braiden/python-ant-downloader

Bad interaction with 310XT

philipwhiuk opened this issue · 1 comments

So a few thinks I noted.

  1. It would be nice to see that first WARN handled a little better - my Garmin is new so they are clearly still shipping the 'older' serial stick. However this is only a minor issue.
  2. The major issue is that it won't transfer any data. I enabled 'Transfer All' and got the below. I presume only the first request is given the transfer of all data, after which it goes back to saying no data available.
[root@philip-pc philip]# ant-downloader
[MainThread]    2014-04-22 19:33:43,507 WARNING Failed to find Garmin nRF24AP2 (newer) USB Stick.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/antd/cfg.py", line 92, in create_hardware
    return hw.UsbHardware(id_vendor, id_product, bulk_endpoint)
  File "/usr/lib/python2.7/site-packages/antd/hw.py", line 61, in __init__
    raise NoUsbHardwareFound(errno.ENOENT, "No available device matching vid(0x%04x) pid(0x%04x)." % (id_vendor, id_product))
NoUsbHardwareFound: [Errno 2] No available device matching vid(0x0fcf) pid(0x1008).
[MainThread]    2014-04-22 19:33:43,507 WARNING Looking for nRF24AP1 (older) Serial USB Stick.
[MainThread]    2014-04-22 19:33:44,517 INFO    Searching for ANT devices.
[MainThread]    2014-04-22 19:33:57,704 DEBUG   Got ANT-FS Beacon. device_number=0x103e Beacon{'auth_type': 3, 'pairing_enabled': 0, 'data_available': 32, 'device_state': 0, 'period': 4, 'descriptor': 66982, 'upload_enabled': 0, 'data_page_id': 67, 'data': '', 'status_2': 0, 'status_1': 44}
[MainThread]    2014-04-22 19:33:57,704 INFO    Device has data. Linking.
[MainThread]    2014-04-22 19:33:57,704 DEBUG   Setting period to match device, hz=8
[MainThread]    2014-04-22 19:33:57,822 DEBUG   Linking with device. freq=2415mhz
[MainThread]    2014-04-22 19:33:58,058 INFO    Pairing with device.
[Thread-1]  2014-04-22 19:33:58,350 WARNING Burst transfer failed, discarding data. CHANNEL_EVENT(channel_number=0, msg_id=1, msg_code=4)
[MainThread]    2014-04-22 19:34:03,286 WARNING Caught error while communicating with device, will retry.
Traceback (most recent call last):
  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 362, in auth
    auth_reply = Auth.unpack(self.channel.read())
  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 680, in _send
    raise cmd.error
