Ralim / IronOS-Meta

Storing meta information about devices that dont need to be in the main repo
54 stars 10 forks source link

TS101 .ERR #43

Closed mattia777 closed 2 weeks ago

mattia777 commented 7 months ago

I've created a boot-up logo for my TS101 in Photoshop, then I've used the python script to create the .hex and .dfu files.

When i put the iron in DFU mode and copy the .hex file into the folder it reboots and then it creates a .ERR file.

I've tried to export the logo (96x16 pixels) in .png and in .bmp but the result seems to be the same.

btw the logo is a 1.420 byte file

DFU:1.05 V2.22E.C308FE8C 05-11-23

aSilentSniper commented 6 months ago

i have the same error did you find a solution?

Ralim commented 6 months ago

Try copying the file twice without removing the Iron. (This is the reccomended workaround for issues with their DFU loader).

i.e

  1. Connect Iron
  2. Copy the file to the iron
  3. Iron disconnects
  4. Iron comes back with .ERR
  5. Copy the file again
  6. Iron comes back with .RDY
aSilentSniper commented 6 months ago

unfortunately if i copy anything to the Iron after it comes back wit .ERR and i copy something nothing happens

discip commented 6 months ago

Have you tried another PC yet?

aSilentSniper commented 6 months ago

Tried it on

  1. my Mac wich dosent work at all.
  2. a Windows VM
  3. and a Physical Windows machine

On both windows machines nothing happens after the second copy

mattia777 commented 5 months ago

I’ve tried the suggested solutions by @Ralim and @discip, but unfortunately, they don’t seem to be resolving the issue for me.

nargalzius commented 4 months ago

Same issue here. OS X / Sonoma.

Also it generates two sets of files, one with the original file name and another with a suffix L. Not sure they're the same, but trying on both yields the same results, always error.

adisdedic96 commented 2 months ago

I have the same issue, i had the same problem with IronOS 2.22, but when I flash the .hex IronOS file it goes and i have the IronOS 2.22 on my iron. I tried to put the logo with IronOS 2.22 doesn't work (.ERR file and copied again and it stays .HEX but nothing happens) and I also tried with the original firmware and to flash the logo, but again nothing happens :(

johncohn commented 3 weeks ago

I'm having the exact same error ! Any help much appreciated.. -jc

Ralim commented 3 weeks ago

To update here, I originally looked into this and ran into the current issue of the Miniware DFU just doesnt program the logo to the flash correctly. i.e. when programming the .hex file that should load the logo in, it gives the response of .RDY but doesnt actually program the flash. Did already find that it doesnt like the double-up in the hex file that was required for the old Miniware DFU. But that isn't enough to make it flash properly.

I did a bunch more re-testing today, and haven't found yet a reliable way to get the bootloader to want to flash the logo hex file. (dumping the flash back out with the bootloader shows it not loading the code in). One method may be to merge the firmware with the logo to make it into a contiguous binary so that logo and main firmware are flashed together.

Would be open to any ideas from others as well.

johncohnvt commented 3 weeks ago

Ben, Thank you so much for taking a look. I'm intrigued by your idea of compiling the logo in. How much of a big deal is it to do a build on my own to try that?

-jc

Ralim commented 2 weeks ago

So I'm working on an update to the script in this repo to let files be merged. And have made progress.

I could insert a fairly lengthy rant here about bugs and issues in the DFU loader that Miniware has shipped (at least the version that is on my unit here). But I'll keep it short

So far I have found:

  1. It cant handle more than 2 segments in the .hex file
  2. It cant write to flash above 100K position (chip in my device has 128K of flash)
  3. It keeps randomly locking up or being unreliable
  4. About 1/4 of flashes just dont work.
  5. Just doesn't seem to flash small files, and also doesn't fall for the repeating content of the other bootloader versions.

So the end result is that:

  1. The logo must be located in the first 100K of flash
  2. We now know that the "usable" flash space on this device is about 100K less the 32K they wasted on the bootloader
  3. Logos will (at least for now) need to be merged with the firmware to be flashable

Annnd all of this will need testing on more than just my unit.

To test:

  1. Use the version of the scripts from this PR https://github.com/Ralim/IronOS-Meta/pull/44
  2. Use the firmware from this PR Build assets here
  3. Merge the firmware with your logo like this: python3 img2logo.py <image file path> <output folder path> -m ts101 --merge <Path to main firmware>
  4. Flash the merged file by drag and drop. For me I always need to do the copy-twice trick. And sometimes it doesnt reboot on second go, but I just left it for a minute and then unplugged and it worked? 😒

As a demo, here is a merged file I used that works for me 😓 IronOS.zip

johncohnvt commented 2 weeks ago

Ben, Wow ! Sorry to drive all this work… But I really appreciate it. I will give it a try.

I'm also going to check out some of the other brands that are better behaved with regard to helping people customize their products.

Thanks for doing all this.… I'll report back on how it works -jc

johncohn commented 2 weeks ago

ben, that procedure worked great for me. got your and my logo running . Thanks so much for the workaround. One question.. am i correct that IronOS doesn't yet use the bigger screen on the TS101 ? The logo is fine.. but doesnt fill the screen. I can live with that. Thanks again ! -jc

mattia777 commented 2 weeks ago

I've used the new version of the script and firmware, followed the procedure to merge the logo, and it works flawlessly. There's a glitch on the voltage reading, but it's a minor inconvenience. Thanks to @Ralim for the great work!

https://github.com/user-attachments/assets/2a85c4d7-44f5-4ac2-b825-e9f74bcfeb64

Ralim commented 2 weeks ago

@mattia777 Could you open an IronOS issue around the broken screen and include in it exactly which file you merged with and used to get to the broken screen?

Going to close this one as the core issue is mitigated