Ardupilot: ChibiOS: Feature Request: Support Frsky Smart Port Telemetry on Matek F405-WING, Omnibus F4 Pro Like FC

Created on 23 Aug 2018  Â·  81Comments  Â·  Source: ArduPilot/ardupilot

I am using OpenTx 2.2.2 in my X9D Plus + R9 Mini SBUS Firmware

On Pixhawk, we could use Frsky Smart Port Telemetry by adding extra hardware like "FrSky Telemetry Cables" or "Teensy Board" (test myself, working)
mention here http://ardupilot.org/copter/docs/common-frsky-telemetry.html

But the Matek F405 WING, Omnibus F4 Pro are now supported by ArduPilot.
and Matek F405 WING, Omnibus F4 Pro like FC are support SPort Telemetry without extra hardware in iNav, CleanFlight, BetaFlight.
So I was hopping the latest firmware 2018-08-23 http://firmware.ardupilot.org/Plane/beta/MatekF405-Wing/
will work, but it does not.

because in here, it said the TX2 (SPort) pin is disabled.
https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_HAL_ChibiOS/hwdef/MatekF405-Wing/hwdef.dat

I try TX1, TX2, TX3, TX5,
with serial protocol set to 4=frsky sport or 10=frsky sport passthrough
all not working, no new sensor.

I even try get the telemetry from this latest lua script
https://github.com/jplopezll/OpenTX_FrSkySPort_passthrough_master
same not working, I guest this script need a TTL-Serial inverter adaptor as mention in the readme.

Most helpful comment

That looks really nice. Thanks for sharing ^^

All 81 comments

That was discussed on chibios thread and would require alteration on current uart driver to support 2 new options similar to betaflight to enforce inversion of uart output on f4/f7 controllers and also needs to add half-duplex protocol support.

@utkinpol could you add a link to that discussion? thank you.

I would also like to know more about this.

Hi,
Looking at:
https://oscarliang.com/uninverted-sbus-smart-port-frsky-receivers
we can see Rx and Tx pads of X4R and XSR are exposed, so shouldn't it work straight out of the box soldering to those pads?
It avoids using any diy cables and gives us a real uart port to deal with without having to change anything in the protocol.
Am I missing something ?

I have telemetry working on Omnibus F4 pro on UART 1 - frsky XSR, on Matek F405 I cannot get telemetry

After testing soldering to those pads most of the sensors are detected but not updated. So basically not working. And I am with a Matek F405 CTR as well.

can you try …. 1N4007 between RX5 - TX5 (TX on cathode, RX on anode to uninverted sport of XSR) ……. select serial 4 ... baud 57, protocol 10

https://gitter.im/ArduPilot/ChibiOS

Discussion is here. I had same bad results trying to use noninverted input. Code needs new features added to support same uart control betaflight has.

Do you mean bridging rx and tx on Fc side? What's the point of doing so?

Bridge with a diode to make it talk half dulex, sort of. A bad solution, but works. Proper solution is to configure fc uart into halfduplex mode

TX on anode and rx on cathode did the trick indeed.

Could you guys help clarify something... I've been trying to get this working with no luck.

@Ind0man , You wrote Success with diode Anode(+) on the TX pad. And diode's Cathode(-) soldered to the RX pad.

While @Ind0man above says the opposite.

Unfortunately for me, I did both ways and still don't see the FrSky Passthrough Telemetry.

We solder RX univerted SmartPort to the FC RX pad right? After successfully bridging with the diode.

I am doing this on the Omnibus Nano v6. According to the wiki, Telemetry should be on UART1. In Mission Planner, we set Serial1_PROTOCOL to 10 right?

Referring to Oscar Liang's website, solder pin A to tx on Fc and pin B to rx of the same uart on Fc.

On Fc side bridge tx and rx with anode on TX and cathode on rx.

Check hwdef of your own board, you might find something as following:

Now the UART order. These map to the hal.uartA to hal.uartF
objects. If you use a shorter list then HAL_Empty::UARTDriver
objects are substituted for later UARTs, or you can leave a gap by
listing one or more of the uarts as EMPTY.

