← All tools

Message & Error Explainer

What an ArduPilot message means and what to do about it

Українська

A rangefinder is switched on in the parameters, but no driver started for it

Stops itRangefinder, optical flow, camera, OSD and other devices

What ArduPilot says:

RNGFNDn_TYPE is not 0, but at power-on ArduPilot could not start a driver for that rangefinder (the number in the message says which: 1 is RNGFND1). Drivers are started once, at boot: a serial sensor needs a port set to the rangefinder protocol, an I2C sensor has to answer on the bus at that moment. Nothing is tried again later, so the message stays until the cause is fixed and the flight controller rebooted.

What to do, most likely first

  1. The type was set or changed, and the flight controller has not been rebooted since.

    FixReboot. If the message is gone, that was all.

  2. It is a serial rangefinder (TFmini, TF-Luna, LightWare), and no serial port is set to the rangefinder protocol.

    CheckFind which UART the sensor's wires go to (the Board & Wiring Planner shows which pad is which UART) and read that port's SERIALn_PROTOCOL: it must be 9 (Rangefinder). The first serial rangefinder takes the first port with 9, the second takes the next one.

    FixSet that port's SERIALn_PROTOCOL to 9 and SERIALn_BAUD to the sensor's speed (115 for 115200, what a TFmini uses), then reboot.

  3. No rangefinder is fitted: the parameter is left over from another aircraft's file.

    FixSet RNGFNDn_TYPE to 0 for the rangefinder named in the message and reboot.

  4. An I2C rangefinder did not answer at boot: it had no power, SDA and SCL are swapped, or the address is wrong.

    CheckMany lidars are fed from the battery side: on USB alone they are still off while the board boots and looks for them. Compare RNGFNDn_ADDR with the address in the sensor's manual.

    FixPower the aircraft from the battery (props off), correct the wiring or RNGFNDn_ADDR, and reboot.

  5. This firmware was built without the driver for that sensor type.

    CheckThe Firmware Inspector lists what a firmware file was built with. Boards with 1 MB of flash leave many rangefinder drivers out.

    FixBuild a firmware with the driver, or choose a sensor the firmware supports.

Parameters to look at

ParameterWhat it is
RNGFND1_TYPERangefinder type
RNGFND2_TYPERangefinder type
RNGFND1_ADDRBus address of sensor
SERIAL1_PROTOCOLTelem1 protocol selection
SERIAL2_PROTOCOLTelemetry 2 protocol selection
SERIAL3_PROTOCOLSerial 3 (GPS) protocol selection
SERIAL4_PROTOCOLSerial4 protocol selection
SERIAL5_PROTOCOLSerial5 protocol selection
The code that sends it

Rangefinder 0x…: Not Detected

libraries/AP_RangeFinder/AP_RangeFinder.cpp RangeFinder::prearm_healthy() · Open in ArduPilot Copter-4.7.1

Written here for Copter 4.6. In the tool you choose your vehicle and version, see your own parameter values beside the ones named here, and drop a flight log to have every message in it explained.

Open it in the Message & Error Explainer