Using PANS firmware, is there any way via API to detect that an anchor in TWR mode has communicated with any tag or can presently communicate with a tag?
To give context, I’d like to turn external circuits on/off depending on if the anchor has seen a tag recently, using the PANS firmware.
The only way I’ve been able to come up with is by interacting with the “stats” function via the UART CLI, but I don’t think those statistics are accessible via API calls (are they?).
I don’t think there is any API, using the stats is probably the best work around.
that is not possible to do it directly on the Anchor using PANS.
How fast do you need to switch the external circuits? Do you use the Gateway?
If you do and it is not a problem to have latency within 12 s then you can do the following:
- Create an User Application to send Anchors ID (obtained in location data each update rate) from the Tag to the Gateway.
- On the Gateway having an application/script which would send IoT User Data via MQTT to the Anchors based on the data from the Tag.
- On the Anchor having an User Application to receive the IoT User Data and do the action needed.
This is slow and the latency would increase with the amount of Tags but it can work.
I do not use the gateway. Using the gateway would actually solve many problems I have but my understanding is that it requires a Raspberry PI which I cannot use for my project.
I have no issue using the stats function/uart cli, was just hoping there was a better alternative.
yes, the Gateway needs a Raspberry PI.