The normal usage of this ordering is:
1) SERIAL0: console (primary mavlink, usually USB)
2) SERIAL3: primary GPS
3) SERIAL1: telem1
4) SERIAL2: telem2
5) SERIAL4: GPS2
6) SERIAL5: extra UART (usually RTOS debug console)

order of UARTs (and USB)
UART_ORDER OTG1 USART6 USART1 UART4

In your case it seems telem1 is uart 1 and serial1_protocol should indeed be set to 10.

Thanks so much for writing all that @Ind0man

It worked exactly as you described. I missed the fact that there was an A and B point for S.PORT.

I wonder if the R-XSR has a "B" point we can tap into somewhere.

Anyways, happy that this is working. Set SERIAL1_PROTOCOL to 10 and rebooted the FC. And all additional sensors were discovered.

Thanks so much for writing all that @Ind0man

It worked exactly as you described. I missed the fact that there was an A and B point for S.PORT.

I wonder if the R-XSR has a "B" point we can tap into somewhere.

Anyways, happy that this is working. Set SERIAL1_PROTOCOL to 10 and rebooted the FC. And all additional sensors were discovered.

https://github.com/ArduPilot/ardupilot/pull/9749

you no longer need to use a hack - this PR will bring inversion control as an option in arducopter.

@Ind0man
I wanted to use the connector on the XSR...so I removed the inverter to free up the S.PORT pin. And then removed the resistor circled in the yellow box to remove free up the CPPM pin.

Then decided to just do the diode bridge between points A and B on the XSR itself.

Here's what it looked like before I Liquid Electrical Tape things down and then heat shrink my XSR RX.

xsr_frsky_ardupilot_telemetry_mod

So now, the modded XSR can use the original plug. And the CCPM and SPORT position gets soldered to the Uart's RX and TX pads respectively on the FC.

That looks really nice. Thanks for sharing ^^

@tridge @utkinpol @MATEKSYS

just download 2018-12-07 ArduPlane V3.10.0-dev
http://firmware.ardupilot.org/Plane/latest/MatekF405-Wing/

and 2018-11-25 v1.3.61
http://firmware.ardupilot.org/Tools/MissionPlanner/MissionPlanner-latest.zip

Test it on Matek F405-WING for UART 1, 3, 5 ( FrSky S8R + X9DP )
SERIALn_BAUD = 57 which is 57600
SERIALn_OPTIONS = x where x I try set to 1, then 2, then 3, then 7 (saved setting, power off and on each time)
SERIALn_PROTOCOL = 10 which is FrySky SPort Passthrough

I also try connect the S8R SPort pin to a MatekF405-Wing TX pin, found nothing, then connect to MatekF405-WingRX pin, and redo the test.
all no new sensor.

Hello,

I've a got a R9 slim and a Kakute F7 and flashed ea2970bf2 (master's HEAD at the time of this post). I'm trying to get S.Port working.

S.Port from the R9 slim is connected to the the TX pad of USART2 (SERIAL2) and I set SERIAL2_PROTOCOL to 4 and SERIAL2_OPTIONS to 7 but I don't get any sensors appearing when enabling "Discover new sensors".

Is it the way it should be wired ?

@auturgy Ok thank you. Looks like I'm not the only one that can't make the Slim work with Ardupilot.

Update to R9 slim today. I will test tonight
2019-02-13 | 190201 | Fix the incorrect telemetry issue
-- | -- | --

I can confirm that it works on an F405-wing with an R9-slim + and the latest firmware. I used the settings below:

SERIAL4_BAUD 57
SERIAL4_OPTIONS 4
SERIAL4_PROTOCOL 10

any chance this could be addressed for arducopter/matek405wing/X8R - currently no telemetry

What about SERIALx_PROTOCOL 4 ? To me it doesn't seem to send the right sensor IDs.

any chance this could be addressed for arducopter/matek405wing/X8R - currently no telemetry
The R9slim + has an inverted(actually uninverted) s.port pin like the the R9mm. I think the issue with the X8R is that it only has standard s.port. You can probably hack the receiver to find the uninverted signal.

What about SERIALx_PROTOCOL 4 ? To me it doesn't seem to send the right sensor IDs.

I can try protocol 4 tonight. However, protocol 10 pass-through telemetry with Yaapu lua scripts is pretty impressive. Try it.

