mvillalba / python-ant

[UNMAINTAINED, LOOK INTO THE FORKS] Python implementation of the ANT, ANT+, and ANT-FS protocols (http://www.thisisant.com/).
https://github.com/mvillalba/python-ant
MIT License
160 stars 130 forks source link

Stuck on waitForMessage #28

Open kinkintama opened 5 years ago

kinkintama commented 5 years ago

Hello, I'm trying to use your library to get live data from ant+ devices. I managed to get live data from the device after changing couple of stuff on the driver.py. but the problem is i need to connect multiple devices simultaneously.And i get an error on the second one saying Resource busy.I saw in couple of codes you have a method called get first free channel. The problem is those demos get stuck on waitForMessage. I can only make it work on the demo 08. Is there a way to make that code find a freechannel ? Or how can i not get stuck on waitForMessage in other examples ? Thanks for the help. Below is the message i get when i try to use demo 04.

^CTraceback (most recent call last): File "04-processevents.py", line 31, in antnode.start() File "/home/talha/Desktop/device2 (copy)/demos/ant.core/node.py", line 165, in start self.init() File "/home/talha/Desktop/device2 (copy)/demos/ant.core/node.py", line 191, in init caps = self.evm.waitForMessage(message.CapabilitiesMessage) File "build/bdist.linux-x86_64/egg/ant/core/event.py", line 176, in waitForMessage self.msg_lock.release() KeyboardInterrupt

kinkintama commented 5 years ago

I actually got the example code 4 working with the getFreechannel method in it. But still when i try to connect to my second device i get Resource Busy error