Flashing of SHT36 Toolboard does not finish
When using the Wizard in RatOS 2.0.1 for flashing the SHT36 v1, the flashing starts, but the flash button gets green again and I cant press next.
Using an Octopus Board and a Raspberry Pi 3B, connected the SHT36 via USB, DFU jumper is on, CAN termination jumpers are on (not related, but wanted to mention it), CAN is not connected.
This is the error:
[17:44:34.876] ^[[31mERROR^[[39m (1155): ^[[36mFailed to flash device.^[[39m
err: {
"type": "TRPCError",
"message": "Failed to flash device.",
"stack":
TRPCError: Failed to flash device.
at Procedure.resolve [as resolver] (/home/pi/ratos-configurator/build/server/chunks/932.js:566:13)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Array.<anonymous> (/home/pi/ratos-configurator/node_modules/.pnpm/@[email protected]/node_modules/@trpc/server/dist/router-aaecbe82.cjs.prod.js:101:25)
at async callRecursive (/home/pi/ratos-configurator/node_modules/.pnpm/@[email protected]/node_modules/@trpc/server/dist/router-aaecbe82.cjs.prod.js:119:24)
at async next (/home/pi/ratos-configurator/node_modules/.pnpm/@[email protected]/node_modules/@trpc/server/dist/router-aaecbe82.cjs.prod.js:126:20)
at async callRecursive (/home/pi/ratos-configurator/node_modules/.pnpm/@[email protected]/node_modules/@trpc/server/dist/router-aaecbe82.cjs.prod.js:119:24)
at async Procedure.call (/home/pi/ratos-configurator/node_modules/.pnpm/@[email protected]/node_modules/@trpc/server/dist/router-aaecbe82.cjs.prod.js:144:20)
at async /home/pi/ratos-configurator/build/server/chunks/669.js:473:24
at async Promise.all (index 0)
"originalError": "An error occured while attempting to run script",
"code": "INTERNAL_SERVER_ERROR",
"name": "TRPCError"
}
26 Replies
I found this post already, but I am using a normal Pi 3, nothing Orange. https://discord.com/channels/582187371529764864/1091764799769157743
I am not sure what to do after flashing. Normally the toolboard connects via USB and everything is fine after flashing? Also tried to connect it via CAN (how I will use it) after flashing but the wizard does not recognize it.
Flashing the Octopus via the Wizard worked without problem
Just skipped the setup of the Toolboard and updated everything in Mainsail. Flashing still does not work. Same error as far as I can tell:
[18:34:57.951] ^[[31mERROR^[[39m (1159): ^[[36mFailed to flash device.^[[39m
err: {
"type": "TRPCError",
"message": "Failed to flash device.",
"stack":
TRPCError: Failed to flash device.
at Procedure.resolve [as resolver] (/home/pi/ratos-configurator/build/server/chunks/932.js:566:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Array.<anonymous> (/home/pi/ratos-configurator/node_modules/.pnpm/@[email protected]/node_modules/@trpc/server/dist/router-aaecbe82.cjs.prod.js:101:25)
at async callRecursive (/home/pi/ratos-configurator/node_modules/.pnpm/@[email protected]/node_modules/@trpc/server/dist/router-aaecbe82.cjs.prod.js:119:24)
at async next (/home/pi/ratos-configurator/node_modules/.pnpm/@[email protected]/node_modules/@trpc/server/dist/router-aaecbe82.cjs.prod.js:126:20)
at async callRecursive (/home/pi/ratos-configurator/node_modules/.pnpm/@[email protected]/node_modules/@trpc/server/dist/router-aaecbe82.cjs.prod.js:119:24)
at async Procedure.call (/home/pi/ratos-configurator/node_modules/.pnpm/@[email protected]/node_modules/@trpc/server/dist/router-aaecbe82.cjs.prod.js:144:20)
at async /home/pi/ratos-configurator/build/server/chunks/669.js:473:24
at async Promise.all (index 0)
at async Object.resolveHTTPResponse (/home/pi/ratos-configurator/build/server/chunks/669.js:469:24)
"originalError": "An error occured while attempting to run script",
"code": "INTERNAL_SERVER_ERROR",
"name": "TRPCError"
}
Just read, that RatOS does not support CAN, only USB. Should have read that earlier. Have hooked up the CAN-wires already. But that shouldnt have anything to do with my problem.
I went the manual route now and flashed the Toolboard by hand and it works now. So the Toolboard is not defective. Also tried different USB cables, was also not the problem.Is this a brand new SHT36?
Brand new as in: never used before, but bought several months back.
Which version, v1 or v2?
v1
Okay that should definitely work, i flashed one the other day
Have you used winscp before? I'm gonna have to see the log from /var/log/ratos-configurator.log on the pi
I think I copied the error in my initial post from this file, didnt I?
Or do you need the complete file?
yes it just doesn't report enough information other than "something went wrong" π
I see π Ok, here it is. The error is not at the end, tried things afterwards, but it is in there.
Hmm seems like it isn't logging the actual error. That makes it harder. We can try doing it manually though, so while connected to the pi via ssh, and the board connected (booted with the DFU jumper like instructed in the configurator) run this:
If it errors at any of the steps above please post the error here
@technofrikus may be worth verifying the toolboard is in DFU mode first by running
lsusb
and checking if 0483:df11
is reported in the output.
It should only be there once
As in only one device connected in DFU modepi@ratos:~ $ lsusb
Bus 001 Device 005: ID 1d50:606f OpenMoko, Inc. Geschwister Schneider CAN adapter
Bus 001 Device 006: ID 0483:df11 STMicroelectronics STM Device in DFU Mode
Bus 001 Device 004: ID 1d50:614e OpenMoko, Inc. stm32f446xx
Bus 001 Device 003: ID 0424:ec00 Microchip Technology, Inc. (formerly SMSC) SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Microchip Technology, Inc. (formerly SMSC) SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
That looks good
β¦
Compiling out/src/generic/usb_cdc.o
Building out/compile_time_request.o
Version: v0.11.0-198-g33b18fd6
Preprocessing out/src/generic/armcm_link.ld
Linking out/klipper.elf
Creating hex file out/klipper.bin
[sudo] password for pi:
Flashing out/klipper.bin to 0483:df11
sudo dfu-util -d ,0483:df11 -R -a 0 -s 0x8000000:leave -D out/klipper.bin
dfu-util 0.11-dev
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/
dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0483:df11
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(10) = dfuERROR, status(10) = Device's firmware is corrupt. It cannot return to run-time (non-DFU) operations
Clearing status
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash "
Downloading element to address = 0x08000000, size = 24920
Erase [=========================] 100% 24920 bytes
Erase done.
Download [=========================] 100% 24920 bytes
Download done.
File downloaded successfully
Submitting leave request...
Transitioning to dfuMANIFEST state
dfu-util: can't detach
Resetting USB to switch back to Run-Time mode
That worked π€How strange
Well, try the configurator again now, it should register the SHT36
Maybe that I flashed it manually changed something to before.
Ok will try
Yes, works now!
Not sure why, but big thanks nonetheless! π
π I will try an see if i can reproduce the issue with my SHT36 here
I checked and flashing via configurator still does not work
Log file attached again, but probably same errors as before.
For me this is solved, just want to help in case you want to investigate further.
It seems it did not flash at all, the old working firmware is still on there. Or did it work and flashed it correctly? Not sure how the configurator shows, that flashing worked.
The Flashing⦠Button just went back to Flash and I cant click next.
Automatic (re)Flashing worked, based on the working manual flash.
If you update the RatOS-configurator it should now report the actual error from the script that fails. Then try reproducing again, if you don't mind π
Of course π
Ah.. So everything works as it should it just reports a wrong exit code. Wonderful.
This gives me something to go on, thank you π
Hmm, but I tried removing the DFU Jumper before and it was not recognised, I think. Will try again with no firmware on there
I think it just doesn't exit DFU mode. Would need to remove the jumper and click the reset button to boot klipper on it.
I can make something to handle this specific case
Hmm, ok, maybe I did not do that. Flashed the board with just CanBoot, so it would not be detected. Then DFU and flashed via configurator, and didnt work, as before. DFU Jumper off and replugging the USB it does work and is recognized by the configurator. So yes, seems to be only that problem.
Glad I could help π and thanks again!
Gotcha, will get that sorted! π You're welcome!