Indeed I should try it :+1:. Please test protocol 4 anyway if you can.

Tested with latest firmware
http://www.mateksys.com/?portfolio=f405-wing#tab-id-6

non-inverted (hacked) S.Port signal
TX1 pad of F405-WING
SERIAL1_BAUD 57
SERIAL1_OPTIONS 7
SERIAL1_PROTOCOL 4

or TX6 pad of F405-WING
SERIAL6_BAUD 57
SERIAL6_OPTIONS 7
SERIAL6_PROTOCOL 4

I could not get protocol 4 working with the settings suggested by Mateksys. I tried it on both TX1 and TX6 connected with the RX1 (un-inverted) pin on the R9 slim +. Again, Protocol 10 works fine with Yaapu telelmetry scripts.

Hi Mateksys .... could you send me the pins for F405-CTR ...... I was using a hacked XSR on TX5 - RX5. That was working well. ... But I cannot get telemetry with an R9 mm (uninverted SPORT) on TX5.

Tested with latest firmware
http://www.mateksys.com/?portfolio=f405-wing#tab-id-6

non-inverted (hacked) S.Port signal
TX1 pad of F405-WING
SERIAL1_BAUD 57
SERIAL1_OPTIONS 7
SERIAL1_PROTOCOL 4

or TX6 pad of F405-WING
SERIAL6_BAUD 57
SERIAL6_OPTIONS 7
SERIAL6_PROTOCOL 4

@MATEKSYS can you clarify that SERIAL6 above was tested with regular inverted s.port signal out of X8R or similar.

btw, my challenge with the latest AC firmware is that matek405wing it doesn't boot with Beitian BN 880 compass/gps combo.
https://discuss.ardupilot.org/t/copter-3-6-5-released/37733/12?u=maciek01

@maciek01 S.Port signal doesn't work, need non-inverted S.Port.

@ThomasH3 I have no R9mm, you might try “Inverted S.Port” pad on R9mm, I don't understand why Frsky mark it "inverted" :-)

I had to swap UART's, following setup is working (R9 MM to Matek F405-CTR , STD)
Serial1: Telemetry - TX3 - SPORT (Inverted)…. Baud 57, Option 4, Protocol 10
or
Serial2: Telemetry - TX4 - SPORT (Inverted) …. Baud 57, Option 4, Protocol 10
Serial3: GPS - RX/TX 1 ….. Baud 57, Option 0, Protocol 5

HELLO.
AS MATEKSYS and CHOYADO report, seem possible to get telemetry both on MATEK WING TX1 and TX6 on RX1 FRSKY SLIM+ RX. I follow all procedure correct, trying any combination but cannot get any discovered new sensor on my QX7 Taranis. I didn't yet install the LUA yaapu script, but , i souppose, should be indifferent and could be able to discover sesnsors anyway, does it?
Another difference i' got, I can't set the SERIALx_OPTION parameter on MPby the fact I've not it in the full par list. My MP ver is the V3.9.5 and FW is the latest stable kept on official AP repository. Can any one suggest any my possible missing action?
TK a lot

A couple things. The serial options parameter is only available on 3.10 (latest) version at this time. If you are using passthrough telemetry (protocol 10) you cannot discover sensors until the script is running. Lastly I was not able to get protocol 4 working on my FC.

Great, i will try on tomorrow. But how is possible options 7 if on the official AP Full Parameter List, it's only till 4?

EX:
image

I think 7 is options 4,2, and 1 at the same time.

Ok, Tk Choyado, I'll try on tomorrow. A curiosity: on which TX you're using it?

Confirm. Work great according to choyado guide. Tk a lot

Ok, Tk Choyado, I'll try on tomorrow. A curiosity: on which TX you're using it?

I am using a Taranis TX.

I use a single wire connection from tx to an inverted s.port to r9mm. Now there is only GPS data. If you change the destination and parameters of the port, then after turning on the flight controller, the data will appear for 1 second (the correct data and all sensors), but then disappear. Use matek f405 ctr

I don't know the R9mm function, even if it should be same of Slim+. Have you update latest rx fw on frsky? F405-Ctr really don't know, mine is F405-Wing

