Firmware update using "copy to sdcard"
I see that there is a new feature for repetier-server to copy firmware to certain folder that is suppose to be sdcard mount.
But it helps only a little.
Even if user would send M997 to reset printer after firmware upload, it will break the linux mount (it leaves linux with broken mount, possibly corrupts fat32 filesystem). So it will serve a little purpose for user to have this kind of UI function, since it you still need manually log into linux host and unmount the sdcard. If all - it will make confusion and bad usage for people who don't understand what is going on in the background.
Solution1 would be to allow user to have checkbox for "apply firmware" etc. so that repetier would unmount the sdcard folder after uploading and would issue M997 command. If udev automount is set up it will remount the drive after board restart, so it will return to same position - everything works and firmware update works once again
Solution2 would be to have textareas so that you can specify your own gcode and shell counterparts to what to do after update.
Of course security comes to play as mounting/unmounting needs root/sudo access and having free textarea to run shell commands.
But it helps only a little.
Even if user would send M997 to reset printer after firmware upload, it will break the linux mount (it leaves linux with broken mount, possibly corrupts fat32 filesystem). So it will serve a little purpose for user to have this kind of UI function, since it you still need manually log into linux host and unmount the sdcard. If all - it will make confusion and bad usage for people who don't understand what is going on in the background.
Solution1 would be to allow user to have checkbox for "apply firmware" etc. so that repetier would unmount the sdcard folder after uploading and would issue M997 command. If udev automount is set up it will remount the drive after board restart, so it will return to same position - everything works and firmware update works once again
Solution2 would be to have textareas so that you can specify your own gcode and shell counterparts to what to do after update.
Of course security comes to play as mounting/unmounting needs root/sudo access and having free textarea to run shell commands.
Comments
Shell commands in interface are a no go for me. That is why you need to always edit extcommands.xml to explicitly define allowed commands. So the only way is in deed the extcommands way. You can in printer configuration redefine M997 so that it executes the unmount first and then sends M997 (gcode replacements)
Pattern: ^M997
Replacement
@execute unmountPrinter
M997