A device on the CAN bus stops arming
What ArduPilot says:
- PreArm: DroneCAN: …
- PreArm: PiccoloCAN not enabled
- PreArm: PiccoloCAN: …
- PreArm: Same rfnd on different CAN ports
CAN is the two-wire bus that DroneCAN GPS units, compasses, ESCs and rangefinders share. “DroneCAN: …” carries a reason from the node list ArduPilot keeps: “Duplicate Node” means two devices claim one node number, or a device was replaced by another with the same number; “Node N unhealthy” means a device reports itself faulty. “Same rfnd on different CAN ports” means the two CAN drivers are set to the same rangefinder protocol. “PiccoloCAN …” concerns Piccolo CAN ESCs and servos.
What to do, most likely first
A DroneCAN device was swapped for another: ArduPilot remembers which hardware had each node number.
CheckThe message is “Duplicate Node …” and it began after you changed a GPS, compass or ESC.
FixSet bit 0 (ClearDNADatabase) of
CAN_D1_UC_OPTIONand reboot: the list is built again, and the bit clears itself.A device on the bus is unhealthy: no power, still starting, or really faulty.
CheckThe number in “Node N unhealthy” is the device's node number; the ground station's DroneCAN screen lists the nodes by number and name.
FixCheck its power and connector. If it stays unhealthy, update its firmware or replace it.
Both CAN ports are set to the same rangefinder protocol, or to PiccoloCAN without Piccolo hardware.
FixGive each CAN driver the protocol of what is really on it:
CAN_D1_PROTOCOL1 is DroneCAN, 0 is none. Reboot.
Parameters to look at
| Parameter | What it is |
|---|---|
CAN_P1_DRIVER | Index of virtual driver to be used with physical CAN interface |
CAN_D1_PROTOCOL | Enable use of specific protocol over virtual driver |
CAN_D1_UC_OPTION | DroneCAN options |
CAN_P2_DRIVER | Index of virtual driver to be used with physical CAN interface |
CAN_D2_PROTOCOL | Enable use of specific protocol over virtual driver |
Where to do it:Board & Wiring Planner
The code that sends it
PreArm: DroneCAN: …
libraries/AP_Arming/AP_Arming.cpp AP_Arming::can_checks() · Open in ArduPilot Copter-4.7.1
PreArm: PiccoloCAN not enabled
libraries/AP_Arming/AP_Arming.cpp AP_Arming::can_checks() · Open in ArduPilot Copter-4.7.1
PreArm: PiccoloCAN: …
libraries/AP_Arming/AP_Arming.cpp AP_Arming::can_checks() · Open in ArduPilot Copter-4.7.1
PreArm: Same rfnd on different CAN ports
libraries/AP_Arming/AP_Arming.cpp AP_Arming::can_checks() · Open in ArduPilot Copter-4.7.1