Yes, I updated it, and the equipment and the receiver and transmitter, the data appear during the controller loading and immediately disappear

Are you using passthrough or frsky x telemetry? I could not get x to work.

Options 4, protocol 10, I only have gps displayed, there are no others ...

Are you using a lua script like Yappu? Protocaol 10 "(Passthrough) telemetry will not populate the the telemetry sensors on the Taranis unless a lua script is running.

Yes you are right !!! in menu number 12 on taranis x7

earned !!! It turned out you need to install the script yappu, only with coordinates it is not clear gps, only 4 digits displays

And why in this firmware 7 and 8 channel are not available? And others are the same, there is no autotune. 3.7 firmware is the latest

Matek F405 wing , arduplane 3.10-dev, X8R SPORT connected to SERIAL1 i can't get telemetry to work with my frsky radio QX7S with opentx 2.2.3 (yapuu or flightdeck don't receive data). Does the SERIALX_OPTION work with F4 board ?

Did you try serial option 4?

Yes but i got a "no telemetry" error message with yapuu, flight deck stay in its "waiting for autopilot" state.
The first forum post deals with a kakute F7, but the F405 wing has a STM F4 is this the problem ?
Is it necessary to "hack" the craft and theory cable ?

I have an f405 wing also. I am connecting directly to the FC (no craft and theory cable). However, I am using a R9slim plus and the uninverted (inverted according to FRsky) s-port pin. F4 boards can't handle inverted telemetry. There is a way to get the uninverted signal off of a X4R....not sure how to do it on an X8R

I have an f405 wing also. I am connecting directly to the FC (no craft and theory cable). However, I am using a R9slim plus and the uninverted (inverted according to FRsky) s-port pin. F4 boards can't handle inverted telemetry. There is a way to get the uninverted signal off of a X4R....not sure how to do it on an X8R

Hi! Could you please post the parameters for SERIAL1 you are using? And please, confirm that only a single cable from TX1 (on the F405WING) to the receiver S.PORT pin (on the R9slim) is needed. I'cant get it working.....
Thanks!

Do you have the slim plus?

SERIAL4_BAUD 57
SERIAL4_OPTIONS 4
SERIAL4_PROTOCOL 10

Thanks! Yes the R9 Slim+

Make sure to use the s.port pin that is labeled inverted.

That was it!!! it's working now! Thanks for your help!!
I've one more question... in INAV (yes I admit) you can send S.PORT telemetry with 405 wing using any S.PORT receiver, single wire, without modification? Why this doesn't work with APM?

I have just recently acquired the 405-wing controller to experiment with Ardupilot in this platform. I previously had a repurposed cube (black from solo) with my r-xsr received working for telemetry with the RS-232 chip with diode that is described by the creator of the Yapuu script. I assumed it would be the same thing for the 405-wing but that did not work. I have tried almost all variations of the settings for serial options, uarts, ap 3.10-dev and ap 3.9.6.

My current config is the r-xsr univerted s port to serial 6, baud 57, option 7. Neither frsky options work (4 or 10). I even pulled out the scope and I can see the rx polling on sport but the fc doesn’t want to talk back. I am now considering going back to 3.9.6 and diode bridging the tx and rx on the univerted s sport side.

Have there been any reports of success with the 405-wing and the r-xsr for s port telemetry?

Just to add feedback of my own successful test;

  • F405-STD running 3.7.0-dev
  • R9 MM running LBT 190201
  • 'inverted S.Port' pad (as per the FrSky printed/PDF manual) of R9 MM connected to TX3 pad of F405-STD
  • SERIAL1_BAUD 57
  • SERIAL1_OPTIONS 4
  • SERIAL1_PROTOCOL 10

Seems to work fine so far (just flight controller & receiver connected, not built into an actual copter yet), I can run FlightDeck on my Taranis X9D Plus & get warning messages & watch the artificial horizon move as I move the flight controller.

