I have written some C code in User Application thread that configures our DWM1001 Dev device as an anchor in passive mode (Listener). When I enter the ‘les’ command over UART shell mode, the location engine data from my tag device is outputted just fine.
What I want is to not have to send the ‘les’ command to start receiving the location of my tag device, but rather I would like to write some C code in the User Application that starts outputting that data as soon as it is available from a tag device on the same PAN network.
I have tried to use ‘dwm_loc_get()’ from my listener device, but the x, y, z, qf values just remain 0, 0, 0, 0.
Is this the correct method to achieve location data from my Listener device?
Many thanks in advance!
Maybe this one helps
dwm_loc_get description: “Get last distances to the anchors (tag is currently ranging to) and the associated position. The
interrupt is triggered when all TWR measurements have completed and the LE has finished. If the LE
is disabled, the distances will just be returned. This API works the same way in both Responsive and
Low-Power tag modes.” Page 53 of the DWM 1001 Firmware API Guide.
les description, page 99 (same document as before): “Show distances to ranging anchors and the position if location engine is enabled. Sending this
command multiple times will turn on/off this functionality.”
I have read both of those descriptions from DWM1001 Firmware API Guide and they haven’t made anything clearer.
The ‘les’ command isn’t really useful to me on the Listener device, as I don’t want to enter UART shell mode. I just want the listener to start reporting the tag location as soon as the tag is turned on.
From that desciption you mentioned, ‘the interrupt is triggered when all TWR measurements have completed and the LE has finished…’ I am unsure what interrupt event is being called when this happens on a Listener device - but that is exactly what I need.
Any idea on which event handler is responsible for dmw_loc_get?
Thanks for the reply
the Listener mode in PANS is a kind of demo feature which became in the end too famous that people try all kind of tricks to use it.
It does not provide the captured position of the Tags via API except via the ‘les’ command and via BLE API (so the Tags can be seen using DRTLS Android Manager). The reason of creation of this feature was because most of Android devices cannot handle reliably more than 4 concurrent BLE connections.
So what you try to do is not possible. One potential solution is to use the API of the device in Bridge mode but as far as I know its API is not documented. Some people have reported however successful reverse engineering of those undocumented APIs so you can give a try. Don’t ask me how though
Thanks for the message TDK!
Yes, I am slowly understanding the many limitations of the PANS firmware.
Thank-you for a definitive answer on the Listener API problem! I have been searching many forum posts for information on this topic and you are the first person to say that ‘les’ command does not have an API counterpart.
The listener device is just needed for demonstration and testing purposes - so we don’t have to remain tethered to our tag device. I guess I can do one of the following :
Send ‘les’ command to the listener from my PC application, via UART.
Reverese engineer the bridge mode API as you said
One last question:
If I wanted to create custom firmware for the DWM1001 Dev board, which example code would I start with?
Thank-you very much!
just to clarify: ‘les’ does not have an API counterpart on the Listener. On the Tag it has.
If with custom firmware you mean within PANS then you should use some of the example which comes with PANS software package, e.g. dwm-simple.
If you mean totally independent on PANS then Decawave provides example codes on its Github. Check out this one: GitHub - Decawave/dwm1001-examples: Simple C examples for Decawave DWM1001 hardware
We ended up just sending the ‘les’ command to the listener over UART shell mode, which worked nicely.
I did mean independent of PANS firmware - thank-you for directing me towards this Git repo. I hope that there isn’t a limitation of maximum 10Hz update rate like in the PANS 2 firmware
But I guess I’ll have to have a dig for myself!
the 10 Hz update rate limit is only in PANS. It is a compromise between the performance, versatility and feature set. The dwm1001-examples GIT repo contains only basic example and not the whole system.
You would have to create a system which would best fit your application or look around for some existing solution.