Appearance
Reference — bus extender
The MUXEN devices this box publishes
| Device | Function | Instance | What it carries |
|---|---|---|---|
| Bus extender | 31 | configured (InstanceNum) | the repeating function itself: running state, and the label given to CAN 1 |
| Generic I/O | 17 | configured (InstanceNum) | the box's own relays, dry-contact inputs and analog inputs |
Both are announced on both segments, so the box is visible and configurable from either side.
MQTT topics on the Brain follow device/<function>/<instance>/<frame>. In practice you will see:
| Topic | When |
|---|---|
device/17/<n>/life | the box's own I/O, once EnGenIo is set to 1 |
device/31/<n>/boot, device/17/<n>/boot | at every startup |
device/31/<n>/uid, device/17/<n>/uid | in answer to a scan |
The extender's own status frame is broadcast on the CAN bus but is not currently published as an MQTT topic by the Brain.
Parameters — bus extender (function 31)
| Parameter | Type | Default | Meaning |
|---|---|---|---|
InstanceNum | 0…62 | 255 | the extender's own instance; 255 means not addressed |
CanBus1Area | 0…255 | 0 | a label for the segment on CAN 1, reported in the box's status frame. Purely informational |
CanBus2Area | 0…255 | 1 | a label for the segment on CAN 2. Stored, and not used by anything today |
ProductId, HardwareId, SoftwareId, SoftwareVersion | read-only | see Reference |
Neither label changes what the box does. They exist to record which segment is which; nothing on the boat reads them yet.
A change to InstanceNum takes effect at the next restart — write it with --reboot.
Parameters — generic I/O (function 17)
| Parameter | Default | Meaning |
|---|---|---|
InstanceNum | 255 | the I/O device's instance |
EnGenIo | 0 | publish the inputs, relays and analog inputs |
EnAnalogPwr | 1 | power the analog sensor supply |
EnCanAuxPwr is not present on this firmware, and nothing about the second CAN interface needs configuring.
What crosses between the segments
| Repeated | every frame received on either segment, in both directions: extended and standard identifiers, data frames and requests for data, whatever the content |
| Filtering | none. The box does not inspect, select, rate-limit or rewrite anything |
| Not repeated | configuration traffic addressed to this box's own two devices — it is answered on the segment it arrived on |
| Not repeated | bus errors and bus-off state. Each segment has its own interface; a fault on one does not put the other in fault |
| Emitted on both segments | the box's own startup and status frames |
| Answered on one segment | a reply to a request goes back out on the segment the request came from |
| Order | frames going one way keep their order; the relative order of frames arriving from opposite segments is not preserved |
Timings and buffers
| Frames buffered per direction | 64; the excess is dropped silently |
| Generic I/O published | on change, and at least every 500 ms |
| Extender status frame | every second |
| Repeating starts | at startup, before any instance number is set |
Routines
| Routine | Payload | Effect |
|---|---|---|
locate | blinks the system LED for 5 seconds, so the box can be identified physically | |
| reset parameters | 0001 | restore the instance number to its default |
| reset parameters | any bit above bit 0 | restore every other parameter of that device |
sh
muxen-uds -i can0 -F 31 -I <n> locateLED codes
The common ones only — 1 Hz is running normally, see Reference. This application adds one:
| Rate | Meaning |
|---|---|
| ≈5 Hz for 5 seconds | answering a locate request |
Limits
| Segments joined | 2, by one box |
| Speed, both segments | 500 kbit/s, fixed in the firmware |
| Terminations required | 2 per segment — 4 in total |
| Combined bus load | that of one 500 kbit/s MUXEN bus, shared by both segments |
| Instance numbers | 0…62 |
| Extenders between one pair of segments | 1. Loops are not detected |
Versions
| Hardware | Version | Image |
|---|---|---|
| CanCan v1 | 5.1 | 010010032-app_bus_extender-firmware.srec |
| CanCan v2 | 6.2 | 010010032-V2-app_bus_extender-firmware.srec |
Source: workspace/muxen/cancan/app_bus_extender/, product overlay boards/arm/<board>/010010032.overlay.
