Nuttx v2 and TFMini Lidar - possible wrong port?


I’m trying to get a TFMini Lidar sensor to connect to a Pixfalcon flight controller via the telem port.

On startup, tfmini reports errors.

nsh> tfmini info
state @ 1000a850
Using port '/dev/ttyS6'
tfmini_read: 3 events, 274445us elapsed, 91481us avg, min 61380us max 142540us 44453.605us rms
tfmini_com_err: 3 events
poll interval:  10 ticks
report queue 2/64 (2/2 @ 1000bb70)

A couple of concerns here are:

The px4fmu-v2 board definition has the Telem1 port listed as a different device.

As can be seen in that link Telem 1 (pixfalcon only has Telem1, not Telem2), it should be /dev/ttyS1.

In my FC parameters, SYS_COMPANION is set to 0

When I attempt to do the following:

tfmini stop
tfmini start -d /dev/ttyS1

the flight controller crashes and immediately reboots with no error messages.

Could the default baud rate also be an issue, the TFMini expects 115200, the Pixfalcon defaults to 57600.

Please can you advise on next best steps for resolving this.


hi, did you manage to solve the problem?
I am using tfmini with pixhawk 1 and have similar probelm


Yes, this did solve one of the problems we were having with the device. We eventually abandoned NuttxV2 because the duty cycle of the various sensors made it too slow to hover in the air.

To get this working on NuttxV2 we modified the firmware changing file rc.sensors in ROMFS/px4fmu_common/init.d

In there you will find a series of if statements determining what tfmini start command is run on boot.

As long as SYS_COMPANION=0 then this will be the boot line

tfmini start -d /dev/ttyS2

The port can be changed on that line then the firmware recompiled.