Partially connected network with mulitple Anchors and Tags

Hello,

We want to have a systems with for 4 anchors and multiple tags (from 1 to 25) to range themself. We are using the product and the code base from InsightSip. Here is there implementation:

implementation file 2

implementation file 1

They have implemented it for only 1:1 ranging. One tag with one anchor. I believe we are facing race conditions between different responds message from anchor. The tag is not managing different anchor message but, it just takes message and calculates the range and saves it in a distance variable, and then after a software timer timeout it sends in a request message the calculated distance.

What would be the best approach to solved this issue? In some post they mentioned that we could use the frame filtering with PAN ID, link1, link2.

Are there any code examples that I could look into it?

In your code (well in drv_uwb_range.c at least) the UWB packets include the 64 bit fields source address and destination address.
The message buffers are populated with default values for these fields on initialisation but I can’t see anywhere in the code that actually makes use of these values.

When talking between multiple devices you need to use these values.

Set them appropriately before transmitting and on packet reception verify if the packets destination address is your address, if not ignore the packet. When sending replies make sure you set the destination address to be the source address contained in the packet you are replying to.