Coder Social home page Coder Social logo

espressifapp / espmeshforandroid Goto Github PK

View Code? Open in Web Editor NEW
61.0 61.0 19.0 5.14 MB

ESP-MESH can be thought of as an extension of the Wi-Fi protocol. It combines the advantages of both Wi-Fi and Bluetooth technologies to provide innovative solutions that make you re-think how wireless networks can be built using the same networking equipment. ESP-MESH is developed and maintained by Espressif Corp.

License: Other

HTML 13.95% CSS 13.04% JavaScript 52.93% Java 20.07%

espmeshforandroid's People

Contributors

espressifapp avatar xuxiangjun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

espmeshforandroid's Issues

What IDE did you use fro the ESP Mesh Android

Never mind - I was able to load it in android studio by changing the sdk version to 29
Hello!

What IDE was used for this project ? Android Studio ? what version? I am trying to import with Android Studio 4.1.3 but the configuration and device are not showing up.

Can you give some hints on how to import this?

Thank you

Problems found in version 1.2.3 -

Problems found in version 1.2.3

  1. Do not run properly on machines older than Android 10. The device list do not show up. Version 1.2.0 can run properly on machines as old as Android 5.
  2. The device list cannot scroll up on version 1.2.3. If more than 10 devices exist in the mesh(on my handphone, 11 device exceed the space available to hold all the device in the device list), The device list cannot scroll up. The device list in version 1.2.0 can scroll up properly.

app is not compatible with ble mesh v1.1

I am trying to use it with esp-idf master ble mesh and there is issue with v1.1 compatibility.

  • it is working when EPA is disabled in menuconfig
  • fails to provisioning when EPA is enabled
I (16001) BLE_MESH: Algorithm:   0x01
I (16001) BLE_MESH: Public Key:  0x00
I (16001) BLE_MESH: Auth Method: 0x00
I (16001) BLE_MESH: Auth Action: 0x00
I (16011) BLE_MESH: Auth Size:   0x00
I (16391) BLE_MESH: Remote Random: b1ba3183c5f8e5b372ae31d6ca568d0dcb42bce339658cff3d5dfa07368b03a0
E (16391) BLE_MESH: Invalid confirmation value
E (16401) BLE_MESH: Received:   004f02c852ecd4adff43f3f667480a54cb42bce339658cff3d5dfa07368b03a0
E (16401) BLE_MESH: Calculated: 046606ad1f7c4a4191ef0ea9336b3e4bc3a240354f10d2a7fce8814751c501e2

There is no issue to finish provisioning with nrf mesh, so esp-idf seems to be fine.

PS on color light page, can we change and send hue, saturation and lightness with relevant opcodes (it could help us better test esp-idf firmware)

ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_HUE_SET_UNACK
ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_SATURATION_SET_UNACK
ESP_BLE_MESH_MODEL_OP_LIGHT_LIGHTNESS_SET_UNACK

currently all values are sent with ESP_BLE_MESH_MODEL_OP_LIGHT_HSL_SET_UNACK

Thanks

Add build instructions to README

Thank you for publishing this app as opensource!

Would you mind adding build instructions to the README so that we can generate the APK by ourselves?

关于实时数据交互

希望动态实时采集mesh网络的动态数据(如传感器),请问基于目前框架如何高效实现。
采用http方式定时发送请求,感觉效率太低了,尤其是在一些事件被触发时,采用udp的notice方式感觉不是很靠谱。还望指导。

Question about the postBinUrl

Hi all,

I am using the Mesh App for updating the ESP32 whit OTA, but I found that the device fail to update every time when the username and password is enter to the url.

The postBinUrl seem having error message. The eLog captured as below


