Closed benvonhandorf closed 4 years ago
In case it's relevant, here are the chip_id and flash_id results:
~/tools/esp/blackmagic-espidf$ esptool.py --chip esp8266 --port /dev/ttyUSB2 chip_id
esptool.py v3.0-dev
Serial port /dev/ttyUSB2
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: 5c:cf:7f:68:22:57
Uploading stub...
Running stub...
Stub running...
Chip ID: 0x00682257
Hard resetting via RTS pin...
~/tools/esp/blackmagic-espidf$ esptool.py --chip esp8266 --port /dev/ttyUSB2 flash_id
esptool.py v3.0-dev
Serial port /dev/ttyUSB2
Connecting......
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: 5c:cf:7f:68:22:57
Uploading stub...
Running stub...
Stub running...
Manufacturer: 5e
Device: 4016
Detected flash size: 4MB
Hard resetting via RTS pin...
Got GDB stub in place and working.
0x402232a3 in xQueueGenericSend (xQueue=0x0, pvItemToQueue=pvItemToQueue@entry=0x3fffbfac, xTicksToWait=xTicksToWait@entry=4294967295, xCopyPosition=xCopyPosition@entry=0)
at /home/benvh/tools/esp/blackmagic-espidf/ESP8266_RTOS_SDK/components/freertos/freertos/queue.c:752
752 if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) )
(gdb) bt
#0 0x402232a3 in xQueueGenericSend (xQueue=0x0, pvItemToQueue=pvItemToQueue@entry=0x3fffbfac, xTicksToWait=xTicksToWait@entry=4294967295, xCopyPosition=xCopyPosition@entry=0)
at /home/benvh/tools/esp/blackmagic-espidf/ESP8266_RTOS_SDK/components/freertos/freertos/queue.c:752
#1 0x4022ae2c in sys_mbox_post (mbox=mbox@entry=0x40106a5c <mbox>, msg=msg@entry=0x3fffbfcc) at /home/benvh/tools/esp/blackmagic-espidf/ESP8266_RTOS_SDK/components/lwip/port/esp8266/freertos/sys_arch.c:207
#2 0x4022b16d in tcpip_send_msg_wait_sem (fn=fn@entry=0x4024e460 <lwip_netconn_do_newconn>, apimsg=apimsg@entry=0x3fffc010, sem=0x40107750)
at /home/benvh/tools/esp/blackmagic-espidf/ESP8266_RTOS_SDK/components/lwip/lwip/src/api/tcpip.c:357
#3 0x4024d524 in netconn_apimsg (fn=0x4024e460 <lwip_netconn_do_newconn>, apimsg=apimsg@entry=0x3fffc010) at /home/benvh/tools/esp/blackmagic-espidf/ESP8266_RTOS_SDK/components/lwip/lwip/src/api/api_lib.c:105
#4 0x4024d6cd in netconn_new_with_proto_and_callback (t=<optimized out>, proto=0 '\000', callback=<optimized out>)
at /home/benvh/tools/esp/blackmagic-espidf/ESP8266_RTOS_SDK/components/lwip/lwip/src/api/api_lib.c:135
#5 0x4024fedf in lwip_socket (domain=domain@entry=2, type=type@entry=1, protocol=protocol@entry=0) at /home/benvh/tools/esp/blackmagic-espidf/ESP8266_RTOS_SDK/components/lwip/lwip/src/api/sockets.c:1274
#6 0x4022d5e8 in net_uart_task (params=<optimized out>) at /home/benvh/tools/esp/blackmagic-espidf/main/platform.c:149
(gdb) p pxQueue
$1 = (Queue_t * const) 0x0
(gdb) p xQueue
$2 = (QueueHandle_t) 0x0
Looks to me like the xQueueGenericSend
is getting called before the queue is initialized in station mode. I'll pick this up tomorrow evening and see if I can make any progress.
Or maybe I'll put off going to sleep a few more minutes and discover esp_event_loop_init
isn't being called when not in AP mode. I'll get a PR together with this and the other STA mode fix once I get everything working end-to-end
Submitted PR #5. Addresses these issues and others found while getting the BMP up and running as a station.
This may be a false error if my approach in #3 is not valid, but after implementing that fix I am unable to connect to my wifi network. The system serial output is:
I'm digging in here and will update this if I find a solution.