TakkTile / TakkTile-usb

Firmware for the recommended USB-I2C bridge for the TakkTile project
www.takktile.com
8 stars 10 forks source link

data read from USB endpoint is not correct length #12

Closed mkoval closed 9 years ago

mkoval commented 9 years ago

I frequently receive this message when trying to connect to the control boards:

$ rosrun takktile_ros takktile_node.py
contact threshold: 5
temp lowpass: 0.001
[INFO] [WallTime: 1444588646.403842] /takktile_29538_1444588646284 node initialized
Number of boards found =  2
UIDs  [u'435543438323FFFFA0FFC1006000', u'435543438323FFFFA0FFC1006100']
Traceback (most recent call last):
  File "/home/mkoval/takktile-ws/src/takktile_ros/src/takktile_node.py", line 224, in <module>
    TakkNode(XYZ_MAP, FRAME_ID, TEMPERATURE_LOWPASS, CONTACT_THRESHOLD)
  File "/home/mkoval/takktile-ws/src/takktile_ros/src/takktile_node.py", line 109, in __init__
    data.update(tk.getDataRaw()) # read data from all the connected boards
  File "/home/mkoval/takktile-ws/src/TakkTile-usb/src/TakkTile/TakkTile.py", line 100, in getDataRaw
    raise Exception("data read from USB endpoint is not correct length")
Exception: data read from USB endpoint is not correct length

Once this happens, the control boards refuse to connect until I power cycle them. I generally have to repeat this process 10-15 times before the connection succeeds. This is obviously quite frustrating - do you have any ideas what the problem may be?

I have replicated this several computers. All are running Ubuntu 14.04 and have the version of pyusb included in the TakkTile-usb package installed (version 1.0.0a2).

mkoval commented 9 years ago

I forgot to mention it, but I get the error mentioned in #11 if I attempt to reconnect after receiving the "not correct length" error. Maybe they're related?

mkoval commented 9 years ago

Upon closer inspection, I suspect that this is a hardware issue with the control board. I am able to read the same sensors from a different control board with no issues.

There are two resistors missing on the bad board that are present on the good board (R1 and R2). There are also a few suspect solder joints (R4 and the I2C connectors). I don't know enough about the pinout on the microcontroller to definitively say that this is the cause, but it seems like a safe guess.

cpetersmeier commented 7 years ago

Dear Mr mkoval,

i am experiencing the same issue nearly 100% of the time. It would be extremely helpful, if you could upload a picture of the bad and the good board for comparison, so I can check, if thats the issue on my boards!

Best wishes,

Chris