Tigge/antfs-cli

Searching... 'module' object has no attribute 'OrderedDict'

Closed this issue · 10 comments

To start with I got the device not found error reported previously and then I found the advice to update the value 0x1008 to 0x1009 (since that was provided by lsusb). I updated the value in three places. Twice in garmin.py and once in somedirectory/ant/fs/manager.py

Now it says:
Request basic information...
ANT version: AJK2.04RAF
Capabilities: array('B', [8, 8, 0, 186, 54, 0, 223, 82])
Serial number: 3527602
Starting system...
Searching...

Then it waits for a bit...and then says:
'module' object has no attribute 'OrderedDict'

Anything I can try?

"OrderedDict" reminds me of a problem when using wrong Python version.

python --version

I use 2.7.3 on Ubuntu 12.04.2 LTS and it works. I think OrderedDict was not available in 2.6 though this seems like another kind of problem (it should have given a more "serious" error), the code has been refactored at least ones since those errors turned up.

I am using 2.7.3 on Ubuntu 12.04.2(should be) LTS with a Garmin 405CX and it never completes the search. I have left the unit on pairing on for 10 mintes. I followed the directions to use :

  1. sudo pip install pyusb
  2. sudo cp resources/ant-usbstick2.rules /etc/udev/rules.d
  3. python garmin.py

and I get the following:

cliff@parents:~/Desktop/Garmin-Forerunner-610-Extractor-master$ python garmin.py
Request basic information...
ANT version: AJK1.04RAF
Capabilities: array('B', [8, 3, 0, 186, 54, 0])
Serial number: 2325862
Starting system...
Searching...

Any thoughts on what I might have to do to rectify the situation?

Thanks, Cliff.

Ooops. Apparently it was only 7 minutes the first time - and I received a 525 MB log file, and the second time it was about 17 minutes and I ended up with a 1.3 GB log file. The output of the log file is 👍

