Hi,
We are using MultiDeviceSearch to discover all device types, and showing a list of results sorted by RSSI, but if RSSI is "similar" between multiple devices then by name. Devices are removed from the list if the reported RSSI drops below a threshold value or if an RSSI update has not been received for a set amount of time (device is no longer "nearby"). I have encountered these issues:
1) As previously reported, there is no way of synchronously knowing if the request to start discovery will fail, for example due to not having an ANT USB stick inserted.
2) As previously reported, warning messages show up in LogCat when cancelling the scan (confirmed that this occurs with the ANT+ Plugin Sampler, not just our app).
3) Can I know before I start the search, or even once I receive a search result, if I will get RSSI information?
Actually, we might be able to get something together that uses the Capabilities.hasRssi()/supportRssi() from the ANT API, but there would probably have to be some assumptions made.
4) If a device is already connected (including in another app), we will not get RSSI info. Is this a bug or a planned current limitation?
5) Issue: the ANT icon/notification flashes on and off. I was seeing this with my own multiple device type search implementation (async scan for each device type for a few seconds, before cancelling the search and starting the next one), but assumed an official implementation would not do this.
6) Due to the above (and the fact that it flashes really quickly), I assume a MultiDeviceSearch is simply searching for anything, reporting the connected device, closing the search, then starting a new search. If this is true, is it more efficient if we split different device type searches up over a couple of channels? What about even more than 2 channels? Is there any documentation on how to best search for all device types on Android?
7) There is no way to specify a search proximity threshold parameter. As the "distant" devices are not important anyway, can the search be configured to not include them? Using requestAccess() or an AsyncScanController implementation we are able to pass in a searchProximityThreshold so that only devices within a reasonable proximity are included (but there is no RSSI info when using these). This is essential for my use case and the ANT USB stick I am using, as it does not provide RSSI, so there is currently no way to filter out distant devices.
8) RSSI updates are quite rare, and take longer as more devices turn on in the area. Is this made worse by not being able to specify search proximity threshold (as above)? Do you have any info on a suggested value to use for my "discovery timeout" value to be able to assume that a device is no longer able to be connected to?
9) I am looking at a background scan as the solution to all of my problems (including the previously requested ability to get device info during discovery) and found quote a few posts, including
one which says
ShaneG - 14 May 2014 12:23 PM
use a background scan and manually decoding the ANT+ info.
but how can we implement this? Why is this not used by the ANT+ API?
Thanks.
R