Closed robho closed 7 months ago
As I wrote above the problem started with 6eb8e19233a9960d316b168d5c0cbf16c8be54e6.
I can restore functionality with either of these changes:
--- a/openant/easy/node.py
+++ b/openant/easy/node.py
@@ -124,11 +124,11 @@ class Node:
elif event == Message.ID.RESPONSE_ANT_VERSION:
self.ant_version = bytes(data).decode("ascii")
_logger.debug(f"ant_version {self.ant_version}")
- else:
- self._responses_cond.acquire()
- self._responses.append((channel, event, data))
- self._responses_cond.notify()
- self._responses_cond.release()
+
+ self._responses_cond.acquire()
+ self._responses.append((channel, event, data))
+ self._responses_cond.notify()
+ self._responses_cond.release()
def _worker_event(self, channel, event, data):
_logger.debug(f"_worker_event {channel}, {event}, {data}")
or:
--- a/openant/fs/manager.py
+++ b/openant/fs/manager.py
@@ -112,8 +112,8 @@ class Application:
print("Request basic information...")
- m = self._node.request_message(Message.ID.RESPONSE_CAPABILITIES)
- print(" Capabilities: ", m[2])
+ # m = self._node.request_message(Message.ID.RESPONSE_CAPABILITIES)
+ # print(" Capabilities: ", m[2])
# m = self._node.request_message(Message.ID.RESPONSE_ANT_VERSION)
# print " ANT version: ", struct.unpack("<10sx", m[2])[0]
The problem seems to be that the capabilities response requested by fs/manager gets ignored/discarded. Can you create a proper fix from this information? I don't know what the expected behaviour is.
What USB ANT+ stick are you using? A try/catch can be put around the request for capabilities but it's odd that it isn't being responded to.
It's not a hardware problem.
The scenario is:
The same problem seems to exist for SERIAL_NUMBER and ANT_VERSION requests. Ie it's not possible to send these messages and receive a response.
Ah I see the issue when you explain it like that; I've not used the antfs stuff myself and didn't have time to look into it when you opened this. Thanks for the PR to just fix it since this stuff isn't used and if is needed, can be grabbed from https://github.com/Tigge/openant/blob/master/openant/easy/node.py#L151 etc.
I've been trying to download logs from my Garmin Forerunner watch and have found that it fails with recent openant versions.
I applied #93 and #94 and then it worked up until 6eb8e19233a9960d316b168d5c0cbf16c8be54e6. After this commit it says:
I'll take a closer look at this breaking commit, but if you have any pointers to what to try, that would be good.
This is also reported in Tigge/antfs-cli#194.