Unable to Flash Duet 6HC Firmware
-
Interesting. I do not remember needing to install anything beyond the git clone... and I started with the Duet provided image.
HOWEVER, when I run make right now, it fails for the same thing. I believe I've done an apt-get autoclean since then, and because bossa is not an apt-get package, some of its dependencies were removed. Very interesting.
Thanks for the research @bearer.
-
Repost of instructions above, with various corrections:
In a Duet3 +Pi configuration, if you need to re-flash the 6HC main board via BOSSA, you can use the Pi itself as the host for bossa (really bossac, the command line version) in order to flash the Duet.
(You may wish to pull the latest release before flashing, if so do it via regular sudo apt-get update && sudo apt-get install duetsoftwareframework)
- Connect a regular USB cable from the Pi to the Duet.
- It is OK to power Duet from VIN and Pi from ribbon ... OR disconnect ribbon and power the Pi the regular Pi way (micro USB power connector) and let the Pi power the Duet via USB (no VIN on the Duet). Do not do both.
- SSH to the Pi and install bossa.
- Do NOT install the apt-get version, it is old and does not work for what we need
- Install Pre-reqs sudo apt update && sudo apt install -y libwxgtk3.0-dev libreadline-dev
- Install bossa
- git clone https://github.com/shumatech/BOSSA
- cd BOSSA
- make
- Then use bossac to flash the Duet. (having already erased it, etc.)
~/BOSSA/bin/bossac -e -w -v -b /opt/dsf/sd/sys/Duet3Firmware_MB6HC.bin -R
-
Now I'm getting a failure of "No device found on /dev/ttyACM0"
I have probed tty devices and there is no ACM* listed
Tried forcing the ACM0 port on the bossac command line but no go on that eitherI have plugged the Duet board into all of the USB ports and still no ACM* appears
I am getting the following output from dmesg consistently[38775.703615] uart-pl011 fe201000.serial: no DMA platform data
[41960.637148] usb 1-1.3: new high-speed USB device number 39 using xhci_hcd
[41960.737392] usb 1-1.3: device descriptor read/64, error -71
[41960.957390] usb 1-1.3: device descriptor read/64, error -71
[41961.177147] usb 1-1.3: new high-speed USB device number 40 using xhci_hcd
[41961.277386] usb 1-1.3: device descriptor read/64, error -71
[41961.497394] usb 1-1.3: device descriptor read/64, error -71
[41961.617475] usb 1-1-port3: attempt power cycle
[41962.277164] usb 1-1.3: new high-speed USB device number 41 using xhci_hcd
[41962.277464] usb 1-1.3: Device not responding to setup address.
[41962.497423] usb 1-1.3: Device not responding to setup address.
[41962.717171] usb 1-1.3: device not accepting address 41, error -71
[41962.817172] usb 1-1.3: new high-speed USB device number 42 using xhci_hcd
[41962.817545] usb 1-1.3: Device not responding to setup address.
[41963.037536] usb 1-1.3: Device not responding to setup address.
[41963.257174] usb 1-1.3: device not accepting address 42, error -71
[41963.257521] usb 1-1-port3: unable to enumerate USB device -
show output from
lsusb
anddmesg
? (i.e. all of dmesg, after booting, with duet3 attached, use pastebin or google markdown formating and use ```) -
Be sure you've successfully erased the 6HC board.
- Power off the 6HC, place a jumper across the ERASE pins and power up to erase the firmware. The Bossa port should appear on the Pi (if it doesn't, try pressing the Reset button).
- The erase jumper is located in the center of the board near the large CPU chip.
- Remove the ERASE jumper, and run the bossac command.
- Power off the 6HC, place a jumper across the ERASE pins and power up to erase the firmware. The Bossa port should appear on the Pi (if it doesn't, try pressing the Reset button).
-
@Danal said in Unable to Flash Duet 6HC Firmware:
Be sure you've successfully erased the 6HC board.
- Power off the 6HC, place a jumper across the ERASE pins and power up to erase the firmware. The Bossa port should appear on the Pi (if it doesn't, try pressing the Reset button).
- The erase jumper is located in the center of the board near the large CPU chip.
- Remove the ERASE jumper, and run the bossac command.
Sometimes you also need to either press the Reset button, or power the Duet down and up again.
- Power off the 6HC, place a jumper across the ERASE pins and power up to erase the firmware. The Bossa port should appear on the Pi (if it doesn't, try pressing the Reset button).
-
@bearer - Here you go http://dpaste.com/308PSPP
@Danal - I have erased/reset/power cycled multiple times. If you look at the above pastebin, you will seepi@duet3:~ $ ls -l
total 4
-rw-r--r-- 1 pi pi 0 Jan 31 20:50 0xf800
drwxr-xr-x 9 pi pi 4096 Jan 31 06:21 BOSSASo it does recognize the Bossa port, still getting the "No device found on /dev/ttyACM0"
@dc42 - As above, I have performed multiple erase/reset/power cycles
-
Have you tried using Bossa on your laptop with VIN power to the Duet, as I suggested in my earlier response?
-
@tdm418 said in Unable to Flash Duet 6HC Firmware:
@bearer - Here you go http://dpaste.com/308PSPP
goodie, nothing to suggest it should be a problem with the Pi.
did the usb serial console work at all before you tried upgrading?
( right, lets wait for Vin to be applied, I think we all assumed that was done.)
-
@dc42, I am currently traveling to my jobsites so I haven't had access to a power supply. I did borrow a transformer from a site today though, so I'll wire it up and try that method.
@bearer, I'm glad the pi came up clean. I upgraded the pi before anything else, so I can't answer the question.
-
@dc42 , I wired up the transformer and connected it, tried to flash the firmware again. It's a 12v 2A wall wart. The Bossa port as identified by the Device Manager has configured itself for a much higher throughput - 115k instead of 9600, as it was on USB. I'm assuming that the autoconfigure got it right, 8 data bit, no parity, 1 stop bit, no flow control.
Same result as before, with USB power only. Bossa has been sitting at 0% complete for about 45 minutes at this point. -
@tdm418 said in Unable to Flash Duet 6HC Firmware:
Bossa has been sitting at 0% complete for about 45 minutes at this point.
Bossa takes less than 2 minutes. If it hasn't progressed, there is very little point in waiting.
-
@tdm418 said in Unable to Flash Duet 6HC Firmware:
@dc42 , I wired up the transformer and connected it, tried to flash the firmware again. It's a 12v 2A wall wart. The Bossa port as identified by the Device Manager has configured itself for a much higher throughput - 115k instead of 9600, as it was on USB. I'm assuming that the autoconfigure got it right, 8 data bit, no parity, 1 stop bit, no flow control.
Same result as before, with USB power only. Bossa has been sitting at 0% complete for about 45 minutes at this point.I think that either there is something very strange about your laptop configuration, or the microcontroller is faulty. Would you like your Duet 3 replaced under warranty?
-
@dc42 , I'm going to keep trying for a bit, but ultimately, yes, the warranty may be necessary.
I did just try to connect through Bossa under Opensuse and it doesn't recognize any connections at all.
If there is any troubleshooting that can be accomplished more easily with a Linux box, I'd love to give it a try first -
@tdm418 said in Unable to Flash Duet 6HC Firmware:
If there is any troubleshooting that can be accomplished more easily with a Linux box, I'd love to give it a try first
With an erased, reset, board, powered by USB or VIN, it should show up as /dev/ttyACM0. If it does not, nothing else is going to work.
This should be true on your SUSE box, or on the Duet provided image for a Pi.
-
So I have been playing with this some more with no positive results, but some results nevertheless.
For the most part, the Linux Bossa just will not connect at all. Occasionally, it will say that it cannot connect to ttyACM0, which seems to be a recognition of the port. I just tried changing permissions via chmod a+rw /dev/ttyACM0. I am now getting an error message of " Device Unsupported".
I really appreciate everyone's time in this venture tremendously, @dc42 ,@Danal ,@bearer . If this is just wasting time at this point, I'm fine with the warranty. If there is something else to be done, or something to be learned, I'll keep plugging away as long as possible. I fly home tomorrow afternoon, and can try to replicate this from my desktop. The desktop; however, was initially a lot more reluctant to make any connection at all, so that also might be a dead end. -
Oh, its always fun to see if you can get something like this back from the brink, so it is really up to you.
On the other hand, if an erased, reset, board is showing and disappearing as ACM0, it is unlikely to go farther. That boot behavior is pretty much "wired into" those chips, it is literally in ROM, and the USB interface is in hardware. If it doesn't work, something very fundamental is wrong.
-
I have now tried an additional 4 computers - one linux box, one mac, and two windows that are older OSs than mine. Still nothing recognized properly, so I'm afraid its time to move on.
@dc42 , I purchased this thru Matter Hackers, so I'm assuming warranty it thru them, or is there an alternate that you would prefer?
-
Yes, please contact Matter Hackers, and refer them to this post for authorisation to replace your Duet under warranty.
-
@Danal , @dc42 Please read on as I suspect that this situation might recur.
So I received a replacement board from MatterHackers and here's what happened:
Plugged the new board into the desktop via usb and it immediately recognized it as a Duet device and installed drivers. Huge relief.
As soon as the drivers were installed, the error message popped up about the "unrecognized USB device".
No problem, just short the jumper, push the reset, and it will be recognized, right??? NOPE!!!
All of a sudden I was reliving the exact same experience with the new board as the last one. Not recognized regardless of USB port, USB cable, or VIN power.
Tried it on the laptop and it recognized the port as Bossa, consistently. This was new. But every time I connected Bossa and tried to flash it, either Bossa locked up, threw an error message, or just refused the connection. But I was encouraged by the consistent recognition of the Bossa port by the Device Manager. Then I noticed that the laptop had had a pretty substantial windows update in the last couple of days, so it seemed appropriate to dig a little deeper.
Back to the desktop. Windows still didn't recognize anything, so I tried Opensuse. Tried putty, ssh, hardware recognition, and about 50 different commands that should have enumerated the Duet board as a tty device. Of course, nothing at all, no recognition, no active ports or devices, just... nothing.
I flashed an updated UEFI/bios, which seemed to have a bit of an effect. Meaning that it would occasionally, maybe 10% of the time, recognize the Bossa port.
So I started googling and reading blogs. Although they mostly consisted of more commands and diagnostics, one of the arduino blogs suggested moving the usb connection down by a level and running it off of a separate usb hub. This was kind of intriguing, first, because of both machines' different behavior after updating, and second, because I have always suspected that my desktop is just off a bit. It has a first generation Ryzen 7 CPU, and also what was a bleeding edge, first gen, X370 motherboard when I built it. But it always seemed to have weird USB issues, especially with the USB 3 integration, which was originally accomplisher by software, not hardware.
So I went to WalMart and bought the cheapest USB hub I could find, unpowered. Plugged it in, and I was able to flash both boards, the new one and the old “defective” one without a hitch. Also tried with the laptop, and after erasing the updated firmware, it also worked exactly as advertised.
All I can think of that there is a disconnect somewhere with the USB 3.0 protocol since this resolution worked across two very different machines, and the USB 3.0 seems to be the common denominator. Hopefully this will help someone else out, as it has taken a few weeks and probably over 300 attempts to get this ironed out.
Now that the board is functional, I’m sure that I’ll be hitting you guys up for help with something else. Thank you in advance…