Tigge / antfs-cli

Extracts FIT files from ANT-FS based sport watches such as Garmin Forerunner 60, 405CX, 310XT, 610 and 910XT.
MIT License
312 stars 77 forks source link

Timed out while waiting for message #194

Open janjezik opened 1 year ago

janjezik commented 1 year ago

Hi. Thanks for sharing antfs-cli with the world. I have been using it for years on old debian with no issues. Recently i switched to Ubuntu 22.04.1 and I am now unable to make it work. I have read all the relevant issues related to "timeout" in antfs-cli as well as in openant. I have tried everything I was able to understand:

After I run antfs-cli I only get Request basic information...

After couple of seconds it fails with ant.easy.exception.AntException: Timed out while waiting for message

The ANT probably doesn't even start any communication with my Garmin Swim watch, because it doesn't show anything on the display.

Debug log: 20230205-162321-antfs-cli-log Terminal output: https://gist.github.com/janjezik/0873c673389395c45b01e8dcca180823#file-terminal-output I am using Python 3.10

I appreciate any suggestion how to debug this issue. Thanks

gjaekel commented 1 year ago
  • I have tried it after removing the authfile from ~/.config/antfs-cli/xxxxxxxxxx/
  • I have also tried to remove the whole ~/.config/antfs-cli/ directory

Did you also try to re-pair (after enabling pairing on the watch)?

Do you need a log of a working transfer to compare? I may provide one.

BTW: Should make no big deal because it have worked before, but just for interest: What model of watch?

janjezik commented 1 year ago

Hi. The watch is Garmin Swim. Trying to pair fails as well: Terminal output

Debug log from the pairing attempt: 20230205-222343-antfs-cli.log

janjezik commented 1 year ago

Hi. I am still unable to make it work.

Do you need a log of a working transfer to compare? I may provide one.

Could you please provide me with the debug log from successful transfer?

Thank you.

gjaekel commented 1 year ago

I would like to send it private to you, may contact me via email?

alelova commented 1 year ago

Hello. Same issue after update ubuntu to 22.04.

gotenp commented 1 year ago

I have the same issue since I upgraded to linux mint 21.1 from 20.3 Is there a way to get antfs-cli working again. I noticed that openant scan seems to be working This is the output: openant scan Starting scanner for #0, type 0, press Ctrl-C to finish Found new device #37494 DeviceType.Unknown; device_type: 1, transmission_type: 5 But using antfs-cli gives antfs-cli Request basic information... Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/antfs_cli-0.4-py3.10.egg/antfs_cli/program.py", line 382, in main g = AntFSCLI(config_dir, args) File "/usr/local/lib/python3.10/dist-packages/antfs_cli-0.4-py3.10.egg/antfs_cli/program.py", line 140, in __init__ Application.__init__(self) File "/home/peter/.local/lib/python3.10/site-packages/ant/fs/manager.py", line 141, in __init__ raise e File "/home/peter/.local/lib/python3.10/site-packages/ant/fs/manager.py", line 115, in __init__ m = self._node.request_message(Message.ID.RESPONSE_CAPABILITIES) File "/home/peter/.local/lib/python3.10/site-packages/ant/easy/node.py", line 116, in request_message return self.wait_for_special(messageId) File "/home/peter/.local/lib/python3.10/site-packages/ant/easy/node.py", line 144, in wait_for_special return wait_for_special(event_id, self._responses, self._responses_cond) File "/home/peter/.local/lib/python3.10/site-packages/ant/easy/filter.py", line 111, in wait_for_special return wait_for_message(match, process, queue, condition) File "/home/peter/.local/lib/python3.10/site-packages/ant/easy/filter.py", line 62, in wait_for_message raise AntException("Timed out while waiting for message") ant.easy.exception.AntException: Timed out while waiting for message Interrupted: Timed out while waiting for message if I use --debug I get this info... `Drivers available: [<class 'ant.base.driver.SerialDriver'>, <class 'ant.base.driver.USB2Driver'>, <class 'ant.base.driver.USB3Driver'>] Using driver: <class 'ant.base.driver.USB2Driver'> USB Find device, vendor 0xfcf, product 0x1008 USB Config values: Config 1 Interface 0, Alt 0 Endpoint 129 Endpoint 1 A kernel driver active, detatching USB Endpoint out: ENDPOINT 0x1: Bulk OUT =============================== bLength : 0x7 (7 bytes) bDescriptorType : 0x5 Endpoint bEndpointAddress : 0x1 OUT bmAttributes : 0x2 Bulk wMaxPacketSize : 0x40 (64 bytes) bInterval : 0x1, 1 USB Endpoint in: ENDPOINT 0x81: Bulk IN =============================== bLength : 0x7 (7 bytes) bDescriptorType : 0x5 Endpoint bEndpointAddress : 0x81 IN bmAttributes : 0x2 Bulk wMaxPacketSize : 0x40 (64 bytes) bInterval : 0x1, 129 Ant runner started Write data: [a4 01 4a 00 ef] Read data: [a4 01 6f 20 ea] (now have [a4 01 6f 20 ea] in buffer) Got response start-up, <ant.base.Message 6f:[20] (s:a4, l:1, c:ea)> Timeout waiting for message: (110, 'Operation timed out') Write data: [a4 02 4d 00 54 bf] Read data: [a4 06 54 08 03 00 ba 36 00 71] (now have [a4 06 54 08 03 00 ba 36 00 71] in buffer) Write data: [a4 09 46 00 a8 a4 23 b9 f5 5e 63 c1 74] Write data: [a4 02 4d 00 61 8a] Got response general, <ant.base.Message 54:[08 03 00 ba 36 00] (s:a4, l:6, c:71)> wait for message matching <function wait_for_response..match at 0x7f8db5fa5090> Write data: [a4 02 4d 00 3e d5] looking for matching message in deque([]) Read data: [a4 03 40 00 46 00 a1] (now have [a4 03 40 00 46 00 a1] in buffer) _worker_response None, 111, array('B', [32])

