Open luke-harris opened 6 years ago
Hi,
I Have a similar issue, but I went the other way around :-). I do have my device number (got from my garmin gps sensor page). I was calling set_id the wrong way (0, 120,
If anyone else runs into this, you can now get the device number via device.device_id
once on_found
has been called, e.g. define device
above and then print it in on_found
. It's also just the digits at the end of the string representation of the device, as seen in the heart rate example. openant.devices.heart_rate.HeartRate(device_id=XXX)
can then be manually set in the future to only connect to that device, no need to mess with the node/channel stuff. Setting to 0 uses any device.
Hi. I'm trying to make your heart rate example always connect to a specific device. I know that I'm supposed to be able to do this by setting the device number. I've added some code to the hr.py example to get the device number of my device.
Added code: m = node.request_message(Message.ID.RESPONSE_CHANNEL_ID) print("channel id:" + repr(m))
Output: channel id:(0, 81, array('B', [28, 152, 120, 17]))
The ant documentation says that this channel response should return: [ channel number, device number, device type id, transmission type]
However, when I change channel.set_id(0, 120, 0) to channel.set_id(152, 120, 0), I am unable to connect to my device. What am I missing here?