AntTimeoutError: No reply to command. ReadData(channel_number=0)
[MainThread]    2014-04-22 19:34:03,287 INFO    Searching for ANT devices.
[MainThread]    2014-04-22 19:34:08,424 DEBUG   Got ANT-FS Beacon. device_number=0x103e Beacon{'auth_type': 3, 'pairing_enabled': 0, 'data_available': 32, 'device_state': 0, 'period': 4, 'descriptor': 66982, 'upload_enabled': 0, 'data_page_id': 67, 'data': '', 'status_2': 0, 'status_1': 44}
[MainThread]    2014-04-22 19:34:08,425 INFO    Device has data. Linking.
[MainThread]    2014-04-22 19:34:08,425 DEBUG   Setting period to match device, hz=8
[MainThread]    2014-04-22 19:34:08,542 DEBUG   Linking with device. freq=2407mhz
[Thread-1]  2014-04-22 19:34:08,657 WARNING Failed to receive RF beacon at expected period. channel_number=0
[Thread-1]  2014-04-22 19:34:08,782 WARNING Failed to receive RF beacon at expected period. channel_number=0
[Thread-1]  2014-04-22 19:34:08,907 WARNING Failed to receive RF beacon at expected period. channel_number=0
[Thread-1]  2014-04-22 19:34:09,032 WARNING Failed to receive RF beacon at expected period. channel_number=0
[Thread-1]  2014-04-22 19:34:09,157 WARNING Failed to receive RF beacon at expected period. channel_number=0
[Thread-1]  2014-04-22 19:34:09,282 WARNING Failed to receive RF beacon at expected period. channel_number=0
[Thread-1]  2014-04-22 19:34:09,407 WARNING Failed to receive RF beacon at expected period. channel_number=0
[Thread-1]  2014-04-22 19:34:09,532 WARNING Failed to receive RF beacon at expected period. channel_number=0
[Thread-1]  2014-04-22 19:34:09,657 WARNING Failed to receive RF beacon at expected period. channel_number=0
[Thread-1]  2014-04-22 19:34:09,782 WARNING Failed to receive RF beacon at expected period. channel_number=0
[Thread-1]  2014-04-22 19:34:09,907 WARNING Failed to receive RF beacon at expected period. channel_number=0
[Thread-1]  2014-04-22 19:34:10,032 WARNING Failed to receive RF beacon at expected period. channel_number=0
[Thread-1]  2014-04-22 19:34:10,157 WARNING Failed to receive RF beacon at expected period. channel_number=0
[Thread-1]  2014-04-22 19:34:10,282 WARNING Failed to receive RF beacon at expected period. channel_number=0
[Thread-1]  2014-04-22 19:34:10,407 WARNING Failed to receive RF beacon at expected period. channel_number=0
[Thread-1]  2014-04-22 19:34:10,532 WARNING Channel dropped to search do to too many dropped messages. channel_number=0
[MainThread]    2014-04-22 19:34:11,544 WARNING Retryable error. 9 try(s) remaining. Send message was not acknowledged by peer. CHANNEL_EVENT(channel_number=0, msg_id=1, msg_code=6)
[MainThread]    2014-04-22 19:34:17,545 WARNING Caught error while communicating with device, will retry.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/antd/main.py", line 88, in downloader
    host.link()
  File "/usr/lib/python2.7/site-packages/antd/antfs.py", line 335, in link
    self.channel.send_acknowledged(link.pack())
  File "/usr/lib/python2.7/site-packages/antd/ant.py", line 882, in send_acknowledged
    self._session._send(cmd, timeout=timeout, retry=retry)
  File "/usr/lib/python2.7/site-packages/antd/ant.py", line 680, in _send
    raise cmd.error
