Hi,
Currently we are working on stable esp-idf 4.2 version, "Merge branch 'bugfix/ppp_deinit_failure_v4.2' into 'release/v4.2'" for our project.
As of now we are facing some issue of Wifi disconnect issue after esp_restart(); as normally it used to work fine with the lower version but facing issue after porting with our application with 4.2 release version. As of now after esp_restart(); our device get reboot but further it won't connect with Wifi. For better understanding i have attach the Debug logs after restart which are coming internally from wifi components. Would you please let us know if anything is missing or any changes need to do in menuconfig which can fix this issue.
Debug Logs in which issue observed :
[2021-06-21 13:25:51.099] I (2650039) wifi:state: run -> init (0)
[2021-06-21 13:25:51.099] I (2650039) wifi:pm stop, total sleep time: 2261045237 us / 2646044124 us
[2021-06-21 13:25:51.099]
[2021-06-21 13:25:51.099] I (2650039) wifi<10,0>, old:<10,0>, ap:<255,255>, sta:<10,0>, prof:1
[2021-06-21 13:25:51.099] W (2650039) wifi:hmac tx: stop, discard
[2021-06-21 13:25:51.099] W (2650049) wifi:hmac tx: stop, discard
[2021-06-21 13:25:51.099] I event_manager: 295: SYSTEM_EVENT_STA_DISCONNECTED]
[2021-06-21 13:25:51.099]
Debug logs of lower version logs in which device used to get reboot smoothly:
[2021-06-24 19:24:35.702]
[2021-06-24 19:24:45.853] I (4751906) wifi: state: run -> init (0)
[2021-06-24 19:24:45.853] I (4751906) wifi: pm stop, total sleep time: 4302754254 us / 4785137200 us
[2021-06-24 19:24:45.853]
[2021-06-24 19:24:45.853] I (4751906) wifi: n:10 0, o:10 0, ap:255 255, sta:10 0, prof:1
[2021-06-24 19:24:45.853] E middleware_service: 138: Middleware : Connection Lost
[2021-06-24 19:24:45.853]
[2021-06-24 19:24:45.853] I (4751926) wifi: flush txq
[2021-06-24 19:24:45.853] I (4751926) wifi: stop sw txq
[2021-06-24 19:24:45.853] I (4751926) wifi: lmac stop hw txq
[2021-06-24 19:24:45.853] ets Jun 8 2016 00:22:57
[2021-06-24 19:24:45.853]
[2021-06-24 19:24:45.853] rst:0xc (SW_CPU_RESET),boot:0x16 (SPI_FAST_FLASH_BOOT)
[2021-06-24 19:24:45.853] configsip: 0, SPIWP:0xee
[2021-06-24 19:24:45.853] clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[2021-06-24 19:24:45.853] mode:DIO, clock div:2
[2021-06-24 19:24:45.853] load:0x3fff0018,len:4
(WIFI) STA get disconnect after esp_restart() is used.
-
- Posts: 6
- Joined: Fri May 08, 2020 7:18 am
-
- Posts: 1
- Joined: Sat Jun 26, 2021 11:06 am
Re: (WIFI) STA get disconnect after esp_restart() is used.
I have just tested the following code on an ESP32 (DOIT ESP32 DEVKIT V1) void setup() { Serial.begin(115200); WiFi.disconnect(); delay(1000); //Wait for ESP.restart(); } Is is possible to have the STA connected to an Internet-connect AP, so the But as long as I use the default IP, etc., all seems fine.
TargetPayandBenefits Login
TargetPayandBenefits Login
Last edited by ebonythoma on Wed Jun 30, 2021 12:03 pm, edited 1 time in total.
-
- Posts: 6
- Joined: Fri May 08, 2020 7:18 am
Re: (WIFI) STA get disconnect after esp_restart() is used.
Hi, thanks for your reply we have use esp_restart(); on successfully download and then installation of firmware through over the air.
Our device get reboot once firmware is install, but unfortunately device is unable to reboot and further all tasks are suspended and get get due to wifi task is suspended. Would you please let us know if anything is missing or any changes need to do in menuconfig which can fix this issue?
Debug logs:
021-06-25 12:16:02.549] I middleware_service: 208: Middleware Send :: system get_free_heap_size :: 75228
[2021-06-25 12:16:02.549]
[2021-06-25 12:16:02.549] I middleware_service: 209: log message added :: count :: 120
[2021-06-25 12:16:02.549]
[2021-06-25 12:16:02.549] I middleware_service: 211: Log id : 119, Bucket ID : 120
[2021-06-25 12:16:02.659]
[2021-06-25 12:16:02.659] I middleware_service: 213: ===============================================================
[2021-06-25 12:16:02.659]
[2021-06-25 12:16:02.659] I (12:16:02.631) esp_image: segment 0: paddr=0x001e0020 vaddr=0x3f400020 size=0x2cfd8 (184280) map
[2021-06-25 12:16:02.731] I (12:16:02.696) esp_image: segment 1: paddr=0x0020d000 vaddr=0x3ffbdb60 size=0x03018 ( 12312)
[2021-06-25 12:16:02.731] I (12:16:02.703) esp_image: segment 2: paddr=0x00210020 vaddr=0x400d0020 size=0x104910 (1067280) map
[2021-06-25 12:16:03.103] I (12:16:03.055) esp_image: segment 3: paddr=0x00314938 vaddr=0x3ffc0b78 size=0x02cfc ( 11516)
[2021-06-25 12:16:03.103] I (12:16:03.061) esp_image: segment 4: paddr=0x0031763c vaddr=0x40080000 size=0x00404 ( 1028)
[2021-06-25 12:16:03.103] I (12:16:03.065) esp_image: segment 5: paddr=0x00317a48 vaddr=0x40080404 size=0x18ce8 (101608)
[2021-06-25 12:16:03.344] I middleware_service: 93: log delivery successful
[2021-06-25 12:16:03.344]
[2021-06-25 12:16:03.344] I middleware_service: 95: success Log count : 1, Bucket ID : 120
[2021-06-25 12:16:03.344]
[2021-06-25 12:16:03.344] I secure_fota_app.c: 542:
[2021-06-25 12:16:03.344] FOTA update is successfully completed, System is going to reset......
[2021-06-25 12:16:03.344]
[2021-06-25 12:16:13.413] I (1395707) wifi:state: run -> init (0)
[2021-06-25 12:16:13.413] I (1395707) wifi:pm stop, total sleep time: 1097630885 us / 1391815674 us
[2021-06-25 12:16:13.413]
[2021-06-25 12:16:13.413] I (1395707) wifi<3,0>, old:<3,0>, ap:<255,255>, sta:<3,0>, prof:1
[2021-06-25 12:16:13.413] W (1395707) wifi:hmac tx: stop, discard
[2021-06-25 12:16:13.413] W (1395717) wifi:hmac tx: stop, discard
[2021-06-25 12:16:13.413] E middleware_se: 29: 138: Middleware : Connection Lost
[2021-06-25 12:16:13.413]
[2021-06-25 12:16:13.413] I secure_fota_app.c: 196: FOTA TASK : suspend
[2021-06-25 12:16:13.413] 0000/00/00 0:00:00 [WARNING] [kaa_bootstrap_manager.c:625] (-7) - Could not find next Operations access point (protocol: id=0x56C8FF92, version=1)
[2021-06-25 12:16:13.413]
[2021-06-25 12:16:13.413] 0000/00/00 0:00:00 [ERROR] [kaa_tcp_channel.c:325] (-7) - Kaa TCP channel [0x929A2016] error notifying bootstrap manager on access point failure
[2021-06-25 12:16:13.413]
[2021-06-25 12:16:13.413] 0000/00/00 0:00:00 [ERROR] [kaa_client.c:222] (-7) - Failed to process IN event for the client socket 56
[2021-06-25 12:16:13.413]
[2021-06-25 12:16:13.854] I event_manager: 262: SYSTEM_EVENT_STA_STOP
[2021-06-25 12:16:13.854]
[2021-06-25 12:16:46.892] 0000/00/00 0:00:00 [ERROR] [kaa_tcp_channel.c:906] (-101) - Kaa TCP channel new access point [0x929A2016] hostname resolve failed
[2021-06-25 12:16:46.892]
[2021-06-25 12:16:46.892] 0000/00/00 0:00:00 [WARNING] [kaa_bootstrap_manager.c:629] (-7) - Could not find next Bootstrap access point (protocol: id=0x56C8FF92, version=1)
[2021-06-25 12:16:46.892]
[2021-06-25 12:16:46.892] 0000/00/00 0:00:00 [ERROR] [kaa_tcp_channel.c:325] (-7) - Kaa TCP channel [0x929A2016] error notifying bootstrap manager on access point failure
[2021-06-25 12:16:46.892]
[2021-06-25 12:16:46.892] 0000/00/00 0:00:00 [ERROR] [kaa_client.c:260] (-7) - Failed to connect channel [0x65EBED8C]
[2021-06-25 12:16:46.892]
[2021-06-25 12:17:20.891] 0000/00/00 0:00:00 [ERROR] [kaa_tcp_channel.c:906] (-101) - Kaa TCP channel new access point [0x929A2016] hostname resolve failed
[2021-06-25 12:17:20.891]
[2021-06-25 12:17:20.891] 0000/00/00 0:00:00 [WARNING] [kaa_bootstrap_manager.c:629] (-7) - Could not find next Bootstrap access point (protocol: id=0x56C8FF92, version=1)
[2021-06-25 12:17:20.891]
Our device get reboot once firmware is install, but unfortunately device is unable to reboot and further all tasks are suspended and get get due to wifi task is suspended. Would you please let us know if anything is missing or any changes need to do in menuconfig which can fix this issue?
Debug logs:
021-06-25 12:16:02.549] I middleware_service: 208: Middleware Send :: system get_free_heap_size :: 75228
[2021-06-25 12:16:02.549]
[2021-06-25 12:16:02.549] I middleware_service: 209: log message added :: count :: 120
[2021-06-25 12:16:02.549]
[2021-06-25 12:16:02.549] I middleware_service: 211: Log id : 119, Bucket ID : 120
[2021-06-25 12:16:02.659]
[2021-06-25 12:16:02.659] I middleware_service: 213: ===============================================================
[2021-06-25 12:16:02.659]
[2021-06-25 12:16:02.659] I (12:16:02.631) esp_image: segment 0: paddr=0x001e0020 vaddr=0x3f400020 size=0x2cfd8 (184280) map
[2021-06-25 12:16:02.731] I (12:16:02.696) esp_image: segment 1: paddr=0x0020d000 vaddr=0x3ffbdb60 size=0x03018 ( 12312)
[2021-06-25 12:16:02.731] I (12:16:02.703) esp_image: segment 2: paddr=0x00210020 vaddr=0x400d0020 size=0x104910 (1067280) map
[2021-06-25 12:16:03.103] I (12:16:03.055) esp_image: segment 3: paddr=0x00314938 vaddr=0x3ffc0b78 size=0x02cfc ( 11516)
[2021-06-25 12:16:03.103] I (12:16:03.061) esp_image: segment 4: paddr=0x0031763c vaddr=0x40080000 size=0x00404 ( 1028)
[2021-06-25 12:16:03.103] I (12:16:03.065) esp_image: segment 5: paddr=0x00317a48 vaddr=0x40080404 size=0x18ce8 (101608)
[2021-06-25 12:16:03.344] I middleware_service: 93: log delivery successful
[2021-06-25 12:16:03.344]
[2021-06-25 12:16:03.344] I middleware_service: 95: success Log count : 1, Bucket ID : 120
[2021-06-25 12:16:03.344]
[2021-06-25 12:16:03.344] I secure_fota_app.c: 542:
[2021-06-25 12:16:03.344] FOTA update is successfully completed, System is going to reset......
[2021-06-25 12:16:03.344]
[2021-06-25 12:16:13.413] I (1395707) wifi:state: run -> init (0)
[2021-06-25 12:16:13.413] I (1395707) wifi:pm stop, total sleep time: 1097630885 us / 1391815674 us
[2021-06-25 12:16:13.413]
[2021-06-25 12:16:13.413] I (1395707) wifi<3,0>, old:<3,0>, ap:<255,255>, sta:<3,0>, prof:1
[2021-06-25 12:16:13.413] W (1395707) wifi:hmac tx: stop, discard
[2021-06-25 12:16:13.413] W (1395717) wifi:hmac tx: stop, discard
[2021-06-25 12:16:13.413] E middleware_se: 29: 138: Middleware : Connection Lost
[2021-06-25 12:16:13.413]
[2021-06-25 12:16:13.413] I secure_fota_app.c: 196: FOTA TASK : suspend
[2021-06-25 12:16:13.413] 0000/00/00 0:00:00 [WARNING] [kaa_bootstrap_manager.c:625] (-7) - Could not find next Operations access point (protocol: id=0x56C8FF92, version=1)
[2021-06-25 12:16:13.413]
[2021-06-25 12:16:13.413] 0000/00/00 0:00:00 [ERROR] [kaa_tcp_channel.c:325] (-7) - Kaa TCP channel [0x929A2016] error notifying bootstrap manager on access point failure
[2021-06-25 12:16:13.413]
[2021-06-25 12:16:13.413] 0000/00/00 0:00:00 [ERROR] [kaa_client.c:222] (-7) - Failed to process IN event for the client socket 56
[2021-06-25 12:16:13.413]
[2021-06-25 12:16:13.854] I event_manager: 262: SYSTEM_EVENT_STA_STOP
[2021-06-25 12:16:13.854]
[2021-06-25 12:16:46.892] 0000/00/00 0:00:00 [ERROR] [kaa_tcp_channel.c:906] (-101) - Kaa TCP channel new access point [0x929A2016] hostname resolve failed
[2021-06-25 12:16:46.892]
[2021-06-25 12:16:46.892] 0000/00/00 0:00:00 [WARNING] [kaa_bootstrap_manager.c:629] (-7) - Could not find next Bootstrap access point (protocol: id=0x56C8FF92, version=1)
[2021-06-25 12:16:46.892]
[2021-06-25 12:16:46.892] 0000/00/00 0:00:00 [ERROR] [kaa_tcp_channel.c:325] (-7) - Kaa TCP channel [0x929A2016] error notifying bootstrap manager on access point failure
[2021-06-25 12:16:46.892]
[2021-06-25 12:16:46.892] 0000/00/00 0:00:00 [ERROR] [kaa_client.c:260] (-7) - Failed to connect channel [0x65EBED8C]
[2021-06-25 12:16:46.892]
[2021-06-25 12:17:20.891] 0000/00/00 0:00:00 [ERROR] [kaa_tcp_channel.c:906] (-101) - Kaa TCP channel new access point [0x929A2016] hostname resolve failed
[2021-06-25 12:17:20.891]
[2021-06-25 12:17:20.891] 0000/00/00 0:00:00 [WARNING] [kaa_bootstrap_manager.c:629] (-7) - Could not find next Bootstrap access point (protocol: id=0x56C8FF92, version=1)
[2021-06-25 12:17:20.891]
-
- Posts: 6
- Joined: Fri May 08, 2020 7:18 am
Re: (WIFI) STA get disconnect after esp_restart() is used.
-When we tried to find out the Wifi disconnection issue we got reason as 8 i.e (WIFI_REASON_ASSOC_LEAVE = 8).
-Still we are facing issue if you have some solution for this then let us know.
Thanks in advance,
Jayshree Shivalkar.
-Still we are facing issue if you have some solution for this then let us know.
Thanks in advance,
Jayshree Shivalkar.
-
- Posts: 6
- Joined: Fri May 08, 2020 7:18 am
Re: (WIFI) STA get disconnect after esp_restart() is used.
-We are not disconnecting Wifi before restart. Because once device get restart it should automatically need to connect with Wifi and notify user about Firmare been updated.ebonythoma wrote: ↑Sat Jun 26, 2021 11:12 amI have just tested the following code on an ESP32 (DOIT ESP32 DEVKIT V1) void setup() { Serial.begin(115200); WiFi.disconnect(); delay(1000); //Wait for ESP.restart(); } Is is possible to have the STA connected to an Internet-connect AP, so the But as long as I use the default IP, etc., all seems fine.
TargetPayandBenefits Login
-Please try to restart and check without Wifi disconnection.
Who is online
Users browsing this forum: No registered users and 84 guests