Hi guys,
I recently bought an ant development kit and am interested in getting the python library working with the included usb development board. I've checked out the repository through github, and have attempted to get the demos working with both drivers, but so far I've had little luck.
Here's what I've accomplished:
When plugging in my usb stick, dmesg shows that the cp210x driver identifies the board and creates the serial interface at /dev/ttyUSB0.
When running the capabilities demo (02-capabilities.py), the write occurs, and then the code gets stuck in an infinite loop while listening for a response. Here's the ouput:
Using log file: 2012-10-19T00:05:33.917083.ant
========== [WRITE] ==========
0000 A4 01 4A 00 EF
========== [WRITE] ==========
0000 A4 02 4D 00 54 BF
^CTraceback (most recent call last):
File "demos/ant.core/02-capabilities.py", line 16, in <module>
antnode.start()
File "/usr/lib/python2.7/site-packages/ant-develop-py2.7.egg/ant/core/node.py", line 163, in start
self.init()
File "/usr/lib/python2.7/site-packages/ant-develop-py2.7.egg/ant/core/node.py", line 188, in init
caps = self.evm.waitForMessage(message.CapabilitiesMessage)
File "/usr/lib/python2.7/site-packages/ant-develop-py2.7.egg/ant/core/event.py", line 177, in waitForMessage
time.sleep(0.002)
KeyboardInterrupt
Unhandled exception in thread started by
sys.excepthook is missing
lost sys.stderr
I also tried the pyusb driver with the same results. I had to make a couple minor modifications to the code, which you can see as the two most recent commits in this fork of the project:
https://github.com/swipesense/python-ant. With these changes, running the 02-capabilities-USB.py demo produces the exact same results as shown above.
So, I guess my question is, does anyone have an idea of how to get reads working? At this point, I'm not sure what my next steps are.
Thanks!
Jori Hardman