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
technofrikus
technofrikusOPβ€’2y ago
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.
miklschmidt
miklschmidtβ€’2y ago
Is this a brand new SHT36?
technofrikus
technofrikusOPβ€’2y ago
Brand new as in: never used before, but bought several months back.
miklschmidt
miklschmidtβ€’2y ago
Which version, v1 or v2?
technofrikus
technofrikusOPβ€’2y ago
v1
miklschmidt
miklschmidtβ€’2y ago
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
technofrikus
technofrikusOPβ€’2y ago
I think I copied the error in my initial post from this file, didnt I? Or do you need the complete file?
miklschmidt
miklschmidtβ€’2y ago
yes it just doesn't report enough information other than "something went wrong" πŸ˜„
technofrikus
technofrikusOPβ€’2y ago
I see πŸ™‚ Ok, here it is. The error is not at the end, tried things afterwards, but it is in there.
miklschmidt
miklschmidtβ€’2y ago
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:
cp -f /home/pi/printer_data/config/RatOS/boards/mellow-fly-sht-36/firmware.config /home/pi/klipper/.config
cd /home/pi/klipper
make olddefconfig
make clean
make
sudo service klipper stop
make flash FLASH_DEVICE=0483:df11
sudo service klipper start
cp -f /home/pi/printer_data/config/RatOS/boards/mellow-fly-sht-36/firmware.config /home/pi/klipper/.config
cd /home/pi/klipper
make olddefconfig
make clean
make
sudo service klipper stop
make flash FLASH_DEVICE=0483:df11
sudo service klipper start
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 mode
technofrikus
technofrikusOPβ€’2y ago
pi@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
miklschmidt
miklschmidtβ€’2y ago
That looks good
technofrikus
technofrikusOPβ€’2y ago
… 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 πŸ€”
miklschmidt
miklschmidtβ€’2y ago
How strange Well, try the configurator again now, it should register the SHT36
technofrikus
technofrikusOPβ€’2y ago
Maybe that I flashed it manually changed something to before. Ok will try Yes, works now! Not sure why, but big thanks nonetheless! πŸ˜„
miklschmidt
miklschmidtβ€’2y ago
πŸ‘ I will try an see if i can reproduce the issue with my SHT36 here
technofrikus
technofrikusOPβ€’2y ago
I checked and flashing via configurator still does not work
technofrikus
technofrikusOPβ€’2y ago
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.
technofrikus
technofrikusOPβ€’2y ago
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.
miklschmidt
miklschmidtβ€’2y ago
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 πŸ™‚
technofrikus
technofrikusOPβ€’2y ago
Of course πŸ™‚
miklschmidt
miklschmidtβ€’2y ago
Ah.. So everything works as it should it just reports a wrong exit code. Wonderful. This gives me something to go on, thank you πŸ™‚
technofrikus
technofrikusOPβ€’2y ago
Hmm, but I tried removing the DFU Jumper before and it was not recognised, I think. Will try again with no firmware on there
miklschmidt
miklschmidtβ€’2y ago
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
technofrikus
technofrikusOPβ€’2y ago
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!
miklschmidt
miklschmidtβ€’2y ago
Gotcha, will get that sorted! πŸ™‚ You're welcome!
Want results from more Discord servers?
Add your server