# TFmini connection problem with px4

**URL:** <https://discuss.px4.io/t/tfmini-connection-problem-with-px4/11629>\
**Category:** PX4 Autopilot\
**Created:** [June 26, 2019, 12:02pm UTC](https://discuss.px4.io/t/tfmini-connection-problem-with-px4/11629 "2019-06-26T12:02:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pence](https://discuss.px4.io/letter_avatar_proxy/v4/letter/p/ecc23a/32.png) [@Pence](https://discuss.px4.io/u/Pence)\
**Post date:** [June 26, 2019, 12:02pm UTC](https://discuss.px4.io/t/tfmini-connection-problem-with-px4/11629/1 "2019-06-26T12:02:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Chai](https://discuss.px4.io/user_avatar/discuss.px4.io/chai/32/17785_2.png) [@Chai](https://discuss.px4.io/u/Chai)\
**Post date:** [October 11, 2019, 3:30pm UTC](https://discuss.px4.io/t/tfmini-connection-problem-with-px4/11629/2 "2019-10-11T15:30:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![erenipek](https://discuss.px4.io/user_avatar/discuss.px4.io/erenipek/32/8019_2.png) [@erenipek](https://discuss.px4.io/u/erenipek)\
**Post date:** [April 22, 2020, 4:49pm UTC](https://discuss.px4.io/t/tfmini-connection-problem-with-px4/11629/4 "2020-04-22T16:49:17Z")

</div>

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
