-
Notifications
You must be signed in to change notification settings - Fork 56
Received only 20 bytes #107
Comments
This is a demo I adapted based on the examples\bluetooth\nimble\bleprph example on esp32. You can refer to this example to improve ble_wrapper.c and adapt it to esp32. You can also try running this demo first before improving ble_wrapper.c. Wifi provisioning needs to work in conjunction with the Tuya Smart App to obtain the WiFi SSID and password. The screenshot below shows the log when running normally. |
@shiliu-yang how you get UUID for your device? I am using Tuyalink base solution. |
You need to get the license list, the following 2 documents will help you |
Okay, I have raised ticket for getting UUID. It can be obtained from Device Details generated file. |
@shiliu-yang How you get the AUTH KEY? We have only device secret which is 16bits length instead of 32bits. |
|
Hi,
Thanks |
@toyokomi Do you finish implementation Wifi provisioning for Tuyalink? |
@xmow49 I see you coding TICMeter project. |
Hi, Yes, I successfully do the paring with the tuya app using BLE, the device is automatically detected by the app. |
I try your code with ESP32, but after wifi information set, the ESP connected to internet it could not show online in the Smartlife/Tuya app. It show error:
Your project a bit complicate, I try your project with ESP32-C6 too but it boot loop, Can you test with the https://github.com/tuya/tuya-connect-kit-for-mqtt-embedded-c/tree/without-submodules/examples/wifi_provisioning_demo ? I spent many hour but still failed. |
The demo works with the tuya lib on my project because I use also the try on your side to create a new esp idf project, in the "components" folder clone my tuya lib Next in the main.c you can use the provisioning example as an example to test the lib and the provisioning. (copy the content of the main file into your main.c and rename the |
Thank you, it is OK now, but I merged original lib with change from https://github.com/accabog/esp32_tuya and using your ble_wrapper.c and it work. Your original component show error when connect to the server with my ESP32. |
@dzungpv I have succeed in developing pairing process. I am able to pair device with Tuya app and send data to Tuya service. |
I have it working too. But take much effort. Better Tuya must release a dedicate SDK base on the ESP IDF or public all the api so we can build on top of it. For example in the ESP IDF they have stable wifi_provisioning lib: https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/provisioning/wifi_provisioning.html. @shiliu-yang @flyingcys you should look at this. |
Right now I am porting code to ESP32 but there is one problem with Wifi provisioning that device is receiving data which is 20 bytes only. From code it looks like we should receive more.
The text was updated successfully, but these errors were encountered: