Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIFI: Coexist: Wi-Fi connect fail, apply reconnect coex policy (IDFGH-12809) #13785

Closed
3 tasks done
matt-wood-ct opened this issue May 12, 2024 · 3 comments
Closed
3 tasks done
Assignees
Labels
Resolution: Won't Do This will not be worked on Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@matt-wood-ct
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.2.1-443-g2ba5320112

Espressif SoC revision.

ESP32-C3-MINI-1 (rev v0.4)

Operating System used.

Linux

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

None

Development Kit.

Custom Board

Power Supply used.

External 3.3V

What is the expected behavior?

Stable wifi connection in all cases

What is the actual behavior?

When connected to certain SSID the unit it prints:

I (5709) wifi:Coexist: Wi-Fi connect fail, apply reconnect coex policy

I (5709) wifi:flush txq
I (5709) wifi:stop sw txq
I (5709) wifi:lmac stop hw txq

Then crashes, rst reason shown as follows:

ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0xc (RTC_SW_CPU_RST),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x403806bc
SPIWP:0xee
mode:DIO, clock div:1

Steps to reproduce.

Cannot share code as it contains confidential information, the application consists of BLE mesh models and Wi-Fi usage, both controlled via a UART interface using custom AT like commands.

Debug Logs.

ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0xc (RTC_SW_CPU_RST),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x403806bc
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5820,len:0x1738
load:0x403cc710,len:0xb9c
load:0x403ce710,len:0x2ebc
entry 0x403cc71a
I (35) boot: ESP-IDF v5.2.1-393-gea967cf2fb 2nd stage bootloader
I (35) boot: compile time Apr 23 2024 14:27:35
I (36) boot: chip revision: v0.4
I (39) boot.esp32c3: SPI Speed      : 80MHz
I (44) boot.esp32c3: SPI Mode       : DIO
I (49) boot.esp32c3: SPI Flash Size : 4MB
I (54) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (63) boot: ## Label            Usage          Type ST Offset   Length
I (70) boot:  0 nvs              WiFi data        01 02 00009000 00003000
I (77) boot:  1 mesh_nvs         WiFi data        01 02 0000c000 00003000
I (85) boot:  2 phy_init         RF data          01 01 0000f000 00001000
I (92) boot:  3 factory          factory app      00 00 00010000 003f0000
I (100) boot: End of partition table
I (104) esp_image: segment 0: paddr=00010020 vaddr=3c170020 size=64d78h (413048) map
I (177) esp_image: segment 1: paddr=00074da0 vaddr=3fc96c00 size=04a68h ( 19048) load
I (181) esp_image: segment 2: paddr=00079810 vaddr=40380000 size=06808h ( 26632) load
I (188) esp_image: segment 3: paddr=00080020 vaddr=42000020 size=16d844h (1497156) map
I (425) esp_image: segment 4: paddr=001ed86c vaddr=40386808 size=103bch ( 66492) load
I (446) boot: Loaded app from partition at offset 0x10000
I (446) boot: Disabling RNG early entropy source...
I (458) cpu_start: Unicore app
I (466) cpu_start: Pro cpu start user code
I (466) cpu_start: cpu freq: 160000000 Hz
I (466) cpu_start: Application information:
I (469) cpu_start: Project name:     nls_hub_esp_firmware
I (475) cpu_start: App version:      0.1.29
I (480) cpu_start: Compile time:     Apr 24 2024 11:25:44
I (486) cpu_start: ELF file SHA256:  2c5656cb6...
I (492) cpu_start: ESP-IDF:          v5.2.1-443-g2ba5320112
I (498) cpu_start: Min chip rev:     v0.3
I (503) cpu_start: Max chip rev:     v1.99
I (508) cpu_start: Chip rev:         v0.4
I (512) heap_init: Initializing. RAM available for dynamic allocation:
I (520) heap_init: At 3FCAF4D0 len 00010B30 (66 KiB): RAM
I (526) heap_init: At 3FCC0000 len 0001C710 (113 KiB): Retention RAM
I (533) heap_init: At 3FCDC710 len 00002950 (10 KiB): Retention RAM
I (540) heap_init: At 50000010 len 00001FD8 (7 KiB): RTCRAM
I (547) spi_flash: detected chip: generic
I (550) spi_flash: flash io: dio
I (555) sleep: Configure to isolate all GPIO pins in sleep state
I (561) sleep: Enable automatic switching of GPIO sleep configuration
I (568) coexist: coex firmware version: d96c1e51f
I (574) coexist: coexist rom version 9387209
I (579) main_task: Started on CPU0
I (579) main_task: Calling app_main()
I (579) lascor_nvs: Initializing NVS ...
I (599) BLE_INIT: BT controller compile version [c23ab4c]
I (599) BLE_INIT: Bluetooth MAC: d4:f9:8d:33:03:6e
I (599) phy_init: phy_version 1160,d532aa4,Mar 27 2024,18:55:22
I (659) bmns_mesh_nvs: Open namespace done, name "bmns_mesh_nvs"
Bluetooth Mesh v1.1 commit: [10f7fdc1a9]
I (729) bmns_init: ESP_BLE_MESH_PROV_REGISTER_COMP_EVT, err_code 0
I (729) bmns_init: ESP_BLE_MESH_PROVISIONER_SET_DEV_UUID_MATCH_COMP_EVT, err_code 0
I (739) bmns_init: ESP_BLE_MESH_PROVISIONER_PROV_ENABLE_COMP_EVT, err_code 0
I (739) bmns_init: ESP_BLE_MESH_PROVISIONER_ADD_LOCAL_APP_KEY_COMP_EVT, err_code 0
I (749) bmns_init: ESP_BLE_MESH_PROVISIONER_BIND_APP_KEY_TO_MODEL_COMP_EVT, err_code 0
I (759) bmns_init: ESP BLE Mesh Provisioner initialized
I (759) bmns_init: ********************** Node Information Start **********************
I (769) bmns_init: ********************** Node Information End **********************
I (779) pp: pp rom version: 9387209
I (789) net80211: net80211 rom version: 9387209
I (799) wifi:wifi driver task: 3fcca67c, prio:23, stack:6656, core=0
I (799) wifi:wifi firmware version: fb857e9
I (799) wifi:wifi certification version: v7.0
I (799) wifi:config NVS flash: enabled
I (809) wifi:config nano formating: disabled
I (809) wifi:Init data frame dynamic rx buffer num: 32
I (819) wifi:Init static rx mgmt buffer num: 5
I (819) wifi:Init management short buffer num: 32
I (829) wifi:Init dynamic tx buffer num: 32
I (829) wifi:Init static tx FG buffer num: 2
I (829) wifi:Init static rx buffer size: 1600
I (839) wifi:Init static rx buffer num: 10
I (839) wifi:Init dynamic rx buffer num: 32
I (849) wifi_init: rx ba win: 6
I (849) wifi_init: tcpip mbox: 32
I (849) wifi_init: udp mbox: 6
I (859) wifi_init: tcp mbox: 6
I (859) wifi_init: tcp tx win: 5760
I (859) wifi_init: tcp rx win: 5760
I (869) wifi_init: tcp mss: 1440
I (869) wifi_init: WiFi IRAM OP enabled
I (879) wifi_init: WiFi RX IRAM OP enabled
I (879) wifi:mode : sta (d4:f9:8d:33:03:6c)
I (889) wifi:enable tsf
I (899) AT-WIFI: Set CIP MUX mode to 1
I (899) AT-WIFI: Auto connect changed to 0
I (909) main_task: Returned from app_main()
I (5709) wifi:Coexist: Wi-Fi connect fail, apply reconnect coex policy

