Booting NuttX RTOS on ESP32 with WiFi+BLE COEX enabled

ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x1e (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:6864 ho 0 tail 12 room 4 load:0x40078000,len:13724 load:0x40080400,len:4260 entry 0x400806e4 I (73) boot: Chip Revision: 1 I (74) boot_comm: chip revision: 1, min. bootloader chip revision: 0 I (40) boot: ESP-IDF v4.0 2nd stage bootloader I (41) boot: compile time 20:51:02 I (41) boot: Enabling RNG early entropy source… I (45) boot: SPI Speed : 40MHz I (49) boot: SPI Mode : DIO I (53) boot: SPI Flash Size : 4MB I (57) boot: Partition Table: I (61) boot: ## Label Usage Type ST Offset Length I (68) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (75) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (83) boot: 2 factory factory app 00 00 00010000 00100000 I (90) boot: End of partition table I (95) boot_comm: chip revision: 1, min. application chip revision: 0 I (102) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x17d20 ( 97568) map I (146) esp_image: segment 1: paddr=0x00027d48 vaddr=0x3ffcdbc0 size=0x02eb4 ( 11956) load I (151) esp_image: segment 2: paddr=0x0002ac04 vaddr=0x40080000 size=0x00400 ( 1024) load I (153) esp_image: segment 3: paddr=0x0002b00c vaddr=0x40080400 size=0x0500c ( 20492) load I (170) esp_image: segment 4: paddr=0x00030020 vaddr=0x400d0020 size=0x83f84 (540548) map I (363) esp_image: segment 5: paddr=0x000b3fac vaddr=0x4008540c size=0x0f2fc ( 62204) load I (402) boot: Loaded app from partition at offset 0x10000 I (402) boot: Disabling RNG early entropy source… �ABesp32_rng_initialize: Initializing RNG esp32_bt_controller_init: BT controller compile version [a4c513b] esp32_bt_controller_init: BT controller compile version [a4c513b]btdm_controller_mem_init] btdm_controller_mem_init: .bss initialise [0x3ffb0000] - [0x3ffb09a8] btdm_controller_mem_init: .bss initialise [0x3ffb09a8] - [0x3ffb1ddc] btdm_controller_mem_init: .bss initialise [0x3ffb1ddc] - [0x3ffb2730] btdm_controller_mem_init: .bss initialise [0x3ffb2730] - [0x3ffb6388] btdm_controller_mem_init: .bss initialise [0x3ffb8000] - [0x3ffb9a20] btdm_controller_mem_init: .bss initialise [0x3ffbdb28] - [0x3ffbdb5c] esp32_bt_controller_init: Memory initialized! esp32_bt_controller_init: Going to call btdm_controller_init esp_ble_set_isr: n=5 f=0x400882ec arg=0 irq=9 esp32_ints_on: Enabled bit 5 esp_ble_set_isr: n=8 f=0x4008832c arg=0 irq=12 esp32_ints_on: Enabled bit 8 esp_ble_set_isr: n=7 f=0x400882d4 arg=0 irq=11 esp32_ints_on: Enabled bit 7 esp32_bt_controller_init: The btdm_controller_init was initialized esp32_bt_controller_enable: Going to call coex_enable() esp32_bt_controller_enable: Returned from coex_enable() bt_initialize: btdev 0x3ffce81c bt_hci_cmd_create: opcode 0c03 param_len 0 bt_buf_alloc: buf 0x3ffca644 type 0 reserve 1 bt_hci_cmd_create: buf 0x3ffca644 bt_buf_extend: buf 0x3ffca644 len 3 bt_hci_cmd_send_sync: opcode 0c03 len 3 hci_tx_kthread: started bt_buf_addref: buf 0x3ffca644 (old) ref 1 type 0 hci_tx_kthread: Sending command 0c03 buf 0x3ffca644 to driver esp32_vhci_host_send_packet: len: 4 esp32_vhci_host_send_packet: 01 esp32_vhci_host_send_packet: 03 esp32_vhci_host_send_packet: 0c esp32_vhci_host_send_packet: 00 esp32_ble_recv_cb: len = 7 esp32_ble_recv_cb: host recv pkt: esp32_ble_recv_cb: 04 esp32_ble_recv_cb: 0e esp32_ble_recv_cb: 04 esp32_ble_recv_cb: 05 esp32_ble_recv_cb: 03 esp32_ble_recv_cb: 0c esp32_ble_recv_cb: 00 bt_receive: data 0x3ffd8ab3 len 6 bt_buf_alloc: buf 0x3ffca62c type 1 reserve 0 bt_buf_extend: buf 0x3ffca62c len 6 priority_rx_work: list 0x3ffc9e90 priority_rx_work: buf 0x3ffca62c type 1 len 6 bt_buf_consume: buf 0x3ffca62c len 2 hci_cmd_complete: opcode 0c03 bt_buf_consume: buf 0x3ffca62c len 3 hci_reset_complete: status 0 bt_buf_addref: buf 0x3ffca62c (old) ref 1 type 1 bt_buf_release: buf 0x3ffca644 ref 2 type 0 bt_buf_release: Remaining references: 1 bt_buf_release: buf 0x3ffca62c ref 2 type 1 bt_buf_release: Remaining references: 1 bt_buf_release: buf 0x3ffca644 ref 1 type 0 bt_buf_release: Buffer freed: 0x3ffca644 bt_buf_release: buf 0x3ffca644 ref 0 type 0 bt_buf_release: Remaining references: 255 bt_buf_release: buf 0x3ffca62c ref 1 type 1 bt_buf_release: Buffer freed: 0x3ffca62c bt_hci_cmd_create: opcode 1003 param_len 0 bt_buf_alloc: buf 0x3ffca62c type 0 reserve 1 bt_hci_cmd_create: buf 0x3ffca62c bt_buf_extend: buf 0x3ffca62c len 3 bt_hci_cmd_send_sync: opcode 1003 len 3 bt_buf_addref: buf 0x3ffca62c (old) ref 1 type 0 hci_tx_kthread: Sending command 1003 buf 0x3ffca62c to driver esp32_vhci_host_send_packet: len: 4 esp32_vhci_host_send_packet: 01 esp32_vhci_host_send_packet: 03 esp32_vhci_host_send_packet: 10 esp32_vhci_host_send_packet: 00 esp32_ble_recv_cb: len = 15 esp32_ble_recv_cb: host recv pkt: esp32_ble_recv_cb: 04 esp32_ble_recv_cb: 0e esp32_ble_recv_cb: 0c esp32_ble_recv_cb: 05 esp32_ble_recv_cb: 03 esp32_ble_recv_cb: 10 esp32_ble_recv_cb: 00 esp32_ble_recv_cb: bf esp32_ble_recv_cb: ee esp32_ble_recv_cb: cd esp32_ble_recv_cb: fe esp32_ble_recv_cb: db esp32_ble_recv_cb: ff esp32_ble_recv_cb: 7b esp32_ble_recv_cb: 87 bt_receive: data 0x3ffd8aab len 14 bt_buf_alloc: buf 0x3ffca644 type 1 reserve 0 bt_buf_extend: buf 0x3ffca644 len 14 priority_rx_work: list 0x3ffc9e90 priority_rx_work: buf 0x3ffca644 type 1 len 14 bt_buf_consume: buf 0x3ffca644 len 2 hci_cmd_complete: opcode 1003 bt_buf_consume: buf 0x3ffca644 len 3 hci_cmd_complete: Unhandled opcode 1003 bt_buf_addref: buf 0x3ffca644 (old) ref 1 type 1 bt_buf_release: buf 0x3ffca62c ref 2 type 0 bt_buf_release: Remaining references: 1 bt_buf_release: buf 0x3ffca644 ref 2 type 1 bt_buf_release: Remaining references: 1 bt_buf_release: buf 0x3ffca62c ref 1 type 0 bt_buf_release: Buffer freed: 0x3ffca62c bt_buf_release: buf 0x3ffca62c ref 0 type 0 bt_buf_release: Remaining references: 255 read_local_features_complete: status 0 bt_buf_release: buf 0x3ffca644 ref 1 type 1 bt_buf_release: Buffer freed: 0x3ffca644 bt_hci_cmd_create: opcode 1001 param_len 0 bt_buf_alloc: buf 0x3ffca644 type 0 reserve 1 bt_hci_cmd_create: buf 0x3ffca644 bt_buf_extend: buf 0x3ffca644 len 3 bt_hci_cmd_send_sync: opcode 1001 len 3 bt_buf_addref: buf 0x3ffca644 (old) ref 1 type 0 hci_tx_kthread: Sending command 1001 buf 0x3ffca644 to driver esp32_vhci_host_send_packet: len: 4 esp32_vhci_host_send_packet: 01 esp32_vhci_host_send_packet: 01 esp32_vhci_host_send_packet: 10 esp32_vhci_host_send_packet: 00 esp32_ble_recv_cb: len = 15 esp32_ble_recv_cb: host recv pkt: esp32_ble_recv_cb: 04 esp32_ble_recv_cb: 0e esp32_ble_recv_cb: 0c esp32_ble_recv_cb: 05 esp32_ble_recv_cb: 01 esp32_ble_recv_cb: 10 esp32_ble_recv_cb: 00 esp32_ble_recv_cb: 08 esp32_ble_recv_cb: 0e esp32_ble_recv_cb: 03 esp32_ble_recv_cb: 08 esp32_ble_recv_cb: 60 esp32_ble_recv_cb: 00 esp32_ble_recv_cb: 0e esp32_ble_recv_cb: 03 bt_receive: data 0x3ffd8aab len 14 bt_buf_alloc: buf 0x3ffca62c type 1 reserve 0 bt_buf_extend: buf 0x3ffca62c len 14 priority_rx_work: list 0x3ffc9e90 priority_rx_work: buf 0x3ffca62c type 1 len 14 bt_buf_consume: buf 0x3ffca62c len 2 hci_cmd_complete: opcode 1001 bt_buf_consume: buf 0x3ffca62c len 3 hci_cmd_complete: Unhandled opcode 1001 bt_buf_addref: buf 0x3ffca62c (old) ref 1 type 1 bt_buf_release: buf 0x3ffca644 ref 2 type 0 bt_buf_release: Remaining references: 1 bt_buf_release: buf 0x3ffca62c ref 2 type 1 bt_buf_release: Remaining references: 1 bt_buf_release: buf 0x3ffca644 ref 1 type 0 bt_buf_release: Buffer freed: 0x3ffca644 bt_buf_release: buf 0x3ffca644 ref 0 type 0 bt_buf_release: Remaining references: 255 read_local_ver_complete: status 0 bt_buf_release: buf 0x3ffca62c ref 1 type 1 bt_buf_release: Buffer freed: 0x3ffca62c bt_hci_cmd_create: opcode 1009 param_len 0 bt_buf_alloc: buf 0x3ffca62c type 0 reserve 1 bt_hci_cmd_create: buf 0x3ffca62c bt_buf_extend: buf 0x3ffca62c len 3 bt_hci_cmd_send_sync: opcode 1009 len 3 bt_buf_addref: buf 0x3ffca62c (old) ref 1 type 0 hci_tx_kthread: Sending command 1009 buf 0x3ffca62c to driver esp32_vhci_host_send_packet: len: 4 esp32_vhci_host_send_packet: 01 esp32_vhci_host_send_packet: 09 esp32_vhci_host_send_packet: 10 esp32_vhci_host_send_packet: 00 esp32_ble_recv_cb: len = 13 esp32_ble_recv_cb: host recv pkt: esp32_ble_recv_cb: 04 esp32_ble_recv_cb: 0e esp32_ble_recv_cb: 0a esp32_ble_recv_cb: 05 esp32_ble_recv_cb: 09 esp32_ble_recv_cb: 10 esp32_ble_recv_cb: 00 esp32_ble_recv_cb: e9 esp32_ble_recv_cb: a7 esp32_ble_recv_cb: b5 esp32_ble_recv_cb: b5 esp32_ble_recv_cb: aa esp32_ble_recv_cb: 8e bt_receive: data 0x3ffd8aaf len 12 bt_buf_alloc: buf 0x3ffca644 type 1 reserve 0 bt_buf_extend: buf 0x3ffca644 len 12 priority_rx_work: list 0x3ffc9e90 priority_rx_work: buf 0x3ffca644 type 1 len 12 bt_buf_consume: buf 0x3ffca644 len 2 hci_cmd_complete: opcode 1009 bt_buf_consume: buf 0x3ffca644 len 3 hci_cmd_complete: Unhandled opcode 1009 bt_buf_addref: buf 0x3ffca644 (old) ref 1 type 1 bt_buf_release: buf 0x3ffca62c ref 2 type 0 bt_buf_release: Remaining references: 1 bt_buf_release: buf 0x3ffca644 ref 2 type 1 bt_buf_release: Remaining references: 1 bt_buf_release: buf 0x3ffca62c ref 1 type 0 bt_buf_release: Buffer freed: 0x3ffca62c bt_buf_release: buf 0x3ffca62c ref 0 type 0 bt_buf_release: Remaining references: 255 read_bdaddr_complete: status 0 bt_buf_release: buf 0x3ffca644 ref 1 type 1 bt_buf_release: Buffer freed: 0x3ffca644 bt_hci_cmd_create: opcode 2003 param_len 0 bt_buf_alloc: buf 0x3ffca644 type 0 reserve 1 bt_hci_cmd_create: buf 0x3ffca644 bt_buf_extend: buf 0x3ffca644 len 3 bt_hci_cmd_send_sync: opcode 2003 len 3 bt_buf_addref: buf 0x3ffca644 (old) ref 1 type 0 hci_tx_kthread: Sending command 2003 buf 0x3ffca644 to driver esp32_vhci_host_send_packet: len: 4 esp32_vhci_host_send_packet: 01 esp32_vhci_host_send_packet: 03 esp32_vhci_host_send_packet: 20 esp32_vhci_host_send_packet: 00 esp32_ble_recv_cb: len = 15 esp32_ble_recv_cb: host recv pkt: esp32_ble_recv_cb: 04 esp32_ble_recv_cb: 0e esp32_ble_recv_cb: 0c esp32_ble_recv_cb: 05 esp32_ble_recv_cb: 03 esp32_ble_recv_cb: 20 esp32_ble_recv_cb: 00 esp32_ble_recv_cb: ff esp32_ble_recv_cb: 00 esp32_ble_recv_cb: 00 esp32_ble_recv_cb: 00 esp32_ble_recv_cb: 00 esp32_ble_recv_cb: 00 esp32_ble_recv_cb: 00 esp32_ble_recv_cb: 00 bt_receive: data 0x3ffd8aab len 14 bt_buf_alloc: buf 0x3ffca62c type 1 reserve 0 bt_buf_extend: buf 0x3ffca62c len 14 priority_rx_work: list 0x3ffc9e90 priority_rx_work: buf 0x3ffca62c type 1 len 14 bt_buf_consume: buf 0x3ffca62c len 2 hci_cmd_complete: opcode 2003 bt_buf_consume: buf 0x3ffca62c len 3 hci_cmd_complete: Unhandled opcode 2003 bt_buf_addref: buf 0x3ffca62c (old) ref 1 type 1 bt_buf_release: buf 0x3ffca644 ref 2 type 0 bt_buf_release: Remaining references: 1 bt_buf_release: buf 0x3ffca62c ref 2 type 1 bt_buf_release: Remaining references: 1 bt_buf_release: buf 0x3ffca644 ref 1 type 0 bt_buf_release: Buffer freed: 0x3ffca644 bt_buf_release: buf 0x3ffca644 ref 0 type 0 bt_buf_release: Remaining references: 255 read_le_features_complete: status 0 bt_buf_release: buf 0x3ffca62c ref 1 type 1 bt_buf_release: Buffer freed: 0x3ffca62c bt_hci_cmd_create: opcode 2002 param_len 0 bt_buf_alloc: buf 0x3ffca62c type 0 reserve 1 bt_hci_cmd_create: buf 0x3ffca62c bt_buf_extend: buf 0x3ffca62c len 3 bt_hci_cmd_send_sync: opcode 2002 len 3 bt_buf_addref: buf 0x3ffca62c (old) ref 1 type 0 hci_tx_kthread: Sending command 2002 buf 0x3ffca62c to driver esp32_vhci_host_send_packet: len: 4 esp32_vhci_host_send_packet: 01 esp32_vhci_host_send_packet: 02 esp32_vhci_host_send_packet: 20 esp32_vhci_host_send_packet: 00 esp32_ble_recv_cb: len = 10 esp32_ble_recv_cb: host recv pkt: esp32_ble_recv_cb: 04 esp32_ble_recv_cb: 0e esp32_ble_recv_cb: 07 esp32_ble_recv_cb: 05 esp32_ble_recv_cb: 02 esp32_ble_recv_cb: 20 esp32_ble_recv_cb: 00 esp32_ble_recv_cb: fb esp32_ble_recv_cb: 00 esp32_ble_recv_cb: 0a bt_receive: data 0x3ffd8aaf len 9 bt_buf_alloc: buf 0x3ffca644 type 1 reserve 0 bt_buf_extend: buf 0x3ffca644 len 9 priority_rx_work: list 0x3ffc9e90 priority_rx_work: buf 0x3ffca644 type 1 len 9 bt_buf_consume: buf 0x3ffca644 len 2 hci_cmd_complete: opcode 2002 bt_buf_consume: buf 0x3ffca644 len 3 hci_cmd_complete: Unhandled opcode 2002 bt_buf_addref: buf 0x3ffca644 (old) ref 1 type 1 bt_buf_release: buf 0x3ffca62c ref 2 type 0 bt_buf_release: Remaining references: 1 bt_buf_release: buf 0x3ffca644 ref 2 type 1 bt_buf_release: Remaining references: 1 bt_buf_release: buf 0x3ffca62c ref 1 type 0 bt_buf_release: Buffer freed: 0x3ffca62c bt_buf_release: buf 0x3ffca62c ref 0 type 0 bt_buf_release: Remaining references: 255 le_read_buffer_size_complete: status 0 bt_buf_release: buf 0x3ffca644 ref 1 type 1 bt_buf_release: Buffer freed: 0x3ffca644 bt_hci_cmd_create: opcode 0c01 param_len 8 bt_buf_alloc: buf 0x3ffca644 type 0 reserve 1 bt_hci_cmd_create: buf 0x3ffca644 bt_buf_extend: buf 0x3ffca644 len 3 bt_buf_extend: buf 0x3ffca644 len 8 bt_buf_addref: buf 0x3ffca644 (old) ref 1 type 0 bt_hci_cmd_send_sync: opcode 0c01 len 11 bt_buf_addref: buf 0x3ffca644 (old) ref 2 type 0 hci_tx_kthread: Sending command 0c01 buf 0x3ffca644 to driver esp32_vhci_host_send_packet: len: 12 esp32_vhci_host_send_packet: 01 esp32_vhci_host_send_packet: 01 esp32_vhci_host_send_packet: 0c esp32_vhci_host_send_packet: 08 esp32_vhci_host_send_packet: 90 esp32_vhci_host_send_packet: e8 esp32_vhci_host_send_packet: 04 esp32_vhci_host_send_packet: 02 esp32_vhci_host_send_packet: 00 esp32_vhci_host_send_packet: 80 esp32_vhci_host_send_packet: 00 esp32_vhci_host_send_packet: 20 esp32_ble_recv_cb: len = 7 esp32_ble_recv_cb: host recv pkt: esp32_ble_recv_cb: 04 esp32_ble_recv_cb: 0e esp32_ble_recv_cb: 04 esp32_ble_recv_cb: 05 esp32_ble_recv_cb: 01 esp32_ble_recv_cb: 0c esp32_ble_recv_cb: 00 bt_receive: data 0x3ffd8a9f len 6 bt_buf_alloc: buf 0x3ffca62c type 1 reserve 0 bt_buf_extend: buf 0x3ffca62c len 6 priority_rx_work: list 0x3ffc9e90 priority_rx_work: buf 0x3ffca62c type 1 len 6 bt_buf_consume: buf 0x3ffca62c len 2 hci_cmd_complete: opcode 0c01 bt_buf_consume: buf 0x3ffca62c len 3 hci_cmd_complete: Unhandled opcode 0c01 bt_buf_addref: buf 0x3ffca62c (old) ref 1 type 1 bt_buf_release: buf 0x3ffca644 ref 3 type 0 bt_buf_release: Remaining references: 2 bt_buf_release: buf 0x3ffca62c ref 2 type 1 bt_buf_release: Remaining references: 1 bt_buf_release: buf 0x3ffca644 ref 2 type 0 bt_buf_release: Remaining references: 1 bt_buf_release: buf 0x3ffca62c ref 1 type 1 bt_buf_release: Buffer freed: 0x3ffca62c bt_buf_release: buf 0x3ffca644 ref 1 type 0 bt_buf_release: Buffer freed: 0x3ffca644 bt_hci_cmd_create: opcode 0c33 param_len 7 bt_buf_alloc: buf 0x3ffca644 type 0 reserve 1 bt_hci_cmd_create: buf 0x3ffca644 bt_buf_extend: buf 0x3ffca644 len 3 bt_buf_extend: buf 0x3ffca644 len 7 bt_buf_addref: buf 0x3ffca644 (old) ref 1 type 0 bt_hci_cmd_send: opcode 0c33 len 10 bt_hci_cmd_create: opcode 0c31 param_len 1 bt_buf_alloc: buf 0x3ffca62c type 0 reserve 1 bt_hci_cmd_create: buf 0x3ffca62c bt_buf_extend: buf 0x3ffca62c len 3 bt_buf_extend: buf 0x3ffca62c len 1 bt_buf_addref: buf 0x3ffca62c (old) ref 1 type 0 bt_hci_cmd_send_sync: opcode 0c31 len 4 bt_buf_addref: buf 0x3ffca644 (old) ref 2 type 0 hci_tx_kthread: Sending command 0c33 buf 0x3ffca644 to driver esp32_vhci_host_send_packet: len: 11 esp32_vhci_host_send_packet: 01 esp32_vhci_host_send_packet: 33 esp32_vhci_host_send_packet: 0c esp32_vhci_host_send_packet: 07 esp32_vhci_host_send_packet: 4a esp32_vhci_host_send_packet: 00 esp32_vhci_host_send_packet: 00 esp32_vhci_host_send_packet: 14 esp32_vhci_host_send_packet: 00 esp32_vhci_host_send_packet: 00 esp32_vhci_host_send_packet: 00 esp32_ble_recv_cb: len = 7 esp32_ble_recv_cb: host recv pkt: esp32_ble_recv_cb: 04 esp32_ble_recv_cb: 0e esp32_ble_recv_cb: 04 esp32_ble_recv_cb: 05 esp32_ble_recv_cb: 33 esp32_ble_recv_cb: 0c esp32_ble_recv_cb: 11 bt_receive: data 0x3ffd8a9f len 6 bt_buf_alloc: buf 0x3ffca614 type 1 reserve 0 bt_buf_extend: buf 0x3ffca614 len 6 priority_rx_work: list 0x3ffc9e90 priority_rx_work: buf 0x3ffca614 type 1 len 6 bt_buf_consume: buf 0x3ffca614 len 2 hci_cmd_complete: opcode 0c33 bt_buf_consume: buf 0x3ffca614 len 3 hci_cmd_complete: Unhandled opcode 0c33 bt_buf_release: buf 0x3ffca644 ref 3 type 0 bt_buf_release: Remaining references: 2 bt_buf_release: buf 0x3ffca614 ref 1 type 1 bt_buf_release: Buffer freed: 0x3ffca614 bt_buf_release: buf 0x3ffca644 ref 2 type 0 bt_buf_release: Remaining references: 1 bt_buf_addref: buf 0x3ffca62c (old) ref 2 type 0 hci_tx_kthread: Sending command 0c31 buf 0x3ffca62c to driver esp32_vhci_host_send_packet: len: 5 esp32_vhci_host_send_packet: 01 esp32_vhci_host_send_packet: 31 esp32_vhci_host_send_packet: 0c esp32_vhci_host_send_packet: 01 esp32_vhci_host_send_packet: 01 esp32_ble_recv_cb: len = 7 esp32_ble_recv_cb: host recv pkt: esp32_ble_recv_cb: 04 esp32_ble_recv_cb: 0e esp32_ble_recv_cb: 04 esp32_ble_recv_cb: 05 esp32_ble_recv_cb: 31 esp32_ble_recv_cb: 0c esp32_ble_recv_cb: 00 bt_receive: data 0x3ffd8aa3 len 6 bt_buf_alloc: buf 0x3ffca614 type 1 reserve 0 bt_buf_extend: buf 0x3ffca614 len 6 priority_rx_work: list 0x3ffc9e90 priority_rx_work: buf 0x3ffca614 type 1 len 6 bt_buf_consume: buf 0x3ffca614 len 2 hci_cmd_complete: opcode 0c31 bt_buf_consume: buf 0x3ffca614 len 3 hci_cmd_complete: Unhandled opcode 0c31 bt_buf_addref: buf 0x3ffca614 (old) ref 1 type 1 bt_buf_release: buf 0x3ffca62c ref 3 type 0 bt_buf_release: Remaining references: 2 bt_buf_release: buf 0x3ffca614 ref 2 type 1 bt_buf_release: Remaining references: 1 bt_buf_release: buf 0x3ffca62c ref 2 type 0 bt_buf_release: Remaining references: 1 bt_buf_release: buf 0x3ffca614 ref 1 type 1 bt_buf_release: Buffer freed: 0x3ffca614 bt_buf_release: buf 0x3ffca62c ref 1 type 0 bt_buf_release: Buffer freed: 0x3ffca62c bt_hci_cmd_create: opcode 0c6d param_len 2 bt_buf_alloc: buf 0x3ffca62c type 0 reserve 1 bt_hci_cmd_create: buf 0x3ffca62c bt_buf_extend: buf 0x3ffca62c len 3 bt_buf_extend: buf 0x3ffca62c len 2 bt_buf_addref: buf 0x3ffca62c (old) ref 1 type 0 bt_hci_cmd_send_sync: opcode 0c6d len 5 bt_buf_addref: buf 0x3ffca62c (old) ref 2 type 0 hci_tx_kthread: Sending command 0c6d buf 0x3ffca62c to driver esp32_vhci_host_send_packet: len: 6 esp32_vhci_host_send_packet: 01 esp32_vhci_host_send_packet: 6d esp32_vhci_host_send_packet: 0c esp32_vhci_host_send_packet: 02 esp32_vhci_host_send_packet: 01 esp32_vhci_host_send_packet: 00 esp32_ble_recv_cb: len = 7 esp32_ble_recv_cb: host recv pkt: esp32_ble_recv_cb: 04 esp32_ble_recv_cb: 0e esp32_ble_recv_cb: 04 esp32_ble_recv_cb: 05 esp32_ble_recv_cb: 6d esp32_ble_recv_cb: 0c esp32_ble_recv_cb: 00 bt_receive: data 0x3ffd8aa3 len 6 bt_buf_alloc: buf 0x3ffca614 type 1 reserve 0 bt_buf_extend: buf 0x3ffca614 len 6 priority_rx_work: list 0x3ffc9e90 priority_rx_work: buf 0x3ffca614 type 1 len 6 bt_buf_consume: buf 0x3ffca614 len 2 hci_cmd_complete: opcode 0c6d bt_buf_consume: buf 0x3ffca614 len 3 hci_cmd_complete: Unhandled opcode 0c6d bt_buf_addref: buf 0x3ffca614 (old) ref 1 type 1 bt_buf_release: buf 0x3ffca62c ref 3 type 0 bt_buf_release: Remaining references: 2 bt_buf_release: buf 0x3ffca614 ref 2 type 1 bt_buf_release: Remaining references: 1 bt_buf_release: buf 0x3ffca62c ref 2 type 0 bt_buf_release: Remaining references: 1 bt_buf_release: buf 0x3ffca614 ref 1 type 1 bt_buf_release: Buffer freed: 0x3ffca614 bt_buf_release: buf 0x3ffca62c ref 1 type 0 bt_buf_release: Buffer freed: 0x3ffca62c hci_initialize: HCI ver 8 rev 782, manufacturer 96 hci_initialize: ACL buffers: pkts 10 mtu 251 bt_l2cap_chan_register: CID 0x0004 bt_l2cap_chan_register: CID 0x0006 bt_l2cap_chan_register: CID 0x0005 I (1864) wifi:wifi driver task: 7, prio:253, stack:6656, core=0 esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.sta.ssid esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.sta.authmode esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.sta.pswd esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.sta.pmk esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.sta.chan esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.auto.conn esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.bssid.set esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.sta.bssid esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.sta.lis_intval esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.sta.phym esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.sta.phybw esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.sta.apsw esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.sta.apinfo esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.sta.scan_method esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.sta.sort_method esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.sta.minrssi esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.sta.minauth esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.sta.pmf_e esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.sta.pmf_r esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.sta.btm_e esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.sta.rrm_e esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.ap.ssid esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.ap.passwd esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.ap.pmk esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.ap.chan esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.ap.authmode esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.ap.hidden esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.ap.max.conn esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.bcn.interval esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.ap.phym esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.ap.phybw esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.ap.pmf_e esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.ap.pmf_r esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.ap.p_cipher esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.lorate esp_nvs_get_blob: No file /mnt/esp/wifi/wifi.nvs.net80211.country I (2346) wifi:wifi firmware version: 9bc0383 I (2347) wifi:wifi certification version: v7.0 I (2347) wifi:config NVS flash: enabled I (2347) wifi:config nano formating: disabled I (2351) wifi:Init data frame dynamic rx buffer num: 32 I (2356) wifi:Init management frame dynamic rx buffer num: 32 I (2362) wifi:Init management short buffer num: 32 I (2366) wifi:Init dynamic tx buffer num: 32 I (2370) wifi:Init static rx buffer size: 1600 I (2374) wifi:Init static rx buffer num: 10 I (2378) wifi:Init dynamic rx buffer num: 32 esp_wifi_adapter_init: OK to initialize WiFi adapter wifi_coex_enable: Going to call coex_enable() from wifi wifi_coex_enable: Returned from coex_enable() on wifi wifi_set_intr: cpu_no=0, intr_source=0, intr_num=0, intr_prio=1 esp_set_isr: n=0 f=0x4008ac84 arg=0 irq=4 esp32_ints_on: INFO mask=00000001 irq=0 I (2415) wifi:mode : sta (8c:aa:b5:b5:a7:e8) I (2418) wifi:enable tsf esp_event_post: Event: base=WIFI_EVENT id=2 data=0 data_size=0 ticks=4294967295 esp_wifi_sta_start: OK to start WiFi station esp_evt_work_cb: WiFi sta start I (2435) wifi:Set ps type: 0 E (2437) wifi:Error! Should enable WiFi modem sleep when both WiFi and Bluetooth are enab!

NuttShell (NSH) NuttX-10.1.0
nsh>

NuttX ported to STM32H745I-DISCO board

This weekend I ported NuttX to STM32H745I-DISCO board and got LVGL working on it.

It is a nice board to run NuttX because it has a big LCD display with resolution of 480×272. Soon I’ll submit it to mainline.

Compiling and flashing:

$ ./tools/configure.sh stm32h745i-disco:lvgl
$ make
$ sudo openocd -f interface/stlink-v2.cfg -f target/stm32h7x.cfg -c init -c "reset halt" -c "flash write_image erase nuttx.bin 0x08000000"

Open minicom and configure it to use /dev/ttyACM0 115200 8n1

NuttShell (NSH) NuttX-10.1.0
nsh> ?
help usage: help [-v] []

. cat dd false ls ps sleep uname
[ cd df free mkdir pwd source umount
? cp echo help mkrd rm test unset
basename cmp exec hexdump mount rmdir time usleep
break dirname exit kill mv set true xd

Builtin Apps:
lvgldemo tc fb sh nsh
nsh> lvgldemo
tp_init: Opening /dev/input0
tp_cal result
offset x:14, y:3
range x:463, y:260
invert x/y:0, x:0, y:0

BLE WIFI Coexistence crash

esp32_bt_controller_init: BT controller compile version [a4c513b]
esp32_bt_controller_init: BT controller compile version [a4c513b]btdm_controller_mem_init]
btdm_controller_mem_init: .bss initialise [0x3ffb0000] - [0x3ffb09a8]
btdm_controller_mem_init: .bss initialise [0x3ffb09a8] - [0x3ffb1ddc]
btdm_controller_mem_init: .bss initialise [0x3ffb1ddc] - [0x3ffb2730]
btdm_controller_mem_init: .bss initialise [0x3ffb2730] - [0x3ffb6388]
btdm_controller_mem_init: .bss initialise [0x3ffb8000] - [0x3ffb9a20]
btdm_controller_mem_init: .bss initialise [0x3ffbdb28] - [0x3ffbdb5c]
esp32_bt_controller_init: Memory initialized!
esp32_bt_controller_init: Going to call btdm_controller_init
esp_ble_set_isr: n=5 f=0x400882dc arg=0 irq=9
esp32_ints_on: Enabled bit 5
esp_ble_set_isr: n=8 f=0x4008831c arg=0 irq=12
esp32_ints_on: Enabled bit 8
esp_ble_set_isr: n=7 f=0x400882c4 arg=0 irq=11
esp32_ints_on: Enabled bit 7
esp32_bt_controller_init: The btdm_controller_init was initialized
xtensa_user_panic: User Exception: EXCCAUSE=001c task: init
xtensa_registerdump: PC: 4014f664 PS: 00060030
xtensa_registerdump: A0: 8014f58a A1: 3ffd4b60 A2: 00000000 A3: 3ffd01bc
xtensa_registerdump: A4: 3ff5d040 A5: 600041c4 A6: 60033d40 A7: 3ffd4990
xtensa_registerdump: A8: 80105683 A9: 3ffd4b50 A10: 3ff4884c A11: 3ff4e0c4
xtensa_registerdump: A12: 00000007 A13: 00000006 A14: 00000000 A15: 0000000a
xtensa_registerdump: SAR: 00000020 CAUSE: 0000001c VADDR: 00000030
xtensa_registerdump: LBEG: 40152730 LEND: 40152752 LCNT: 00000000
xtensa_registerdump: TMP0: 400808e0 TMP1: 3ffd4940
xtensa_dumpstate: sp: 3ffd48b0
xtensa_dumpstate: IRQ stack:
xtensa_dumpstate: base: 3ffcdbe0
xtensa_dumpstate: size: 00000800
xtensa_dumpstate: ERROR: Stack pointer is not within the interrupt stack
xtensa_stackdump: 3ffcdbe0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdc00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdc20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdc40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdc60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdc80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdca0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdcc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdce0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdd00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdd20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdd40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdd60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdd80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdda0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcddc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdde0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcde00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcde20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcde40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcde60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcde80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdea0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdf00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdf20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdf40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdf60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdf80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdfa0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffcdfe0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce000: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce020: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce040: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce060: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce080: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce0a0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce0c0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce0e0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce100: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce120: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce140: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce160: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce180: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce1a0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce1c0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce1e0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce200: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce220: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce240: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce260: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce280: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce2a0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce2c0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce2e0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce300: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce320: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce340: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce360: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce380: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce3a0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffce3c0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
xtensa_dumpstate: sp: 3ffd4b60
xtensa_dumpstate: User stack:
xtensa_dumpstate: base: 3ffd3cc0
xtensa_dumpstate: size: 00001030
xtensa_stackdump: 3ffd4b60: 3ffcb338 00000000 00000005 00000000 8010f9bc 3ffd4bb0 00000000
xtensa_stackdump: 3ffd4b80: 8010f9bc 3ffd4bb0 00000001 3ffdbf30 3ffc3c05 3ffc3c04 0000000c
xtensa_stackdump: 3ffd4ba0: 80104688 3ffd4be0 00000000 3ffce7d0 00060a23 3ffd4be0 ffffffe0
xtensa_stackdump: 3ffd4bc0: 3ffc9de8 3ffd0028 00060a20 3ffc9dec 8010463e 3ffd4c00 3ffd0968
xtensa_stackdump: 3ffd4be0: 3f402088 00000000 00000000 00000000 800f9cf1 3ffd4c20 00000000
xtensa_stackdump: 3ffd4c00: 800d2ced 3ffd37f0 000000e0 00000005 800d6c1f 3ffd4c40 0000ff00
xtensa_stackdump: 3ffd4c20: 80000060 3ffd0960 00000000 3ffd2440 800d6bd8 3ffd4c60 00000000
xtensa_stackdump: 3ffd4c40: ffffffe7 3ffd39c0 3ffcad4c fffffffc 800d3ffb 3ffd4c80 00000000
xtensa_stackdump: 3ffd4c60: 00000000 3ffd3850 00060f20 3ffcad44 800d282f 3ffd4cb0 400d6bb1
xtensa_stackdump: 3ffd4c80: 00000064 97340f1e 9948e768 4136b271 00000064 3ffd4f1c 00000000
xtensa_stackdump: 3ffd4ca0: 00000000 3ffd4cd0 00000000 00000000 3ffd3cb0 00000001 3ffc0b30
xtensa_stackdump: 3ffd4cc0: 00000000 3ffd4cf0 00000000 00000000 00000000 00000000 00000000
xtensa_stackdump: 3ffd4ce0: 63f39536 e40c9cfe 9155f933 8c439db0 5c55abcd 817daec4 00000060

Testing ESP32 BLE support on NuttX

Clone the repositories:

$ git clone https://www.github.com/apache/incubator-nuttx nuttx
$ git clone https://www.github.com/apache/incubator-nuttx-apps apps

Configure and compile:

$ cd nuttx/
$ ./tools/configure.sh esp32-devkitc:ble
$ make download ESPTOOL_PORT=/dev/ttyUSB0

Configure minicom or other serial console terminal to /dev/ttyUSB0 115200 8n1 and access the terminal and scan the Bluetooth devices:

NuttShell (NSH) NuttX-10.1.0
nsh> ifconfig
bnep0 Link encap:UNSPEC at DOWN
inet addr:0.0.0.0 DRaddr:0.0.0.0 Mask:0.0.0.0

wlan0 Link encap:Ethernet HWaddr ac:67:b2:53:8b:ec at UP
inet addr:10.0.0.2 DRaddr:10.0.0.1 Mask:255.255.255.0

nsh> bt bnep0 scan start
nsh> bt bnep0 scan stop
nsh> bt bnep0 scan get
Scan result:

addr: 4b:5f:17:5d:6c:a9 type: 1
rssi: -89
response type: 2
advertiser data: 02 01 1a 09 ff c4 00 02 33 14 12 16 80 02 0a d4
03 03 b9 fe 08 1b 00 2d 97 67 12 dd 78

addr: 4b:5f:17:5d:6c:a9 type: 1
rssi: -90
response type: 4
advertiser data: 18 09 5b 4c 47 5d 20 77 65 62 4f 53 20 54 56 20
55 4d 37 32 37 30 50 53 41 02 0a d4

addr: 60:23:38:f9:6b:0e type: 1
rssi: -94
response type: 3
advertiser data: 1e ff 06 00 01 09 20 02 67 7c 14 68 d5 b4 38 9f
bc 0d 22 02 b0 c2 ed a7 df bc 02 2e 61 d8 5c

addr: 2c:de:fa:4d:b3:3d type: 1
rssi: -92
response type: 3
advertiser data: 1c ff 06 00 01 09 21 0a bb 0a 75 5b cd 5c 44 45
53 4b 54 4f 50 2d 30 33 4c 31 4a 38 4e

addr: 58:16:55:01:ee:e9 type: 1
rssi: -70
response type: 3
advertiser data: 1e ff 06 00 01 09 20 02 0f c7 70 a0 d1 25 7f fb
3f 2f 04 2c 42 48 ec fa a8 2b 91 4e 1a 43 2f
nsh>

Complete ESP32 Bluetooth Low Energy Initialization Log

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:4
load:0x3fff0034,len:6932
load:0x40078000,len:12756
ho 0 tail 12 room 4
load:0x40080400,len:3856
entry 0x40080684
I (31) boot: ESP-IDF v4.1 2nd stage bootloader                                            
I (31) boot: compile time 22:41:23                                                        
I (31) boot: chip revision: 1                                                             
I (33) boot_comm: chip revision: 1, min. bootloader chip revision: 0                      
I (41) boot.esp32: SPI Speed      : 40MHz                                                 
I (45) boot.esp32: SPI Mode       : DIO                                                   
I (50) boot.esp32: SPI Flash Size : 4MB                                                   
I (54) boot: Enabling RNG early entropy source...                                         
I (60) boot: Partition Table:                                                             
I (63) boot: ## Label            Usage          Type ST Offset   Length                   
I (71) boot:  0 nvs              WiFi data        01 02 00009000 00006000                 
I (78) boot:  1 phy_init         RF data          01 01 0000f000 00001000                 
I (85) boot:  2 factory          factory app      00 00 00010000 00100000                 
I (93) boot: End of partition table                                                       
I (97) boot_comm: chip revision: 1, min. application chip revision: 0                     
I (104) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x10f08 ( 69384) map 
I (140) esp_image: segment 1: paddr=0x00020f30 vaddr=0x3ffc62e0 size=0x01d5c (  7516) load
I (143) esp_image: segment 2: paddr=0x00022c94 vaddr=0x40080000 size=0x00400 (  1024) load
I (147) esp_image: segment 3: paddr=0x0002309c vaddr=0x40080400 size=0x0cf7c ( 53116) load
I (178) esp_image: segment 4: paddr=0x00030020 vaddr=0x400d0020 size=0x567b4 (354228) map 
I (314) esp_image: segment 5: paddr=0x000867dc vaddr=0x4008d37c size=0x0215c (  8540) load
I (326) boot: Loaded app from partition at offset 0x10000                                 
I (326) boot: Disabling RNG early entropy source...                                       
�ABesp32_rng_initialize: Initializing RNG                                                 
esp32_bt_controller_init: BT controller compile version [a4c513b]                         
esp32_bt_controller_init: BT controller compile version [a4c513b]btdm_controller_mem_init]
btdm_controller_mem_init: .bss initialise [0x3ffb0000] - [0x3ffb09a8]                     
btdm_controller_mem_init: .bss initialise [0x3ffb09a8] - [0x3ffb1ddc]                     
btdm_controller_mem_init: .bss initialise [0x3ffb1ddc] - [0x3ffb2730]                     
btdm_controller_mem_init: .bss initialise [0x3ffb2730] - [0x3ffb6388]                     
btdm_controller_mem_init: .bss initialise [0x3ffb8000] - [0x3ffb9a20]                     
btdm_controller_mem_init: .bss initialise [0x3ffbdb28] - [0x3ffbdb5c]                     
esp32_bt_controller_init: Memory initialized!                                             
esp32_bt_controller_init: Going to call btdm_controller_init                              
esp_ble_set_isr: n=5 f=0x4008a974 arg=0 irq=9                                             
esp32_ints_on: Enabled bit 5                                                              
esp_ble_set_isr: n=8 f=0x4008a9b4 arg=0 irq=12                                            
esp32_ints_on: Enabled bit 8                                                              
esp_ble_set_isr: n=7 f=0x4008a95c arg=0 irq=11                                            
esp32_ints_on: Enabled bit 7                                                              
esp32_bt_controller_init: The btdm_controller_init was initialized                        
adapter_coex_register_bt_cb_wrapper: I'm here!                                            
Coex register bt cb faild                                                                 
adapter_coex_schm_register_btdm_callback: I'm here!                                       
Coex register schm btdm cb faild                                                          
adapter_coex_wifi_channel_get: I'm here!                                                  
adapter_coex_schm_status_bit_clear: I'm here!                                             
adapter_coex_schm_status_bit_clear: I'm here!                                             
bt_initialize: btdev 0x3ffc6400                                                           
bt_hci_cmd_create: opcode 0c03 param_len 0                                                
bt_buf_alloc: buf 0x3ffc330c type 0 reserve 1                                             
bt_hci_cmd_create: buf 0x3ffc330c                                                         
bt_buf_extend: buf 0x3ffc330c len 3                                                       
bt_hci_cmd_send_sync: opcode 0c03 len 3                                                   
hci_tx_kthread: started                                                                   
bt_buf_addref: buf 0x3ffc330c (old) ref 1 type 0                                          
hci_tx_kthread: Sending command 0c03 buf 0x3ffc330c to driver                             
esp32_vhci_host_send_packet: len: 4                                                       
esp32_vhci_host_send_packet: 01                                                           
esp32_vhci_host_send_packet: 03                                                           
esp32_vhci_host_send_packet: 0c                                                           
esp32_vhci_host_send_packet: 00                                                           
esp32_ble_recv_cb: len = 7                                                                
esp32_ble_recv_cb: host recv pkt: esp32_ble_recv_cb: 04                                   
esp32_ble_recv_cb: 0e                                                                     
esp32_ble_recv_cb: 04                                                                     
esp32_ble_recv_cb: 05                                                                     
esp32_ble_recv_cb: 03                                                                     
esp32_ble_recv_cb: 0c                                                                     
esp32_ble_recv_cb: 00                                                                     
bt_receive: data 0x3ffcc373 len 6                                                         
bt_buf_alloc: buf 0x3ffc32f4 type 1 reserve 0                                             
bt_buf_extend: buf 0x3ffc32f4 len 6                                                       
priority_rx_work: list 0x3ffc2b58                                                         
priority_rx_work: buf 0x3ffc32f4 type 1 len 6                                             
bt_buf_consume: buf 0x3ffc32f4 len 2                                                      
hci_cmd_complete: opcode 0c03                                                             
bt_buf_consume: buf 0x3ffc32f4 len 3                                                      
hci_reset_complete: status 0                                                              
bt_buf_addref: buf 0x3ffc32f4 (old) ref 1 type 1                                          
bt_buf_release: buf 0x3ffc330c ref 2 type 0                                               
bt_buf_release: Remaining references: 1                                                   
bt_buf_release: buf 0x3ffc32f4 ref 2 type 1                                               
bt_buf_release: Remaining references: 1                                                   
bt_buf_release: buf 0x3ffc330c ref 1 type 0                                               
bt_buf_release: Buffer freed: 0x3ffc330c                                                  
bt_buf_release: buf 0x3ffc330c ref 0 type 0                                               
bt_buf_release: Remaining references: 255                                                 
bt_buf_release: buf 0x3ffc32f4 ref 1 type 1                                               
bt_buf_release: Buffer freed: 0x3ffc32f4                                                  
bt_hci_cmd_create: opcode 1003 param_len 0                                                
bt_buf_alloc: buf 0x3ffc32f4 type 0 reserve 1                                             
bt_hci_cmd_create: buf 0x3ffc32f4                                                         
bt_buf_extend: buf 0x3ffc32f4 len 3                                                       
bt_hci_cmd_send_sync: opcode 1003 len 3                                                   
bt_buf_addref: buf 0x3ffc32f4 (old) ref 1 type 0                                          
hci_tx_kthread: Sending command 1003 buf 0x3ffc32f4 to driver                             
esp32_vhci_host_send_packet: len: 4                                                       
esp32_vhci_host_send_packet: 01                                                           
esp32_vhci_host_send_packet: 03                                                           
esp32_vhci_host_send_packet: 10                                                           
esp32_vhci_host_send_packet: 00                                                           
esp32_ble_recv_cb: len = 15                                                               
esp32_ble_recv_cb: host recv pkt: esp32_ble_recv_cb: 04                                   
esp32_ble_recv_cb: 0e                                                                     
esp32_ble_recv_cb: 0c                                                                     
esp32_ble_recv_cb: 05                                                                     
esp32_ble_recv_cb: 03                                                                     
esp32_ble_recv_cb: 10                                                                     
esp32_ble_recv_cb: 00                                                                     
esp32_ble_recv_cb: bf                                                                     
esp32_ble_recv_cb: ee                                                                     
esp32_ble_recv_cb: cd                                                                     
esp32_ble_recv_cb: fe                                                                     
esp32_ble_recv_cb: db                                                                     
esp32_ble_recv_cb: ff                                                                     
esp32_ble_recv_cb: 7b                                                                     
esp32_ble_recv_cb: 87                                                                     
bt_receive: data 0x3ffcc36b len 14                                                        
bt_buf_alloc: buf 0x3ffc330c type 1 reserve 0                                             
bt_buf_extend: buf 0x3ffc330c len 14                                                      
priority_rx_work: list 0x3ffc2b58                                                         
priority_rx_work: buf 0x3ffc330c type 1 len 14                                            
bt_buf_consume: buf 0x3ffc330c len 2                                                      
hci_cmd_complete: opcode 1003                                                             
bt_buf_consume: buf 0x3ffc330c len 3                                                      
hci_cmd_complete: Unhandled opcode 1003                                                   
bt_buf_addref: buf 0x3ffc330c (old) ref 1 type 1                                          
bt_buf_release: buf 0x3ffc32f4 ref 2 type 0                                               
bt_buf_release: Remaining references: 1                                                   
bt_buf_release: buf 0x3ffc330c ref 2 type 1                                               
bt_buf_release: Remaining references: 1                                                   
bt_buf_release: buf 0x3ffc32f4 ref 1 type 0                                               
bt_buf_release: Buffer freed: 0x3ffc32f4                                                  
bt_buf_release: buf 0x3ffc32f4 ref 0 type 0                                               
bt_buf_release: Remaining references: 255                                                 
read_local_features_complete: status 0                                                    
bt_buf_release: buf 0x3ffc330c ref 1 type 1                                               
bt_buf_release: Buffer freed: 0x3ffc330c                                                  
bt_hci_cmd_create: opcode 1001 param_len 0                                                
bt_buf_alloc: buf 0x3ffc330c type 0 reserve 1                                             
bt_hci_cmd_create: buf 0x3ffc330c                                                         
bt_buf_extend: buf 0x3ffc330c len 3                                                       
bt_hci_cmd_send_sync: opcode 1001 len 3                                                   
bt_buf_addref: buf 0x3ffc330c (old) ref 1 type 0                                          
hci_tx_kthread: Sending command 1001 buf 0x3ffc330c to driver                             
esp32_vhci_host_send_packet: len: 4                                                       
esp32_vhci_host_send_packet: 01                                                           
esp32_vhci_host_send_packet: 01                                                           
esp32_vhci_host_send_packet: 10                                                           
esp32_vhci_host_send_packet: 00                                                           
esp32_ble_recv_cb: len = 15                                                               
esp32_ble_recv_cb: host recv pkt: esp32_ble_recv_cb: 04                                   
esp32_ble_recv_cb: 0e                                                                     
esp32_ble_recv_cb: 0c                                                                     
esp32_ble_recv_cb: 05                                                                     
esp32_ble_recv_cb: 01                                                                     
esp32_ble_recv_cb: 10                                                                     
esp32_ble_recv_cb: 00                                                                     
esp32_ble_recv_cb: 08                                                                     
esp32_ble_recv_cb: 0e                                                                     
esp32_ble_recv_cb: 03                                                                     
esp32_ble_recv_cb: 08                                                                     
esp32_ble_recv_cb: 60                                                                     
esp32_ble_recv_cb: 00                                                                     
esp32_ble_recv_cb: 0e                                                                     
esp32_ble_recv_cb: 03                                                                     
bt_receive: data 0x3ffcc36b len 14                                                        
bt_buf_alloc: buf 0x3ffc32f4 type 1 reserve 0                                             
bt_buf_extend: buf 0x3ffc32f4 len 14                                                      
priority_rx_work: list 0x3ffc2b58                                                         
priority_rx_work: buf 0x3ffc32f4 type 1 len 14                                            
bt_buf_consume: buf 0x3ffc32f4 len 2                                                      
hci_cmd_complete: opcode 1001                                                             
bt_buf_consume: buf 0x3ffc32f4 len 3                                                      
hci_cmd_complete: Unhandled opcode 1001                                                   
bt_buf_addref: buf 0x3ffc32f4 (old) ref 1 type 1                                          
bt_buf_release: buf 0x3ffc330c ref 2 type 0                                               
bt_buf_release: Remaining references: 1                                                   
bt_buf_release: buf 0x3ffc32f4 ref 2 type 1                                               
bt_buf_release: Remaining references: 1                                                   
bt_buf_release: buf 0x3ffc330c ref 1 type 0                                               
bt_buf_release: Buffer freed: 0x3ffc330c                                                  
bt_buf_release: buf 0x3ffc330c ref 0 type 0                                               
bt_buf_release: Remaining references: 255                                                 
read_local_ver_complete: status 0                                                         
bt_buf_release: buf 0x3ffc32f4 ref 1 type 1                                               
bt_buf_release: Buffer freed: 0x3ffc32f4                                                  
bt_hci_cmd_create: opcode 1009 param_len 0                                                
bt_buf_alloc: buf 0x3ffc32f4 type 0 reserve 1                                             
bt_hci_cmd_create: buf 0x3ffc32f4                                                         
bt_buf_extend: buf 0x3ffc32f4 len 3                                                       
bt_hci_cmd_send_sync: opcode 1009 len 3                                                   
bt_buf_addref: buf 0x3ffc32f4 (old) ref 1 type 0                                          
hci_tx_kthread: Sending command 1009 buf 0x3ffc32f4 to driver                             
esp32_vhci_host_send_packet: len: 4                                                       
esp32_vhci_host_send_packet: 01                                                           
esp32_vhci_host_send_packet: 09                                                           
esp32_vhci_host_send_packet: 10                                                           
esp32_vhci_host_send_packet: 00                                                           
esp32_ble_recv_cb: len = 13                                                               
esp32_ble_recv_cb: host recv pkt: esp32_ble_recv_cb: 04                                   
esp32_ble_recv_cb: 0e                                                                     
esp32_ble_recv_cb: 0a                                                                     
esp32_ble_recv_cb: 05                                                                     
esp32_ble_recv_cb: 09                                                                     
esp32_ble_recv_cb: 10                                                                     
esp32_ble_recv_cb: 00                                                                     
esp32_ble_recv_cb: ed                                                                     
esp32_ble_recv_cb: 8b                                                                     
esp32_ble_recv_cb: 53                                                                     
esp32_ble_recv_cb: b2                                                                     
esp32_ble_recv_cb: 67                                                                     
esp32_ble_recv_cb: ae                                                                     
bt_receive: data 0x3ffcc36f len 12                                                        
bt_buf_alloc: buf 0x3ffc330c type 1 reserve 0                                             
bt_buf_extend: buf 0x3ffc330c len 12                                                      
priority_rx_work: list 0x3ffc2b58                                                         
priority_rx_work: buf 0x3ffc330c type 1 len 12                                            
bt_buf_consume: buf 0x3ffc330c len 2                                                      
hci_cmd_complete: opcode 1009                                                             
bt_buf_consume: buf 0x3ffc330c len 3                                                      
hci_cmd_complete: Unhandled opcode 1009                                                   
bt_buf_addref: buf 0x3ffc330c (old) ref 1 type 1                                          
bt_buf_release: buf 0x3ffc32f4 ref 2 type 0                                               
bt_buf_release: Remaining references: 1                                                   
bt_buf_release: buf 0x3ffc330c ref 2 type 1                                               
bt_buf_release: Remaining references: 1                                                   
bt_buf_release: buf 0x3ffc32f4 ref 1 type 0                                               
bt_buf_release: Buffer freed: 0x3ffc32f4                                                  
bt_buf_release: buf 0x3ffc32f4 ref 0 type 0                                               
bt_buf_release: Remaining references: 255                                                 
read_bdaddr_complete: status 0                                                            
bt_buf_release: buf 0x3ffc330c ref 1 type 1                                               
bt_buf_release: Buffer freed: 0x3ffc330c                                                  
bt_hci_cmd_create: opcode 2003 param_len 0                                                
bt_buf_alloc: buf 0x3ffc330c type 0 reserve 1                                             
bt_hci_cmd_create: buf 0x3ffc330c                                                         
bt_buf_extend: buf 0x3ffc330c len 3                                                       
bt_hci_cmd_send_sync: opcode 2003 len 3                                                   
bt_buf_addref: buf 0x3ffc330c (old) ref 1 type 0                                          
hci_tx_kthread: Sending command 2003 buf 0x3ffc330c to driver                             
esp32_vhci_host_send_packet: len: 4                                                       
esp32_vhci_host_send_packet: 01                                                           
esp32_vhci_host_send_packet: 03                                                           
esp32_vhci_host_send_packet: 20                                                           
esp32_vhci_host_send_packet: 00                                                           
esp32_ble_recv_cb: len = 15                                                               
esp32_ble_recv_cb: host recv pkt: esp32_ble_recv_cb: 04                                   
esp32_ble_recv_cb: 0e                                                                     
esp32_ble_recv_cb: 0c                                                                     
esp32_ble_recv_cb: 05                                                                     
esp32_ble_recv_cb: 03                                                                     
esp32_ble_recv_cb: 20                                                                     
esp32_ble_recv_cb: 00                                                                     
esp32_ble_recv_cb: ff                                                                     
esp32_ble_recv_cb: 00                                                                     
esp32_ble_recv_cb: 00                                                                     
esp32_ble_recv_cb: 00                                                                     
esp32_ble_recv_cb: 00                                                                     
esp32_ble_recv_cb: 00                                                                     
esp32_ble_recv_cb: 00                                                                     
esp32_ble_recv_cb: 00                                                                     
bt_receive: data 0x3ffcc36b len 14                                                        
bt_buf_alloc: buf 0x3ffc32f4 type 1 reserve 0                                             
bt_buf_extend: buf 0x3ffc32f4 len 14                                                      
priority_rx_work: list 0x3ffc2b58                                                         
priority_rx_work: buf 0x3ffc32f4 type 1 len 14                                            
bt_buf_consume: buf 0x3ffc32f4 len 2                                                      
hci_cmd_complete: opcode 2003                                                             
bt_buf_consume: buf 0x3ffc32f4 len 3                                                      
hci_cmd_complete: Unhandled opcode 2003                                                   
bt_buf_addref: buf 0x3ffc32f4 (old) ref 1 type 1                                          
bt_buf_release: buf 0x3ffc330c ref 2 type 0                                               
bt_buf_release: Remaining references: 1                                                   
bt_buf_release: buf 0x3ffc32f4 ref 2 type 1                                               
bt_buf_release: Remaining references: 1                                                   
bt_buf_release: buf 0x3ffc330c ref 1 type 0                                               
bt_buf_release: Buffer freed: 0x3ffc330c                                                  
bt_buf_release: buf 0x3ffc330c ref 0 type 0                                               
bt_buf_release: Remaining references: 255                                                 
read_le_features_complete: status 0                                                       
bt_buf_release: buf 0x3ffc32f4 ref 1 type 1                                               
bt_buf_release: Buffer freed: 0x3ffc32f4                                                  
bt_hci_cmd_create: opcode 2002 param_len 0                                                
bt_buf_alloc: buf 0x3ffc32f4 type 0 reserve 1                                             
bt_hci_cmd_create: buf 0x3ffc32f4                                                         
bt_buf_extend: buf 0x3ffc32f4 len 3                                                       
bt_hci_cmd_send_sync: opcode 2002 len 3                                                   
bt_buf_addref: buf 0x3ffc32f4 (old) ref 1 type 0                                          
hci_tx_kthread: Sending command 2002 buf 0x3ffc32f4 to driver                             
esp32_vhci_host_send_packet: len: 4                                                       
esp32_vhci_host_send_packet: 01                                                           
esp32_vhci_host_send_packet: 02                                                           
esp32_vhci_host_send_packet: 20                                                           
esp32_vhci_host_send_packet: 00                                                           
esp32_ble_recv_cb: len = 10                                                               
esp32_ble_recv_cb: host recv pkt: esp32_ble_recv_cb: 04                                   
esp32_ble_recv_cb: 0e                                                                     
esp32_ble_recv_cb: 07                                                                     
esp32_ble_recv_cb: 05                                                                     
esp32_ble_recv_cb: 02                                                                     
esp32_ble_recv_cb: 20                                                                     
esp32_ble_recv_cb: 00                                                                     
esp32_ble_recv_cb: fb                                                                     
esp32_ble_recv_cb: 00                                                                     
esp32_ble_recv_cb: 0a                                                                     
bt_receive: data 0x3ffcc36f len 9                                                         
bt_buf_alloc: buf 0x3ffc330c type 1 reserve 0                                             
bt_buf_extend: buf 0x3ffc330c len 9                                                       
priority_rx_work: list 0x3ffc2b58                                                         
priority_rx_work: buf 0x3ffc330c type 1 len 9                                             
bt_buf_consume: buf 0x3ffc330c len 2                                                      
hci_cmd_complete: opcode 2002                                                             
bt_buf_consume: buf 0x3ffc330c len 3                                                      
hci_cmd_complete: Unhandled opcode 2002                                                   
bt_buf_addref: buf 0x3ffc330c (old) ref 1 type 1                                          
bt_buf_release: buf 0x3ffc32f4 ref 2 type 0                                               
bt_buf_release: Remaining references: 1                                                   
bt_buf_release: buf 0x3ffc330c ref 2 type 1                                               
bt_buf_release: Remaining references: 1                                                   
bt_buf_release: buf 0x3ffc32f4 ref 1 type 0                                               
bt_buf_release: Buffer freed: 0x3ffc32f4                                                  
bt_buf_release: buf 0x3ffc32f4 ref 0 type 0                                               
bt_buf_release: Remaining references: 255                                                 
le_read_buffer_size_complete: status 0                                                    
bt_buf_release: buf 0x3ffc330c ref 1 type 1                                               
bt_buf_release: Buffer freed: 0x3ffc330c                                                  
bt_hci_cmd_create: opcode 0c01 param_len 8                                                
bt_buf_alloc: buf 0x3ffc330c type 0 reserve 1                                             
bt_hci_cmd_create: buf 0x3ffc330c                                                         
bt_buf_extend: buf 0x3ffc330c len 3                                                       
bt_buf_extend: buf 0x3ffc330c len 8                                                       
bt_buf_addref: buf 0x3ffc330c (old) ref 1 type 0                                          
bt_hci_cmd_send_sync: opcode 0c01 len 11                                                  
bt_buf_addref: buf 0x3ffc330c (old) ref 2 type 0                                          
hci_tx_kthread: Sending command 0c01 buf 0x3ffc330c to driver                             
esp32_vhci_host_send_packet: len: 12                                                      
esp32_vhci_host_send_packet: 01                                                           
esp32_vhci_host_send_packet: 01                                                           
esp32_vhci_host_send_packet: 0c                                                           
esp32_vhci_host_send_packet: 08                                                           
esp32_vhci_host_send_packet: 90                                                           
esp32_vhci_host_send_packet: e8                                                           
esp32_vhci_host_send_packet: 04                                                           
esp32_vhci_host_send_packet: 02                                                           
esp32_vhci_host_send_packet: 00                                                           
esp32_vhci_host_send_packet: 80                                                           
esp32_vhci_host_send_packet: 00                                                           
esp32_vhci_host_send_packet: 20                                                           
esp32_ble_recv_cb: len = 7                                                                
esp32_ble_recv_cb: host recv pkt: esp32_ble_recv_cb: 04                                   
esp32_ble_recv_cb: 0e                                                                     
esp32_ble_recv_cb: 04                                                                     
esp32_ble_recv_cb: 05                                                                     
esp32_ble_recv_cb: 01                                                                     
esp32_ble_recv_cb: 0c                                                                     
esp32_ble_recv_cb: 00                                                                     
bt_receive: data 0x3ffcc35f len 6                                                         
bt_buf_alloc: buf 0x3ffc32f4 type 1 reserve 0                                             
bt_buf_extend: buf 0x3ffc32f4 len 6                                                       
priority_rx_work: list 0x3ffc2b58                                                         
priority_rx_work: buf 0x3ffc32f4 type 1 len 6                                             
bt_buf_consume: buf 0x3ffc32f4 len 2                                                      
hci_cmd_complete: opcode 0c01                                                             
bt_buf_consume: buf 0x3ffc32f4 len 3                                                      
hci_cmd_complete: Unhandled opcode 0c01                                                   
bt_buf_addref: buf 0x3ffc32f4 (old) ref 1 type 1                                          
bt_buf_release: buf 0x3ffc330c ref 3 type 0                                               
bt_buf_release: Remaining references: 2                                                   
bt_buf_release: buf 0x3ffc32f4 ref 2 type 1                                               
bt_buf_release: Remaining references: 1                                                   
bt_buf_release: buf 0x3ffc330c ref 2 type 0                                               
bt_buf_release: Remaining references: 1                                                   
bt_buf_release: buf 0x3ffc32f4 ref 1 type 1                                               
bt_buf_release: Buffer freed: 0x3ffc32f4                                                  
bt_buf_release: buf 0x3ffc330c ref 1 type 0                                               
bt_buf_release: Buffer freed: 0x3ffc330c                                                  
bt_hci_cmd_create: opcode 0c33 param_len 7                                                
bt_buf_alloc: buf 0x3ffc330c type 0 reserve 1                                             
bt_hci_cmd_create: buf 0x3ffc330c                                                         
bt_buf_extend: buf 0x3ffc330c len 3                                                       
bt_buf_extend: buf 0x3ffc330c len 7                                                       
bt_buf_addref: buf 0x3ffc330c (old) ref 1 type 0                                          
bt_hci_cmd_send: opcode 0c33 len 10                                                       
bt_hci_cmd_create: opcode 0c31 param_len 1                                                
bt_buf_alloc: buf 0x3ffc32f4 type 0 reserve 1                                             
bt_hci_cmd_create: buf 0x3ffc32f4                                                         
bt_buf_extend: buf 0x3ffc32f4 len 3                                                       
bt_buf_extend: buf 0x3ffc32f4 len 1                                                       
bt_buf_addref: buf 0x3ffc32f4 (old) ref 1 type 0                                          
bt_hci_cmd_send_sync: opcode 0c31 len 4                                                   
bt_buf_addref: buf 0x3ffc330c (old) ref 2 type 0                                          
hci_tx_kthread: Sending command 0c33 buf 0x3ffc330c to driver                             
esp32_vhci_host_send_packet: len: 11                                                      
esp32_vhci_host_send_packet: 01                                                           
esp32_vhci_host_send_packet: 33                                                           
esp32_vhci_host_send_packet: 0c                                                           
esp32_vhci_host_send_packet: 07                                                           
esp32_vhci_host_send_packet: 4a                                                           
esp32_vhci_host_send_packet: 00                                                           
esp32_vhci_host_send_packet: 00                                                           
esp32_vhci_host_send_packet: 14                                                           
esp32_vhci_host_send_packet: 00                                                           
esp32_vhci_host_send_packet: 00                                                           
esp32_vhci_host_send_packet: 00                                                           
esp32_ble_recv_cb: len = 7                                                                
esp32_ble_recv_cb: host recv pkt: esp32_ble_recv_cb: 04                                   
esp32_ble_recv_cb: 0e                                                                     
esp32_ble_recv_cb: 04                                                                     
esp32_ble_recv_cb: 05                                                                     
esp32_ble_recv_cb: 33                                                                     
esp32_ble_recv_cb: 0c                                                                     
esp32_ble_recv_cb: 11                                                                     
bt_receive: data 0x3ffcc35f len 6                                                         
bt_buf_alloc: buf 0x3ffc32dc type 1 reserve 0                                             
bt_buf_extend: buf 0x3ffc32dc len 6                                                       
priority_rx_work: list 0x3ffc2b58                                                         
priority_rx_work: buf 0x3ffc32dc type 1 len 6                                             
bt_buf_consume: buf 0x3ffc32dc len 2                                                      
hci_cmd_complete: opcode 0c33                                                             
bt_buf_consume: buf 0x3ffc32dc len 3                                                      
hci_cmd_complete: Unhandled opcode 0c33                                                   
bt_buf_release: buf 0x3ffc330c ref 3 type 0                                               
bt_buf_release: Remaining references: 2                                                   
bt_buf_release: buf 0x3ffc32dc ref 1 type 1                                               
bt_buf_release: Buffer freed: 0x3ffc32dc                                                  
bt_buf_release: buf 0x3ffc330c ref 2 type 0                                               
bt_buf_release: Remaining references: 1                                                   
bt_buf_addref: buf 0x3ffc32f4 (old) ref 2 type 0                                          
hci_tx_kthread: Sending command 0c31 buf 0x3ffc32f4 to driver                             
esp32_vhci_host_send_packet: len: 5                                                       
esp32_vhci_host_send_packet: 01                                                           
esp32_vhci_host_send_packet: 31                                                           
esp32_vhci_host_send_packet: 0c                                                           
esp32_vhci_host_send_packet: 01                                                           
esp32_vhci_host_send_packet: 01                                                           
esp32_ble_recv_cb: len = 7                                                                
esp32_ble_recv_cb: host recv pkt: esp32_ble_recv_cb: 04                                   
esp32_ble_recv_cb: 0e                                                                     
esp32_ble_recv_cb: 04                                                                     
esp32_ble_recv_cb: 05                                                                     
esp32_ble_recv_cb: 31                                                                     
esp32_ble_recv_cb: 0c                                                                     
esp32_ble_recv_cb: 00                                                                     
bt_receive: data 0x3ffcc363 len 6                                                         
bt_buf_alloc: buf 0x3ffc32dc type 1 reserve 0                                             
bt_buf_extend: buf 0x3ffc32dc len 6                                                       
priority_rx_work: list 0x3ffc2b58                                                         
priority_rx_work: buf 0x3ffc32dc type 1 len 6                                             
bt_buf_consume: buf 0x3ffc32dc len 2                                                      
hci_cmd_complete: opcode 0c31                                                             
bt_buf_consume: buf 0x3ffc32dc len 3                                                      
hci_cmd_complete: Unhandled opcode 0c31                                                   
bt_buf_addref: buf 0x3ffc32dc (old) ref 1 type 1                                          
bt_buf_release: buf 0x3ffc32f4 ref 3 type 0                                               
bt_buf_release: Remaining references: 2                                                   
bt_buf_release: buf 0x3ffc32dc ref 2 type 1                                               
bt_buf_release: Remaining references: 1                                                   
bt_buf_release: buf 0x3ffc32f4 ref 2 type 0                                               
bt_buf_release: Remaining references: 1                                                   
bt_buf_release: buf 0x3ffc32dc ref 1 type 1                                               
bt_buf_release: Buffer freed: 0x3ffc32dc                                                  
bt_buf_release: buf 0x3ffc32f4 ref 1 type 0                                               
bt_buf_release: Buffer freed: 0x3ffc32f4                                                  
bt_hci_cmd_create: opcode 0c6d param_len 2                                                
bt_buf_alloc: buf 0x3ffc32f4 type 0 reserve 1                                             
bt_hci_cmd_create: buf 0x3ffc32f4                                                         
bt_buf_extend: buf 0x3ffc32f4 len 3                                                       
bt_buf_extend: buf 0x3ffc32f4 len 2                                                       
bt_buf_addref: buf 0x3ffc32f4 (old) ref 1 type 0                                          
bt_hci_cmd_send_sync: opcode 0c6d len 5                                                   
bt_buf_addref: buf 0x3ffc32f4 (old) ref 2 type 0                                          
hci_tx_kthread: Sending command 0c6d buf 0x3ffc32f4 to driver                             
esp32_vhci_host_send_packet: len: 6                                                       
esp32_vhci_host_send_packet: 01                                                           
esp32_vhci_host_send_packet: 6d                                                           
esp32_vhci_host_send_packet: 0c                                                           
esp32_vhci_host_send_packet: 02                                                           
esp32_vhci_host_send_packet: 01                                                           
esp32_vhci_host_send_packet: 00                                                           
esp32_ble_recv_cb: len = 7                                                                
esp32_ble_recv_cb: host recv pkt: esp32_ble_recv_cb: 04                                   
esp32_ble_recv_cb: 0e                                                                     
esp32_ble_recv_cb: 04                                                                     
esp32_ble_recv_cb: 05                                                                     
esp32_ble_recv_cb: 6d                                                                     
esp32_ble_recv_cb: 0c                                                                     
esp32_ble_recv_cb: 00                                                                     
bt_receive: data 0x3ffcc363 len 6                                                         
bt_buf_alloc: buf 0x3ffc32dc type 1 reserve 0                                             
bt_buf_extend: buf 0x3ffc32dc len 6                                                       
priority_rx_work: list 0x3ffc2b58                                                         
priority_rx_work: buf 0x3ffc32dc type 1 len 6                                             
bt_buf_consume: buf 0x3ffc32dc len 2                                                      
hci_cmd_complete: opcode 0c6d                                                             
bt_buf_consume: buf 0x3ffc32dc len 3                                                      
hci_cmd_complete: Unhandled opcode 0c6d                                                   
bt_buf_addref: buf 0x3ffc32dc (old) ref 1 type 1                                          
bt_buf_release: buf 0x3ffc32f4 ref 3 type 0                                               
bt_buf_release: Remaining references: 2                                                   
bt_buf_release: buf 0x3ffc32dc ref 2 type 1                                               
bt_buf_release: Remaining references: 1                                                   
bt_buf_release: buf 0x3ffc32f4 ref 2 type 0                                               
bt_buf_release: Remaining references: 1                                                   
bt_buf_release: buf 0x3ffc32dc ref 1 type 1                                               
bt_buf_release: Buffer freed: 0x3ffc32dc                                                  
bt_buf_release: buf 0x3ffc32f4 ref 1 type 0                                               
bt_buf_release: Buffer freed: 0x3ffc32f4                                                  
hci_initialize: HCI ver 8 rev 782, manufacturer 96                                        
hci_initialize: ACL buffers: pkts 10 mtu 251                                              
bt_l2cap_chan_register: CID 0x0004                                                        
bt_l2cap_chan_register: CID 0x0006                                                        
bt_l2cap_chan_register: CID 0x0005                                                        
                                                                                          
