Smartport telemetry for Cleanflight

With their latest transmitters and receivers FrSky changed telemetry protocol. XJT module, Taranis radios, X8R, X4R and X4RSB are using SmartPort telemetry protocol. And that creates few problems. First of all, SmartPort is a serial protocol. That means, flight controller has to have free serial port to connect S.Port device. Second of all, TX and RX lines shares the same wire. The work in half-duplex mode. Third of all, SmartPort signal levels are inverted: logical 0 is in HIGH state, logical 1 is in high state. All of that combined, connecting SmartPort receiver to flight controller and sending telemetry data is not so easy to archive. Specially on FCs without hardware inverters. That applies to most popular STM32F1 devices like Naze32 and Flip32. Not only numer of UARTs there is limited, but also they lack hardare inverters. Of curse, everything is possible and hardware solution for Cleanflight, Naze32 and SmartPort telemetry can be found here.

Luckily, there is simpler solution for Cleanflight that uses SoftSerial and does not require any hardware hacks besides special wire. Requirements:

  • Cleanflight capable flight controller (STM32F1 or STM32F3),
  • SmartPort enabled receiver: FrSky X8R, X6R, X4R, X4RSB,
  • Possibility to enable SoftSerial. Depending on FC type, different fetures like Parallel PWM, Sonar, LED Strip or Current Meter collides with SoftSerial functionality. Check documentation first. In case of Naze32/Flip32 WS2812b LED strips and Parallel PWM can not be used.

Next, we have to make a special cable that will bridge together TX and RX lines from flight controller and connect them to S.Port data line. Do not worry, it’s OK to bridge those pins together. Nothing will be broken, it’s just like forcing logical state on pin. Electrical diagram looks like this:

S.Port telemetry cable schema

You do not have to connect +5V and GND lines. They are already there with RC signal.

When this is done, let’s configure Cleanflight.

  1. Open Cleanflight Configurator
  2. Open CLI tab end ensure telemetry inversion is enabled by typing set telemetry_inversion = ON. Then type save to reboot flight controller
  3. Open Configuration tab and enable SoftSerial Enable SoftSerial
  4. Save settings
  5. Open Ports tab and enable SmartPort telemetry on selected SoftSerial port with Auto baud rateEnable smartport telemetry
  6. Save settings
  7. Open Configuration tab and enable TelemetryCleanflight enable telemetry
  8. Save settings

Starting from now, Cleanflight will be sending telemetry data back to receiver. So, let’s configure it there. In case of FrSky Taranis it would look like this:

  1. Power up flight controller and radio
  2. Goto taranis Telemetry screen
  3. Select and enter Discover new sensorsTelemetry screen
  4. New sensor should appear in a list above.
  5. Because Cleanflight does not sends all data when disarmed, arm flight controller. Be sure to remove propellers before you do it. Safety first!
  6. More sensors should appear
  7. Hit Stop discovery

Done. From now on, Taranis can start showing you the data you need, report voltage, etc.

13 thoughts on “Smartport telemetry for Cleanflight

  1. Hello,

    I have read your and others accounting of how to get telemetry working with my NAZE (Flip32) board.

    1. I am using CleanFlight 1.12
    2. I have a Taranis OPENTx 2.1.7
    3. I have hard wired pin 4 and 5 to pin 4 on the X4R
    4. I have turned on SoftSerial 1 to Smartport Auto
    5. I turned On Telemetry
    6. I have “set telemetry_inversion = ON”
    7. I have armed the Quad
    8. I went to the Telemetry setup in the Receiver it sees RSSI, a2. swr, RXBt
    9. I tell it to Discover new Sensors and get nothing..

    Does anyone have any suggestions?

    Dave.

    1. About point 3: on X4R to Smartport port? “S” pin on this small connector?
      I know this trick is not working on Betaflight on STM32F1 boards like Naze32. CF 1.12 is not also using gyro sync. Maybe this is the issue

    2. Hi ,

      after hours of testing , i find out that smartport does NOT work reliably on softserial since it need 57600 bauds and cant be changed in the X4R.

      Sometimes it work , sometimes it doesnt .

      Best way to go is to put it on UART 1 (usb) :
      -in cleanflight port tab , set UART1 to smartport telemetry and left MSP Enabled
      then when craft is not armed , you got USB connection (just unplug jst connector to X4R if you have packet error)
      when craft is armed the port become a Telemetry port ( usb will not respond anymore if craft is armed because port will talk “telemetry” and not “MSP”

      1. Putting Smartport on uart will work only on boards with hardware inverters. Naze32 and similar with Stm32f1 does not have one. So either hacking receiver or adding additional invertet

  2. fact : my F3 board is OK (uart and softserial working reliably with osd or gps or ftdi)
    fact2 : my x4rsb is OK (smartport work reliably 100% with UART)

    i tried the new resistor hack betwen TX , RX or both with many different value -> nothing
    with a diode 1nxxxx in both way -> nothing
    softserial 1 or 2 -> nothing

    not really nothing but erratic behavior , (on the taranis screen you got little star”*” when receiving telemetry for one particular sensor) the little stars flicker at high rate on ALL sensors when using UART

    but when switching to softserial the little stars start to droping out pretty fast after initialisation then drop completly or never receiving update at all

    i think this is due to buffering and desync because of different bauds rate

    Dont take my word for it , i may be wrong

  3. What sort of loops times are you guys running? I found that with a low loop time I got unreliable telemetry data. I found that increasing loop time gave much more reliable data. I now run at 750ms on an SP Racing F3 mini board.

    1. ATM I’m using it only on my big quad where I do not need low looptime. Too much inertia, so 2000us is enought for me

  4. Here too, on a flip32 STM32F1, no (only line high) SmartPort signal on softserial . FrsKy telemetry is getting out though! (checked with oscilloscope)

Leave a Reply

Your email address will not be published.