I (5709) wifi:flush txq
I (5709) wifi:stop sw txq
I (5709) wifi:lmac stop hw txq
ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0xc (RTC_SW_CPU_RST),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x403806bc
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5820,len:0x1738
load:0x403cc710,len:0xb9c
load:0x403ce710,len:0x2ebc
entry 0x403cc71a
I (35) boot: ESP-IDF v5.2.1-393-gea967cf2fb 2nd stage bootloader
I (35) boot: compile time Apr 23 2024 14:27:35
I (36) boot: chip revision: v0.4
I (39) boot.esp32c3: SPI Speed      : 80MHz
I (44) boot.esp32c3: SPI Mode       : DIO
I (49) boot.esp32c3: SPI Flash Size : 4MB
I (54) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (63) boot: ## Label            Usage          Type ST Offset   Length
I (70) boot:  0 nvs              WiFi data        01 02 00009000 00003000
I (77) boot:  1 mesh_nvs         WiFi data        01 02 0000c000 00003000
I (85) boot:  2 phy_init         RF data          01 01 0000f000 00001000
I (92) boot:  3 factory          factory app      00 00 00010000 003f0000
I (100) boot: End of partition table
I (104) esp_image: segment 0: paddr=00010020 vaddr=3c170020 size=64d78h (413048) map
I (177) esp_image: segment 1: paddr=00074da0 vaddr=3fc96c00 size=04a68h ( 19048) load
I (181) esp_image: segment 2: paddr=00079810 vaddr=40380000 size=06808h ( 26632) load
I (188) esp_image: segment 3: paddr=00080020 vaddr=42000020 size=16d844h (1497156) map
I (425) esp_image: segment 4: paddr=001ed86c vaddr=40386808 size=103bch ( 66492) load
I (446) boot: Loaded app from partition at offset 0x10000
I (446) boot: Disabling RNG early entropy source...
I (458) cpu_start: Unicore app
I (466) cpu_start: Pro cpu start user code
I (466) cpu_start: cpu freq: 160000000 Hz
I (466) cpu_start: Application information:
I (469) cpu_start: Project name:     nls_hub_esp_firmware
I (475) cpu_start: App version:      0.1.29
I (480) cpu_start: Compile time:     Apr 24 2024 11:25:44
I (486) cpu_start: ELF file SHA256:  2c5656cb6...
I (492) cpu_start: ESP-IDF:          v5.2.1-443-g2ba5320112
I (498) cpu_start: Min chip rev:     v0.3
I (503) cpu_start: Max chip rev:     v1.99
I (508) cpu_start: Chip rev:         v0.4
I (512) heap_init: Initializing. RAM available for dynamic allocation:
I (520) heap_init: At 3FCAF4D0 len 00010B30 (66 KiB): RAM
I (526) heap_init: At 3FCC0000 len 0001C710 (113 KiB): Retention RAM
I (533) heap_init: At 3FCDC710 len 00002950 (10 KiB): Retention RAM
I (540) heap_init: At 50000010 len 00001FD8 (7 KiB): RTCRAM
I (547) spi_flash: detected chip: generic
I (550) spi_flash: flash io: dio
I (555) sleep: Configure to isolate all GPIO pins in sleep state
I (561) sleep: Enable automatic switching of GPIO sleep configuration
I (568) coexist: coex firmware version: d96c1e51f
I (574) coexist: coexist rom version 9387209
I (579) main_task: Started on CPU0
I (579) main_task: Calling app_main()
I (579) lascor_nvs: Initializing NVS ...
I (599) BLE_INIT: BT controller compile version [c23ab4c]
I (599) BLE_INIT: Bluetooth MAC: d4:f9:8d:33:03:6e
I (599) phy_init: phy_version 1160,d532aa4,Mar 27 2024,18:55:22
I (659) bmns_mesh_nvs: Open namespace done, name "bmns_mesh_nvs"
Bluetooth Mesh v1.1 commit: [10f7fdc1a9]
I (729) bmns_init: ESP_BLE_MESH_PROV_REGISTER_COMP_EVT, err_code 0
I (729) bmns_init: ESP_BLE_MESH_PROVISIONER_SET_DEV_UUID_MATCH_COMP_EVT, err_code 0
I (739) bmns_init: ESP_BLE_MESH_PROVISIONER_PROV_ENABLE_COMP_EVT, err_code 0
I (739) bmns_init: ESP_BLE_MESH_PROVISIONER_ADD_LOCAL_APP_KEY_COMP_EVT, err_code 0
I (749) bmns_init: ESP_BLE_MESH_PROVISIONER_BIND_APP_KEY_TO_MODEL_COMP_EVT, err_code 0
I (759) bmns_init: ESP BLE Mesh Provisioner initialized
I (759) bmns_init: ********************** Node Information Start **********************
I (769) bmns_init: ********************** Node Information End **********************
I (779) pp: pp rom version: 9387209
I (789) net80211: net80211 rom version: 9387209
I (799) wifi:wifi driver task: 3fcca67c, prio:23, stack:6656, core=0
I (799) wifi:wifi firmware version: fb857e9
I (799) wifi:wifi certification version: v7.0
I (799) wifi:config NVS flash: enabled
I (809) wifi:config nano formating: disabled
I (809) wifi:Init data frame dynamic rx buffer num: 32
I (819) wifi:Init static rx mgmt buffer num: 5
I (819) wifi:Init management short buffer num: 32
I (829) wifi:Init dynamic tx buffer num: 32
I (829) wifi:Init static tx FG buffer num: 2
I (829) wifi:Init static rx buffer size: 1600
I (839) wifi:Init static rx buffer num: 10
I (839) wifi:Init dynamic rx buffer num: 32
I (849) wifi_init: rx ba win: 6
I (849) wifi_init: tcpip mbox: 32
I (849) wifi_init: udp mbox: 6
I (859) wifi_init: tcp mbox: 6
I (859) wifi_init: tcp tx win: 5760
I (859) wifi_init: tcp rx win: 5760
I (869) wifi_init: tcp mss: 1440
I (869) wifi_init: WiFi IRAM OP enabled
I (879) wifi_init: WiFi RX IRAM OP enabled
I (879) wifi:mode : sta (d4:f9:8d:33:03:6c)
I (889) wifi:enable tsf
I (899) AT-WIFI: Set CIP MUX mode to 1
I (899) AT-WIFI: Auto connect changed to 0
I (909) main_task: Returned from app_main()
I (5709) wifi:Coexist: Wi-Fi connect fail, apply reconnect coex policy

