nRFMesh / sdk-uwb-zephyr

Zephyr sdk for uwb module DWM1001C based on nRF52832 and DW1000 Transceiver
GNU General Public License v3.0
18 stars 7 forks source link

CIR accumulator not reading correctly #3

Open liamself opened 1 year ago

liamself commented 1 year ago

I am unable to retrieve the CIR from the DWM1001 - instead of returning the CIR, it just returns a noisy pattern, which does not change on repeated calls (until the device is unplugged and plugged back in).

This is the 'CIR' I get using the 06_uwb_node example as provided (unmodified except adding a line in prf.conf as it wouldn't build without specifying a stack size): uwb_node_cir

By comparison, this is what the same device outputs when I modify a Decawave example to print the CIR:

Screenshot 2023-05-11 at 11 25 07

Modifying mesh_twp.cpp so that the logic for retrieving the CIR exactly matches my working version results in the exact same problem.

I have experienced a similar problem when trying to develop software for the DWM1001 before, but aside from suspecting there might be some sort of memory leak, I've been unable to pinpoint what is causing this. Do you have any advice?

wassfila commented 1 year ago

you can have a look at this python wrapper I developed at the time, and the CIR info seems to be plausible similar to the case where it worked for you https://github.com/HomeSmartMesh/mesh_position/blob/main/py_serial/uwb_cir.ipynb

image

I'm no longer actively working on this project, but what I can recommend would be the same for any embedded issue, do not take any assumptions and anything you cannot debug and display will not work, so you can go through the steps one by one and try to have either step debug, serial log or rf log depending on the reliablity you reach with each layer. Nicest would be of course if you manage to get a python layer working then you can have the luxury of working with a python notebook, a sort of live debug connected to the target. For follow ups, if it relates to the python layer you can use https://github.com/orgs/HomeSmartMesh/discussions

What you can do is try to reproduce what I did with the exact same sw, extract debug info, and then compare with your environment. there are also multiple notebooks on this directory, you can open them and see the execution results in directly on github https://github.com/HomeSmartMesh/mesh_position/tree/main/py_serial all .ipynb files