DMW1001- Dev with Raspberry Pi4

Hello guys, I have a challenge for my project now which I really need to find a proper solution. At first, I need to find a way for indoor tracking and navigation for my robot, and then I find our UWB with DMW 1001 is the best way for now. But then the DMW1001 will only work with Raspberry Pi3B meanwhile my robot will run with Raspberry Pi4 as the main control unit. Any advices for me in this case? Should I connect my listener to Arduino and then connect it to Pi 4 or using Pi3B and PI4? I appreciate your advices and help if possible.

Hi @meomap887
if you need only the TN location you can setup listener and connect it directly RPI4 and listen the serial port.

Cheers
JK

Hi @leapslabs hats great. omg, that’s what Im looking for. Can I contact you personally for more information ? It’s really important to me with this project.

Hi,
feel free to ask here in the forum. Other user might be also interested.

Cheers
JK

@leapslabs So, in the manual with the mode that we use the listener, Can you explain more about this sentence "• In this mode, only position is printed (not individual ranges)
" .So how can I find out the distance?

Hi @meomap887
you cannot get the distances, you can only get the locations. If you want to get distance you need to setup a proper gateway & write a mini app into the TN that will send distances via IoT data.

Another way would be to connect to the TN via BLE a and then you can get distances.

Cheers
JK

@leapslabs , do we have any detail instruction on this case, I read about this in user manual seem that it go with the gateway instruction. When I connect the tag to PC I can get the distance from that’s tag to the other anchors. Is that right? Can we do the same as Raspberry Pi4? Thanks for your patience.

Hi @meomap887
first of all for a gateway function you need RPI 3B. The 3B+ might work also via WIFI with !!!disabled ethernet!!!, but I cannot guarantee it.

Normally the TN send to BN only the position and not ranges which you need. You need to write your own application that will send ranges to BN instead of the position. I have rechecked the dwm examples and there is an example application called dwm-range-iot which should to the work for you - just remove the “if (range_request == 1 && cnt_data_out < 1000)” condition so it could send the ranges all the time.

Cheers
JK

1 Like

@leapslabs It is more complicated than I thought. Because I need to use the Raspberry Pi4 as the main controlling unit. For now, I have 3 anchor on the robot, and tag will be with the user and one more dwm1001-dev will be installed with the Raspberry 3B to play as a gateway. We don’t use the listener anymore since it just sent the location not the distance. My main purpose is the distance from the tag to other anchor so I can calculation the position of the user compare to the robot such as the distance, and which direction. After setup the gateway, I need to find another way to send the distancing data to the main controlling unit of the robot in this case is the Raspberry 4 for navigation. Please give me some advices.

I’m using Python for my project so I dont see any example Python from the manufacture but if anyone can help me on this, I really appreciate that.

Hi @meomap887
please note that 3 anchors are the absolute minimum for TWR scheme to calculate TN position . If there will be some glitch in and the TN could not reach one of the ANs then you would not be able to calculate TN position.

I see here two ways:

  1. Setup a proper BN and use the dwm-range-iot example in the TN. This will send the distances from the TN in IoT data. You can read this data via MQTT running on the RPI 3B. I would believe that there are many plugins into the Python to do that.
  1. If the TN is close to the RPI4 you can connect to TN via BLE and read the needed data via BLE. IN this case you dont need the gateway. Check the forums, I believe that there are few python samples laying around.

Cheers
JK

1 Like

@leapslabs , I did get RPI 3B and set up the gateway but now Im stuck at how to get the Python program running. I can not find the official example coding in this case. Do you have any idea about this?

Hi @meomap887
sorry I cannot help you here. Im not Python guy and there are no official Python examples.

Cheers
JK

@leapslabs I did find out one example from the previous post which I connect tag with Rasp Pi3 and I can get the distance from tag to the anchor. For the Gateway, after soldering the module to Pi3. I use the same code and change the input to serial0 as @brianh instructed. For now, it didnt show me anything yet. Getting Distance From Raspberry Pi

Here is the screenshot I have

Hi @meomap887
you are mixing few stuff together.

The python script is for gathering data directly from TN (different use case) and not from MQTT.

For now you should get your system up and running with gateway following the installation guide - so at the end you should see your TN moving in the RPi web interface + try to play with MQTT. Once this is done you need to compile the example I mentioned above and upload it to the TN and then you can gather distances between TN and AN via MQTT.

One additional hint - the RPi + DWM1001 needs a proper power source (original RPI 5.1V adapter) or external 5.1V power source.

Cheers
JK

@leapslabs Thanks for your clarification, I follow it step by step. Currently I dont quite understand this “In order to connect to the web-manager, it is necessary to connect to the proxy-server host IP
address using a web browser such as Google Chrome or Mozilla Firefox”. Can you explain it a little bit more. I’m trying to use MQTT.fx but seem that they ask us to buy it.

Here is the screenshot of my configuration in dwm1001.config and the bridge node. I notice that in our instruction the uwbmac:disconnected mine is uwbmac: connected. will that is a problem?



Hi @meomap887
actually it looks all good.

uwbmac: connected - this is what you want - it is connected to the UWB network.

There are two Qorvo SW that are mandatory to run and one is optional:

  • Kernel module (mandatory) - this one handles the communication between DWM1001 and RPi via SPI bus
  • daemon (mandatory) - grabs the data from kernel module (via char device) do its magic over them and then forward them to proxy or directly to the MQTT broker
  • proxy (optional) - if you have multiple gateways then you must point daemons to single proxy which takes care about message duplicity and other potential problems. After message filtration the proxy forwards the data to the MQTT broker

In you case your can disable the proxy or point the proxy to the MQTT broker. If you have default Qorvo RPi image then leave it as it is - all is preset.

Re MQTT.fx) yes that was (probably still is) a nice SW but now you have to pay for it. The version 1.7.1 sometime could be found on internet. But I didnt find it for Linux …

Cheers
JK

@leapslabs , Thanks for your help. It’s more clear for me now, I’m glad that I can see a way to do this. So for clarification. I need to flash dwm-range-iot to the Bridge node using GNU Segger. Than reading the output via MQTT, for my understanding we can access the system via cloud by the gateway. In my application, all I need is getting the distance to the Ras Pi3 and then I will use that to calculation the location of the user as x, y coordinate. So I need to build a python program to get the output data and calculate that. Am I correct?

Hi,
yes you are correct. Just few notes:

  • dwm-range-iot - you need to modify this sample to send you the distances for ever. I think that now you need to sent some IoT message to it to start streaming the distances (this sample was made by Qorvo and not by LEAPS)
  • Just a question: why the calculated position by the TN is not sufficient for you?

Cheers
JK

The way im thinking is I will need the distance from the tag (user) to 3 anchors and from that I will triangulation method to calculate the position of the user compare to the robot so I can get x,y cordinate. From that I can control the robot to determine how far and which direction it need to go.