NuttShell (NSH) NuttX-10.1.0                                                              
nsh> 

Primeiros passos com o AWS

Resolvi finalmente testar o Amazon AWS, depois de anos ignorando esta solução por achar a Amazon um dos maiores monopólios em relação ao Cloud Computing.

Pra quem quiser começar, primeiro você terá que criar uma conta, pode começar com a solução gratuita: https://aws.amazon.com/free/

Você terá que informar seu cartão de crédito, eles vão retirar R$ 3,00 e em seguida devolver, só pra ter certeza que você é um usuário válido.

Após logar no sistema você deverá criar uma instância de uma máquina virtual Amazon EC2. Eu optei por usar o Ubuntu, que é um dos mais usados.

Você também precisará criar um par de chaves Pública/Privada. Para isso acesse o painel de controle: https://console.aws.amazon.com/ec2/ e vá em Rede e segurança e clique em Pares de chaves e finalmente clique no botão Create key pair no topo da página. Dê um nome para esta chave, por exemplo AWSLinux.

Após criar o par de chaves o sistema vai dar a opção de baixar a sua chave privada. Salve este arquivo (AWSLinux.pem) num local seguro no seu computador.

Você também vai precisar mudar a permissão deste arquivo, do contrário o ssh não vai permitir que você use ele como sua chave privada. Então execute o comando:

