How to get distance data using BLE

I am developing an iPhone app and I am able to communicate with the Decawave tag over BLE. I am currently able to read and write messages. However, I am not receiving location data. Is there something I need to be doing to activate the tag to start sending location data? I am currently using one tag and one anchor.

You need at least 3 anchors to calculate a location.

I just want distance for now. Does 1 anchor work in that case? I am setting the tag and anchor to be “Distance Only”

Hello Phlip9

This should be possible, see section 5.1 “1 Anchor + 1 Tag” in the MDEK101 user guide.

In order to achieve this make sure to:

  • Configure the anchor as initiator (configurable with byte 2, bit 7 of characteristic 3f0afd88-7770-46b0-b5e7-9fc099598964)
  • Make sure both tag and anchor use the same PAN ID (configurable with characteristic 80f9d8bc-3bff-45bb-a181-2d6a37991208)
  • Set the location data mode of the tag to “distances” (configurable with characteristic a02b947e-df97-4516-996a-1882521e0ead)
  • Read and parse the location information (characteristic 003bbdf2-c634-4b3d-ab56-7ec889b89a37)

Greetings
Seppe Stas

Thanks a lot! I am now about to get valid location information. However, I am only receiving one instance of location information. I am having to reconnect over BLE to get the latest value. Is there a better workaround to get a constant feed of distances?

Hey Philip

It should be possible to subscribe to the location information characteristic allowing to get automatic updates using BLE notifications/indications (i’m not sure which one is used in PANS). It should also be possible to update the value by reading the value again.

If this is not working this could be caused by caching of the iOS BLE driver. I was able to use the nRF connect app on iOS to subscribe to notifications/indications. A more user friendly app is the Lightblue app, but this app seems to have issues connecting to the DWM1001 running PANS 2.0.

Hi,

I have been really confused about how I to use these characteristic values.
Like are these codes you have to put in TeraTerm (through UART)?