2022-02-10 12:29:23.859 21131-21131/h5.espressif.esp32 I/ViewRootImpl@580c9ac[EspWebActivity]: ViewPostIme pointer 0
2022-02-10 12:29:23.942 21131-21131/h5.espressif.esp32 I/ViewRootImpl@580c9ac[EspWebActivity]: ViewPostIme pointer 1
2022-02-10 12:29:23.957 21131-21131/h5.espressif.esp32 D/InputMethodManager: HSIFW - flag : 0
2022-02-10 12:29:23.976 21131-21131/h5.espressif.esp32 D/InputMethodManager: HSIFW - flag : 0
2022-02-10 12:29:24.054 21131-21131/h5.espressif.esp32 I/chromium: [INFO:CONSOLE(368)] "{"bin":"http://test:[email protected]:8000/ESP32Firmware.bin","macs":["7c9ebdf07db4"],"type":3}", source: file:///android_asset/web/app/js/otaInfo.js (368)
2022-02-10 12:29:24.056 21131-25353/h5.espressif.esp32 I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
2022-02-10 12:29:24.056 21131-25353/h5.espressif.esp32 I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
2022-02-10 12:29:24.281 21131-25353/h5.espressif.esp32 D/[EspOTAClientImpl2]: OTA url response code = 500
2022-02-10 12:29:24.282 21131-25353/h5.espressif.esp32 D/[EspOTAClientImpl2]: OTA url response content = {"status_code":-1,"status_msg":"Initialize the upgrade status"}
2022-02-10 12:29:24.282 21131-25353/h5.espressif.esp32 W/[EspOTAClientImpl2]: PostBinUrl failed
2022-02-10 12:29:24.282 21131-25353/h5.espressif.esp32 D/[EspOTAClientImpl2]: close()
2022-02-10 12:29:24.282 21131-25353/h5.espressif.esp32 D/[EspOTAClientImpl2]: OTA thread over
2022-02-10 12:29:24.282 21131-24970/h5.espressif.esp32 I/[AppApiForJSImpl]: onOTAResult: 10.0.1.145 : []
2022-02-10 12:29:24.282 21131-24970/h5.espressif.esp32 D/[EspOTAClientImpl2]: close()
2022-02-10 12:29:24.285 21131-21131/h5.espressif.esp32 I/chromium: [INFO:CONSOLE(435)] "[]", source: file:///android_asset/web/app/js/otaInfo.js (435)
2022-02-10 12:29:25.009 21131-21131/h5.espressif.esp32 I/chromium: [INFO:CONSOLE(390)] "0", source: file:///android_asset/web/app/js/otaInfo.js (390)
2022-02-10 12:29:27.007 21131-21131/h5.espressif.esp32 I/chromium: [INFO:CONSOLE(390)] "0", source: file:///android_asset/web/app/js/otaInfo.js (390)
2022-02-10 12:29:29.007 21131-21131/h5.espressif.esp32 I/chromium: [INFO:CONSOLE(390)] "0", source: file:///android_asset/web/app/js/otaInfo.js (390)
2022-02-10 12:29:31.008 21131-21131/h5.espressif.esp32 I/chromium: [INFO:CONSOLE(390)] "0", source: 

I found that the error message come form the runOTA() function in EspOTAClientlmpl2.java

    private void runOta() {
        mOtaRunning = true;

        mOtaThread = new Thread(() -> {
            if (getOTACallback() != null) {
                runOtaCallback(() -> getOTACallback().onOTAPrepare(EspOTAClientImpl2.this));
            }

            EventBus.getDefault().register(EspOTAClientImpl2.this);

            for (int t = 0; t < 1; t++) {
                if (mBin != null) {
                    if (!postBinData()) {
                        mLog.w("PostBinData failed");
                        continue;
                    }
                } else if (mBinUrl != null) {
                    if (!postBinUrl()) {
                        mLog.w("PostBinUrl failed");
                        continue;
                    }
                } else {
                    mLog.e("Bin and bin url are both null");
                    break;
                }


                if (!checkProgress()) {
                    mLog.w("checkProgress failed");
                    continue;
                }

                if (willRebootAfterOTA()) {
                    otaReboot();
                }
                mLog.d("Check over");
            }

            EventBus.getDefault().unregister(EspOTAClientImpl2.this);
            close();

            if (getOTACallback() != null) {
                runOtaCallback(() -> {
                    List<String> sucMacList = new LinkedList<>();
                    for (Map.Entry<String, Integer> entry : mProgressValues.entrySet()) {
                        if (entry.getValue() == 100) {
                            sucMacList.add(entry.getKey());
                        }
                    }
                    getOTACallback().onOTAResult(EspOTAClientImpl2.this, sucMacList);
                });
            }

            mOtaRunning = false;
            mLog.d("OTA thread over");
        });
        mOtaThread.start();
    }

The target device also don't have any respond