$ sudo chmod 0600 ~/AWSLinux.perm

Agora você pode ir na opção Instance -> Instances no painel de controle pra ver o IP que a Amazon definiu para a sua instância, no meu caso “Public IPv4 address” era 3.144.104.2.

Já temos tudo que precisamos pra conectar:

$ ssh -i ~/AWSLinux.pem ubuntu@3.144.104.21
Welcome to Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-1045-aws x86_64)
Documentation: https://help.ubuntu.com
Management: https://landscape.canonical.com
Support: https://ubuntu.com/advantage System information as of Mon Sep 6 17:20:35 UTC 2021 System load: 0.0 Processes: 100
Usage of /: 16.4% of 7.69GB Users logged in: 0
Memory usage: 22% IPv4 address for eth0: XXX.XX.XX.XXX
Swap usage: 0%
1 update can be applied immediately.
To see these additional updates run: apt list --upgradable
The list of available updates is more than a week old.
To check for new updates run: sudo apt update
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
To run a command as administrator (user "root"), use "sudo ".
See "man sudo_root" for details.
ubuntu@ip-XXX-XX-XX-XXX:~$ uname -a
Linux ip-XXX-XX-XX-XXX 5.4.0-1045-aws #47-Ubuntu SMP Tue Apr 13 07:02:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@ip-XXX-XX-XX-XXX:~$

