TFmini Plus I2C driver

Hi,

I hope I am not doing any double posts.

I am just wondering if there is already an PX4 I2C driver for the TFmini plus. I think on arducopter, there is already one if this helps. Are there any good ideas how to get the tfmini plus running over I2C?

Best

It looks like there should be support for it.

Have a look at the serial port configuration and then use the param SENS_TFMINI_CFG.

Hi, thanks a lot for your answer.
Yes, on serial, it should be well supported.
My goal was to use the sensor as an I2C device and not as a serial device. (I am using a Pixhawk4 mini and am running out of serial ports.) The sensor can be set to output a I2C signal. However, I think a driver is needed to use it properly. Thus I am asking, if there is already one existing, in work or if I should try my luck by myself.

Oh, got it. I don’t think so but you could probably implement it yourself based on existing distance sensor I2C drivers.

Oh thanks, I will give it a try sometimes.

Hi, sorry to bother you again. I did not manage to get a I2C driver running. Thus, I decided to switch back to UART. However, I can’t get it running there either.
What I have done yet:

  • Tested the Sensor with a tll to usb adapter and the Benewake GUI. Switched to PIX Mode there. It works.
  • Connect TF Mini PLUS to the I2C UART combined port of the Pixhawk 4 Mini
  • Set the SENS_TFMINI_CFG to Telem/Serial 4.
  • No serial port config. param is appearing. Thus, I can not check for the baud rate.
  • Driver seem to be running but no reading there.

Could it be, that the TFmini Plus is not supported?

@mcsauder do you have any idea how this would work?

I just got my bench setup running and the driver in the configuration as specified above is always returning -EAGAIN from the collect() method, hence no readings are published. I’ll work on fixing things and get a PR submitted when I have it figured out!

Thanks a lot for your help.
To prevent confusion and to tidy up my dual request (Sorry), I will reference the corresponding GitHub Feature request.

Hello mcsauter,

i am new in this field and own a Cuav V5+ on a drone and use qgroundcontrol under windows.
Could you please explain me where I can find the new driver for the tfmini plus module and how I integrate it into qgroundcontrol?
Many greetings
Thomas

Hi @KlausDieter,

There is not an I2C driver implemented currently for the TFMINI or open PR’s that I am aware of to accomplish that work. If you are using UART, you should be able to load the current master branch of PX4 or the release candidate v1.11, and then enable the sensor:

Hopefully this helps.

Hi mcsauder,

thank you for your quick response and sorry I misspelled your name.
I have seen under “https://docs.px4.io/master/en/” that there are different versions.
But I did not find any option to change the version at qgroundcontrol. How do I download release v1.11?

Hi, Mcsauder,

I don’t think I heard you right.
Of course I also find the Tfmini under the option “Parameter”.
But it does not deliver any data, no matter which interface I use.