v01d commented on issue #2084:
URL: 
https://github.com/apache/incubator-nuttx/issues/2084#issuecomment-716163289


   I had this fix as part of my work on the nRF52 LL branch, while I was still 
using NuttX's stack. With the linked changed initialization now goes as far as:
   
   ```
   bt_initialize: btdev 0x56126d485080
   bt_hci_cmd_create: opcode 0c03 param_len 0
   bt_buf_alloc: buf 0x56126d488590 type 0 reserve 0
   bt_hci_cmd_create: buf 0x56126d488590
   bt_buf_extend: buf 0x56126d488590 len 3
   bt_hci_cmd_send_sync: opcode 0c03 len 3
   hci_tx_kthread: started
   hci_tx_kthread: Sending command 0c03 buf 0x56126d488590 to driver
   btnull_send: Bit bucket: length 3
   btnull_send: CMD: 0c03
   bt_buf_alloc: buf 0x56126d488560 type 1 reserve 0
   btnull_send: Send CMD complete event
   bt_hci_receive: buf 0x56126d488560 len 5
   priority_rx_work: list 0x56126d488650
   priority_rx_work: buf 0x56126d488560 type 1 len 5
   bt_buf_consume: buf 0x56126d488560 len 2
   hci_cmd_complete: opcode 0c03
   bt_buf_consume: buf 0x56126d488560 len 3
   hci_reset_complete: status 0
   bt_buf_addref: buf 0x56126d488560 (old) ref 1 type 1
   bt_buf_release: buf 0x56126d488560 ref 2 type 1
   bt_buf_release: Remaining references: 1
   bt_buf_release: buf 0x56126d488590 ref 1 type 0
   bt_buf_release: Buffer freed: 0x56126d488590
   bt_buf_release: buf 0x56126d488560 ref 1 type 1
   bt_buf_release: Buffer freed: 0x56126d488560
   bt_hci_cmd_create: opcode 1003 param_len 0
   bt_buf_alloc: buf 0x56126d488560 type 0 reserve 0
   bt_hci_cmd_create: buf 0x56126d488560
   bt_buf_extend: buf 0x56126d488560 len 3
   bt_hci_cmd_send_sync: opcode 1003 len 3
   hci_tx_kthread: Sending command 1003 buf 0x56126d488560 to driver
   btnull_send: Bit bucket: length 3
   btnull_send: CMD: 1003
   bt_buf_alloc: buf 0x56126d488590 type 1 reserve 0
   btnull_send: Send CMD complete event
   bt_hci_receive: buf 0x56126d488590 len 14
   priority_rx_work: list 0x56126d488650
   priority_rx_work: buf 0x56126d488590 type 1 len 14
   bt_buf_consume: buf 0x56126d488590 len 2
   hci_cmd_complete: opcode 1003
   bt_buf_consume: buf 0x56126d488590 len 3
   hci_cmd_complete: Unhandled opcode 1003
   bt_buf_addref: buf 0x56126d488590 (old) ref 1 type 1
   bt_buf_release: buf 0x56126d488590 ref 2 type 1
   bt_buf_release: Remaining references: 1
   bt_buf_release: buf 0x56126d488560 ref 1 type 0
   bt_buf_release: Buffer freed: 0x56126d488560
   read_local_features_complete: status 0
   bt_buf_release: buf 0x56126d488590 ref 1 type 1
   bt_buf_release: Buffer freed: 0x56126d488590
   bt_hci_cmd_create: opcode 1001 param_len 0
   bt_buf_alloc: buf 0x56126d488590 type 0 reserve 0
   bt_hci_cmd_create: buf 0x56126d488590
   bt_buf_extend: buf 0x56126d488590 len 3
   bt_hci_cmd_send_sync: opcode 1001 len 3
   hci_tx_kthread: Sending command 1001 buf 0x56126d488590 to driver
   btnull_send: Bit bucket: length 3
   btnull_send: CMD: 1001
   bt_buf_alloc: buf 0x56126d488560 type 1 reserve 0
   btnull_send: Send CMD complete event
   bt_hci_receive: buf 0x56126d488560 len 5
   priority_rx_work: list 0x56126d488650
   priority_rx_work: buf 0x56126d488560 type 1 len 5
   bt_buf_consume: buf 0x56126d488560 len 2
   hci_cmd_complete: opcode 1001
   bt_buf_consume: buf 0x56126d488560 len 3
   hci_cmd_complete: Unhandled opcode 1001
   bt_buf_addref: buf 0x56126d488560 (old) ref 1 type 1
   bt_buf_release: buf 0x56126d488560 ref 2 type 1
   bt_buf_release: Remaining references: 1
   bt_buf_release: buf 0x56126d488590 ref 1 type 0
   bt_buf_release: Buffer freed: 0x56126d488590
   read_local_ver_complete: status 0
   bt_buf_release: buf 0x56126d488560 ref 1 type 1
   bt_buf_release: Buffer freed: 0x56126d488560
   bt_hci_cmd_create: opcode 1009 param_len 0
   bt_buf_alloc: buf 0x56126d488560 type 0 reserve 0
   bt_hci_cmd_create: buf 0x56126d488560
   bt_buf_extend: buf 0x56126d488560 len 3
   bt_hci_cmd_send_sync: opcode 1009 len 3
   hci_tx_kthread: Sending command 1009 buf 0x56126d488560 to driver
   btnull_send: Bit bucket: length 3
   btnull_send: CMD: 1009
   bt_buf_alloc: buf 0x56126d488590 type 1 reserve 0
   btnull_send: Send CMD complete event
   bt_hci_receive: buf 0x56126d488590 len 12
   priority_rx_work: list 0x56126d488650
   priority_rx_work: buf 0x56126d488590 type 1 len 12
   bt_buf_consume: buf 0x56126d488590 len 2
   hci_cmd_complete: opcode 1009
   bt_buf_consume: buf 0x56126d488590 len 3
   hci_cmd_complete: Unhandled opcode 1009
   bt_buf_addref: buf 0x56126d488590 (old) ref 1 type 1
   bt_buf_release: buf 0x56126d488590 ref 2 type 1
   bt_buf_release: Remaining references: 1
   bt_buf_release: buf 0x56126d488560 ref 1 type 0
   bt_buf_release: Buffer freed: 0x56126d488560
   read_bdaddr_complete: status 0
   bt_buf_release: buf 0x56126d488590 ref 1 type 1
   bt_buf_release: Buffer freed: 0x56126d488590
   bt_hci_cmd_create: opcode 2003 param_len 0
   bt_buf_alloc: buf 0x56126d488590 type 0 reserve 0
   bt_hci_cmd_create: buf 0x56126d488590
   bt_buf_extend: buf 0x56126d488590 len 3
   bt_hci_cmd_send_sync: opcode 2003 len 3
   hci_tx_kthread: Sending command 2003 buf 0x56126d488590 to driver
   btnull_send: Bit bucket: length 3
   btnull_send: CMD: 2003
   bt_buf_alloc: buf 0x56126d488560 type 1 reserve 0
   btnull_send: Send CMD complete event
   bt_hci_receive: buf 0x56126d488560 len 14
   priority_rx_work: list 0x56126d488650
   priority_rx_work: buf 0x56126d488560 type 1 len 14
   bt_buf_consume: buf 0x56126d488560 len 2
   hci_cmd_complete: opcode 2003
   bt_buf_consume: buf 0x56126d488560 len 3
   hci_cmd_complete: Unhandled opcode 2003
   bt_buf_addref: buf 0x56126d488560 (old) ref 1 type 1
   bt_buf_release: buf 0x56126d488560 ref 2 type 1
   bt_buf_release: Remaining references: 1
   bt_buf_release: buf 0x56126d488590 ref 1 type 0
   bt_buf_release: Buffer freed: 0x56126d488590
   read_le_features_complete: status 0
   bt_buf_release: buf 0x56126d488560 ref 1 type 1
   bt_buf_release: Buffer freed: 0x56126d488560
   bt_hci_cmd_create: opcode 2002 param_len 0
   bt_buf_alloc: buf 0x56126d488560 type 0 reserve 0
   bt_hci_cmd_create: buf 0x56126d488560
   bt_buf_extend: buf 0x56126d488560 len 3
   bt_hci_cmd_send_sync: opcode 2002 len 3
   hci_tx_kthread: Sending command 2002 buf 0x56126d488560 to driver
   btnull_send: Bit bucket: length 3
   btnull_send: CMD: 2002
   bt_buf_alloc: buf 0x56126d488590 type 1 reserve 0
   btnull_send: Send CMD complete event
   bt_hci_receive: buf 0x56126d488590 len 9
   priority_rx_work: list 0x56126d488650
   priority_rx_work: buf 0x56126d488590 type 1 len 9
   bt_buf_consume: buf 0x56126d488590 len 2
   hci_cmd_complete: opcode 2002
   bt_buf_consume: buf 0x56126d488590 len 3
   hci_cmd_complete: Unhandled opcode 2002
   bt_buf_addref: buf 0x56126d488590 (old) ref 1 type 1
   bt_buf_release: buf 0x56126d488590 ref 2 type 1
   bt_buf_release: Remaining references: 1
   bt_buf_release: buf 0x56126d488560 ref 1 type 0
   bt_buf_release: Buffer freed: 0x56126d488560
   le_read_buffer_size_complete: status 0
   bt_buf_release: buf 0x56126d488590 ref 1 type 1
   bt_buf_release: Buffer freed: 0x56126d488590
   bt_hci_cmd_create: opcode 0c01 param_len 8
   bt_buf_alloc: buf 0x56126d488590 type 0 reserve 0
   bt_hci_cmd_create: buf 0x56126d488590
   bt_buf_extend: buf 0x56126d488590 len 3
   bt_buf_extend: buf 0x56126d488590 len 8
   bt_hci_cmd_send_sync: opcode 0c01 len 11
   hci_tx_kthread: Sending command 0c01 buf 0x56126d488590 to driver
   btnull_send: Bit bucket: length 11
   btnull_send: CMD: 0c01
   bt_buf_alloc: buf 0x56126d488560 type 1 reserve 0
   btnull_send: Send CMD complete event
   bt_hci_receive: buf 0x56126d488560 len 5
   priority_rx_work: list 0x56126d488650
   priority_rx_work: buf 0x56126d488560 type 1 len 5
   bt_buf_consume: buf 0x56126d488560 len 2
   hci_cmd_complete: opcode 0c01
   bt_buf_consume: buf 0x56126d488560 len 3
   hci_cmd_complete: Unhandled opcode 0c01
   bt_buf_addref: buf 0x56126d488560 (old) ref 1 type 1
   bt_buf_release: buf 0x56126d488560 ref 2 type 1
   bt_buf_release: Remaining references: 1
   bt_buf_release: buf 0x56126d488560 ref 1 type 1
   bt_buf_release: Buffer freed: 0x56126d488560
   bt_buf_release: buf 0x56126d488590 ref 1 type 0
   bt_buf_release: Buffer freed: 0x56126d488590
   bt_hci_cmd_create: opcode 0c33 param_len 7
   bt_buf_alloc: buf 0x56126d488590 type 0 reserve 0
   bt_hci_cmd_create: buf 0x56126d488590
   bt_buf_extend: buf 0x56126d488590 len 3
   bt_buf_extend: buf 0x56126d488590 len 7
   bt_hci_cmd_send: opcode 0c33 len 10
   bt_hci_cmd_create: opcode 0c31 param_len 1
   bt_buf_alloc: buf 0x56126d488560 type 0 reserve 0
   bt_hci_cmd_create: buf 0x56126d488560
   bt_buf_extend: buf 0x56126d488560 len 3
   bt_buf_extend: buf 0x56126d488560 len 1
   bt_hci_cmd_send_sync: opcode 0c31 len 4
   hci_tx_kthread: Sending command 0c33 buf 0x56126d488590 to driver
   btnull_send: Bit bucket: length 10
   btnull_send: CMD: 0c33
   bt_buf_alloc: buf 0x56126d488530 type 1 reserve 0
   btnull_send: Send CMD complete event
   bt_hci_receive: buf 0x56126d488530 len 5
   priority_rx_work: list 0x56126d488650
   priority_rx_work: buf 0x56126d488530 type 1 len 5
   bt_buf_consume: buf 0x56126d488530 len 2
   hci_cmd_complete: opcode 0c33
   bt_buf_consume: buf 0x56126d488530 len 3
   hci_cmd_complete: Unhandled opcode 0c33
   bt_buf_release: buf 0x56126d488590 ref 1 type 0
   bt_buf_release: Buffer freed: 0x56126d488590
   bt_buf_release: buf 0x56126d488530 ref 1 type 1
   bt_buf_release: Buffer freed: 0x56126d488530
   hci_tx_kthread: Sending command 0c31 buf 0x56126d488560 to driver
   btnull_send: Bit bucket: length 4
   btnull_send: CMD: 0c31
   bt_buf_alloc: buf 0x56126d488530 type 1 reserve 0
   btnull_send: Send CMD complete event
   bt_hci_receive: buf 0x56126d488530 len 5
   priority_rx_work: list 0x56126d488650
   priority_rx_work: buf 0x56126d488530 type 1 len 5
   bt_buf_consume: buf 0x56126d488530 len 2
   hci_cmd_complete: opcode 0c31
   bt_buf_consume: buf 0x56126d488530 len 3
   hci_cmd_complete: Unhandled opcode 0c31
   bt_buf_addref: buf 0x56126d488530 (old) ref 1 type 1
   bt_buf_release: buf 0x56126d488530 ref 2 type 1
   bt_buf_release: Remaining references: 1
   bt_buf_release: buf 0x56126d488530 ref 1 type 1
   bt_buf_release: Buffer freed: 0x56126d488530
   bt_buf_release: buf 0x56126d488560 ref 1 type 0
   bt_buf_release: Buffer freed: 0x56126d488560
   bt_hci_cmd_create: opcode 0c6d param_len 2
   bt_buf_alloc: buf 0x56126d488560 type 0 reserve 0
   bt_hci_cmd_create: buf 0x56126d488560
   bt_buf_extend: buf 0x56126d488560 len 3
   bt_buf_extend: buf 0x56126d488560 len 2
   bt_hci_cmd_send_sync: opcode 0c6d len 5
   hci_tx_kthread: Sending command 0c6d buf 0x56126d488560 to driver
   btnull_send: Bit bucket: length 5
   btnull_send: CMD: 0c6d
   bt_buf_alloc: buf 0x56126d488530 type 1 reserve 0
   btnull_send: Send CMD complete event
   bt_hci_receive: buf 0x56126d488530 len 5
   priority_rx_work: list 0x56126d488650
   priority_rx_work: buf 0x56126d488530 type 1 len 5
   bt_buf_consume: buf 0x56126d488530 len 2
   hci_cmd_complete: opcode 0c6d
   bt_buf_consume: buf 0x56126d488530 len 3
   hci_cmd_complete: Unhandled opcode 0c6d
   bt_buf_addref: buf 0x56126d488530 (old) ref 1 type 1
   bt_buf_release: buf 0x56126d488530 ref 2 type 1
   bt_buf_release: Remaining references: 1
   bt_buf_release: buf 0x56126d488530 ref 1 type 1
   bt_buf_release: Buffer freed: 0x56126d488530
   bt_buf_release: buf 0x56126d488560 ref 1 type 0
   bt_buf_release: Buffer freed: 0x56126d488560
   hci_initialize: HCI ver 0 rev 0, manufacturer 0
   hci_initialize: ACL buffers: pkts 1 mtu 79
   bt_l2cap_chan_register: CID 0x0004
   bt_l2cap_chan_register: CID 0x0006
   aes_test: Test aes-cmac0: AES CMAC of message with len 0
   le_encrypt: key 3c4fcf098815f7aba6d2ae2816157e2b plaintext 
00000000000000000000000000000000
   bt_hci_cmd_create: opcode 2017 param_len 32
   bt_buf_alloc: buf 0x56126d488560 type 0 reserve 0
   bt_hci_cmd_create: buf 0x56126d488560
   bt_buf_extend: buf 0x56126d488560 len 3
   bt_buf_extend: buf 0x56126d488560 len 32
   bt_hci_cmd_send_sync: opcode 2017 len 35
   hci_tx_kthread: Sending command 2017 buf 0x56126d488560 to driver
   btnull_send: Bit bucket: length 35
   btnull_send: CMD: 2017
   bt_buf_alloc: buf 0x56126d488530 type 1 reserve 0
   btnull_send: Send CMD complete event
   bt_hci_receive: buf 0x56126d488530 len 5
   priority_rx_work: list 0x56126d488650
   priority_rx_work: buf 0x56126d488530 type 1 len 5
   bt_buf_consume: buf 0x56126d488530 len 2
   hci_cmd_complete: opcode 2017
   bt_buf_consume: buf 0x56126d488530 len 3
   hci_cmd_complete: Unhandled opcode 2017
   bt_buf_addref: buf 0x56126d488530 (old) ref 1 type 1
   bt_buf_release: buf 0x56126d488530 ref 2 type 1
   bt_buf_release: Remaining references: 1
   bt_buf_release: buf 0x56126d488560 ref 1 type 0
   bt_buf_release: Buffer freed: 0x56126d488560
   bt_buf_release: buf 0x56126d488530 ref 1 type 1
   bt_buf_release: Buffer freed: 0x56126d488530
   le_encrypt: enc_data 00000000000000000000000000000000
   cmac_subkey: l 00000000000000000000000000000000
   bt_smp_aes_cmac: key 2b7e151628aed2a6abf7158809cf4f3c subkeys k1 
00000000000000000000000000000000 k2 00000000000000000000000000000000
   bt_smp_aes_cmac: len 0 n 1 flag 0
   le_encrypt: key 3c4fcf098815f7aba6d2ae2816157e2b plaintext 
00000000000000000000000000000080
   bt_hci_cmd_create: opcode 2017 param_len 32
   bt_buf_alloc: buf 0x56126d488530 type 0 reserve 0
   bt_hci_cmd_create: buf 0x56126d488530
   bt_buf_extend: buf 0x56126d488530 len 3
   bt_buf_extend: buf 0x56126d488530 len 32
   bt_hci_cmd_send_sync: opcode 2017 len 35
   hci_tx_kthread: Sending command 2017 buf 0x56126d488530 to driver
   btnull_send: Bit bucket: length 35
   btnull_send: CMD: 2017
   bt_buf_alloc: buf 0x56126d488560 type 1 reserve 0
   btnull_send: Send CMD complete event
   bt_hci_receive: buf 0x56126d488560 len 5
   priority_rx_work: list 0x56126d488650
   priority_rx_work: buf 0x56126d488560 type 1 len 5
   bt_buf_consume: buf 0x56126d488560 len 2
   hci_cmd_complete: opcode 2017
   bt_buf_consume: buf 0x56126d488560 len 3
   hci_cmd_complete: Unhandled opcode 2017
   hci_cmd_done: WARNING: status 207
   bt_buf_release: buf 0x56126d488560 ref 1 type 1
   bt_buf_release: Buffer freed: 0x56126d488560
   bt_hci_cmd_send_sync: ERROR:  Failed get return parameters
   bt_buf_release: buf 0x56126d488530 ref 1 type 0
   bt_buf_release: Buffer freed: 0x56126d488530
   aes_test: ERROR: Test aes-cmac0: Failed
   smp_self_test: ERROR: SMP AES-CMAC self tests failed
   ERROR: btnull_register() failed: -1
   ```
   
   I'm not really sure what is the failure about, maybe some feature that needs 
enabling.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to