Using Internet in the NuttX running on simulator

When using NuttX with TCP/IP support in the simulator you will not get network to the Internet. No ping to google, etc.

Fortunately it is easy to fix:

$ sudo sysctl -w net.ipv4.ip_forward=1

or

$ sudo ./tools/simhostroute.sh

Then everything works as expected:

nsh> ping 8.8.8.8
PING 8.8.8.8 56 bytes of data
56 bytes from 8.8.8.8: icmp_seq=0 time=40 ms
56 bytes from 8.8.8.8: icmp_seq=1 time=40 ms
56 bytes from 8.8.8.8: icmp_seq=2 time=40 ms
nsh> ping google.com
PING 142.250.218.174 56 bytes of data
56 bytes from 142.250.218.174: icmp_seq=0 time=40 ms
56 bytes from 142.250.218.174: icmp_seq=1 time=40 ms
56 bytes from 142.250.218.174: icmp_seq=2 time=40 ms

Flashing STM32H745I-DISCO board

$ sudo openocd -f interface/stlink.cfg -f target/stm32h7x.cfg -c init -c "reset halt" -c "flash write_image erase nuttx.bin 0x08000000"
Open On-Chip Debugger 0.11.0+dev-00062-g6405d35f3-dirty (2021-05-15-10:34)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select '.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : clock speed 1800 kHz
Info : STLINK V3J3M2 (API v3) VID:PID 0483:374E
Info : Target voltage: 3.274900
Info : stm32h7x.cpu0: hardware has 8 breakpoints, 4 watchpoints
Info : starting gdb server for stm32h7x.cpu0 on 3333
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08000340 msp: 0x24000ec8
Info : Device: STM32H74x/75x
Info : flash size probed value 2048
Info : STM32H7 flash has dual banks
Info : Bank (0) size is 1024 kb, base address is 0x08000000
Info : Padding image section 0 at 0x08017e10 with 16 bytes (bank write end alignment)
Warn : Adding extra erase range, 0x08017e20 .. 0x0801ffff
auto erase enabled
wrote 97824 bytes from file nuttx.bin in 2.126441s (44.925 KiB/s)
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
^Cshutdown command invoked