Upload firmware von SKR Mini e3 (mainly Ender 3)

Hi there,

this board is incredible popular among the 3D printing folks and there is another SKR board currently configured by the community for the Prusa mk i3. Currently it is not possible to upload firmware with repetier server.

Now, with the newer Marlin it is now possible to access the SD card via USB cable. I have repetier running on a raspi pi3 and my Ender 3 Pro connected to the SKR board. I can access my SD card on the board as it is mounted under /media/usb, so I can copy the firmware.bin from my PC to the directory and with M997 I can reboot the printer and update the firmware.

Is it possible for you Repetier guys toi implement a workflow in Repetier to make that possible via your GUI? I currently use VNC server on my raspi to copy over files, ssh would work too.

Thx,

Michael

Comments

  • STM32 supports dfu upload protocol which is supported from next release on to support RUMBA32 board. Upload address is fixed to 0x0800 0000 but as I understand from googling that chip also uses the same upload address so guess it would work.

    You can already try our beta if you change the download link version to 0.93.2 which includes that already. But you must put the board in boot mode before starting the upload.

    The copy file to folder solution is a different thing. The target path must be entered and this opens high risks for hacking if you can use it to upload arbitrary files to any folder. Currently not sure how to open this way in a safe and simple way. Maybe limit filenames to files ending in .bin which seems a common suffix would limit misuse. I could also add a config file that contains allowed target paths. That might be best solution as it can also be used later for other uploads if the need arises.
  • Cool... can I simply install and it will retain all my configurations?
  • It didn't work yet. I verified I can access the sd card from the pi that the board connects to, and I can also transfer files. But when I ran the firmware tool it fails saying there is no dfu compatible device or so. I will paste the exact message soon.

    But I like your improvements to the touchscreen GUI, much better and direct access to many functions on one screen. Very nice!!
  • As I said you must switch the board in dfu mode. Then it reboots firmware and presents a completely different usb device. On my RUMBA32 I neet to press BOOT hold while hitting reset, release reset and then release boot. Then it switches in boot mode and only then you have dfu mode.

    For V2 firmware I wrote a M code to switch to dfu mode, M9999. Mk4duo also uses that command, but haven't read that marlin has it.

    Thanks for the touch screen. Yes tried to make it more comfortable if screen size allows it and added some extra links for faster navigation.
  • edited February 2020
    aha. My output is this:/usr/local/Repetier-Server/modules/firmware/bin/dfu-util -d vid:pid,0x0483:0xDF11 -a 0 -s 0x08000000:leave -D /var/lib/Repetier-Server/tmp/tmplua5.bin
    dfu-util 0.9

    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2016 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
    dfu-util: No DFU capable USB device availableHochladen beendet
    Druckerverbindung wieder herstellen ...
    Firmware-Upload beendet.
    ---
    Now, I have no idea how I put the SKR Mini e3 board into dfu mode. 
  • Guess you are right. Looking into schematics I don't see a reset or boot button. So sd card upload is the only provided solution.
  • Too bad. Right now I can upload the firmware.bin manually to the mounted sd card via my raspberry pi and then send M997 and it will reboot and flash the firmware.

    This is sufficient for me, but it would be even better to be able to implement something like that via Repetier, but then it would be just a minor improvement to this process.
  • Hi,
    I have a similar work around, a Gcode command that looks like:
    M22
    @execute skr_firmware
    M21
    M997
    Where skr_firmware points to the following script:
    #!/bin/bash
    #assume M22 has been run to release SD card from SKR
    cd /
    sleep 5
    sudo /bin/mount /dev/sda1 /media/skr > /boot/run_firmware 2>&1
    sudo /bin/cp /home/pi/firmware.bin /media/skr >> /boot/run_firmware 2>&1
    sudo /bin/sync >> /boot/run_firmware 2>&1
    sudo /bin/ls -l /media/skr/firmware.bin >> /boot/run_firmware 2>&1
    sudo /bin/mount >> /boot/run_firmware 2>&1
    sudo /bin/umount /media/skr >> /boot/run_firmware 2>&1
    # Next run M21 to init SD card and M997 to update firmware
    This allows me to upload firmware.bin to the Pi home dir using ssh on my PC and run a Gcode command to flash my SKRv1.4.  It would be great to have an option to select a file when running a gcode command then this could be all done using one step from Repetier Server.
    Thanks.
  • Interesting solution. I'm thinking on how I can safely integrate this in our firmware upload wizard. That is where it would belong and now that I have a skr board I also test. Main problem is that is generally bad to allow uploads without extra checks as that can help hacking. The other problem is that it is not always /dev/sda1 - In my case I had a usb stick connected so it was /dev/sdb1 and on windows/mac it would also be different.

    I think a good way would be to check for FIRMWARE.CUR and only copy a firmware.bin to same location if that file exists. I would check all gcode import folders I guess. So users can add the correct path and select the one to use. That way it is usable where it belongs.
  • Ok in 0.94.4 it will be contained. Uses one of the upload folders as target. On our pi image these are the one used for external usb/sd cards so that would match. And it requires configure permission so only assigned persons can use the upload.
Sign In or Register to comment.