OpenSky — a FrSky compatible opensource receiver firmware

One year ago i was annoyed by the missing failsafe feature of the stock firmware of my VD5M receiver. My brushed micro quad nearly flow away because of that. This was when i started to look out for alternatives. There were some diy receivers using atmega processors and code from midelic, a user of rcgroups. They did not quite fit my needs, the cheap cc2500 modules from china had some rx issues and i never got them to work 100 percent reliable. This is when i started to write my own firmware for FrSky gear…

VD5M

I started with a vd5m. I gathered some information about the used chipset (a cc2510), got a cc-debugger for it and started blinking leds. That was quite easy once you get used to the sdcc compiler. After tracking all traces and writing down a pinout i started to work on the receiver code. When i got it working i started adding more features such as SBUS output.

D4R-ii

Recently i got annoyed by the fact that all my D4R-ii receivers did not support SBUS. This is why i started to port my VD5M code to the STM32F0 architecture of the D4R-ii receiver. After some modifications, introducing a hardware abstraction layer and some testing i finally got my code to support both targets. A new feature was added as well, the code supports incoming serial hub telemetry — you can hook up that port to your flight controller and receive various telemetry data on your tx.

uSKY

When i was building my TinyWhoop F3 i found not lightweight RX for it. So i developed uSKY, the worlds’ smallest FrSky compatible RX. It weights <0.5g and is really tiny, features full SBUS and hub telemetry support. Of course it also runs OpenSky.

tinyFISH FC

This is my approach of building a tiny flight controller with an integrated uSKY receiver.

My Code

My code is not based on any FrSky code, it was written from scratch with some inspiration from midelics atmega code. I am not affiliated with FrSky in any way. This is just my personal hobby project. As written before i did not only implement the features of the original receivers but added or enhanced some features:

  • completely open source (compiles with the opensource arm gcc or sdcc compiler)
  • fully compatible to FrSky 2-way protocol
  • 8 Channel CPPM output or digital SBUS output (INVERTED or non-INVERTED mode!)
  • failsafe (constant, stopped ppm output)
  • telemetry: 2 analog channels, RSSI, and hub telemetry forwarding
  • builtin APA102 Led control (maps to any a ppm channel)

You can find my code on my Github repository https://github.com/fishpepper/opensky.

Tutorials

I will add more information and tutorials for flashing soon.

Disclaimer


THIS SOFTWARE IS FOR EDUCATIONAL USE ONLY!


DO NOT use this software to control real planes/quadrocopters.
This is for educational use only, bad things could happen if you run this on a real vehicle. Its meant to be used on indoor and/or small vehicles.
Using this code will probably void its FCC compliance and might void transmission laws depending on your country!

I AM NOT RESPONSIBLE FOR ANY DAMAGE/INJURIES CAUSED BY USING THIS CODE!

Thanks

Thanks to midelic from rcgroups.com for the reverse engineering the protocol and code of his atmega implementation. Thanks to holger for the d4r-ii donation 😉

13 thoughts on “OpenSky — a FrSky compatible opensource receiver firmware

    1. fishpepper Post author

      This is for the old international D8 protocol.

      Reply
    1. fishpepper Post author

      Due to a lack of time I will not put work into that. Anyway pull requests are highly welcome!

      Reply
  1. MATHE Zsolt

    Hello!
    Any chance to port it to XM/XM+? They are cc2510 based and there are a lot of bricked out there. It seems to be a procedural problem with the FrSky updating, because the bootloader doesn’t responds anymore to the official FrSky updater. Ask my how I know? 🙂 They are tiny, especially the XM+ could worth it – very good range, thanks to the PA+LNA chip…

    Reply
    1. fishpepper Post author

      It is just a matter of tracing the pinout and setting the proper defines in the config file. Should not be that hard 😉

      Reply
  2. Mondo

    Hey i am really interested in tinyfish fc since it has an integrated receiver in it, few questions on mind, what ports / uart of serial rx will i have to turn on in betaflight to activate the integrated receiver? what if i messed up the receiver and for some reaon i cant activate it… is it possible to solder an external receiver for example frsky xm+ ?

    Reply
    1. fishpepper Post author

      It should work out of the box. The tinyFISH bf firmware includes all settings. You can load the defaults. You can always connect a receiver to the UART3 pads next to the usb port.

      Reply
  3. Edward

    I was wondering how complicated it would be to add support for the D8R-II receiver? I’ve got a few of them sitting around doing nothing.

    Reply
    1. fishpepper Post author

      It’s just a matter of writing the right configuration files for it… Should not be too hard for a programmer.

      Reply
  4. AlexC

    I have assembled your versions of open source FC with integrated receiver. I see it has hub telemetry via SBUS but how about SmartPort? Will it be hard to implement such feature? It’s really handy with the new LUA scripts on OpenTX to now change PID’s and RC rates. Thanks a lot for all the hard work you put in to make these projects!

    Reply
  5. Łukasz

    Hello again Simon! I posted this in the uSky post, but the comment seems to have disappeared, so I’m posting this here since it’s more relevant to the OpenSky. I just finished building and flashing uSky receiver, and it seems to work as I got it to bind and I can get RSSI on my Taranis as well 🙂 Can you tell me how can I compile firmware with SBUS enabled instead of CPPM output? Should I change anything in config.h? Please excuse my lack of programming skills. Thanks a lot for help and open sourcing this amazing creation!

    Reply
    1. AlexC

      For me, when I compiled the firmware (it was a bit complicated) I did not require to make any modifications to work in SBUS mode.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *