Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

OpenAnt connecting to specific device

Rank

Total Posts: 1

Joined 2018-03-27

PM

Hey everyone,

I'm currently working on a project using a raspberry pi with a usb ant+ stick to collect heart rate information. I'm using python and openant (https://github.com/Tigge/openant) to connect to devices. The part that I'm having trouble with is connecting to specific devices. Specifically, I'd like to be able to use the serial number that is printed on the back of my garmin vivosmart to specify the device that I want to connect to.

I've read about using the internal device id specified in the set_channel_id but that doesn't really help when it's the serial number that's printed on the device.

Can anyone give me some insight on how to accomplish this?

Thanks,
Luke      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi Luke,

It depends on if the device is using the serial number as part of the channel ID. If it is then the lower 20-bits of the number should be part of the channel ID it is broadcasting with (lowest 16-bits as the device number, with 4-bits embedded in the transmission type upper nibble). However, that may not always be the case...

Cheers      
Rank

Total Posts: 2

Joined 2015-09-28

PM

Luke.Harris - 03 April 2018 01:42 AM
Hey everyone,

Specifically, I'd like to be able to use the serial number that is printed on the back of my garmin vivosmart to specify the device that I want to connect to.

I've read about using the internal device id specified in the set_channel_id but that doesn't really help when it's the serial number that's printed on the device.

Thanks,
Luke


If that serial number isn't the device id then you can't do it. You can only look for a specific device by it's device type and device id. If that serial number happens to be the device id then you can do it. If not, then that serial number is not going to help.