Connecting to two odrives -- "[LEGACY_PROTOCOL] received unexpected ACK: 129"

Hello,

I’m connecting to two ODrives using Python. I took the serial numbers from the odrivetool. The second call to find_any always fails.

>>> import odrive
>>> a = odrive.find_any(serial_number='2061356C3056')
>>> b = odrive.find_any(serial_number='208435833056')
18:01:56.454132255 [LEGACY_PROTOCOL] received unexpected ACK: 129
18:01:56.454463667 [LEGACY_PROTOCOL] received unexpected ACK: 129
>>> import odrive
>>> b = odrive.find_any(serial_number='208435833056')
>>> a = odrive.find_any(serial_number='2061356C3056')
18:03:34.790441738 [LEGACY_PROTOCOL] received unexpected ACK: 129
18:03:34.790612939 [LEGACY_PROTOCOL] received unexpected ACK: 129

Thoughts?
Divya

Version info:
odrive==0.5.2.post0
Firmware: 0 5 1
Hardware 3 6 56

I think possibly you are using the latest odrive python libraries with quite an old firmware.
Try updating to 0.5.3

Where does one find 0.5.3?

I’ve seen you mention it, and I saw samuelsadok mention it here (Hangs when connecting to multiple odrives using find_any() · Issue #591 · odriverobotics/ODrive · GitHub ). I don’t see anything about it in the release notes here (ODrive/CHANGELOG.md at master · odriverobotics/ODrive · GitHub). I’ve used up the extent of my knowledge performing the actions I describe below. I’d say explain it like I’m 5, but I’m not sure I’m that smart.

on my raspberry pi

pip install --upgrade odrive
pip show odrive
gives “Version: 0.5.2.post0”

then

sudo odrivetool dfu
odrivetool
In [1] odrv0
gives “fw_version_major: 0 (uint8)
fw_version_minor: 5 (uint8)
fw_version_revision: 1 (uint8)
fw_version_unreleased: 1 (uint8)”

(p.s. first post ever. stoked. hope to be as smart of a six year old in just a few short years.)

:grin:
That’s basically because 0.5.3 is still somewhat in-development, and the devs haven’t yet pushed it to PyPi (pip) etc.

If you want a specific version, it’s easier to use the one from the Git repository.

Can you make sure that you have the ‘git’ version control software installed on your raspberry pi (sudo apt install git)
Then, find a suitable directory (mkdir ~/Git ; cd ~/Git) and clone the repo:
git clone git://github.com/odriverobotics/ODrive.git ; cd ODrive

Now, you can use Git to check out any version you like. Use git tag to list all of the released versions. Note that 0.5.3 is not there yet.

By default, git will check out master which currently is the most up-to-date branch.
You can use git checkout fw-v0.5.3 to switch to the 0.5.3 release branch, which is slightly behind and contains the last properly tested version of the software.

Then you can run odrivetool directly from the repo with
python3 tools/odrivetool

You can also build and flash the latest firmware:
cd Firmware;
tup
(you might get an error complaining about missing dependencies. sudo apt install tup gcc-arm-none-eabi python3-jinja2 python3-jsonschema and try tup again)
python3 ../tools/odrivetool build/ODriveFirmware.hex

Good luck! :smiley:

BTW: For a question like that, it would have been better to start a new thread. :stuck_out_tongue_closed_eyes:

Thanks! I figured it was in secret development somewhere. I’ll hopefully have a chance to try that out this weekend.

I think I’ve got it! Per the Firmware Developer Guide I also had to update the tup.config file and install python3-yaml and git-lfs to get the build sorted.

Once the fw was flashed, I realized I was still using the odrive python package from 0.5.2, presumably with the old version of find_any(). I rocked a little sudo python3 setup.py install as per the link below.

(pip - How to install Python package from GitHub? - Stack Overflow)

I’ve got the boards loaded in command line. Now I’m one more motor config and some controller gain tuning away from getting stuff done. LFG!

2 Likes

Yeah you can also just call _tools/odrivetool