fly-sht-36 support

Hi. I am trying to flash fly sht-36 toolboard from RatOS frontend, I followed the instruction (added jumper and reconnected toolboard), button Flash became green, but after pressing it and waiting, it just becomes green again...
No description
No description
39 Replies
Maba_Kalox
Maba_Kalox•2y ago
Button "next" - is grayed out. Or maybe the problem is - I did not connect 24v power to it yet?
miklschmidt
miklschmidt•2y ago
Shouldn't be necessary if you use the V_USB jumper. Which sht-36 version is that? Because the 2.0 is not supported and won't work. If its the v1, please post /var/log/ratos-configurator.log (fetch it via something like WinSCP)
Maba_Kalox
Maba_Kalox•2y ago
yep. some error is there indeed.
[16:54:06.903] ERROR (1736): Failed to flash device.
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/455.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"
}
[16:54:06.903] ERROR (1736): Failed to flash device.
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/455.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"
}
it is V1 Also I tried different usb cable, with same result. Which jumper is it? I only added a jumper between boot0 and 3.3v dmesg output:
[ 9372.013865] usb 5-1: new full-speed USB device number 20 using ohci-platform
[ 9372.242856] usb 5-1: New USB device found, idVendor=0483, idProduct=df11, bcdDevice=22.00
[ 9372.242879] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 9372.242885] usb 5-1: Product: STM32 BOOTLOADER
[ 9372.242889] usb 5-1: Manufacturer: STMicroelectronics
[ 9372.242893] usb 5-1: SerialNumber: FFFFFFFEFFFF
[ 9372.013865] usb 5-1: new full-speed USB device number 20 using ohci-platform
[ 9372.242856] usb 5-1: New USB device found, idVendor=0483, idProduct=df11, bcdDevice=22.00
[ 9372.242879] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 9372.242885] usb 5-1: Product: STM32 BOOTLOADER
[ 9372.242889] usb 5-1: Manufacturer: STMicroelectronics
[ 9372.242893] usb 5-1: SerialNumber: FFFFFFFEFFFF
I tried to flash manually by dfu-utils
sudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08000000:leave -D ~/Documents/mello-fly-sht36.bin
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/

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 = 24908
Erase [=========================] 100% 24908 bytes
Erase done.
Download [=========================] 100% 24908 bytes
Download done.
File downloaded successfully
Submitting leave request...
Transitioning to dfuMANIFEST state
sudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08000000:leave -D ~/Documents/mello-fly-sht36.bin
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/

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 = 24908
Erase [=========================] 100% 24908 bytes
Erase done.
Download [=========================] 100% 24908 bytes
Download done.
File downloaded successfully
Submitting leave request...
Transitioning to dfuMANIFEST state
note the:
DFU state(10) = dfuERROR, status(10) = Device's firmware is corrupt. It cannot return to run-time (non-DFU) operations
DFU state(10) = dfuERROR, status(10) = Device's firmware is corrupt. It cannot return to run-time (non-DFU) operations
Maba_Kalox
Maba_Kalox•2y ago
BTW, my stm chip:
No description
Maba_Kalox
Maba_Kalox•2y ago
Everything is disconnected from the fly-sht36 except usb cable. Okay. I have a clue. When I flash from orange pi 3 lts by dfu-utils:
sudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08000000:leave -D ~/Documents/mello-fly-sht36.bin
dfu-util 0.11
sudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08000000:leave -D ~/Documents/mello-fly-sht36.bin
dfu-util 0.11
I receive error at the end:
Device returned transfer size 2048
DfuSe interface name: "Internal Flash "
Memory segment at 0x08000000 64 x 2048 = 131072 (rew)
Downloading element to address = 0x08000000, size = 24908
...
File downloaded successfully
Submitting leave request...
dfu-util: Error during download get_status: -4 (LIBUSB_ERROR_NO_DEVICE)
Device returned transfer size 2048
DfuSe interface name: "Internal Flash "
Memory segment at 0x08000000 64 x 2048 = 131072 (rew)
Downloading element to address = 0x08000000, size = 24908
...
File downloaded successfully
Submitting leave request...
dfu-util: Error during download get_status: -4 (LIBUSB_ERROR_NO_DEVICE)
But if I run the same command from my normal x86 PC, with same version of dfu-util 0.11, I don"t receive any error!
DfuSe interface name: "Internal Flash "
Downloading element to address = 0x08000000, size = 24932
Erase [=========================] 100% 24932 bytes
Erase done.
Download [=========================] 100% 24932 bytes
Download done.
File downloaded successfully
Submitting leave request...
Transitioning to dfuMANIFEST state
DfuSe interface name: "Internal Flash "
Downloading element to address = 0x08000000, size = 24932
Erase [=========================] 100% 24932 bytes
Erase done.
Download [=========================] 100% 24932 bytes
Download done.
File downloaded successfully
Submitting leave request...
Transitioning to dfuMANIFEST state
Will try to compile dfu-utils from source, maybe that is the source of magic...
miklschmidt
miklschmidt•2y ago
Is the configurator updated? Are you running RatOS on orange pi? With the experimental image?
Maba_Kalox
Maba_Kalox•2y ago
Should it be updated? Yep
miklschmidt
miklschmidt•2y ago
Yes This is probably the issue I have no idea what the state of that is, i suggest taking it up over in <#1075501089257963540> Might be an issue with dfu-util for all i know
Maba_Kalox
Maba_Kalox•2y ago
What and how should be updated? Yep, probably indeed.
miklschmidt
miklschmidt•2y ago
In mainsail, in the machine tab, make sure RatOS and RatOS configurator is up to date (basically just follow the manual)
Maba_Kalox
Maba_Kalox•2y ago
Oh, btw, update of sht 36fails but firmware actually flashes fine So if I remove jumper, ratos detects fly sht 36 and version of firmware without any issues
miklschmidt
miklschmidt•2y ago
Maba_Kalox
Maba_Kalox•2y ago
Thank you, will post my problem there I cleaned it after
miklschmidt
miklschmidt•2y ago
How?
Maba_Kalox
Maba_Kalox•2y ago
By dfu util erase
miklschmidt
miklschmidt•2y ago
Ok.. Hmm strange
Maba_Kalox
Maba_Kalox•2y ago
It is not problem in RatOs for sure, some bug in dfu-util
miklschmidt
miklschmidt•2y ago
On orangepi only apparently
Maba_Kalox
Maba_Kalox•2y ago
It returns non successful exit code on complete, that makes klipper scripts to report error Sorry, yep
miklschmidt
miklschmidt•2y ago
Because it works on raspberry pi which is using the same manually compiled dfu util
Maba_Kalox
Maba_Kalox•2y ago
It is problem of Orange Pi+dfu util
miklschmidt
miklschmidt•2y ago
Maybe try using the one from apt It's version 0.9 i think
Maba_Kalox
Maba_Kalox•2y ago
Btw, tried to compile dfu-util from sources - did not help
miklschmidt
miklschmidt•2y ago
that's done during image compilation So you'd just get the same thing I'd get rid of the current dfu-util installation and install it from apt
Maba_Kalox
Maba_Kalox•2y ago
Thank you for suggestions! And it works if I flash from my PC as I said 8)
miklschmidt
miklschmidt•2y ago
yep, not sure why the manually compiled one doesn't work on orange-pi but hopefully the one from aptitude does
Maba_Kalox
Maba_Kalox•2y ago
If I will find the solution/install of old dfu will help, I will post it there. Otherwise- thank you for you time!
miklschmidt
miklschmidt•2y ago
excellent! đź‘Ť
Maba_Kalox
Maba_Kalox•2y ago
It became weirder... I added a 1 sec delay before status check in dfu source code, which have been throwing
dfu-util: Error during download get_status: -4 (LIBUSB_ERROR_NO_DEVICE)
dfu-util: Error during download get_status: -4 (LIBUSB_ERROR_NO_DEVICE)
no more error...
Download done.
File downloaded successfully
Submitting leave request...
Sleeping
Transitioning to dfuMANIFEST state
pi@ratos:~/klipper$ echo $?
0
Download done.
File downloaded successfully
Submitting leave request...
Sleeping
Transitioning to dfuMANIFEST state
pi@ratos:~/klipper$ echo $?
0
I would guess, orange pi takes enormous amount of time to initialize usb device?... As software engineer I cannot accept such solution xD and as expected, it works unreliable, after reboot it stopped working 8)
miklschmidt
miklschmidt•2y ago
oh shit
Maba_Kalox
Maba_Kalox•2y ago
two sequential calls to dfu-util without any changes:
Maba_Kalox
Maba_Kalox•2y ago
Tried v0.8 and v0.9, same problem so, this error message is just random, even with delay 8) Without it, errors are even more often
miklschmidt
miklschmidt•2y ago
That sucks..
Maba_Kalox
Maba_Kalox•2y ago
Update if some will step into same issue, for some reason with my mello-fly-sht-36, libusb fails to find device after reset as final stage, with LIBUSB_ERROR_NOT_FOUND, it is not critical and device seems to flash and reset fine, but drives crazy ratos update scripts, so as workaround, I patched dfu-util to ignore this particular error on reset. Ping me if you need the patch. Modifying klipper/ratos scripts would be easier, but dfu-util seems to replace this particular error by some generic one when probagandates error code, and I don’t want to ignore some other possible error unexpectedly
miklschmidt
miklschmidt•2y ago
Odd, as i don't have this problem with the fly-sht-42. Raspberry Pi though. So i'm assuming it's a problem with libusb on orange pi?
Maba_Kalox
Maba_Kalox•2y ago
I had same results on x86 pc too I guess I just have a little bugged fly-sht
Maba_Kalox
Maba_Kalox•2y ago
Or maybe default firmware.cfg for my fly-sht in RatOS is not for my chip (some letters seems to be missing)
No description
Maba_Kalox
Maba_Kalox•2y ago
I have heard that mellow tend to use a little different stm32 chips in their fly-sht, don’t know how much true is it
Want results from more Discord servers?
Add your server