python-ant-downloader
python-ant-downloader copied to clipboard
Is foretrex 401 supported
Hi There,
I am trying to send a waypoint from my foretrex 401 to my laptop over the air with the help of a ANT USBStick2.
When used with ant-downloader I have the following output:
eric@lys openant-master]$ ant-downloader [MainThread] 2018-12-10 16:37:34,071 INFO Searching for ANT devices. [MainThread] 2018-12-10 16:37:37,471 DEBUG Got ANT-FS Beacon. device_number=0xdf9f Beacon{'auth_type': 0, 'pairing_enabled': 0, 'data_available': 32, 'device_state': 0, 'period': 4, 'descriptor': 131074, 'upload_enabled': 0, 'data_page_id': 67, 'data': '', 'status_2': 0, 'status_1': 36} [MainThread] 2018-12-10 16:37:37,471 INFO Device has data. Linking. [MainThread] 2018-12-10 16:37:37,471 DEBUG Setting period to match device, hz=8 [MainThread] 2018-12-10 16:37:37,591 DEBUG Linking with device. freq=2460mhz [Thread-1] 2018-12-10 16:37:37,801 WARNING Failed to receive RF beacon at expected period. channel_number=0 [MainThread] 2018-12-10 16:37:37,931 INFO Pairing with device. [MainThread] 2018-12-10 16:37:38,214 DEBUG Got client auth string. Auth{'auth_string': 'Foretrex 401', 'beacon': <antd.antfs.Beacon object at 0x7f4dc7da7f10>, 'op_id': None, 'response_type': 1, 'client_id': 3962298271, 'host_id': 11221, 'data_page_id': 68, 'command_id': 132} [MainThread] 2018-12-10 16:37:38,215 DEBUG Device unkown, requesting pairing. [Thread-1] 2018-12-10 16:37:38,300 WARNING Failed to receive RF beacon at expected period. channel_number=0 ... [Thread-1] 2018-12-10 16:38:10,676 WARNING Failed to receive RF beacon at expected period. channel_number=0 [Thread-1] 2018-12-10 16:38:10,801 WARNING Channel dropped to search do to too many dropped messages. channel_number=0 ^CTraceback (most recent call last): File "/usr/bin/ant-downloader", line 11, in <module> load_entry_point('python-ant-downloader==13.2.24', 'console_scripts', 'ant-downloader')() File "/usr/lib/python2.7/site-packages/antd/main.py", line 90, in downloader client_id = host.auth(pair=not args.daemon) File "/usr/lib/python2.7/site-packages/antd/antfs.py", line 388, in auth auth_reply = Auth.unpack(self.channel.read(timeout)) File "/usr/lib/python2.7/site-packages/antd/ant.py", line 918, in read return self._session._send(ReadData(self.channel_number, ReadData), timeout=timeout).data File "/usr/lib/python2.7/site-packages/antd/ant.py", line 669, in _send cmd.done.wait(1) File "/usr/lib64/python2.7/threading.py", line 617, in wait self.__cond.wait(timeout, balancing) File "/usr/lib64/python2.7/threading.py", line 362, in wait _sleep(delay) KeyboardInterrupt
and when used with and-downloader -d:
[eric@lys openant-master]$ ant-downloader -d [MainThread] 2018-12-10 16:38:41,019 INFO Searching for ANT devices. [MainThread] 2018-12-10 16:38:45,717 DEBUG Got ANT-FS Beacon. device_number=0xdf9f Beacon{'auth_type': 0, 'pairing_enabled': 0, 'data_available': 32, 'device_state': 0, 'period': 4, 'descriptor': 131074, 'upload_enabled': 0, 'data_page_id': 67, 'data': '', 'status_2': 0, 'status_1': 36} [MainThread] 2018-12-10 16:38:45,718 DEBUG Found device, but paring not enabled. device_number=0xdf9f [MainThread] 2018-12-10 16:38:48,713 DEBUG Got ANT-FS Beacon. device_number=0xdf9f Beacon{'auth_type': 0, 'pairing_enabled': 0, 'data_available': 32, 'device_state': 0, 'period': 4, 'descriptor': 131074, 'upload_enabled': 0, 'data_page_id': 67, 'data': '', 'status_2': 0, 'status_1': 36} [MainThread] 2018-12-10 16:38:48,714 DEBUG Found device, but paring not enabled. device_number=0xdf9f [MainThread] 2018-12-10 16:38:49,850 DEBUG Got ANT-FS Beacon. device_number=0xdf9f Beacon{'auth_type': 0, 'pairing_enabled': 0, 'data_available': 32, 'device_state': 0, 'period': 4, 'descriptor': 131074, 'upload_enabled': 0, 'data_page_id': 67, 'data': '', 'status_2': 0, 'status_1': 36} [MainThread] 2018-12-10 16:38:49,850 DEBUG Found device, but paring not enabled. device_number=0xdf9f [MainThread] 2018-12-10 16:38:51,089 DEBUG Got ANT-FS Beacon. device_number=0xdf9f ... [MainThread] 2018-12-10 16:39:19,596 DEBUG Got ANT-FS Beacon. device_number=0xdf9f Beacon{'auth_type': 0, 'pairing_enabled': 0, 'data_available': 32, 'device_state': 0, 'period': 4, 'descriptor': 131074, 'upload_enabled': 0, 'data_page_id': 67, 'data': '', 'status_2': 0, 'status_1': 36} [MainThread] 2018-12-10 16:39:19,596 DEBUG Found device, but paring not enabled. device_number=0xdf9f ^CTraceback (most recent call last): File "/usr/bin/ant-downloader", line 11, in <module> load_entry_point('python-ant-downloader==13.2.24', 'console_scripts', 'ant-downloader')() File "/usr/lib/python2.7/site-packages/antd/main.py", line 85, in downloader include_devices_with_no_data=args.force or not args.daemon) File "/usr/lib/python2.7/site-packages/antd/antfs.py", line 277, in search beacon = Beacon.unpack(self.channel.recv_broadcast(timeout=timeout - time.time())) File "/usr/lib/python2.7/site-packages/antd/ant.py", line 897, in recv_broadcast return self._session._send(ReadData(self.channel_number, RecvBroadcastData), timeout=timeout).data File "/usr/lib/python2.7/site-packages/antd/ant.py", line 669, in _send cmd.done.wait(1) File "/usr/lib64/python2.7/threading.py", line 617, in wait self.__cond.wait(timeout, balancing) File "/usr/lib64/python2.7/threading.py", line 362, in wait _sleep(delay) KeyboardInterrupt
Any clue ?
Thanks and regards,
Eric.
A couple things,
I'm not familiar with the Foretrex 410. This code supports a pretty narrow set of old devices. So you may want to also try: https://github.com/Tigge/antfs-cli
Make sure the watch is ready to pair; "Found device, but paring not enabled" shows up in the second attempt, but not the first. Pairing is a little flaky so try a couple times. The device should be in the mode where its waiting for computer to connect, and asks you to press a button to confirm.
If your device is supported by this code base, It only downloads routes from the watch. Its technically possible to download other datatypes, but I never implemented it. I'm not sure about antfs-cli
it may work with waypoints if your device is supported.
Hi Braiden,
Thanks a lot for your quick reply. I already gave it a try with antfs-cli, with more or less the same result. I guess you pointed out the main issue. With the Foretrex 401 you send the waypoint or routes to other device, and you are not awaiting a connection from the other side.
There is a similar process as you describe to pair a heart beat or cadence monitor.
I'll post in antfs-cli, but it doesn't look tracked anymore by its autor.
Any progress and I'll post here.
thanks and regards,
Eric.