MDEK1001 multifloor installation

I’ve managed to get x,y,z coordinates from my listener connected to a Raspberry Pi 3b+ and save the tag ID with coordinates into a MySQL Database. I’ve wrote a c# windows application reading the coordinates from the database and display I on a map of the ground floor of my house. Everything works 100%.

Now I want to add more anchors to the second floor. I’m not sure how to do this. Must I configure the second floor’s anchors z value from the ground floor, e.g. if the ground floor’s anchors is position at 2m above ground level and the height of the second floor’s anchor is also mounted 2m from the floor, but from ground floor the height is 4.2m is this the anchor’s z value?

If the tag is within range of the ground floor anchors while situated on he second floor, will the calculation still be accurate? (I have not install it yet). What problems or issues must I look out for?

I must still modify my Windows app to accommodate multi-floors.

Any advise will be appreciated.

1 Like

I’m kind of new to DWM1001 . I want to the do some researches about this to use for my house ,too . But I don’t know where to begin. Could you please show me how you did that ?
Thank you so much.

Hi Hoang

I’m not an expert, but a self-taught C# developer.

I’ve bought the MDEK1001 development kit and setup 4 anchors and 1 tag with the Android RTLS manager. (Don’t try to cover your whole house in the beginning).

I’ve wrote 2 applications, 1 console app for the Raspberry Pi and the second one as a Windows App. On the Raspberry Pi, I’ve installed MySQL server and run the C# app with mono.

I use my windows app as a remote configuration app as well as a visual tool to “see” if my tags is at the correct positions.

I’ve spend months to get it working and done a lot of reading and get answers on google.

Hi Izak

Thanks for your reply . Maybe I should spend more time researching it like you did.

I hope that you will figure out your problem soon. Wish you luck.

Hi Sir,
could you share your Gui application and code that you developped for the raspberry and windows application please

Yes, you need to set your upstairs anchors Z values to be the height offset from the main floor zero, which should typically be at the floor. If your second floor level is 2.75m from the main floor level, and the main floor level is zero, and the second floor anchors are 2m up the wall, then the second floor anchors would have their Z value set to 4.75.

  • Jon

Thank you. I will try it.

How do I fetch the position of the tag from the Bridge or Listener that is connected to the Raspi into the Raspi? I can see it on TeraTerm with ‘les’ command, but how do I deliver it to Raspi? MQTT works but only when I manually publish the message and I would like Tag position dynamically propagated to Raspi.
Just a thought - in your C# app on Raspi - Are you opening Serial port to the Bridge (or Listener?) and somehow getting the data? but how? calling what?

Hi Securigy2

Yes I’m connecting the listener to one of the USB ports, because I’m using all GPIO pins of the raspberry Pi to switch relays. I’m opening the port and sends the \r\r command and the les command. I then read the data by ReadLn, filter the positions of the tags and save it in a MySQL database on the Raspberry Pi

Got it. I wrote today a simple C# WinForms app that does exactly that with a separate thread that reads serial port…running on RPi with Mono. I am connecting my PC to mini USB on RPi (and can do TeraTerm if I want to)…
Unfortunately with my app I don’t get any output - I tried to do:

MySerialPort.Encoding = System.Text.Encoding.GetEncoding(1252);
serialPort.Write("\r\r");
serialPort.Write("\r\n");
serialPort.Write("\n"); // like in C-examples that DecaWave ships

…and even writing bytes, but at no avail…
serialPort.Write(new byte[] { 13, 10 }, 0, 2);

What am I missing?

I do get the port name when I call GetPortNames: “/dev/ttyS0”

Hi Izak,

set the Z axis as described by Jon. That should be correct.

Regarding the network functionality on the multiple floors, see my response in this post, perhaps it can help you:

Please let us know if it works for you and good luck!

Thanks,
Cheers, TDK

Hi Leon,

I am not familiar with C# but when sending commands to the module make sure you keep some delay between the characters (e.g. 10 ms) to ensure the on-module Shell would process all the characters.

Cheers,
TDK

I think I found a problem with serial that I had for quite a long time. The connection with 2x13 Header is really bad - it is unstable by its nature - really wiggling and moves so it is not clear at any given time if it is on of off.
When I connected mini USB of the board to one of the USBs of Raspi everything started working (on port /dev/ttyACM0)…including my existing C# code that runs on Mono (without sending char by char with timeouts between them - IMO it is unnecessary)

Hi Leon,

The 2x13 Header is very rigid when soldered. It cannot be used without soldering.

Cheers,
TDK