Open cvonk opened 2 years ago
Hi @cvonk ,
Have you tried sending custom data (MQTT config) before Wi-Fi credential from phone app ? Can you also check return codes of your endpoint create and register calls ?
As I recall it sends the MQTT cfg first before connecting wifi. Sorry no details as I am on the road right now.
On Mon, Jun 27, 2022, 00:01 Khushbu Shah @.***> wrote:
Hi @cvonk https://github.com/cvonk ,
Have you tried sending custom data (MQTT config) before Wi-Fi credential from phone app ? Can you also check return codes of your endpoint create and register calls ?
— Reply to this email directly, view it on GitHub https://github.com/espressif/esp-idf-provisioning-android/issues/60#issuecomment-1166957611, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACKIDGX3ZVIP2IW7ROH6FBTVRFGWDANCNFSM5SJ2VCCA . You are receiving this because you were mentioned.Message ID: @.***>
I am using BLE to provision an ESP32 device. It is nice that the BLE connection stays active while the device goes through its paces of connecting to e.g. Wi-Fi.
For my current application, I do not only need to provision the WiFi config, but also need to config and send and apply MQTT config. I succeeded to pass this MQTT config to an additional endpoint as described here. I do this before the Wi-Fi config is passed or applied.
Similar to how the WiFi configuration gets sent and applied, I would like to apply the MQTT config by having the device connect to the MQTT broker. So, I created and registered a second custom endpoint.
where
However, applying the MQTT config, can only be done once the devices establishes its Wi-Fi connection. In other words until after the
ApplyConfig()
.The documentation says
So, on the device I added a call to
wifi_prov_mgr_disable_auto_stop()
. Now, the GATT connection stays active. However, my this endpoint still doesn't receive the data send from my modified android phone app. However, in the Android Studio debugger, I see that the phone app sends the information to the correct endpoint.Can you shed some light on this issue? Thanks.
FYI a similar issue will arise if you want to wait for the device to download e.g. an OTA update. It also needs the Wi-Fi connection established, and it would be great it the phone app would be able to show the progress.