espressif / esp-rainmaker

ESP RainMaker Agent for firmware development
Apache License 2.0
453 stars 152 forks source link

Cannot provision new device (MEGH-3641) #134

Open homonto opened 2 years ago

homonto commented 2 years ago

So I am trying ESP32-S2 and when trying to provision I am getting errors on the application (serial monitor shows lots of data): Screenshot_20220710-161654_ESP RainMaker Screenshot_20220710-161643_Settings Screenshot_20220710-161547_ESP RainMaker

Screenshot 2022-07-10 at 16 21 20

Similar with ESP32-S3:

Screenshot 2022-07-10 at 16 32 59

however both work once used the example on Arduino

manuferro commented 2 years ago

I've a very similar problem after the updating all at last release (esp-idf, esp-rainmaker, esp-rainmaker-android) before it was working


D (45072) httpd_txrx: httpd_unrecv: length = 43
D (45072) httpd_parse: pause_parsing: paused
D (45082) httpd_parse: cb_on_body: body begins
D (45082) httpd_parse: httpd_parse_req: parsing complete
D (45092) httpd_uri: httpd_uri: request for /prov-session with type 3
D (45092) httpd_uri: httpd_find_uri_handler: [0] = /proto-ver
D (45102) httpd_uri: httpd_find_uri_handler: [1] = /prov-session
D (45102) protocomm_httpd: Received cookie session=1643257416
D (45112) protocomm_httpd: Continuing Session 1643257416
D (45122) httpd_txrx: httpd_req_recv: remaining length = 43
D (45122) httpd_txrx: httpd_recv_with_opt: requested length = 43
D (45132) httpd_txrx: httpd_recv_with_opt: pending length = 43
D (45132) httpd_txrx: httpd_req_recv: received length = 43
D (45142) security1: Request to handle setup1_command
D (45142) security1: Client verifier:
D (45152) security1: 1d c7 54 2c ba 27 01 e8 03 bd 4b 1c f4 5e 25 3d
D (45152) security1: cf 09 90 1a 1c df 61 ab da c0 88 28 c7 79 39 ec
D (45162) security1: Dec Client verifier:
D (45162) security1: da d0 d6 7b 2f 57 f1 cd ed 6b 22 f0 0a 21 56 73
D (45172) security1: aa 72 d9 f3 7c f1 d4 27 f9 d4 43 9a 42 d0 07 72
E (45182) security1: Key mismatch. Close connection
D (45182) event: running post RTC_STORE_EVENT:1 with handler 0x400e7a60 and context 0x3ffd70c4 on loop 0x3ffcad74
E (45182) security1: Session setup error -1
D (45192) event: running post RTC_STORE_EVENT:0 with handler 0x400e7a60 and context 0x3ffd70c4 on loop 0x3ffcad74
D (45212) event: running post RTC_STORE_EVENT:1 with handler 0x400e7a60 and context 0x3ffd70c4 on loop 0x3ffcad74
D (45202) protocomm: SEC_EP Req handler returned -1
D (45222) event: running post RTC_STORE_EVENT:0 with handler 0x400e7a60 and context 0x3ffd70c4 on loop 0x3ffcad74
E (45222) protocomm_httpd: Data handler failed
W (45242) httpd_uri: httpd_uri: uri handler execution failed
D (45232) event: running post RTC_STORE_EVENT:1 with handler 0x400e7a60 and context 0x3ffd70c4 on loop 0x3ffcad74
D (45252) httpd_sess: httpd_sess_delete: fd = 57
D (45262) event: running post RTC_STORE_EVENT:0 with handler 0x400e7a60 and context 0x3ffd70c4 on loop 0x3ffcad74
D (45262) httpd_sess: httpd_sess_delete: active sockets: 0
shahpiyushv commented 2 years ago

@homonto , for your issue with esp32s2, I think your phone's Wi-Fi settings may be causing it to disconnect from the esp32s2 as the phone would not be getting Internet on that Wi-Fi interface. Typically, the OS gives a popup asking if you want to stay connected to the Wi-Fi. Do you get that popup?

Meanwhile, I would suggesting using the release/v4.4 branch of esp-idf and ensuring that all submodules are in sync using git submodule update --init --recursive.

For your issue @manuferro , can you double check that the PoP you are providing is correct?

manuferro commented 2 years ago

Pop is inserted correctly (QR, manually, softAP, BLE). (also if is not recognized correctly) Switching back on esp-idf 4.4 it's working.

Thansk