Does DW3 QM33 SDK's QANI project support multiple FiRa sessions?

Hi, Qorvo.
I’m testing QANI project of DW3 QM33 SDK v1.1.1 on DW3001CDK, and the DW3001CDK can perform TWR(Two-Way Ranging) with an iPhone.
In QNAI project, DW3001CDK establishes BLE connection with iPhone and get FiRa session parameters.
The SoC of DW3001CDK is nrf52833, and the ble stack of nrf52833 is Softdevice S113. S113 supports one peripheral ble device to establish multi ble connections with several ble central devices.
I use two iPhones to establish ble connection with one DW3001CDK, and I would like to know if QANI project supports TWRs with two iPhones concurrently?

In this case, iPhone is the initiator, DW3001CDK is the responder, which is equivalent to two initiators and one responder performing the FiRa ranging at the same time. According to the actual needs of the scene, these two FiRa distance measurements need to be carried out in two FiRa sessions. So the final question is: Does DW3 QM33 SDK QANI project support multiple FiRa Sessions running concurrently?

Looking forward to your reply.

no.. to make the thing work, requires a sideband channel to tell the UWB when to start/stop
once a phone connects then this ble endpoint it is no longer available to connect to or discover as its advertising has stopped..

full Fira supports one(controller) to many(controlee), nothing yet supports many to many or many to one
QANI supports one (iPhone) to many(endpoints/beacons.. not anchors) , my app does that now. on iPhone.

no, only 1 session with one phone

Thanks for your reply.

Actually, on nrf52833 or nrf52840,after a phone connects ble, ble can still be available to connect or discover by other phones as it can still advertise.


The picture above is S113 on nrf52833,it can support 4 phones to connect ble with one 52833, (S140 on nrf52840 support up to 20 phones). And I have verified this with multiple phones, and one 52833 can indeed connect to multiple phones’ ble concurrently. (Because after establishing a ble connection, it can still advertise.)

FiRa indeed supports one(controller) to many(controlee) in A Session, however, in my use case, I don’t need one to many in one session, what I need is multiple sessions, each session is One to One.

The usage scenario is, the first iPhone establishes a BLE connection with 52833, starts a one-to-one FiRa session for distance measurement, and then the second iPhone establishes a BLE connection with this 52833, and then the second iPhone uses the same process to start a one-to-one FiRa session for distance measurements. So there are two FiRa sessions running on one 52833 concurrently, and each session is one-to-one.

This multi-session mechanism is not in conflict with the features of FiRa itself. If the current version of the SDK v1.1.1 does not support such multi-session, does the SDK plan to add such multi-session feature in the future?

Hi @paopaohepan !

QNI from DW3_QM33_SDK v1.1.1 is working like this.
As iOS only supports unicast sessions what it does is open multiple unicast sessions, when an iPhone is connecting to multiple tags.

There’s no restriction to do the same on the tag side, you’d need to keep BLE advertising after connection and handle the connected devices by its connection id and context (check DW3_QM33_SDK_1.1.1/Libs/niq/Inc/niq.h)

Kind regards!

Thank you very much for your reply.

Let’s discuss the feature of multi-sessions in the Qorvo SDK in more detail.

After the first iPhone establishes a BLE connection with 52833, the iPhone will send two BLE commands to the device sequentially: an init command and a configure_and_start command, as shown below.

Upon receiving the configure_and_start command, the SDK will execute the niq_configure_and_start_uwb() function as shown below.


However, there is no source code in this function.

Based on this, after the first session started with the first iPhone, another iPhone can establish BLE connection with this 52833. The second iPhone will also send these two BLE commands and upon receiving the second ble command, sdk will execute niq_configure_and_start_uwb() again, then problem occurs.

Based on my actual testing, after 52833 establishes a BLE connection with the second iPhone, it receives two BLE commands from the second iPhone, and then executes niq_configure_and_start_uwb(), after which the distance measurement freezes.

Therefore, based on current testing, the SDK does not support multiple sessions running concurrently.

Let’s look at another part.

After the SDK receives the two BLE commands from iPhone, it executes niq_configure_and_start_uwb() function, since I can’t see the source code, I’m guessing that it should further execute fira_start_niq() function as shown below:

This function has three parts: app_process_init(), uwbmac_start() and start_session(), and based on this code, it’s reasonable to guess that the SDK doesn’t support multiple sessions running concurrently, because uwbmac_start() obviously shouldn’t be executed every time a new session is started.

These are my tests and questions. In summary, the current SDK v1.1.1 QANI project likely doesn’t support multiple sessions running concurrently for three reasons:

  • None of the SDK’s documentation mentions support for multiple sessions running concurrently.
  • The current code structure doesn’t seem to support multiple sessions running concurrently.
  • In actual testing, one DWM3001CDK (nRF52833) cannot measure distances with two iPhones concurrently.

So, please confirm this. Thank you very much.

Correct. As I said before

The cdk does not measure anything, it broadcasts its signal, and the iPhone receiver does all the work

As the iPhone does not expect multiple sessions, the QANI support is only for one session at a time.
The code COULD be changed as Carlos said.
But many to one is a lot harder to do.

Have you tried the FIRA UCI firmware with controller mode on the CDK to multiple controlle’s?
I don’t know how another controlle could join a session already in progress
This firmware is USB connection only currently