Gateway automatic script

Hi,

I am using DWM1001 dev boards to set up a small scene consisted of 3 anchors and 1 tag. If I connect one of the anchors to the Raspberry Pi through UART, is it possible to have some kind of Python scripts running on the Pi which will automatically make API calls to the 1001 module (similar to the shell calls) to grab x-y-z info off the tag in JSON format?

Thanks in advance!

1 Like

Hi Hobian,

There is a bit of confusion in your post.

A dwm1001-dev configured as bridge node connected to a raspberry pi will make a gateway. If configured as anchor, then it just makes an anchor connected to a raspberry pi.

Yes, it is possible to script the UART interface between the dwm1001-dev and RBP3b with python. Maybe have a look online for python UART interface with raspberry pi.

Thanks
Yves

Thank you Yves. I am kinda new to this system. sorry for some confusing phrases.

I have some follow up questions:

  1. is a gateway node a special kind of anchor? which means it also performs anchor’s functionalities.
  2. by scripting the UART interface, do I still interact with the shell mode commands or should I modify the on-board C code to make the dwm1001-dev yield x-y-z output? If I need to modify the onboard C code, do you have an example for that?

Thank you very much!

Hi Hobian,

  1. No the gateway does not perform anchor’s functionality.

  2. Well you can either use the UART or SPI interface. If you script connects to the UART, there are two options : uart shell mode (basically scripting the shell command) and uart tlv mode. I think you should maybe look at the firmware user guide and gateway guide in detail.

I don’t think we have any other example that the on board package itself, maybe have a look on the forum, I think some user may have posted example of script over uart in the last year.

Thanks
Yves

Got it, thank you for your responses!