Re: python-ant and the Dynastream ANT USB Development Board

314 views
Skip to first unread message

Adrian Cooke

unread,
Oct 23, 2012, 1:04:48 PM10/23/12
to python-ant-...@googlegroups.com
Hello,

Are you programming on Linux or windows? Have you tried just writing without waiting for READS using raw messages. Possibly the device that you are talking to is not responding properly? Try resetting the Ant device you would like to talk to...

With me it works  with a Garmin Cadence Speed sensor, but sometimes I have to reset the Garmin sensor to get the communication to work again.
--------------------------------------------------------------------------------------------------
Adrian Cooke                                        http://surfforecaster.com
--------------------------------------------------------------------------------------------------



On 18 October 2012 16:19, <jyr...@gmail.com> wrote:
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

Jori Hardman

unread,
Oct 25, 2012, 4:13:40 PM10/25/12
to python-ant-...@googlegroups.com
Hi Adrian,

Thanks for the reply! I was worried this group might be dead after the few months of inactivity. I am programming on Linux, but I have not tried raw writes directly. Instead, I went ahead and ordered the Garmin usb stick since that is what everyone else seems to be using, and with that, things worked without a hitch. I never did figure out what the issue with the development usb board was, but I assume it has something to do with the ant module being a breakout board rather than on chip. Anyways, with the Garmin part, all my issues have been solved.

To anyone else who finds themselves here with the same issues while working with the Ant development kit, I urge you to buy the Garmin kit, as it just works.

Thanks again for the response,
Jori

Adrian Cooke

unread,
Oct 25, 2012, 5:36:00 PM10/25/12
to python-ant-...@googlegroups.com
Hey Jori,

OK, cool. I use the Spark fun ant plus nordic devices usb stick, it also works!

Good luck with your project.

On 25 October 2012 13:13, <jyr...@gmail.com> wrote:
Hi Adrian,

Thanks for the reply! I was worried this group might be dead after the few months of inactivity. I am programming on Linux, but I have not tried raw writes directly. Instead, I went ahead and ordered the Garmin usb stick since that is what everyone else seems to be using, and with that, things worked without a hitch. I never did figure out what the issue with the development usb board was, but I assume it has something to do with the ant module being a breakout board rather than on chip. Anyways, with the Garmin part, all my issues have been solved.

To anyone else who finds themselves here with the same issues while working with the Ant development kit, I urge you to buy the Garmin kit, as it just works.

Thanks again for the response,
Jori

On Tuesday, October 23, 2012 12:05:09 PM UTC-5, Adrian Cooke wrote:
Reply all
Reply to author
Forward
0 new messages