I’d like to make the unit output a custom string while in shell mode. I tried following the guide to make custom functions but for whatever reason the device was not detectable by the Android app afterwards. It outputs all zeroes which is presumably ‘correct’ in the sense that it’s outputting what I expect given that it hasn’t joined a network.
The string I’d like it to output is just “[x, y, z, qf]”. Any suggestions are welcome.
Note: in case this is just an XY problem, what I’m really trying to do is read the data out over a serial connection for use in a larger program. Ideally I’d do that without entering shell mode at all. Unfortunately I’m a beginner at this kind of thing so I’m finding blocks at every step.
The dwm-simple example that is part of the DWM1001_on_board_package_R2.0 does exactly that!
It will print “[x, y, z, qf]” from the location engine if their are at least 3 - 4 anchors configured with the same network ID.
You should be able to find this source code on the Decawave website.
The reason your Android App is not detecting the device is probably because you haven’t configured BLE as ON.
That is what I thought should be the case, but it didn’t work as expected. I’ve since found a typo in my code that might explain it, but am now having trouble compiling with Segger (even though nothing about the environment has changed, but that’s another issue…). I’ll come back to this if/when I’ve solved that issue.
Will it be necessary to set the PAN ID as well, or does dwm-simple have the same PAN ID as the standard firmware?
Thanks for your help.
I’m not sure what the default PAN ID is when you flash the PANS2 firmware image, but this is easy enough to do over the UART shell mode.
I strongly suggest you look at the DWM1001-API-Guide found on the Decawave website. More specifically, section 3.3.1 for UART interfacing.
Once you get this working, the “si” command will tell you what your device PAN ID is.
Best of luck!
the default PANID is 0. If you do not change it in the User Application then it will stay the same. The PANID is stored in a reserved non-volatile memory along other node configuration values. This section is called environment.
Like Ryan has written, I also suspect you have disabled somehow the BLE in your application.