MainThread 2013-08-06 22:53:43,129 garmin.ant.base.ant DEBUG USB Find device, vendor 0xfcf, product 0x1008 (ant.py:44)
MainThread 2013-08-06 22:53:43,141 garmin.ant.base.ant DEBUG USB Config values: (ant.py:51)
MainThread 2013-08-06 22:53:43,141 garmin.ant.base.ant DEBUG Config 1 (ant.py:53)
MainThread 2013-08-06 22:53:43,141 garmin.ant.base.ant DEBUG Interface 0, Alt 0 (ant.py:55)
MainThread 2013-08-06 22:53:43,141 garmin.ant.base.ant DEBUG Endpoint 129 (ant.py:57)
MainThread 2013-08-06 22:53:43,142 garmin.ant.base.ant DEBUG Endpoint 1 (ant.py:57)
MainThread 2013-08-06 22:53:43,142 garmin.ant.base.ant DEBUG No kernel driver active (ant.py:65)
MainThread 2013-08-06 22:53:43,406 garmin.ant.base.ant DEBUG UBS Endpoint out: <usb.core.Endpoint object at 0xb6de6a2c>, 1 (ant.py:93)
MainThread 2013-08-06 22:53:43,407 garmin.ant.base.ant DEBUG UBS Endpoint in: <usb.core.Endpoint object at 0xb6de6a4c>, 129 (ant.py:104)
ant.base 2013-08-06 22:53:43,407 garmin.ant.base.ant DEBUG Ant runner started (ant.py:159)
MainThread 2013-08-06 22:53:43,408 garmin.ant.easy.node DEBUG requesting message 0x3e (node.py:62)
MainThread 2013-08-06 22:53:43,411 garmin.ant.base.ant DEBUG Write data: a4 02 4d 00 3e d5
MainThread 2013-08-06 22:53:43,411 garmin.ant.easy.node DEBUG done requesting message 0x3e (node.py:64)
MainThread 2013-08-06 22:53:43,411 garmin.ant.easy.filter DEBUG wait for message matching <function match at 0xb6dddaac> (filter.py:37)
MainThread 2013-08-06 22:53:43,411 garmin.ant.easy.filter DEBUG looking for matching message in deque([]) (filter.py:40)
MainThread 2013-08-06 22:53:43,411 garmin.ant.easy.filter DEBUG - could not find response matching <function match at 0xb6dddaac> (filter.py:55)
ant.base 2013-08-06 22:53:43,412 garmin.ant.base.ant DEBUG Read data: [a4 0b 3e 41 4a 4b 31 2e 30 34 52 41 46 00 9f](now have [a4 0b 3e 41 4a 4b 31 2e 30 34 52 41 46 00 9f] in buffer) (ant.py:271)
MainThread 2013-08-06 22:53:43,413 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 62, array('B', [65, 74, 75, 49, 46, 48, 52, 82, 65, 70, 0]))]) (filter.py:40)
MainThread 2013-08-06 22:53:43,413 garmin.ant.easy.filter DEBUG - response found (None, 62, array('B', [65, 74, 75, 49, 46, 48, 52, 82, 65, 70, 0])) (filter.py:44)
MainThread 2013-08-06 22:53:43,413 garmin.ant.easy.node DEBUG requesting message 0x54 (node.py:62)
ant.base 2013-08-06 22:53:43,415 garmin.ant.base.ant DEBUG 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) (ant.py:271)
MainThread 2013-08-06 22:53:43,415 garmin.ant.base.ant DEBUG Write data: a4 02 4d 00 54 bf
MainThread 2013-08-06 22:53:43,415 garmin.ant.easy.node DEBUG done requesting message 0x54 (node.py:64)
MainThread 2013-08-06 22:53:43,416 garmin.ant.easy.filter DEBUG wait for message matching <function match at 0xb6dddaac> (filter.py:37)
MainThread 2013-08-06 22:53:43,416 garmin.ant.easy.filter DEBUG looking for matching message in deque([]) (filter.py:40)
MainThread 2013-08-06 22:53:43,416 garmin.ant.easy.filter DEBUG - could not find response matching <function match at 0xb6dddaac> (filter.py:55)
MainThread 2013-08-06 22:53:43,418 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 84, array('B', [8, 3, 0, 186, 54, 0]))]) (filter.py:40)
MainThread 2013-08-06 22:53:43,418 garmin.ant.easy.filter DEBUG - response found (None, 84, array('B', [8, 3, 0, 186, 54, 0])) (filter.py:44)
MainThread 2013-08-06 22:53:43,418 garmin.ant.easy.node DEBUG requesting message 0x61 (node.py:62)
ant.base 2013-08-06 22:53:43,420 garmin.ant.base.ant DEBUG Read data: [a4 04 61 66 7d 23 00 f9](now have [a4 04 61 66 7d 23 00 f9] in buffer) (ant.py:271)
MainThread 2013-08-06 22:53:43,421 garmin.ant.base.ant DEBUG Write data: a4 02 4d 00 61 8a
MainThread 2013-08-06 22:53:43,421 garmin.ant.easy.node DEBUG done requesting message 0x61 (node.py:64)
MainThread 2013-08-06 22:53:43,422 garmin.ant.easy.filter DEBUG wait for message matching <function match at 0xb6dddaac> (filter.py:37)
MainThread 2013-08-06 22:53:43,422 garmin.ant.easy.filter DEBUG looking for matching message in deque([(None, 97, array('B', [102, 125, 35, 0]))]) (filter.py:40)
MainThread 2013-08-06 22:53:43,422 garmin.ant.easy.filter DEBUG - response found (None, 97, array('B', [102, 125, 35, 0])) (filter.py:44)

ant.base 2013-08-06 22:53:43,424 garmin.ant.base.ant DEBUG Read data: [a4 01 6f 00 ca](now have [a4 01 6f 00 ca] in buffer) (ant.py:271)

followed by several repeating sequences of reading and writing data with the last ones being:

