Month: September 2021

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