Hi everybody,
I’m trying to plug a SW20 lidar in my plane that uses a Pixhawk2, but I cannot make it work.
I followed the instructions on these pages: https://docs.px4.io/en/sensor/rangefinders.html https://docs.px4.io/en/sensor/sfxx_lidar.html and plugged it on the I2C 2 socket.
QGroundControl doesn’t give me any distance_sensor and on the console sf1xx says [sf1xx] driver start failed
I tried editing sf1xx.cpp to use PX4_I2C_BUS_ONBOARD
as suggested here: https://github.com/PX4/Firmware/issues/6358 but no more success.
In the startup log, I have the following line:
WARN [blinkm] I2C init failed
It seems to indicate me that the problem comes from the I2C in itself.
I tested on another Pixhawk and I have the same problem, so I don’t think that it’s a hardware fault on my device.
Is there some config (in the Pixhawk or directly in the code) that I must change to make it work?
Here is the whole start log if it can be of any help:
MUv2 ver 0xE : Rev 0 V30
[boot] Fault Log info File No 4 Length 3177 flags:0x01 state:1
[boot] Fault Log is Armed
sercon: Registering CDC/ACM serial driver
sercon: Successfully registered the CDC/ACM serial driver
HW arch: PX4FMU_V2
HW type: V30
HW version: 0x0009000E
HW revision: 0x00000000
FW git-hash: 82aa24adfca29321cfd1209e287eab6c2b16780e
FW version: Release 1.8.1 (17302015)
OS: NuttX
OS version: Release 7.22.0 (118882559)
OS git-hash: 63775322bf25adb406594f8e610122fe0cef2f7a
Build datetime: Oct 20 2018 00:19:12
Build uri: BUILD_URI
Toolchain: GNU GCC, 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204]
MFGUID: 3334353731375104002e0029
MCU: STM32F42x, rev. 3
UID: 2E0029:31375104:33343537
[hardfault_log] Fault Log is Armed
INFO [tune_control] Publishing standard tune 1
INFO [param] selected parameter default file /fs/mtd_params
WARN [rgbled] no RGB led on bus #2
WARN [blinkm] I2C init failed
WARN [blinkm] init failed
nsh: rgbled_pwm: command not found
MS5611_SPI on SPI bus 4 at 3 (20000 KHz)
MS5611_SPI on SPI bus 1 at 3 (20000 KHz)
WARN [bst] no devices found
WARN [hmc5883] no device on bus 1 (type: 2)
WARN [lis3mdl] no device on bus 2
WARN [hmc5883] no device on bus 2 (type: 1)
WARN [mpu6000] no device on bus #3 (SPI1)
WARN [mpu6000] no device on bus #5 (SPI4)
MPU9250 on SPI bus 4 at 4 (1000 KHz)
INFO [mpu9250] accel cutoff set to 30.00 Hz
INFO [mpu9250] gyro cutoff set to 80.00 Hz
L3GD20 on SPI bus 4 at 1 (11000 KHz)
LSM303D on SPI bus 4 at 2 (11000 KHz)
MPU9250 on SPI bus 1 at 4 (1000 KHz)
INFO [mpu9250] accel cutoff set to 30.00 Hz
INFO [mpu9250] gyro cutoff set to 80.00 Hz
WARN [sdp3x_airspeed] not started on bus 1
WARN [sdp3x_airspeed] not started on bus 2
WARN [ms5525_airspeed] not started on bus 1
WARN [ms5525_airspeed] not started on bus 2
WARN [ms4525_airspeed] not started on bus 1
WARN [ms4525_airspeed] not started on bus 2
WARN [ets_airspeed] not started on bus 1
WARN [ets_airspeed] not started on bus 2
INFO [load_mon] stack check enabled
INFO [px4io] default PWM output device
INFO [mavlink] mode: Normal, data rate: 1200 B/s on /dev/ttyS1 @ 57600B
px4flow [215:100]
WARN [px4flow] scanning I2C buses for device..
INFO [mavlink] mode: Config, data rate: 800000 B/s on /dev/ttyACM0 @ 57600B
INFO [init] Mixer: /etc/mixers/AETRFG.main.mix on /dev/pwm_output0
INFO [init] Mixer: /etc/mixers/pass.aux.mix on /dev/pwm_output1
INFO [logger] logger started (mode=all)