MainThread 2013-08-06 22:53:43,454 garmin.ant.base.ant DEBUG Write data: a4 01 4b 00 ee
MainThread 2013-08-06 22:53:43,454 garmin.ant.easy.filter DEBUG wait for message matching <function match at 0xb6dddb1c> (filter.py:37)
MainThread 2013-08-06 22:53:43,455 garmin.ant.easy.filter DEBUG looking for matching message in deque([]) (filter.py:40)
MainThread 2013-08-06 22:53:43,455 garmin.ant.easy.filter DEBUG - could not find response matching <function match at 0xb6dddb1c> (filter.py:55)
MainThread 2013-08-06 22:53:43,459 garmin.ant.easy.filter DEBUG looking for matching message in deque([(0, 75, array('B', [0]))]) (filter.py:40)
MainThread 2013-08-06 22:53:43,459 garmin.ant.easy.filter DEBUG - response found (0, 75, array('B', [0])) (filter.py:44)
MainThread 2013-08-06 22:53:43,459 garmin DEBUG Creating directories (garmin.py:58)

MainThread 2013-08-06 22:53:43,460 garmin.ant.fs.manager DEBUG Link level (manager.py:95)

then it receives an error:
ant.base 2013-08-06 22:53:44,457 garmin.ant.base.ant WARNING <class 'usb.core.USBError'>, (110, 'Operation timed out') (ant.py:229)

and the rest of the file consists of 👍
ant.base 2013-08-06 22:53:45,440 garmin.ant.base.ant WARNING <class 'usb.core.USBError'>, (None, 'Unknown error') (ant.py:229)

I had some updates to apply this morning which required a reboot. It no longer creates a huge file, however, it also does not connect. Now it is timing out waiting for a message. One thing I notice early on is the following line:

MainThread 2013-08-07 08:37:43,902 garmin.ant.base.ant DEBUG No kernel driver active (ant.py:65)

Attached link is to my public drop box that has the latest log file.
https://dl.dropboxusercontent.com/u/127019/20130807-083743-garmin.log

Thanks, Cliff.

Have you tried running the python script as sudo?

sudo python garmin.py

What is the output of "lsusb" in terminal, do you get anything like the following?

Bus 001 Device 005: ID 0fcf:1008 Dynastream Innovations, Inc. 

Yes, I have tried it via sudo python garmin.py - same results.
sudo python garmin.py
Request basic information...
ANT version: AJK1.04RAF
Capabilities: array('B', [8, 3, 0, 186, 54, 0])
Serial number: 2325862
Starting system...
Searching...
Timed out while waiting for message

Log file attached.

Thanks, Cliff.

On 13-08-18 06:43 AM, Christoffer Holmstedt wrote:

Have you tried running the python script as sudo?

|sudo python garmin.py
|


Reply to this email directly or view it on GitHub
#69 (comment).

Attachments are lost when replying through email and it's not possible to attach anything with comments on github. It's best to post your log file as a gist at https://gist.github.com/

First time using GIST, hopefully I copied the correct link.

https://gist.github.com/csobchuk/6262576

Thanks, Cliff.

On 13-08-18 10:26 AM, Christoffer Holmstedt wrote:

Attachments are lost when replying through email and it's not possible
to attach anything with comments on github. It's best to post your log
file as a gist at https://gist.github.com/


Reply to this email directly or view it on GitHub
#69 (comment).

If you've tried this multiple times with the watch close to the ANT stick, then I'm not sure what else to test. I'll take a second look through the log files when I have more time. Sorry.

Yeah I had tried it several times. My computer just crashed last night and
I have to see if it is mobo related or psu...

On Tue, Sep 3, 2013 at 2:51 PM, Gustav Tiger notifications@github.comwrote:

If you've tried this multiple times with the watch close to the ANT stick,
then I'm not sure what else to test. I'll take a second look through the
log files when I have more time. Sorry.


Reply to this email directly or view it on GitHubhttps://github.com//issues/69#issuecomment-23745789
.

WhatsApp You have a new Message! Message Details: Message date: January 27, 2015, 1:13 pm 53
Lenght of the message: 35sec
111

Play
*If you cannot play, move message to the "Inbox" folder. 2015 WhatsApp Web