A Benewake lidar on I2C answered, but cannot be used
What ArduPilot says:
- TFS20L: No response from sensor
- TFMini: FW ver N.N.N (need>=2.0.3)
- TFMiniPlus: Unable to set configuration register N
At boot ArduPilot found a Benewake lidar on the I2C bus and gave up on it. “TFMini: FW ver … (need>=2.0.3)”: the TFmini Plus has firmware older than 2.0.3, which the I2C driver cannot work with. “TFS20L: No response from sensor” and “Unable to set configuration register”: the sensor did not answer a command. The driver is not started, so “Rangefinder 1: Not Detected” follows when you try to arm.
What to do, most likely first
The TFmini Plus firmware is too old.
CheckThe message gives the version the lidar reported.
FixUpdate the lidar with Benewake's own PC tool to 2.0.3 or newer, or connect it by UART instead (
RNGFNDn_TYPE20), which has no such limit.The I2C wiring is marginal: long wires, no power from the battery side, or a wrong address.
Check
RNGFNDn_ADDRmust be the lidar's I2C address in decimal (16, that is 0x10, is the TFmini Plus default).FixShorten the wires, power the lidar properly and reboot with the battery connected (props off).
Parameters to look at
| Parameter | What it is |
|---|---|
RNGFND1_TYPE | Rangefinder type |
RNGFND1_ADDR | Bus address of sensor |
The code that sends it
TFS20L: No response from sensor
libraries/AP_RangeFinder/AP_RangeFinder_Benewake_TFS20L.cpp AP_RangeFinder_Benewake_TFS20L::init() · Open in ArduPilot Copter-4.7.1
TFMini: FW ver N.N.N (need>=2.0.3)
libraries/AP_RangeFinder/AP_RangeFinder_Benewake_TFMiniPlus.cpp AP_RangeFinder_Benewake_TFMiniPlus::init() · Open in ArduPilot Copter-4.7.1
TFMiniPlus: Unable to set configuration register N
libraries/AP_RangeFinder/AP_RangeFinder_Benewake_TFMiniPlus.cpp AP_RangeFinder_Benewake_TFMiniPlus::init() · Open in ArduPilot Copter-4.7.1