gotenp commented 1 year ago

I have the same issue since I upgraded to linux mint 21.1 from 20.3 Is there a way to get antfs-cli working again. I noticed that openant scan seems to be working This is the output:

SNIP

Update: I reverted back to mint 20.3 antfs-cli is working again ... Happy days... :-)

prcoder-1 commented 1 year ago

Same issue (Timed out while waiting for message) on Fedora release 37 (Thirty Seven). Before that it worked fine on Fedora 35.

microniko commented 1 year ago

I have the same issue with Debian GNU/Linux 11 (bullseye, kernel 5.10.0-23-amd64).

microniko commented 1 year ago

I have the same issue with Debian GNU/Linux 12.1 (bookworm, kernel 6.1.0-10-amd64)

(antfs) nicolas@carbone:~/openant-master$ antfs-cli --pair
Request basic information...
Traceback (most recent call last):
  File "/home/nicolas/antfs/lib/python3.11/site-packages/antfs_cli-0.4-py3.11.egg/antfs_cli/program.py", line 382, in main
    g = AntFSCLI(config_dir, args)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nicolas/antfs/lib/python3.11/site-packages/antfs_cli-0.4-py3.11.egg/antfs_cli/program.py", line 140, in __init__
    Application.__init__(self)
  File "/home/nicolas/antfs/lib/python3.11/site-packages/ant/fs/manager.py", line 141, in __init__
    raise e
  File "/home/nicolas/antfs/lib/python3.11/site-packages/ant/fs/manager.py", line 115, in __init__
    m = self._node.request_message(Message.ID.RESPONSE_CAPABILITIES)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nicolas/antfs/lib/python3.11/site-packages/ant/easy/node.py", line 116, in request_message
    return self.wait_for_special(messageId)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nicolas/antfs/lib/python3.11/site-packages/ant/easy/node.py", line 144, in wait_for_special
    return wait_for_special(event_id, self._responses, self._responses_cond)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nicolas/antfs/lib/python3.11/site-packages/ant/easy/filter.py", line 111, in wait_for_special
    return wait_for_message(match, process, queue, condition)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nicolas/antfs/lib/python3.11/site-packages/ant/easy/filter.py", line 62, in wait_for_message
    raise AntException("Timed out while waiting for message")
ant.easy.exception.AntException: Timed out while waiting for message
Interrupted: Timed out while waiting for message
arjanboltjes commented 1 year ago

First time user here. Same issue, with an identical output from antfs-cli --pair as @microniko got. I'm not sure openant scan yields any pairing, like @gotenp posted: how long is this pairing supposed to take? I haven't seen the 'Found new device' myself.

Garmin 310 XT, pairing enabled Ubuntu 22.04.2 LTS openant 1.2.1 antfs-cli downloaded just now

microniko commented 1 year ago

I tried with Linux Mint 20.3 Una (like @gotenp) in a VirtualBox VM but I had the same error :

vboxuser@linuxmint:~/garmin/antfs-cli-master$ antfs-cli --pair
Request basic information...
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/antfs_cli-0.4-py3.8.egg/antfs_cli/program.py", line 382, in main
    g = AntFSCLI(config_dir, args)
  File "/usr/local/lib/python3.8/dist-packages/antfs_cli-0.4-py3.8.egg/antfs_cli/program.py", line 140, in __init__
    Application.__init__(self)
  File "/usr/local/lib/python3.8/dist-packages/ant/fs/manager.py", line 141, in __init__
    raise e
  File "/usr/local/lib/python3.8/dist-packages/ant/fs/manager.py", line 115, in __init__
    m = self._node.request_message(Message.ID.RESPONSE_CAPABILITIES)
  File "/usr/local/lib/python3.8/dist-packages/ant/easy/node.py", line 116, in request_message
    return self.wait_for_special(messageId)
  File "/usr/local/lib/python3.8/dist-packages/ant/easy/node.py", line 144, in wait_for_special
    return wait_for_special(event_id, self._responses, self._responses_cond)
  File "/usr/local/lib/python3.8/dist-packages/ant/easy/filter.py", line 111, in wait_for_special
    return wait_for_message(match, process, queue, condition)
  File "/usr/local/lib/python3.8/dist-packages/ant/easy/filter.py", line 62, in wait_for_message
    raise AntException("Timed out while waiting for message")
ant.easy.exception.AntException: Timed out while waiting for message
Interrupted: Timed out while waiting for message

I had a Cycplus ANT stick :

Bus 002 Device 004: ID 0fcf:1008 Dynastream Innovations, Inc. ANTUSB2 Stick

Will I try with Fedora 35 like @prcoder-1 ? edit : same error message...

microniko commented 9 months ago

@arjanboltjes and @prcoder-1 : do you finally solved the problem ?

alelova commented 6 months ago

cool! it works in Ubuntu 22.04 after the openant update. thanks @tuna-f1sh, i can still use my garmin from 2012.

m:~/varios/openant/openant$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:    22.04
Codename:   jammy

m:~/varios/openant/openant$ openant --version
openant 1.3.1

m:~/varios/openant/openant$ antfs-cli
Searching...
Authenticating with Forerunner 310XT (3894335436)
 - Passkey: OK
 - Set time: FAILED
Downloading 0 file(s)