[ESP32-C6][WiFi & BLE cohex] assert failed: tcpip_inpkt /IDF/components/lwip/lwip/src/api/tcpip.c:252 (Invalid mbox)

cassianocampes
Posts: 9
Joined: Sun Jun 04, 2023 11:19 pm

[ESP32-C6][WiFi & BLE cohex] assert failed: tcpip_inpkt /IDF/components/lwip/lwip/src/api/tcpip.c:252 (Invalid mbox)

Postby cassianocampes » Mon Aug 07, 2023 6:38 pm

I am trying to create a firmware that does the following (it is a kind of wifi provisioning via BLE):

1. Start the ESP32-C6 module
2. Execute a Wifi scan
3. Save the wifi SSIDs found in a "local cache"
4. If I hold the push-button for 5 seconds, the the ESP32-C6 starts the BLE
5. Then, using the "nRF Connect" Android APP, I Send the SSID and Password to connect to the WiFi
6. The ESP32-C6 receives the SSID and PASSWORD correctly
7. Then, I use this information to connect to that WiFi

And, at step (7) I am getting a strange error, causing the module to reset as shown below:

Code: Select all

I (39621) wifi:enable tsf
I (39631) example_connect: Connecting to Minharede...
I (39631) example_connect: Waiting for IP(s)
I (43001) wifi:new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1
I (43001) wifi:(connect)dot11_authmode:0x3, pairwise_cipher:0x3, group_cipher:0x3
I (43781) wifi:state: init -> auth (b0)
I (43791) wifi:state: auth -> assoc (0)
I (43851) wifi:state: assoc -> run (10)
I (43851) wifi:(trc)phytype:CBW20-SGI, snr:60, maxRate:144, highestRateIdx:0
I (43851) wifi:(trc)rate(S-MCS7, schedIdx:0), ampdu(rate:S-MCS7, schedIdx(0, stop:8)), snr:60, ampduState:wait operational
I (43861) wifi:ifidx:0, rssi:-23, nf:-83, phytype(0x3, CBW20-SGI), phymode(0x3, 11bgn), max_rate:1440, he:0
I (43871) wifi:max ampdu length exponent:3(65535 bytes), mmss:4(2 us)
I (43921) wifi:(extcap)mbssid:0, enhanced_mbssid_advertise:0, complete_nontxbssid_profiles:0
I (43921) wifi:connected with Minharede, aid = 6, channel 1, BW20, bssid = 1a:93:54:cb:92:14
I (43931) wifi:cipher(pairwise:0x3, group:0x3), pmf:0, security:WPA2-PSK, phy:11bgn, rssi:-23
I (43941) wifi:pm start, type: 1, itwt_start:0

I (43941) wifi:pm start, type:1, aid:0x6, trans-BSSID:1a:93:54:cb:92:14, BSSID[5]:0x14, mbssid(max-indicator:0, index:0), he:0
I (43951) wifi:set rx beacon pti, rx_bcn_pti: 10, bcn_timeout: 25000, mt_pti: 10, mt_time: 10000
I (43961) wifi:[ADDBA]TX addba request, tid:0, dialogtoken:1, bufsize:64, A-MSDU:0(not supported), policy:1(IMR), ssn:0(0x0)
I (43971) wifi:[ADDBA]TX addba request, tid:7, dialogtoken:2, bufsize:64, A-MSDU:0(not supported), policy:1(IMR), ssn:0(0x30)
I (43981) wifi:[ADDBA]TX addba request, tid:5, dialogtoken:3, bufsize:64, A-MSDU:0(not supported), policy:1(IMR), ssn:0(0x0)
I (44001) wifi:BcnInt:102400, DTIM:2
I (44041) wifi:[ADDBA]RX addba response, status:0, tid:0/tb:1(0xa1), bufsize:64, batimeout:0, txa_wnd:64
I (44111) wifi:[ADDBA]RX addba response, status:0, tid:5/tb:1(0xa1), bufsize:64, batimeout:0, txa_wnd:64
W (44111) wifi:<ba-add>idx:0, ifx:0, tid:0, TAHI:0x1001492, TALO:0xcb54931a, (ssn:0, win:64, cur_ssn:0), CONF:0xc0000005

assert failed: tcpip_inpkt /IDF/components/lwip/lwip/src/api/tcpip.c:252 (Invalid mbox)
Core  0 register dump:
MEPC    : 0x4080062e  RA      : 0x40809a7a  SP      : 0x40839480  GP      : 0x40814920  
TP      : 0x40803e40  T0      : 0x37363534  T1      : 0x7271706f  T2      : 0x33323130  
S0/FP   : 0x00000070  S1      : 0x00000001  A0      : 0x408394bc  A1      : 0x408165e9  
A2      : 0x00000001  A3      : 0x00000029  A4      : 0x00000001  A5      : 0x4081c000  
A6      : 0x0000000c  A7      : 0x76757473  S2      : 0x00000009  S3      : 0x408395e7  
S4      : 0x408165e8  S5      : 0x4083f6e8  S6      : 0x4084040c  S7      : 0x0000001a  
S8      : 0x4087ff9c  S9      : 0x00000000  S10     : 0x40840adc  S11     : 0x408409f0  
T3      : 0x6e6d6c6b  T4      : 0x6a696867  T5      : 0x66656463  T6      : 0x62613938  
MSTATUS : 0x00001881  MTVEC   : 0x40800001  MCAUSE  : 0x00000007  MTVAL   : 0x00000000  
MHARTID : 0x00000000  

... removed some content for better see here ...

Rebooting...
ESP-ROM:esp32c6-20220919
But, If I do the following steps (not turning on the BLE):

1. Start the ESP32-C6 module
2. Execute a Wifi scan
3. Save the wifi SSIDs found in a "local cache"
4. The ESP32-C6 receives the SSID and PASSWORD correctly (SSID and PASSWORD hardcoded)
5. Then, I use this information to connect to that WiFi

cassianocampes
Posts: 9
Joined: Sun Jun 04, 2023 11:19 pm

Re: [ESP32-C6][WiFi & BLE cohex] assert failed: tcpip_inpkt /IDF/components/lwip/lwip/src/api/tcpip.c:252 (Invalid mbox)

Postby cassianocampes » Mon Aug 07, 2023 8:10 pm

I discovered the problem.

It was missing this at the main:

Code: Select all

esp_netif_init();

Who is online

Users browsing this forum: No registered users and 86 guests