I (5709) wifi:flush txq
I (5709) wifi:stop sw txq
I (5709) wifi:lmac stop hw txq
ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0xc (RTC_SW_CPU_RST),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x403806bc
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5820,len:0x1738
load:0x403cc710,len:0xb9c
load:0x403ce710,len:0x2ebc
entry 0x403cc71a
I (35) boot: ESP-IDF v5.2.1-393-gea967cf2fb 2nd stage bootloader
I (35) boot: compile time Apr 23 2024 14:27:35
I (36) boot: chip revision: v0.4
I (39) boot.esp32c3: SPI Speed      : 80MHz
I (44) boot.esp32c3: SPI Mode       : DIO
I (49) boot.esp32c3: SPI Flash Size : 4MB
I (54) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (63) boot: ## Label            Usage          Type ST Offset   Length
I (70) boot:  0 nvs              WiFi data        01 02 00009000 00003000
I (77) boot:  1 mesh_nvs         WiFi data        01 02 0000c000 00003000
I (85) boot:  2 phy_init         RF data          01 01 0000f000 00001000
I (92) boot:  3 factory          factory app      00 00 00010000 003f0000
I (100) boot: End of partition table
I (104) esp_image: segment 0: paddr=00010020 vaddr=3c170020 size=64d78h (413048) map
I (177) esp_image: segment 1: paddr=00074da0 vaddr=3fc96c00 size=04a68h ( 19048) load
I (181) esp_image: segment 2: paddr=00079810 vaddr=40380000 size=06808h ( 26632) load
I (188) esp_image: segment 3: paddr=00080020 vaddr=42000020 size=16d844h (1497156) map
I (425) esp_image: segment 4: paddr=001ed86c vaddr=40386808 size=103bch ( 66492) load
I (446) boot: Loaded app from partition at offset 0x10000
I (446) boot: Disabling RNG early entropy source...
I (458) cpu_start: Unicore app
I (466) cpu_start: Pro cpu start user code