AntTimeoutError: No reply to command. SEND_ACKNOWLEDGED_DATA(channel_number=0, data='D\x02\x07\x047(\x00\x00')
[MainThread]    2014-04-22 19:34:17,545 INFO    Searching for ANT devices.
[MainThread]    2014-04-22 19:34:26,681 DEBUG   Got ANT-FS Beacon. device_number=0x103e Beacon{'auth_type': 3, 'pairing_enabled': 0, 'data_available': 32, 'device_state': 0, 'period': 4, 'descriptor': 66982, 'upload_enabled': 0, 'data_page_id': 67, 'data': '', 'status_2': 0, 'status_1': 44}
[MainThread]    2014-04-22 19:34:26,681 INFO    Device has data. Linking.
[MainThread]    2014-04-22 19:34:26,681 DEBUG   Setting period to match device, hz=8
[MainThread]    2014-04-22 19:34:26,797 DEBUG   Linking with device. freq=2429mhz
[MainThread]    2014-04-22 19:34:27,082 INFO    Pairing with device.
[MainThread]    2014-04-22 19:34:27,310 DEBUG   Got client auth string. Auth{'auth_string': 'Forerunner 310XT', 'beacon': <antd.antfs.Beacon object at 0x1be6750>, 'op_id': None, 'response_type': 0, 'client_id': 3875541054, 'host_id': 10295, 'data_page_id': 68, 'command_id': 132}
[MainThread]    2014-04-22 19:34:27,310 DEBUG   Device secret known.
[MainThread]    2014-04-22 19:34:27,588 DEBUG   Device accepted key.
[MainThread]    2014-04-22 19:34:27,702 INFO    Saving raw data to /root/.antd/0xe700103e/raw/20140422-193427.raw.
[MainThread]    2014-04-22 19:34:27,703 DEBUG   A000: executing product request
[MainThread]    2014-04-22 19:34:29,803 DEBUG   init_device_api: product_id=1446, software_version=4.50, description=['Forerunner 310XT Software Version 4.50', 'VERBMAP ', 'VERSMAP ']
[MainThread]    2014-04-22 19:34:29,803 DEBUG   init_device_api: protocol_array=['P000', 'L001', 'A010', 'A903', 'A918', 'D918', 'A1015', 'T001', 'A100', 'D110', 'A201', 'D202', 'D110', 'D210', 'A302', 'D311', 'D1018', 'A500', 'D501', 'A600', 'D600', 'A601', 'D601', 'A700', 'D700', 'A800', 'D800', 'A801', 'D801', 'A902', 'A907', 'D907', 'D908', 'D909', 'D910', 'A906', 'D1015', 'A1000', 'D1009', 'A1017', 'D1008', 'A1003', 'D1003', 'A1016', 'D1016', 'A1005', 'D1005', 'A1018', 'D1006', 'A1007', 'D1007', 'A1008', 'D1012', 'A1009', 'D1013', 'A1013', 'D1014', 'A1014', 'D1017']
[MainThread]    2014-04-22 19:34:29,803 DEBUG   Using link protocol L001.
[MainThread]    2014-04-22 19:34:29,803 DEBUG   Using command protocol A010.
[MainThread]    2014-04-22 19:34:29,803 DEBUG   Using A302['D311', 'D1018'] for: get_trks
[MainThread]    2014-04-22 19:34:29,804 DEBUG   Using A906['D1015'] for: get_laps
[MainThread]    2014-04-22 19:34:29,804 DEBUG   Using A1000['D1009'] for: get_runs
[MainThread]    2014-04-22 19:34:29,804 DEBUG   A000: executing product request
[MainThread]    2014-04-22 19:34:31,952 DEBUG   A1000: executing transfer runs
[MainThread]    2014-04-22 19:34:33,067 DEBUG   A906: executing transfer laps
[MainThread]    2014-04-22 19:34:34,181 DEBUG   A301: executing transfer tracks
[MainThread]    2014-04-22 19:34:35,311 INFO    Closing session.
[MainThread]    2014-04-22 19:34:35,589 INFO    Excuting plugins.
[MainThread]    2014-04-22 19:34:35,589 INFO    TcxPlugin: processing /root/.antd/0xe700103e/raw/20140422-193427.raw.
[MainThread]    2014-04-22 19:34:35,589 DEBUG   A000: executing product request
[MainThread]    2014-04-22 19:34:35,590 DEBUG   init_device_api: product_id=1446, software_version=4.50, description=['Forerunner 310XT Software Version 4.50', 'VERBMAP ', 'VERSMAP ']
[MainThread]    2014-04-22 19:34:35,590 DEBUG   init_device_api: protocol_array=['P000', 'L001', 'A010', 'A903', 'A918', 'D918', 'A1015', 'T001', 'A100', 'D110', 'A201', 'D202', 'D110', 'D210', 'A302', 'D311', 'D1018', 'A500', 'D501', 'A600', 'D600', 'A601', 'D601', 'A700', 'D700', 'A800', 'D800', 'A801', 'D801', 'A902', 'A907', 'D907', 'D908', 'D909', 'D910', 'A906', 'D1015', 'A1000', 'D1009', 'A1017', 'D1008', 'A1003', 'D1003', 'A1016', 'D1016', 'A1005', 'D1005', 'A1018', 'D1006', 'A1007', 'D1007', 'A1008', 'D1012', 'A1009', 'D1013', 'A1013', 'D1014', 'A1014', 'D1017']
[MainThread]    2014-04-22 19:34:35,590 DEBUG   Using link protocol L001.
[MainThread]    2014-04-22 19:34:35,590 DEBUG   Using command protocol A010.
[MainThread]    2014-04-22 19:34:35,590 DEBUG   Using A302['D311', 'D1018'] for: get_trks
[MainThread]    2014-04-22 19:34:35,591 DEBUG   Using A906['D1015'] for: get_laps
[MainThread]    2014-04-22 19:34:35,591 DEBUG   Using A1000['D1009'] for: get_runs
[MainThread]    2014-04-22 19:34:35,591 DEBUG   A1000: executing transfer runs
[MainThread]    2014-04-22 19:34:35,591 DEBUG   A906: executing transfer laps
[MainThread]    2014-04-22 19:34:35,591 DEBUG   A301: executing transfer tracks
[MainThread]    2014-04-22 19:34:35,591 DEBUG   extract_runs: found 0 run(s)
[root@philip-pc philip]# 

