EspressifApp / EsptouchForAndroid

EspTouch is one way for Android Phone to tell the connected Router's Ssid, Password and etc. to make IOT devices to connect to the same Router. EspTouch is developed and maintained by Espressif Corp.
Other
1.03k stars 461 forks source link

how to get custom data from phone to esp32 via ESPTouch V2 #94

Open vominhmanh opened 1 year ago

vominhmanh commented 1 year ago

on the app ESP Touch on tab ESPTouch V2, I see an input for custom data , but on ESP32, I don't find out any function to get it. Can you show me function to get it, thanks. image

edg2411 commented 1 year ago

Hi you can try something like this uint8_t rvd_data[33] = { 0 }; if (info.sc_got_ssid_pswd.type == SC_TYPE_ESPTOUCH_V2) { ESP_ERROR_CHECK( esp_smartconfig_get_rvd_data(rvd_data, sizeof(rvd_data)) ); } then you can use rvd_data elsewhere