Skip to content

Loading and updating a firmware ​

A MUXEN box is updated over the boat's CAN bus, from the Brain, without opening anything and without a programmer.

Which image goes in which box ​

Released images are named after what they are:

010010005-app_scheiber-firmware.srec        a CanCan v1 Scheiber gateway
010010005-V2-app_scheiber-firmware.srec     the same, for CanCan v2
010010019-MODBUS-app_frigomar-firmware.srec a CAN-SERIAL Modbus Frigomar gateway
PartMeaning
the leading digitsthe product ID — which firmware this is
a board tag, when presentwhich board the image is for (-V2, -MODBUS, -SERIAL-V2)
app_…the program the product ID stands for
-firmwarethe update image, loaded over the bus

Three things must line up, and only the first two are checked for you:

  1. The signature. Every image is signed, and the bootloader refuses one whose signature it does not recognise — before anything is written. Which keys exist depends on the line; see below.
  2. The product ID. Both the box and the image carry one. They must be the same, or you are changing what the box does.
  3. What is wired to the box must match the firmware. Nothing checks this. A gateway will happily run another line's application and then understand nothing of what is on its bus.

Read what a box currently is before touching it — see The identifiers a box carries.

How the keys are arranged, per line ​

Product lineKeys
CAN-CANone key per board — an image never crosses between themthe two generations are signed with different keys
CAN-MDVone key per board — an image never crosses between them
CAN-ENOCEANa single key across the lineone board, one key
BLOC 8 v2a single key across the lineone board, one key
CAN-SERIALone key per board — an image never crosses between themthree boards, three keys — an image never crosses between them

Doing the update ​

sh
muxen-uds -i can0 listfirmware                       # what the Brain has
muxen-uds -i can0 -d <address> firmware --name <image>

While it runs the box is out of service: it stops doing its job, and whatever depends on it disappears from the boat's screens. Expect that, and do not do it under way. The full command reference is in the muxen-uds manual, chapter Firmware.

Settings survive a firmware update. They do not survive a factory reset.

What happens if an update fails ​

The box holds two firmware slots. An upload writes the spare slot, never the running one. Only when the whole image has arrived and its signature checks out does the bootloader swap the two and start what was uploaded. A cable pulled mid-upload, a Brain that reboots, a corrupt image: in every case the box is left running something complete, never nothing.

What happens after the new firmware starts differs by line, and it is the difference that matters when an update goes wrong:

Product lineOn a failed start
CAN-CANthe previous firmware comes back on the next reset
CAN-MDVthe previous firmware comes back on the next reset
CAN-ENOCEANno revert — a started image is keptimages are signed --pad --confirm, so a started image is kept
BLOC 8 v2the previous firmware comes back on the next reset
CAN-SERIALthe previous firmware comes back on the next reset

On a line that reverts, the visible symptom of a firmware that cannot confirm itself is the system LED blinking very fast and no traffic on the bus — power-cycle the box and it comes back on the previous version. On a line that does not, a started image stays; recovering means uploading a good image over it.

Integration of multiplexed solutions
MUXEN and the MUXEN logo are trademarks of MUXEN SAS.