After burning the hex( nRF52840DK-QANI-FreeRTOS_full_QNI_3_0_0.hex) file, the device ID of the uwb module can be correctly identified, and the connection can be established with the mobile app, but the uwb related ranging data cannot be obtained. What could be the cause of this problem?
nrf52840 output RTTlog as follows:
00> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
00> app: Notification is enabled
00> app: Connected
00> peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Encryption
00> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
00> app: Notification is enabled
00> app: App requests accessory config data
00> THREAD NAME Stack usage
00> defaultTask 2652/4304
00> IDLE 308/512
00> reportTask 188/4096
00> BLE 744/1024
00> logger 428/1024
00> Tmr Svc 156/512
00> mcpsTask 172/1600
00> Total HEAP 51200
00> Current HEAP used 26568
00> Max HEAP used 26832
00> app: Slow advertising.
00> app: Disconnected
00> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
00> app: Notification is enabled
00> app: Connected
00> peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Encryption
00> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
00> app: Notification is enabled
00> app: App requests accessory config data
00> app: Slow advertising.
00> app: Disconnected
00> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
00> app: Notification is enabled
00> app: Connected
00> peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Encryption
00> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
00> app: Notification is enabled
00> app: App requests accessory config data
00> app: Slow advertising.
00> app: Disconnected
00> Application: Nearby Interaction
00> BOARD: nRF52840DK
00> OS: FreeRTOS
00> Version: 3.0.0
00> DW3XXX Device Driver Version 06.00.14
00> MAC: cmsis_v1_R11.9.2
00> ACCESSORY_RANGING_ROLE: Initiator
00> app: Slow advertising.
00> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
00> app: Notification is enabled
00> app: Connected
00> peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Encryption
00> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
00> app: Notification is enabled
00> app: App requests accessory config data
00> THREAD NAME Stack usage
00> defaultTask 2652/4304
00> IDLE 308/512
00> mcpsTask 172/1600
00> reportTask 188/4096
00> BLE 744/1024
00> logger 428/1024
00> Tmr Svc 156/512
00> Total HEAP 51200
00> Current HEAP used 26568
00> Max HEAP used 26832
00> app: Slow advertising.
00> app: Disconnected
00> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
00> app: Notification is enabled
00> app: Connected
00> peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Encryption
00> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
00> app: Notification is enabled
00> app: App requests accessory config data
00> app: Slow advertising.
00> app: Disconnected
00> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
00> app: Notification is enabled
00> app: Connected
00> peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Encryption
00> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
00> app: Notification is enabled
00> app: App requests accessory config data
00> app: Slow advertising.
00> app: Disconnected
Wish Best
zhiguo77
Greetings @zhiguo77 !
It seems to be a mismatch in the BLE peer registers between the Qorvo device and the iPhone.
To fix it you have to use the erase option on J-Flash Lite before flashing the nRF52840 and then flash it again. Also, go to the iPhone Settings→Blueetooth→MY DEVICES, find the nRF52840 device, click on the info button (blue “i” on the right), and then on “Forget this device”. After that, you can start the Background app, it will request the device to be paired again and TWR shall work.
The issue happens when you delete the pairing information from one of the devices, for nRF52840 it is in the non-volatile memory and is not overwritten during the flashing process, on the iPhone it is on Settings. When it happens the best option is to delete on both sides and start again.
Please let me know if it worked!
Kind regards!
Thank you for your reply. I have already solved it. There are some problems on my hardware
Wish Best
zhiguo77