I then tried again, starting the downloader in verbose mode then enabling transfer all. I got the following:

[MainThread]    2014-04-22 19:43:36,679 INFO    Saving raw data to /root/.antd/0xe700103e/raw/20140422-194336.raw.
[MainThread]    2014-04-22 19:43:36,679 DEBUG   A000: executing product request
[MainThread]    2014-04-22 19:43:36,679 DEBUG   Executing Command. SEND_BURST_COMMAND(channel_number=0)
[MainThread]    2014-04-22 19:43:36,680 DEBUG   SEND: a4095000440dffff00000000b4
[MainThread]    2014-04-22 19:43:36,680 DEBUG   SEND: a40950a0fe00000000000000a3
[Thread-1]  2014-04-22 19:43:36,793 DEBUG   RECV: a4094e00432c02039e2800003b
[Thread-1]  2014-04-22 19:43:36,793 DEBUG   Processing reply. RECV_BROADCAST_DATA(channel_number=0, data='C,\x02\x03\x9e(\x00\x00')
[Thread-1]  2014-04-22 19:43:36,794 DEBUG   RECV: a4034000010aec
[Thread-1]  2014-04-22 19:43:36,794 DEBUG   Processing reply. CHANNEL_EVENT(channel_number=0, msg_id=1, msg_code=10)
[Thread-1]  2014-04-22 19:43:36,799 DEBUG   RECV: a40340000105e3
[Thread-1]  2014-04-22 19:43:36,799 DEBUG   Processing reply. CHANNEL_EVENT(channel_number=0, msg_id=1, msg_code=5)
[MainThread]    2014-04-22 19:43:36,844 DEBUG   Executing Command. ReadData(channel_number=0)
[MainThread]    2014-04-22 19:43:36,844 DEBUG   SEND: a4024d0052b9
[Thread-1]  2014-04-22 19:43:36,846 DEBUG   RECV: a402520003f7
[Thread-1]  2014-04-22 19:43:36,846 DEBUG   Processing reply. CHANNEL_STATUS(channel_number=0, channel_status=3)
[MainThread]    2014-04-22 19:43:36,848 DEBUG   SEND: a4094f004403000000000000a5
[MainThread]    2014-04-22 19:43:36,848 DEBUG   Executing Command. RESET_SYSTEM()
[MainThread]    2014-04-22 19:43:36,848 DEBUG   SEND: a4014a00ef
[Thread-1]  2014-04-22 19:43:36,850 DEBUG   RECV: a4016f20ea
[Thread-1]  2014-04-22 19:43:36,850 DEBUG   Processing reply. STARTUP_MESSAGE(startup_message=32)
Traceback (most recent call last):
  File "/usr/bin/ant-downloader", line 9, in <module>
    load_entry_point('python-ant-downloader==13.02.24', 'console_scripts', 'ant-downloader')()
  File "/usr/lib/python2.7/site-packages/antd/main.py", line 98, in downloader
    dev = antd.Device(host)
  File "/usr/lib/python2.7/site-packages/antd/garmin.py", line 312, in __init__
    self.init_device_api()
  File "/usr/lib/python2.7/site-packages/antd/garmin.py", line 351, in init_device_api
    raise DeviceNotSupportedError("Product data not returned by device.")
antd.garmin.DeviceNotSupportedError: Product data not returned by device.

310 XT doesn't support the garmin interface spec. It uses a newer communication protocol, ant-fs.

You'll have to try this project. https://github.com/Tigge/Garmin-Forerunner-610-Extractor.