FrSky passthrough telemetry (protocol 10 with a single wire uninverted smartport feed) also working on the following setup :

  • CC3D mini Revolution with Arduplane 3.10.0-FIRMWARE_VERSION_TYPE_DEV
  • FrSky ACCST G-RX6 with native Inverted S.Port pad and FIRMWARE EU LBT G-RX6_FCC_181025
  • Ardupilot settings
    SERIAL1_BAUD 57
    SERIAL1_OPTIONS 4 (= Half-Duplex)
    SERIAL1_PROTOCOL 10
    The CC3D Mini Revo / G-RX6 setup is intended for a high performance DLG glider on which its easily fits.

Anyway this is truly good news for Ardupilot users since it's a "kiss me goodby" for all those until now necessary additional hardware signal converter proprietary or DIY crutches .

SERIAL1_OPTIONS 4 (= Half-Duplex)

I cannot find this option in Mission Planner and a X2.1 controller. Is that restricted to certain devices?

I think that you haven't install the 3.10 dev version of ardupilot.

ok, that is true, I have 3.6.8. Looking forward for those changes, they will help me alot!

Matek F405 wing, R9 slim + and qx7 (last opentx version, last firmware on the r9 and the receiver), arduplane 3.10 dev, connecting RX1 pin of the R9 slim + on the TX4 pin of the FC.

The telemetry works with yapuu. But i don't get the imu and compass update (maybe yapuu update those only after arming ?). I don't get neither the mode
switch voice alert
SERIAL4_BAUD 57
SERIAL4_OPTIONS 4
SERIAL4_PROTOCOL 10

I tried this on my Matek F405-CTR.
Inverted S.Port (A) of XSR on TX5.
image
SERIAL4_BAUD 57
SERIAL4_OPTIONS 4
SERIAL4_PROTOCOL 4
No sensors discovered.
Also tried TX3 without success.

Hi! You should use yapuu lua script (get the script on its github page). And try the protocol 10.

I have tried yapuu and protocol 10.
All it shows is "no telemetry".

If you set the parameters :
SERIAL4_BAUD 57
SERIAL4_OPTIONS 4
SERIAL4_PROTOCOL 10
You have to connect the Sport cable on the TX4 pad of the board.

Are you sure?
http://ardupilot.org/copter/docs/common-matekf405.html says
SERIAL0 = console = USB
SERIAL1 = Telemetry1 = USART3
SERIAL2 = Telemetry2 = UART4
SERIAL3 = GPS1 = USART1
SERIAL4 = GPS2 = UART5

@MATEKSYS
Have you tested a F405-CTR?

@twistedwings We have not tested it on F405-CTR, but the theory is identical
SERIALx_BAUD 57
SERIALx_OPTIONS 7
SERIALx_PROTOCOL 4

MATEKF405 target for F405-CTR
BATT_AMP_PERVLT 17.9
BATT_CURR_PIN 14
BATT_VOLT_MULT 11.0
BATT_VOLT_PIN 15

Would you mind testing it?

FrSky Telemetry works fine on my F405-Wing, so I assume a firmware bug.

It works with a diode between Rx and Tx (anode on Tx).
So I assume the half duplex option SERIALx_OPTIONS 4
does not work an F405-CTR.

tested it on F405-CTR, works fine
http://firmware.ardupilot.org/Plane/2019-05/2019-05-30-21:05/MatekF405/
MP 1.3.66

http://ardupilot.org/copter/docs/common-matekf405.html#default-uart-order

Frsky X4R non-inverted S.Port signal to TX5 of F405-CTR
SERIAL4_BAUD 57
SERIAL4_OPTIONS 7
SERIAL4_PROTOCOL 4

Frsky X4R non-inverted S.Port signal to TX4 of F405-CTR
SERIAL2_BAUD 57
SERIAL2_OPTIONS 7
SERIAL2_PROTOCOL 4

Thank you very much for testing this!

I'm closing this now as it is already supported and this issue turned into a support forum, which is not the intention.

If you are having problems, please post in our forum (http://discuss.ardupilot.org).

@MATEKSYS as you are an ArduPilot partner, if you wish to have a dedicated category in our forum for support (see https://discuss.ardupilot.org/c/hardware-vendors), let us know at [email protected] (I have sent an e-mail to all partners about it, but you might have missed it).

would have a photo demonstrating how to connect the diode on both sides do not hear communication
or do you have to use a rs232 on the way?

Was this page helpful?
0 / 5 - 0 ratings