Unable to connect to new v3.5 48V

I have finally gotten around to testing my v3.5 48V but have not had any luck. I have spent a bunch of time trying to connect but to no avail following the getting started guide and searching the forum. I am running on a 32VDC power supply and trying to connect with a Win 10 machine but it is not being detected and it’s not showing up in zadig. I did try several cables and machines to make sure it wasn’t something stupid like that. The green light is on, but nobody is home. Any suggestions?

On Windows 10 I had to select Options->List All Devices, Just be careful to select the right device (if you don’t here is how to restore it)

Thanks but that is after I had done the list all devices. The odrive isn’t connecting to the PC or showing up in the devices.

Did you power it externally? it is not USB powered

Yes. I am powering it with a 32VDC power supply.

Any other thoughts? I am thinking it is a firmware problem. Since I don’t have USB connection, I ordered a STlink so I can update the firmware directly.

Hi

Try another USB cable

Cheers
Carelsbergh Stijn

Thanks but I did try several cables and PCs.

Hi @Kerrymann,
It is possible that the ODrive was shipped to you without the correct firmware on it, if so my apologies.
You can indeed update the firmware with an STLink, but you may also use the “DFU mode” on the dip switch to engage the ROM bootloader.
You can find more instructions here, you will need to do the step called “How to force DFU mode”

I hope that helps,
Cheers

I went the force DFU route but ran into the following:

(base) C:\Users\d55gu>odrivetool dfu
ODrive control utility v0.4.7
Waiting for ODrive...
Found ODrive 206C35833948 (v3.5-48V) with firmware [unknown version] in DFU mode
Checking online for newest firmware... found v0.4.7
Downloading firmware v0.4.7...
The configuration cannot be backed up because the device is already in DFU mode. The configuration may be lost after updating. Do you want to continue anyway? [Y/n] y
Erasing... done
Flashing... (sector 0/6)
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
~\Anaconda3\Scripts\odrivetool in <module>()
    140         print_version()
    141         import odrive.dfu
--> 142         odrive.dfu.launch_dfu(args, logger, app_shutdown_token)
    143
    144     elif args.command == 'liveplotter':

~\Anaconda3\lib\site-packages\odrive\dfu.py in launch_dfu(args, logger, cancellation_token)
    452     firmware = FirmwareFromFile(args.file) if args.file else None
    453
--> 454     update_device(device, firmware, logger, cancellation_token)
    455
    456

~\Anaconda3\lib\site-packages\odrive\dfu.py in update_device(device, firmware, logger, cancellation_token)
    380         for i, (sector, data) in enumerate(touched_sectors):
    381             print("Flashing... (sector {}/{})  \r".format(i, len(touched_sectors)), end='', flush=True)
--> 382             dfudev.write_sector(sector, data)
    383         print('Flashing... done            \r', end='', flush=True)
    384     finally:

~\Anaconda3\lib\site-packages\odrive\dfuse\DfuDevice.py in write_sector(self, sector, data)
    185             status = self.wait_while_state(DfuState.DFU_DOWNLOAD_BUSY)
    186             if status[1] != DfuState.DFU_DOWNLOAD_IDLE:
--> 187                 raise RuntimeError("An error occured. Device Status: {!r}".format(status))
    188
    189     def read_sector(self, sector):

RuntimeError: An error occured. Device Status: (0, 2, 0, 0)

(base) C:\Users\d55gu>

Try the other DFU method: https://docs.odriverobotics.com/odrivetool#upgrading-firmware-with-a-different-dfu-tool

I did try that but I could not get the DfuSe demo to see the odrive. I followed the zadig instructions for uninstalling the driver several times but it wouldn’t come up. I went back to trying the normal dfu procedure but this time I got a different error and then there was a barely audible click (might have been my imagination) the LED went out and the odrive disconnected from USB. :face_with_raised_eyebrow:

I power cycled it and it came back :slight_smile:

But I have the same problem: :frowning:

(base) C:\Users\d55gu>odrivetool dfu
ODrive control utility v0.4.7
Waiting for ODrive…

ValueError Traceback (most recent call last)
~\Anaconda3\Scripts\odrivetool in ()
140 print_version()
141 import odrive.dfu
–> 142 odrive.dfu.launch_dfu(args, logger, app_shutdown_token)
143
144 elif args.command == ‘liveplotter’:

~\Anaconda3\lib\site-packages\odrive\dfu.py in launch_dfu(args, logger, cancellation_token)
452 firmware = FirmwareFromFile(args.file) if args.file else None
453
–> 454 update_device(device, firmware, logger, cancellation_token)
455
456

~\Anaconda3\lib\site-packages\odrive\dfu.py in update_device(device, firmware, logger, cancellation_token)
256
257 if isinstance(device, usb.core.Device):
–> 258 serial_number = device.serial_number
259 dfudev = DfuDevice(device)
260 if (logger._verbose):

~\Anaconda3\lib\site-packages\usb\core.py in serial_number(self)
828 “”"
829 if self._serial_number is None:
–> 830 self._serial_number = util.get_string(self, self.iSerialNumber)
831 return self._serial_number
832

~\Anaconda3\lib\site-packages\usb\util.py in get_string(dev, index, langid)
312
313 if 0 == len(langids):
–> 314 raise ValueError(“The device has no langid”)
315 if langid is None:
316 langid = langids[0]

ValueError: The device has no langid

(base) C:\Users\d55gu>odrivetool dfu

It is in DFU mode

Fixed! (see below)

I had still no joy despite a lot of head scratching trying to do it via USB. Looks like others had this error before according to this git issue but didn’t see a fix:

I was experiencing the exact same problem that the window users in this issue reported.

The ST link I ordered came in and I was able to get the firmware flashed in DFU mode via the STlink.

So for future reference if anyone gets the following errors trying to flash:

ValueError: The device has no langid
IndexError: array index out of range
RuntimeError: An error occured. Device Status: (0, 2, 0, 0)

I got one of these three errors anytime I tried to reflash and went through all the other methods numerous times and even tried a different PC, all with the same result. If you get the same OpenOCD the .elf file via STlink is a (the?) solution.

Now I can actually get to testing the Odrive! :slight_smile:
Kerry

1 Like