Read/Write BLE?

Hi, I am trying to get 2 DWM1001 modules to communicate over BLE. I have read the API docs, but I see no mention to any commands for reading/writing. Is there any examples or code in general that shows basic BLE functions? Thanks

Hi Vik,

Have you seen the BLE gatt model detailed in the dwm1001-api documentation ?

You can subscribe to those characteristics and write to them as well. If you’re not too familiar with BLE maybe have a look at nordic semiconductor resources center, they have a lot of information and instructions

Thanks
Yves

Hi Vik,

if you talk about PANS: there is no support for user data via BLE in PANS. If you want to communicate via BLE between 2 DWM1001, you will need to disable BLE in PANS and write some application using the SD (SoftDevice). This can be tricky and it has not been tested as far as I know.

If you talk about your own application then there are plenty of examples as Yves has mentioned. You can use the SoftDevice or use e.g. Bluetooth in Zephyr https://zephyrproject.org which works fine.

Cheers,
TDK

1 Like

Would the linked project be able to use the DWM radio functionality as well? Basically I want to send ble position data to a dwm1001 and then have it act as an anchor with the position it just got over ble, and start a single sided 2 way ranging example which I have working currently

Hi Vik,

could you please describe in details your needs? I.e. how many modules do you use, which SW are you planning to use on them (if PANS or your own), which interface/radio do you want to use etc.

Your description is vague so it is hard to point you to the correct direction.

Cheers,
TDK

1 Like

Thanks for responding, Currently I am using the MDEK1001 board system. I have 1 tag, and multiple anchors (not sure of how many exactly yet) . Before the anchors are deployed, they receive a Bluetooth message containing the x,y, and z position that they are at. Then, the anchors are deployed and begin two way single sided ranging from PANS example. They broadcast the ranging packets, as well as the info they recieved over bluetooth, so when the tag communicates with an anchor, it gets the distance it is from the anchor, as well as the anchor’s x,y,z location. For now, I am only worried about the tag communicating with 1 anchor at a time, as they will be very spread out.

Right now, I would like to find out a way to communicate over bluetooth to the anchors before they are deployed.

The 2 way ranging code that I have slightly modified was taken from:

Hi Vik,

I think I understand what you want to do, but your description is somewhat confusing.

The dwm1001-examples has nothing to do with PANS. Those examples run independently on PANS.

I see three options of solution based on your inputs:

Option 1) Tag running your non-PANS custom firmware. Anchors runs on PANS firmware.

Tag: if you want to modify those examples to be able to communicate with a PANS Anchor then it would be challenging. You would need to understand first the PANS protocol and architecture in order to create a Tag which would be compatible. For Bluetooth communication you will need to use some BT stack, e.g. SoftDevice from Nordic and write the communication with the Anchors.

Anchors: PANS, no changes needed. The X,Y,Z of an Anchor in PANS can be easily configured using the BLE API. Please refer to the BLE documentation and also to DRTLS Android Manager code if wanted.

Option 2) Tag and Anchors running PANS custom firmware.
Anchors: the same as above.
Tag: use User Application, disable the BLE in PANS to take control over the BLE. Then try to use SoftDevice within the User Application. This option we have never tested yet. Theoretically it should work, but can be also challenging. However improper usage of BLE might negatively influence the UWB stack because the SoftDevice uses software interrupts which would take control of the MCU when it needs.

Option 3) Tag and Anchors using non-PANS custom firmware.

You will need to integrate some Bluetooth stack, like the SoftDevice mentioned above. Then design and implement some protocol on UWB which would allow SS-TWR for multiple Tags. This is usually a challenging task but it could be simplified if the system would be fixed in some way.

Cheers,
TDK

1 Like