TFmini connection problem with px4

Greetings!

I was trying to connect the Benewake TFmini rangefinder with the pixhawk cube (Firmware 1.9.0)
I did the following connections

Pixhawk GPS2 TfMini
VCC VCC
GND GND
MCU_Tx Rx
MCU_Rx Tx

the parameter change on QGC is as follows
SENS_TFMINI_CFG = GPS2
EKF2_RNG_AID = Range aid enabled
EKF2_RNG_A_HMAX = 6m
EKF2_RNG_A_VMAX = 2

Then after a reboot, I checked for the data using the analyze tool and the MAVLINK console; but nothing appeared on both. The LiDAR works fine when directly connected to the companion computer and also with the ArduPilot firmware. The same problem persisted on the older firmware(1.8.2) .Any suggestions on debugging this issue?

Regards
Pence Mataria

Hi Pence,

I have the exact same issue but am using PX4 firmware, I suspect it might be a hardware issue. Have you managed to find a solution?

Cheers,
Chai.

Hi Pence and Chai

You can check the Lidar sensor status from MAVLink console.

$ tfmini status

If its not working you can try the command (For Pixhawk GPS2)

$ tfmini start -d /dev/ttyS6

and then check status

 $ tfmini status

If its working, the problem related to serial port mapping. Pixhawk cube GPS2 port corresponds to /dev/ttyS6 on Nuttx.

In Firmware/boards/px4/fmu-v3/default.cmake file, you can see the following lines.

	SERIAL_PORTS
	GPS1:/dev/ttyS3
	TEL1:/dev/ttyS1
	TEL2:/dev/ttyS2
	TEL4:/dev/ttyS6

if you set the SENS_TFMINI_CFG parameter to TELEM/SERIAL 4, the Lidar will be working.

Note: Firmware version 1.11.0-beta1