More Information.

Once this state occurs the only way to get out of boot looping is to disconnect wifi, once that is done it recovers.

I have attempted to research this error which comes out of the wifi module

 wifi:Coexist: Wi-Fi connect fail, apply reconnect coex policy

But it appears no one else is getting it/talking about it

@matt-wood-ct matt-wood-ct added the Type: Bug bugs in IDF label May 12, 2024
@espressif-bot espressif-bot added the Status: Opened Issue is new label May 12, 2024
@github-actions github-actions bot changed the title WIFI: Coexist: Wi-Fi connect fail, apply reconnect coex policy WIFI: Coexist: Wi-Fi connect fail, apply reconnect coex policy (IDFGH-12809) May 12, 2024
@Espressif-liuuuu
Copy link
Collaborator

Hi @matt-wood-ct , thanks for your report
There is nothing special for the log wifi:Coexist: Wi-Fi connect fail, apply reconnect coex policy. It just notes that Wi-Fi falied to establish connection when coexists with BT, and coexist connecting policy will be applied for the next connect.

The log
I (5709) wifi:flush txq I (5709) wifi:stop sw txq I (5709) wifi:lmac stop hw txq
belongs to Wi-Fi stop process. I think you may decide to stop/restart Wi-Fi or do something reboot when you receive Wi-Fi disconnection event in your application, and something goes wrong during that.

Maybe you could help check the exact behaviour when handling Wi-Fi disconnecting event, and we will able to see if any issue there.

@Espressif-liuuuu
Copy link
Collaborator

Furthermore, may I get the elf file of the application? We could check the PC value in reset log.

@matt-wood-ct
Copy link
Author

Furthermore, may I get the elf file of the application? We could check the PC value in reset log.

Thanks for looking at this, I have realised you are correct, it was a mistake in my code where I mistakenly software rebooted because I thought the state was unrecoverable.

@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: Won't Do This will not be worked on and removed Status: Opened Issue is new labels May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Won't Do This will not be worked on Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

3 participants