Odrv0.axis0.config.enable_sensorless_mode Does not Exist?

I’m trying to setup sensorless mode for this motor. I get this error:

How should I fix this? Should I actually be selecting startup_sensorless_control?

Also, since this hasn’t been working (I’ve tried using startup_sensorless_control then followed the documentation to no avail) I also considered using the sensors. These have a 6 pin output, and I was wondering if the odd one out - since the documentation only mentions 5 pin sensors - would just not be connected?. I believe the last one is for temperature, though I’m not sure. The wire colors are: Black-Yellow-Green-Blue-White-Red

Also after running calibration, I get this error:


Sorry for the wall of text, I’m new to ODrive and I’ve been struggling with this for a week or so now.

I think you need to update the firmware. enable_sensorless_mode was a relatively recent addition. That would also explain the unknown error code.

I’d also advise to re-create your config from scratch (call odrv0.erase_configuration() after the upgrade) - you can always take a backup first i.e. odrivetool backup-config my-config.json but there have been some bugs migrating config from old firmware versions, and it’s easier to set it up from defaults.

1 Like

I’ve recreated my config numerous times now (didn’t know you could migrate a config whoops) and for some reason I don’t have the authorization to update the firmware for some reason. I’ve tried adding sudo to the firmware updating command, as well as flipping the switch on the board to DFU, power cycling, and trying again to no avail. I have also tried using the other phase ports(?) on the ODrive (m1 instead of m0).

Did you run sudo odrivetool udev-setup ?
If you still get permissions errors, can you paste the output here?

Will do. I’ve run the command but I’m waiting for it to finish now. It’s been stuck like this for a little while now (just like in some of the previous instances of me trying to update the firmware):

About 17 minutes and counting now.

Alright so after switching to DFU on the ODrive physically (I flipped the switch on the actual ODrive itself), it tells me:

udev rules configured successfully

I’ll switch it back to “run” and see if I can get anything to work.

Trying to run sensorless after that did not work.

So I tried to update the firmware again by running sudo odrivetool dfu:

Still stuck on this for ungodly amounts of time so I cancelled it. However this time around I also flipped the DFU switch after waiting a while – no change there.

It doesn’t seem like I’m the only one that has had this issue. In addition to some of the other posts on here (iirc not all of them had been resolved, or at least there was not update to the threads), someone else I know is also have the exact same issues. Is this not a one-off case?

Ok, so it’s not setting DFU mode correctly, which is odd.
Can you check “sudo dmesg -w” and plug in the ODrive in DFU mode and verify that it connects as “STMicroelectronics STM32 DFU Bootloader” or similar?
It should do the same when calling odrv0.enter_dfu_mode() (which is the function that the odrivetool dfu script calls)

fyi, Flipping the DFU switch while the ODrive is powered will do nothing. You need to flip it and then power-cycle the ODrive for it to boot into DFU mode.


Sorry for the long over due response, I appreciate your help.

What in the sudo dmesg -w output did you want me to check?

I also now have an ST-Link (v2) if I need to update the firmware that way.


So on the documentation here, there are instructions to update the firmware with a different DFU utility:

sudo apt install dfu-util

The documentation also notes that other’s have had issues using the Python DFU tool.

After running this and going through the firmware update process again:

odrivetool dfu

The ODrive was FINALLY able to update the firmware – no ST-Link needed.

**Note: I did put the ODrive tool in DFU mode by flipping the physical switch on the board itself while it had power, then unplugged it from the computer, took away power, plugged it back in, then plugged the ODrive back into the computer before doing the aforementioned steps to update the firmware.

Following the calibration then then unsensored setup processes, the motor moves now.