Appearance
Reference
The identifiers a box carries
Every can-mdv answers with four identifiers. They are read-only.
| Parameter | What it is | Example |
|---|---|---|
ProductId | the finished product — which firmware this box carries | 010010029 |
HardwareId | the board | 990010058 |
SoftwareId | the program | 990050019 |
SoftwareVersion | the version of that program — 6.x on the board in service | 6.2 |
sh
muxen-uds -i can0 -d <address> readconfig --only-name ProductId \
--only-name SoftwareVersionProduct, software and version
| Product ID | Firmware | Software ID | Version |
|---|---|---|---|
| 010010029 | battery switch | 990050019 | 6.2 |
Versions are those released at the time of writing; the box itself is always the authority.
How a device is addressed
A MUXEN device is a function (what kind of thing it is) and an instance (which one). The address used by muxen-uds -d is the two packed together:
address = function × 64 + instanceInstance numbers run 0…62. 63 and above mean "not addressed."
The same device can be reached by name instead:
sh
muxen-uds -i can0 -F 25 -I 0 readconfigThe two devices on every can-mdv
Whatever firmware it carries, a can-mdv registers both of these:
| Function | Device | Factory instance | Address at instance 0 |
|---|---|---|---|
| 25 | remote battery switch | 255 — not addressed | 25 × 64 = 0x640 |
| 5 | battery | 0 — publishes immediately | 5 × 64 = 0x140 |
Remote battery switch (function 25). Publishes the position of the switch, whether the boat's supply is present, whether the power injection is on, and the current the box is injecting. Accepts commands to open and close the switch and to force the power injection on or off. Silent until it has been given an instance number.
Battery (function 5). Publishes the bank as read from the LIN sensor — its voltage and current, and the charge and discharge limits the installation was configured with — plus over- and under-voltage alarms. Its instance defaults to 0 on a factory-fresh box, which is why two unconfigured boxes on one bus collide. It publishes only while the power injection is on and a sensor is answering.
LED codes
| Rate | Meaning |
|---|---|
| on 500 ms, off 500 ms (1 Hz) | the battery-switch firmware is running normally |
| off, box powered | standby — the switch is open and the hold-up delay has run out; the CAN and LIN buses are shut down |
| on 2 s, off 2 s | the hardware-test firmware is running |
| off, box unpowered | not running at all |
Timings
| MUXEN bus | 500 kbit/s, classic CAN, extended identifiers, sample point 75 % |
| LIN bus | 19200 baud, 8N1 |
| Remote-switch frame | on change, and at least every 500 ms |
| Battery frames | once a second, while a sensor answers |
| Position feedback | a change is believed after 2 s of steady state |
| Injected-current measurement | every 100 ms |
| Firmware upload | abandoned if more than 5 s pass between two chunks |
Flash layout
| Area | Size |
|---|---|
| Bootloader | 40 KB |
| Running firmware | 480 KB |
| Spare slot, where an upload lands | 488 KB |
| Settings | 16 KB |
Settings survive resets and firmware updates. They are erased by the factory-reset routine — see Common mistakes.
