News:

Welcome to the Retrode Community Forums

Main Menu

Firmware Update Hoops to jump through (Windows Good, Linux Sad)

Started by Land95, 10/Sep/2018 02:55:39 AM

Previous topic - Next topic

Land95

I first attempted to update the Retrode v2 firmware using the Linux instructions outlined here: http://www.retrode.org/documentation/firmware/

1 -Install dfu-programmer.
2 -If you have any other flashable AVR devices plugged in (if you don't know, you probably don't), unplug them, as dfu-programmer gets confused if it finds more than one flash target.
3 -Hold down RESET button. Hold down the HWB button. Let go of RESET button. Finally, let go of HWB as well.
4 -At a command line, run "dfu-programmer at90usb646 get product-revision" (without the quotes). If you get the error "dfu-programmer: no device present", try running as the root user. If you still get that error, repeat step 5.
5 -Run "dfu-programmer at90usb646 erase" (without the quotes). If you needed to run dfu-programmer as root in step 6, you will need to do so in this step as well.
6 -Run "dfu-programmer at90usb646 flash /path/to/retrode/firmware.hex" (without the quotes, and obviously use an appropriate path). If you needed to run dfu-programmer as root in step 6, you will need to do so in this step as well.
7 -When the programming is done, hit the RESET button or cycle the USB connection. As tempting as it may seem, do NOT run "dfu-programmer at90usb646 start".

However it turns out as of the 9th of  sept 2018 finding DFU for Ubuntu is no easy task.

Eventually I sourced it https://launchpad.net/ubuntu/xenial/+package/dfu-programmer
And while I was able to return valid info from the get product-revision, at the erase step this would always fail.


Next, I tried updating the firmware using Windows 7 & 10 – both had the problems listed here: http://forum.retrode.org/index.php/topic,156.0.html

This would manifest when the Retrode v2 was put into programming mode (hold reset, hold HWB, release reset, release HWB) and windows would throw a USB device not reconized message.   In FLIP an error indicating Could not open USB device would be thrown.

The solution
1 -look in the task managers device, Right click, Details, HardwareID. 
2 -Go to Regedit, HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\usbflags\VIDPIDREV (where VID/PID/REV are numbers from the HardwareID)
3 -Add a new Dword32 titled SkipBOSDescriptorQuery and set its value to 1. 

More info can be found here: https://blogs.msdn.microsoft.com/usbcoreblog/2013/11/25/why-does-my-usb-device-work-on-windows-8-0-but-fail-on-windows-8-1-with-code-43/

Now firmware updates on Windows 10 or 7 work just fine

ssokolow

You might want to try the helper I wrote for Linux after I got fed up with having to re-learn the official instructions every time I needed to apply an update:

http://forum.retrode.org/index.php/topic,374.msg2888.html#msg2888

It provides a friendly, task-specific wrapper around dfu-programmer and does everything I could think of to be simple and mistake-resistant.

Land95

Thanks @ssokolow.  I actually tried for a goodly amount of time to use your solution first.
 
While I have in the past used dfu-programmer on my ElementaryOS (Ubuntu) laptop, the latest ElementrayOS release flat out was not usable with dfu.   In order to stick with using linux I feel I would have required starting up a fresh virtual machine for the purpose - and nearly did so - when I decided to try using my Windows 10 VM first.   

ssokolow

Quote from: Land95 on 18/Sep/2018 04:06:21 PM
Thanks @ssokolow.  I actually tried for a goodly amount of time to use your solution first.
 
While I have in the past used dfu-programmer on my ElementaryOS (Ubuntu) laptop, the latest ElementrayOS release flat out was not usable with dfu.   In order to stick with using linux I feel I would have required starting up a fresh virtual machine for the purpose - and nearly did so - when I decided to try using my Windows 10 VM first.

Huh. Well, when I find time to upgrade from Kubuntu 14.04 LTS to Kubuntu 18.04 LTS, I'll remember to figure out what's going on there.

Land95

It's odd / annoying and at some point I'll need to solve it for Arduino projects maintenance.