Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Information about what device is discovered/connected

Avatar
RankRankRankRank

Total Posts: 149

Joined 2014-04-02

PM

How can I know what type (make/model) of device has been found in a search?

The ANT+ plugins API has:
IManufacturerAndSerialReceiver.onNewManufacturerAndSerial(long estTimestamp,
                              
java.util.EnumSet<EventFlageventFlags,
                              
int manufacturerID,
                              
int serialNumber

and
IVersionAndModelReceiver.onNewVersionAndModel(long estTimestamp,
                        
java.util.EnumSet<EventFlageventFlags,
                        
int hardwareVersion,
                        
int softwareVersion,
                        
int modelNumber


This post http://www.thisisant.com/forum/viewthread/4037/ says that using the manufacturer ID for a heart rate monitor "Displays or online systems will be able to show your company name when they find your sensor". This post links to a manufacturer list (spreadsheet) in the FIT SDK: http://www.thisisant.com/forum/viewthread/1392/
How can I map manufacturerID to a company name in the ANT+ SDK?

This post http://www.thisisant.com/forum/viewthread/3924/ from a year ago states "We don't manage or provide a list of the model numbers, so can't help you with that one".
Has/will that change?

What other information can I get about a connected device?      

Signature

blackramlabs.com

Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

The fit.jar library which is carried by the Plugin Library or the FIT SDK contains a manufacturer ID list in a class called Manufacturer. You may reference your received Manufacturer ID against that list.

Model numbers are manufacturer specific and no single managed model number list is currently planned. Please contact the manufacturer to inquire what model numbers their specific devices support.      
Avatar
RankRankRankRank

Total Posts: 149

Joined 2014-04-02

PM

Thanks Harrison. How can I get manufacturer's information and product information while performing an async scan?

Note: The FIT library is not part of the ANT+ API, it must be added separately. This is also just a raw list of integers, if you would like an enum version let me know and I should be able to provide you mine.      

Signature

blackramlabs.com

Avatar
RankRankRankRank

Total Posts: 149

Joined 2014-04-02

PM

If I can't get the device info during a scan, the Requesting Data Pages thread describes a helpful method to get it as soon as I connect. This could mean temporarily connecting to the device while the scan is happening so I can populate the device info myself. However:

1) Can I request data pages with the Android API?
2) Is it rare for sensors to respond to these requests, as old_man_biking warns?
     

Signature

blackramlabs.com

RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

Android API doesn't yet support freely requesting pages, and it is definitely hit or miss on devices actually responding to it. You might want to have one MultiDeviceSearch open then use a couple more channels to connect to devices found in the search and listen for the manf event. It is on our wish list to add this to the MultiDeviceSearch itself, but no idea right now when that might actually happen.      

Signature

Dynastream Developer

Avatar
RankRankRankRank

Total Posts: 149

Joined 2014-04-02

PM

It can take a long time to receive the manufacturing event. It would not be surprising for a list of say 4 sensors to take over a minute to wait for this event one at a time, which is far longer than I would like to be watching a search screen (which, with the existing bug of ignoring set device names, is just a list of numbers) for info. This is why I was hoping to either get it from the multi device search that is already receiving data from multiple sensors at once, or request to get it faster.

Also, can the list of manufacturers be added to the ANT+ API (preferably as an enum)? I currently have the whole FIT library included for one list of integer defines.

Thanks.
R      

Signature

blackramlabs.com

RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

We already distribute the FIT file with the PluginLib, so we will probably just keep the two together, without redefining things.

When implemented in the multi device search we could offer some optimizations, but even then unless other apps have already started searches there is not much optimization that can occur, we don't want to be scanning continuously for power usage reasons. It is a device limitation that the information is broadcast irregularly, especially if the device doesn't support page requests.      

Signature

Dynastream Developer

Avatar
RankRankRankRank

Total Posts: 149

Joined 2014-04-02

PM

Thanks for the response.

I will define my own list of manufacturers, and manually keep this in sync with new additions in the FIT SDK.

Could you please elaborate on "we don't want to be scanning continuously for power usage reasons"? While my device discovery screen is shown, I continuously rotate through scanning for each device type for 3 seconds. Are you saying that the scan may not actually be happening during that 3 seconds?

Thanks.
R      

Signature

blackramlabs.com

RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

The FIT lib is not very big to add to your app, but it's totally up to you.

As for searching, whenever you have a search open it will indeed be a live search (with the normal constraint of competing with other live searches scheduled by other apps). What I was saying is that in the plugins themselves we don't want to keep an ANT search open indefinitely in the background when NO apps are attached just to increase search responsiveness for the first app that shows up.      

Signature

Dynastream Developer