PreArm: check proximity sensor


I use a Tfmini plus as a proximity sensor.
If the tfmini plus is outside its maximum distance in the open the error message appears:

17.07.2020 19:22:19 : PreArm: check proximity sensor

But I can’t find a parameter to set the maximum distance.
Can anyone help me with this?



Good day,
you need to set the parameters of the distance in the advanced parameters tree… you need to set it in the RNGFND1 or RNGFND2…etc, it depends on how you have set it, but if you are using the tf mini you cannot use it as a proximity sensor but as an altimeter or Landing sensor…, so you have to disable the proximity sensor with 0.

Hello, David,

thanks for your answer.

But which parameters would have to be changed accordingly?


in advance tree parameters just check the parm PRX_TYPE … open it and set 0.

PRX Parameters

PRX_TYPE: Proximity type

What type of proximity sensor is connected

RebootRequired Values
True Value Meaning

0 None
7 LightwareSF40c
1 LightWareSF40C-legacy
2 MAVLink
3 TeraRangerTower
4 RangeFinder
5 RPLidarA2
6 TeraRangerTowerEvo
11 MorseSITL
12 AirSimSITL

Hello, David,

Setting prx=0 would simply mean that you no longer have a proximity sensor.
Also a lidar a2 should have the same problem as a tfmini plus.
In the open field there is no value that the A2 can deliver.

if you want use the tf mini as obstacle avoidance and as a proximity sensor, you need to set it on an Arduino module… you must adjust few settings on the addresses but you need more than one sensor for make it as a real obstacle avoidance there is a topic of a developer who create a poc with tf mini) tf mini have also the lake that is unidirectional.
If you need a complete obstacle avoidance you can look for the teraranger evo hub with the correlated sensors like evo 60m or evo 600.

there is a wiki about a2

Hello, David,

i want to use the tfmini to avoid a collision.
Only in one direction, forward.
Is there any way around here?

And one more question in a moment.
I switched one of the Tfmini to the I2c bus. When changing the address of the tfmini, an error must have occurred.
I do not know the address of the tfmini.
is there a way to scan the I2c bus to find the address?


if you have installed one tf mini you can use only as altimeter or Landing sensor, if you want use it standalone as proximity sensor you cannot use it as long as you will not use it with an Arduino board with the proper code…, for check and modify the add of the sensor you need a ttl serial board and with it you can check everything you need with the benewake gui tool.
Foward cannot be use… if you will set foward in RNGFND1 or 2, you will not have any measurement while putting the parameters down you will see the reading. You can reposition your module in front of your drone but i don’t give you any assurance about the behavior of your vehicle

Hello @beck
I use the Tfmini plus on a daily basis for Simple avoidance, as well as path planning algo’s like BendyRuler. It is fairly easy to set it up… One can set any rangefinder to be used as a proximity sensor.
First step will be to configure RangeFinder properly:
Check this out. There is a note for I2c driver that will help you.

Next: setup RNGFNDX_ORIENT param correctly as per your need (0 if forward facing)

Now go to mission planner and check in the status tab if you can see the Range finder values correctly or not. If you can see it, all is well, and you’re almost done.

Last step would be to set up the param PRX_TYPE to 4… So that proximity library knows that it should look for the rangefinder readings.
Before flying do have a look here:
and verify everything is working correctly.

Overall it won’t take you more than 10-15 mins to set this up if your connections are right. Hope I helped. Let me know if you have more doubts. Cheers!

Hello, Rishabh,

Thank you for your detailed message.
I will try it tonight.


Hello, David,

thank you for your support.
I will try to get the minis working again.


Mission planner 2, CTRL-F doesn’t work. Impossible to watch sensor on radar screen

What is Mission Planner 2?

APM planner 2.0 excuse me

The Cntrl>F menu and the Proximality View is in Mission Planner.

couldn’t find it in missionplanner 2.0

I don’t know what you are talking about. There is no Mission Planner 2.0.


And this one?

Mon image

Mission Planner and APM Planner are two different softwares.
Please install Mission Planner

No. Follow @amilcarlucas direction.