I (5531680) [mesh_utils, 150]: System information, channel: [5/2], layer: 2, self mac: 7c:9e:bd:f0:7d:b4, parent bssid: 4c:75:25:c3:af:e9, parent rssi: -53, node num: 4, free heap: 133504
I (5541680) [mesh_utils, 150]: System information, channel: [5/2], layer: 2, self mac: 7c:9e:bd:f0:7d:b4, parent bssid: 4c:75:25:c3:af:e9, parent rssi: -52, node num: 4, free heap: 133504
I (5551680) [mesh_utils, 150]: System information, channel: [5/2], layer: 2, self mac: 7c:9e:bd:f0:7d:b4, parent bssid: 4c:75:25:c3:af:e9, parent rssi: -51, node num: 4, free heap: 133504
I (5561680) [mesh_utils, 150]: System information, channel: [5/2], layer: 2, self mac: 7c:9e:bd:f0:7d:b4, parent bssid: 4c:75:25:c3:af:e9, parent rssi: -53, node num: 4, free heap: 133504
I (5571680) [mesh_utils, 150]: System information, channel: [5/2], layer: 2, self mac: 7c:9e:bd:f0:7d:b4, parent bssid: 4c:75:25:c3:af:e9, parent rssi: -53, node num: 4, free heap: 133504
I (5581680) [mesh_utils, 150]: System information, channel: [5/2], layer: 2, self mac: 7c:9e:bd:f0:7d:b4, parent bssid: 4c:75:25:c3:af:e9, parent rssi: -52, node num: 4, free heap: 133504
I (5591680) [mesh_utils, 150]: System information, channel: [5/2], layer: 2, self mac: 7c:9e:bd:f0:7d:b4, parent bssid: 4c:75:25:c3:af:e9, parent rssi: -52, node num: 4, free heap: 133504
I (5594817) mesh: 5117<assoc>parent layer:1, channel:5, rssi:-50, assoc:3, rssi threshold<-78,-82,-85>
I (5601680) [mesh_utils, 150]: System information, channel: [5/2], layer: 2, self mac: 7c:9e:bd:f0:7d:b4, parent bssid: 4c:75:25:c3:af:e9, parent rssi: -52, node num: 4, free heap: 133504
I (5611680) [mesh_utils, 150]: System information, channel: [5/2], layer: 2, self mac: 7c:9e:bd:f0:7d:b4, parent bssid: 4c:75:25:c3:af:e9, parent rssi: -54, node num: 4, free heap: 133504
I (5621680) [mesh_utils, 150]: System information, channel: [5/2], layer: 2, self mac: 7c:9e:bd:f0:7d:b4, parent bssid: 4c:75:25:c3:af:e9, parent rssi: -52, node num: 4, free heap: 133504
I (5631680) [mesh_utils, 150]: System information, channel: [5/2], layer: 2, self mac: 7c:9e:bd:f0:7d:b4, parent bssid: 4c:75:25:c3:af:e9, parent rssi: -50, node num: 4, free heap: 133504
I (5641680) [mesh_utils, 150]: System information, channel: [5/2], layer: 2, self mac: 7c:9e:bd:f0:7d:b4, parent bssid: 4c:75:25:c3:af:e9, parent rssi: -51, node num: 4, free heap: 133504
I (5651680) [mesh_utils, 150]: System information, channel: [5/2], layer: 2, self mac: 7c:9e:bd:f0:7d:b4, parent bssid: 4c:75:25:c3:af:e9, parent rssi: -52, node num: 4, free heap: 133504
I (5661680) [mesh_utils, 150]: System information, channel: [5/2], layer: 2, self mac: 7c:9e:bd:f0:7d:b4, parent bssid: 4c:75:25:c3:af:e9, parent rssi: -52, node num: 4, free heap: 133504
I (5671680) [mesh_utils, 150]: System information, channel: [5/2], layer: 2, self mac: 7c:9e:bd:f0:7d:b4, parent bssid: 4c:75:25:c3:af:e9, parent rssi: -53, node num: 4, free heap: 133504
I (5681680) [mesh_utils, 150]: System information, channel: [5/2], layer: 2, self mac: 7c:9e:bd:f0:7d:b4, parent bssid: 4c:75:25:c3:af:e9, parent rssi: -52, node num: 4, free heap: 133504
I (5691680) [mesh_utils, 150]: System information, channel: [5/2], layer: 2, self mac: 7c:9e:bd:f0:7d:b4, parent bssid: 4c:75:25:c3:af:e9, parent rssi: -55, node num: 4, free heap: 133504

Screenshot of the APP as below
Screenshot_20220210-121948_ESP MeshKit

The sever side log

(base) esp32@Mac-Pro build % sauth test testing 10.0.1.93 8000
Serving "/Users/esp32/Firmware/build" directory on http://10.0.1.93:8000
send header
10.0.1.145 - - [10/Feb/2022 12:29:01] "GET /ESP32Firmware.bin HTTP/1.1" 401 -
send header
10.0.1.145 - - [10/Feb/2022 12:29:26] "GET /ESP32Firmware.bin HTTP/1.1" 401 -

Any reason for the app stop the OTA sequence? and checking/adjustment on the firmware or the app or the server is required?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.