I'm still having problems searching for other devices in parallel.
Here is what I would want to do:
I've a couple of moving devices and on each device I would like to now which other devices are nearby.
Here is what I did:
My approach so far used one master channel on each device that broadcast a device ID. In parallel I open up to 7 slave channels to search for a list of other devices. A slave channel is opened with a deviceID which is popped from a list of devices to search for. I've disabled the high priority search timeout and set the low priority search timeout to infinite and instead used a software timeout each 5 seconds because I don't want the search timeouts to stack up.
In case that a device with a corresponding deviceID is found or a timeout occurs the channel is closed, the deviceID is appended back to the list and the channel is reopened with a new deviceId popped from the list.
The problem:
The approach seems to work for the first hour or so, but after that time, no or not all devices are found anymore. Sometimes even the ANT chip does not respond anymore.
Any guess why this is? I would be very glad for some help or better approaches to find nearby moving devices using ANT.
notes:
- I cannot use background search, because the ANT chip in the phone does not support it.
- I've also tried the list search example from the device pairing application note which uses wildcards instead of a predefined list, however also then not all devices are found.
Thanks for your help.
Sebastian