IronOS-dfu
IronOS-dfu copied to clipboard
Testing
Soo..... This code should now be into the territory of testable. I've tested on 3x TS100's so far.
To test still:
- TS80
- TS80P
- MHP30
If anyone out there wants to give it a shot to just test the runtime version would be fantastic.
Just grab the runtime.hex from the latest action
If you can run runtime and make a bootloader backup would be fantastic, and if you could note the md5sum of your backup + your bootloader version would be awesome.
runtime worked for me! π
DFU 3.5
MD5 1805EC83F64C74DD89F87A1B57B7E631
@Ralim
πApparently, I bricked my beautiful TS80P!
I did follow all the instructions you provided, starting with flashing runtime, backing up the original bootloader and finally flashing your bootloader. The result showed up as you predicted:
flash log
Match vendor ID from file: 0483
Match product ID from file: df11
Multiple alternate interfaces for DfuSe file
Opening DFU capable USB device...
Device ID 28e9:0189
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "Internal Flash "
File contains 1 DFU images
Parsing DFU image 1
Target name: ST...
Image for alternate setting 0, (1 elements, total size = 5400)
Setting Alternate Interface #0 ...
Parsing element 1, address = 0x08000000, size = 5392
Erase [=========================] 100% 5392 bytes
Erase done.
Download [=========================] 100% 5392 bytes
Download done.
Done parsing DfuSe file
... but after unpluging and repluging the USB cable the screen stayed black! ππ€·ββοΈ
Is there any chance of reviving the TS80P? Which st-link would I need?
Is this one sufficient?
Please don't get me wrong, I know that this is my fault, since you only asked to test runtime.
But honestly: I was that much excited, that I did not read the text carefully the first time, because I wanted to get this immediately onto my iron. π©π€¦ββοΈ
thanks in advance
I did just say runtime mode :/ mostly as I've not finished testing it across all my devices.
Have you checked that if you hold the front button and plug it in that it doesn't appear in device manager / lsusb ? If it does show up but the screen stays black then you can probably just reflash runtime and then flash it with the screen starting off vasc it's most likely the thing that's dodgy is the OLED code.
But yes that st-link or the many like it will work, is it doesn't show up on USB. Not sure what the easiest way for you to buy locally is but those units work great as little clones. Often they are $3-4 USD ish around here fwiw.
Don't panic I'll help get this fixed up, worst case is the st-link but that's all
@Ralim Good morning Sir, thank you for replying in time. π
I already tried to reflash runtime, but unfortunately no luck what so ever.
So next step is to buy the st-link?
Do I need any adapter apart from this?
Yeah okay if that's not working, an st-link, and you also want a USB breakout so that you can access the USB pins .
I use a USB-A socket breakout that gives me the VCC,D+,D- and GND pins.
I then supply 5v,GND from the st-link. And wire up D+ and D- to the SWD pins and then you can reprogram it without opening.
Alternatively one could cut up a USB cable, but if you can buy a cheap breakout that is easiest
Thanks! As soon as I get the needed parts, I think I will have to ask you about the what and how once more. π
@Ralim
Good news! π
My TS80P is alive again!
Excellent :D You managed to restore the bootloader fine? :)
Glad you managed to get it going before I woke up. Sorry about the mess of having to buy an st-link.
Yes that worked! The hardest part was to get the STM32 ST-LINK Utility software, though! π
No reason for you to feel bad however! π
This was clearly my fault and obviously the consequence of my impatience! π
So I am here for more testing! What's next?
You have found something interesting..
Could I ask you to repeat what you did last time with the latest action builds; and also record the commands you run? I've done testing on my TS80 and TS80P now and they also work fine π If you can reproduce the issue, could you save our your flash as a hex for the case where it doesnt boot ?
I've cleaned up the ci builds to prevent any accidental contamination between them, but even still not sure what could have gone wrong :/
@Ralim
Thank you, this time it worked immediately! ππ
I like the instant powerup very much! A lot better than the stock bootloader. β€
2 things I would like to issue though are:
- Orientation being in lefty mode (Maybe you could provide 2 separate builds left and right.)
- Logo not centered
I dont know if its worth doing lefty/righty modes π Its just more firmwares to confuse people :P
Should probably centre the logo though
@Ralim Would you mind telling me what I need to change,
- to get righty mode? (Are there not more righties than lefties out there?) π
- to set the brightness to the lowest possible value?
https://github.com/Ralim/IronOS-dfu/blob/5b662a75c66e0189566e9fa8765d196aac8b964c/src/oled.c#L14
or / and
https://github.com/Ralim/IronOS-dfu/blob/5b662a75c66e0189566e9fa8765d196aac8b964c/src/oled.c#L24
I would like to adapt my fork only.
I dont want to go minimum brightness, but rather middle of the range :)
I'll update to make it flipped for the TS80's so its the right way around for righties.
@Ralim Good morning Sir.
I dont want to go minimum brightness, but rather middle of the range :)
Yeah I got that, but as mentioned above, I wanted to only apply this to my fork.
I will not start a PR to the mainline. π
Unless you do not want me to build my own.
I'll update to make it flipped for the TS80's so its the right way around for righties.
That would be great!
trying runtime.hex - flashed ok. when I plug iron with running runtime dfu-util
dfu-util -d 28e9:0189 -U backup.bin -s 0x08000000:0x4000 dfu-util 0.9 dfu-util: Cannot open DFU device 28e9:0189 dfu-util: No DFU capable USB device available
here is dmesg output
[ 27.077322] usb 1-10.4: new full-speed USB device number 10 using xhci_hcd [ 27.179499] usb 1-10.4: New USB device found, idVendor=0483, idProduct=5720, bcdDevice= 2.00 [ 27.179511] usb 1-10.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 27.179516] usb 1-10.4: Product: STM32 Mass Storage [ 27.179520] usb 1-10.4: Manufacturer: STMicroelectronics [ 27.179523] usb 1-10.4: SerialNumber: PΓΏo\xc2\x83\xc2\x88SS#8g [ 27.185499] usb-storage 1-10.4:1.0: USB Mass Storage device detected [ 27.185874] scsi host6: usb-storage 1-10.4:1.0 [ 28.214042] scsi 6:0:0:0: Direct-Access Virtual DFU Disk PQ: 0 ANSI: 2 [ 28.214633] sd 6:0:0:0: Attached scsi generic sg2 type 0 [ 28.215443] sd 6:0:0:0: [sdc] 4096 512-byte logical blocks: (2.10 MB/2.00 MiB) [ 28.215733] sd 6:0:0:0: [sdc] Write Protect is off [ 28.215739] sd 6:0:0:0: [sdc] Mode Sense: 03 00 00 00 [ 28.215970] sd 6:0:0:0: [sdc] No Caching mode page found [ 28.215980] sd 6:0:0:0: [sdc] Assuming drive cache: write through [ 28.251947] sdc: [ 28.274573] sd 6:0:0:0: [sdc] Attached SCSI removable disk [ 41.473521] logitech-hidpp-device 0003:046D:4055.0005: HID++ 4.5 device connected. [ 53.017356] logitech-hidpp-device 0003:046D:4076.0006: HID++ 4.1 device connected. [ 78.457153] usb 1-10.4: USB disconnect, device number 10 [ 78.471729] FAT-fs (sdc): unable to read boot sector to mark fs as dirty [ 81.497059] usb 1-10.4: new full-speed USB device number 11 using xhci_hcd [ 81.577093] usb 1-10.4: device descriptor read/64, error -32 [ 81.765083] usb 1-10.4: device descriptor read/64, error -32 [ 81.953035] usb 1-10.4: new full-speed USB device number 12 using xhci_hcd [ 82.033062] usb 1-10.4: device descriptor read/64, error -32 [ 82.221064] usb 1-10.4: device descriptor read/64, error -32 [ 82.329126] usb 1-10-port4: attempt power cycle [ 82.937028] usb 1-10.4: new full-speed USB device number 13 using xhci_hcd [ 82.959024] usb 1-10.4: New USB device found, idVendor=28e9, idProduct=0189, bcdDevice= 2.00 [ 82.959035] usb 1-10.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 82.959041] usb 1-10.4: Product: DFU bootloader [77312422] [ 82.959044] usb 1-10.4: Manufacturer: RalimTek <3 libopencm3 [ 82.959048] usb 1-10.4: SerialNumber: 50ff6f068388535323381467 [ 777.841843] usb 1-10.4: USB disconnect, device number 13 [ 784.462135] usb 1-10.4: new full-speed USB device number 14 using xhci_hcd [ 784.542123] usb 1-10.4: device descriptor read/64, error -32 [ 784.730141] usb 1-10.4: device descriptor read/64, error -32 [ 784.918132] usb 1-10.4: new full-speed USB device number 15 using xhci_hcd [ 784.998122] usb 1-10.4: device descriptor read/64, error -32 [ 785.186136] usb 1-10.4: device descriptor read/64, error -32 [ 785.294231] usb 1-10-port4: attempt power cycle [ 785.898118] usb 1-10.4: new full-speed USB device number 16 using xhci_hcd [ 785.898231] usb 1-10.4: Device not responding to setup address. [ 786.106199] usb 1-10.4: Device not responding to setup address. [ 786.314115] usb 1-10.4: device not accepting address 16, error -71 [ 786.394092] usb 1-10.4: new full-speed USB device number 17 using xhci_hcd [ 786.416369] usb 1-10.4: New USB device found, idVendor=28e9, idProduct=0189, bcdDevice= 2.00 [ 786.416380] usb 1-10.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 786.416385] usb 1-10.4: Product: DFU bootloader [77312422] [ 786.416389] usb 1-10.4: Manufacturer: RalimTek <3 libopencm3 [ 786.416392] usb 1-10.4: SerialNumber: 50ff6f068388535323381467
[ 82.959041] usb 1-10.4: Product: DFU bootloader [https://github.com/Ralim/IronOS-dfu/commit/773124221064d490506953bae6b66ada708d308c]
[ 82.959044] usb 1-10.4: Manufacturer: RalimTek <3 libopencm3
[ 82.959048] usb 1-10.4: SerialNumber: 50ff6f068388535323381467
This is the bootloader
Can you provide output of lsusb ?
Noting your dfu-util is older but it should work fine for this.
You may need to run dfu-util with sudo depending on permissions on your usb devices
[ 82.959041] usb 1-10.4: Product: DFU bootloader [https://github.com/Ralim/IronOS-dfu/commit/773124221064d490506953bae6b66ada708d308c] [ 82.959044] usb 1-10.4: Manufacturer: RalimTek <3 libopencm3 [ 82.959048] usb 1-10.4: SerialNumber: 50ff6f068388535323381467This is the bootloader
Can you provide output of
lsusb?Noting your dfu-util is older but it should work fine for this.
You may need to run
dfu-utilwith sudo depending on permissions on your usb devices
dfu-util installed to ubuntu 20 lts via apt-install. will try to update.
lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 004: ID 2109:0812 VIA Labs, Inc. VL812 Hub
Bus 002 Device 003: ID 045b:0210 Hitachi, Ltd
Bus 002 Device 002: ID 045b:0210 Hitachi, Ltd
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 005: ID 0d9f:00a3 Powercom Co., Ltd Smart King PRO Uninterruptible Power Supply (HID PDC)
Bus 001 Device 004: ID 0bda:8771 Realtek Semiconductor Corp.
Bus 001 Device 002: ID 045b:0209 Hitachi, Ltd
Bus 001 Device 017: ID 28e9:0189
Bus 001 Device 009: ID 0bda:8171 Realtek Semiconductor Corp. RTL8188SU 802.11n WLAN Adapter
Bus 001 Device 008: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 006: ID 2109:2812 VIA Labs, Inc. VL812 Hub
Bus 001 Device 003: ID 045b:0209 Hitachi, Ltd
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
28e9:0189 connected directly to motherboard with good working usb-cable which worked ok flashing runtime.hex. BTW - I was able to flash runtime.hex only in windows 10 x64. dropping the same file in ubuntu alsways giving runtime.ERR.
Downloaded .11 binaries: dfu-util 0.11 dfu-util: Cannot open DFU device 28e9:0189 found on devnum 17 (LIBUSB_ERROR_ACCESS) dfu-util: No DFU capable USB device available
For in ubuntu you copy the hex twice to get it to flash (first will .err, second works)
So its showing up on usb, so it may be either sudo access or out of date dfu-util i'm afraid
Oh! Problem solved - sudo! Please add it to .md Do you need DFU 3.45 .bin from STM32 TS100? MD5: 17FFF8A9D561B226D1DDC2D19BA2198E
@JugglerLKR Thank you for the MD5 and for testing. Have added sudo and started the list of known MD5 checksums :)
TS100 3.43 STM32: MD5: f67879424d73345e4bddca69a4f9c75c
@JugglerLKR Thank you for the MD5 and for testing. Have added sudo and started the list of known MD5 checksums :) TS100 DFU 3.48 GD32 (PUF52's): MD5: BD0EC4AC10C2DFFB05C107BB1034B727
I have backed up TS80 DFU 3.45, no one else uploaded his fw hash yet, is there any way to be sure it is ok? I don't fully understand the bytes thing. Maybe @Ralim would you mind checking if I send the file directly to you? My sum is fadae45b4249d4f156c30b7d4b0a853e.
The runtime works perfectly.
Happy to inspect and test the backup for you if desired. Easiest is probably email (it's on my github profile).
I may have something odd going on with my TS100, when it's in DFU mode it says it's 3.45 but the md5sum of the backup matches the one listed for 3.42.
Fun bit of trivia I noticed while checking this out:
$ strings backup.bin | grep -Ee '3.{3}'
ppG0123456789ABCDEF
DFU V3_42_D
/3.45
upgrading my Miniware TS80P with DFU 3.50 to IronOS-DFU 0.2 worked like a charm. I have used macOS 11.6 and usb-c -> usb-c 2.0 cable connected to one of the ports on my Mac.
I did boot new boot loader at runtime, made a backup, checksum did confirm 3.50 dfu version and then flash boot loader in place of existing one. all I had to do after is flash firmware itself using dfu mode.
# sudo dfu-util -d 28e9:0189 -U backup.bin -s 0x08000000:0x4000
dfu-util 0.11
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Opening DFU capable USB device...
Device ID 28e9:0189
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "Internal Flash "
Upload [=========================] 100% 16384 bytes
Upload done.
# md5sum backup.bin
1805ec83f64c74dd89f87a1b57b7e631 backup.bin
# dfu-util -D bootloader.dfu
dfu-util 0.11
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Match vendor ID from file: 0483
Match product ID from file: df11
Multiple alternate interfaces for DfuSe file
Opening DFU capable USB device...
Device ID 28e9:0189
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "Internal Flash "
File contains 1 DFU images
Parsing DFU image 1
Target name: ST...
Image for alternate setting 0, (1 elements, total size = 5388)
Setting Alternate Interface #0 ...
Parsing element 1, address = 0x08000000, size = 5380
Erase [=========================] 100% 5380 bytes
Erase done.
Download [=========================] 100% 5380 bytes
Download done.
Done parsing DfuSe file
# dfu-util -D TS80P_EN.dfu
dfu-util 0.11
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Match vendor ID from file: 1209
Match product ID from file: db42
Multiple alternate interfaces for DfuSe file
Opening DFU capable USB device...
Device ID 28e9:0189
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "Internal Flash "
File contains 1 DFU images
Parsing DFU image 1
Target name: ST...
Image for alternate setting 0, (1 elements, total size = 43408)
Setting Alternate Interface #0 ...
Parsing element 1, address = 0x08004000, size = 43400
Erase [=========================] 100% 43400 bytes
Erase done.
Download [=========================] 100% 43400 bytes
Download done.
Done parsing DfuSe file
hi, trying runtime version on mhp30 and it gets renamed to RUNTIME.NOT instead of err or rdy extension. main IronOS firmware could be flashed just fine.
all i do is copy runtime.hex to device.
is there anything else i could try?