Appearance
Reference — J1939 gateway
The MUXEN devices this gateway publishes
| Device | Function | Instance | What it carries |
|---|---|---|---|
| Generator group | 4 | the genset's own J1939 instance, then InstanceNum | one per discovered genset: state, engine speed, AC voltage, current, power, temperature, alarms |
| Generic I/O | 17 | configured (InstanceNum) | the box's own relays, inputs and analog inputs |
MQTT topics on the Brain follow device/<function>/<instance>/<frame>:
| Topic | Direction | Contents |
|---|---|---|
device/4/<n>/life | published, 1 s | state, stateCode, voltage, temperature, noStart, noCutOff |
device/4/<n>/state | published, 1 s | rpm, voltage, current, power |
device/4/<n>/error/<code> | published, 500 ms | one topic per active alarm |
device/4/<n>/command | accepted | startRequest, stopRequest, ForceCmd, clearError |
device/17/<n>/life | published | the box's own inputs and relays |
Genset states: off, contact, starting, on, stopping, error, plus codes 5 (engine only) and 6 (test mode), which carry no label.
Parameters — generator group (function 4)
| Parameter | Default | Meaning |
|---|---|---|
InstanceNum | the genset's J1939 instance | the MUXEN instance; changing it needs a restart |
BindToParc | latched to 255 (stand-alone) at first sight | the battery zone this genset charges. Required for automatic start; read once at discovery |
SocToStart | 15 | state of charge, in %, below which the genset is started |
MaxCurrentPercent | 40 | share, in %, of the zone's maximum discharge current above which the genset is started to assist |
SocToStopAfterCurrentHelp | 90 | state of charge, in %, above which an assist run may end |
ChargeCurrentToStop | −100 | battery current, in 0.1 A, at which a full bank counts as charged |
GensetModel | set by discovery | read-only: 1 = Fischer Panda, 2 = Cummins Onan |
MinSocToStop, VmaxToWork | 5, 248 | in the list, not used by this firmware |
ProductId, HardwareId, SoftwareId, SoftwareVersion | read-only | see Reference |
Every threshold above concerns a Fischer Panda only.
Parameters — generic I/O (function 17)
The common ones (InstanceNum, EnGenIo, EnAnalogPwr) are in Reference. This firmware adds four:
| Parameter | Default | Meaning |
|---|---|---|
Relay1Eqn, Relay2Eqn | empty | a MUXEN equation driving that relay from what it hears on the bus |
Relay1Latch, Relay2Latch | 0 | 1 = each time the equation goes true, the relay toggles instead of following it |
A relay command from the bus overrides the equation until released.
Routines
| Routine | Payload | Effect |
|---|---|---|
| 1 | 0001 | restore the instance number to its default |
| 1 | any bit above bit 0 | restore every other parameter of that device |
| 2 | — | reserved; does nothing, including no LED "locate" |
What is read from the J1939 bus
Fischer Panda — manufacturer-specific frames:
| PGN | Feeds |
|---|---|
| 65281 | genset state, and the genset's own auto-start mode |
| 65300 | AC voltage, current, power |
| 65303 | engine speed |
| 65285 | engine temperature |
Cummins Onan:
| PGN | Feeds |
|---|---|
| 65280 | genset status → the MUXEN state |
| 61444 | engine speed |
| 65030 | AC line-to-neutral RMS voltage |
| 65262 | temperature |
| 65226, 65227 | active and previously active diagnostic codes → MUXEN alarms |
| 65242, 65253, 65263, 65266, 65270, 65271 | accepted and decoded, but nothing is published from them today |
Everything else is ignored; an unknown sender is asked once to introduce itself so the gateway can decide whether it knows it.
What is written to the J1939 bus
Only for a Fischer Panda:
| Frame | Purpose |
|---|---|
| PGN 61184 | remote start and stop; and re-enabling the genset's auto-start mode whenever it is found off |
| PGN 65305 | charge parameters taken from the bound battery zone: state of charge, maximum charge voltage, maximum charge current |
The gateway claims source address 0x53 (83) for itself and answers address-claim requests.
Timings
| Genset life and state frames | every 1 s, starting 1 s after discovery |
| Alarms republished | every 500 ms |
| A Fischer Panda is forgotten after | 120 s without a single J1939 frame from it |
| A Cummins Onan is reported off after | 5 s without a single J1939 frame from it (CUMMINS_ONAN_ASLEEP_TIMEOUT_MS); it is never forgotten |
| Generic I/O published | on change, and at least every 500 ms |
| Second CAN bus bitrate | 250 kbit/s, forced at every start |
Known limitations
- A diagnostic code the gateway does not recognise clears the whole alarm list, including alarms belonging to other devices.
- The temperature published for a Cummins Onan is derived from its fuel temperature and its offset is wrong. Indicative only.
- Charge parameters are sent to J1939 address 0 rather than to the genset's own address; a Fischer Panda that does not sit at address 0 never receives them.
clearErroris accepted and ignored.- Current and power are never published for a Cummins Onan.
InstanceNumandBindToParctake effect only after a restart.
Versions
| Hardware | Version | Image |
|---|---|---|
| CanCan v1 | 5.3 | 010010034-app_j1939-firmware.srec |
| CanCan v2 | 6.4 | 010010034-V2-app_j1939-firmware.srec |
Source: workspace/muxen/cancan/app_j1939/, overlay boards/arm/<board>/010010034.overlay.
