@Phaedrux Replacement board arrived today, straight forward swap out of the clone, once I jumped through the firmware v2 --> v3.0 --> v3.1.1 hoops, all working perfectly. Thanks for your assistance in resolving this.
Best posts made by zombiRon
-
RE: Aux(bad-csum): M408 S0 R13
-
RE: Macro to update PanelDue Firmware
@OwenD Just thought I'd offer my solution using M38 to check existence of the file and offer the user a chance to check the Hash??
M38 "0:/sys/PanelDueFirmware.bin" if result == 0 M291 R"PanelDue Upgrade" P"New firmware has been detected, hash has been output to the console. OK to update?" S3 ; M997 etc... elif result == 2 echo "No PanelDue firmware detected"
-
RE: Macro to update PanelDue Firmware
Here's where I've got to now, adding this at the beginning of config.g and making sure it's AFTER network/HTTP is started, but before the rest of the machine config.
If a PanelDueFirmware.bin is detected a request is pushed to the PanelDue and DWC if connected at the time to update.
If DWC is connected, it also shows progress and results in console.
M552 S1 ; Enable network M586 P0 S1 ; Enable HTTP M586 P1 S0 ; Enable FTP M586 P2 S1 ; Enable Telnet M38 "sys/PanelDueFirmware.bin" ; compute hash of file if exists if result == 0 M291 R"PanelDue Update" P"Update available, checksum is available on console, OK to flash?" S3" M997 S4 ; flash PanelDue if result == 0 G4 S6 ; wait for paneldue reboot M30 "0:/sys/PanelDueFirmware.bin" ; delete update file if result != 0 echo "PanelDue update file could not be removed following successful flash" M291 R"PanelDue Update" P"Update successful, see console for details" S2 T0 else M291 R"PanelDue Update" P"Update ERROR, see console for details" S2 T0
If an update is declined, the file will need to be removed manually as cancel will abort further processing of config.g.
I did consider deleting the file on cancel and then rebooting, but I thought that if I'd declined the updated due to HASH mismatch, then I'd prob want the machine to stay as it is so I can troubleshoot. If you'd rather it deleted and rebooted, add the following after the last M291 making sure of the same indentation.
M30 "0:/sys/PanelDueFirmware.bin" M999