DWM3001CDK ranging with iPhone without Bluetooth connection

Hi there

I am testing nearby interaction app with DWM3001CDK and iPhone.
It seems to require Bluetooth connection between DWM3001CDK and iPhone.
If Bluetooth is disconnected, they fail to measure the distance.

When measuring the distance between CDK devices, up to 150m is measured, but when measuring the distance between the iPhone and the CDK device, only about 30m is measured.

I think this is because Bluetooth paring is disconnected.

Is there any way to measure the distance even if Bluetooth connection is disconnected in nearby interaction with iPhone?

Regards

Hi @jiwoong !
Stopping UWB Two-Way Ranging is the default behavior on both sides, iOS and Qorvo devices, however, BLE is not required after starting ranging.
You can keep the UWB TWR when the BLE connection is dropped, but you have to plan how to handle timeout issues and implement it in these functions according to what you defined as the default behavior.

On the firmware side, it happens in \Src\Comm\Src\BLE\ble.c, ble_evt_handler().
I think timeout events (BLE_GATTC_EVT_TIMEOUT and BLE_GATTS_EVT_TIMEOUT) will lead to disconnection and then the BLE_GAP_EVT_DISCONNECTED will happen, there ble_evt_disconnected_handler() is called, which calls niq_stop_uwb().

On the iOS side, it happens in \NINearbyAccessorySample\QorvoDemoViewController.swift, accessoryDisconnected().
It is the BLE disconnection handler and the default action is to invalidate the NI Session related to the device disconnected.

Hope it gives you a starting point!
Kind regards!

1 Like

Hello @carlos.silva.

I have a question related to this topic.
I have a problem with random disconnection between DWM3001CDK and iPhone which uses a nearby interaction app.

Connection is often disconnected suddenly. At this time, one of the LED light on the CDK is turned off which means disconnection, and CDK’s distance information or device name itself is disappeared from connected accessories list on app.
If I try to reconnect to the CDK on the app, CDK works again.

Does this random disconnection issue also relate to timeout events on the firmware side?
And could you please tell me where can I find the file below that you mentioned at the last answer and how can I edit the firmware by myself?

On the firmware side, it happens in \Src\Comm\Src\BLE\ble.c, ble_evt_handler().

Best regards.

Hi @yuki5a4n !

We had an issue like this in the first version, and yes, it was related to timeout.
It was two connection parameters that didn’t match iPhone parameters (MIN_CONN_INTERVAL and MAX_CONN_INTERVAL I guess), the iPhone was requesting Connection Parameters Update three times and then disconnecting, you can check if this is your issue by measuring the time between connecting and disconnecting, the whole process takes exactly 90 seconds.

It was fixed in the most recent versions. If you’re using an old version, please download the newer from the Evaluation Tools tab on the DWM3001CDK or DWM3000EVB products page (if you’re using DWM3001CDK):
https://www.qorvo.com/products/p/DWM3001CDK#evaluation-tools

If you wanna play with BLE timeout, they are set in \Src\Comm\Src\BLE\ble.c as mentioned:
APP_ADV_DURATION
MIN_CONN_INTERVAL
MAX_CONN_INTERVAL
CONN_SUP_TIMEOUT
FIRST_CONN_PARAMS_UPDATE_DELAY
NEXT_CONN_PARAMS_UPDATE_DELAY
MAX_CONN_PARAMS_UPDATE_COUNT

The description for each is in the code comments.
ble_evt_handler() is regarding that specific issue, but if you search for “timeout” in the code you will find more timeout actions for different BLE connection steps.

Kind regards!