Odrive (sometimes) won't connect to Jetson TX2 (ubuntu 16.04)


#1

I’ve been running my odrive off of my laptop (ubuntu 16.04) without issue, but it’s time to switch to a Jetson and I’m having trouble connecting to the odrive in odrivetool (or with odrive.find_any()).

Most of the time, if I run odrivetool -v shell I get this:

odrivejetson

Sometimes with the please connect your ODrive at the end and sometimes without.
Sometimes I get lucky and get the “connected to odrive as odrv0” after 5-10 seconds, but the majority of the time nothing happens (even for 20+ minutes). This isn’t a problem on my laptop at all.

If I kill power to the odrive, I get this:

So I know that odrivetool has found the odrive.

EDIT:
I added some debug statements in the Fibre library to find the line it’s getting stuck on:

Looks like #69 in discovery.py is not returning
json_bytes = channel.remote_endpoint_read_buffer(0)

Following it down the function calls we get to:
self._output.process_packet(packet)
on line 297 in protocol.py (in remote_endpoint_operation).

And continuing the stack trace to line 98 in usbbulk_transport.py
ret = self.epw.write(usbBuffer, 0)

Not sure where to go from here…


#2

Hm not sure why the implementation would hang on that line on one platform and not another. Can you try to change line 98 in usbbulk_transport to:

ret = self.epw.write(usbBuffer, timeout=1)

let me know.


#3

So that makes it raise TimeoutErrors (“no response - probably incompatible” in the except in discovery.py)


#4

I had been using python2 (on both machines), and I just tried using python3 instead on the Jetson.

Error different now:

in protocol.py -> remote_endpoint_operation
is calling wait_any() in fibre.utils, which is returning TimeoutError.

So I guess this is a more reasonable error? It’s not setting events properly?


#6

It seems I can get a connection within 4-5 tries if I call odrive.find_any(timeout in {10,15 secs}). I can make this work on my end, so while I’m happy to try out any debug steps, I can also leave it as is.


#7

Reflashed odrive with latest firmware and issue is gonzos.