Coder Social home page Coder Social logo

cleric-k / flyskyrxfirmwarerssimod Goto Github PK

View Code? Open in Web Editor NEW
109.0 10.0 16.0 181 KB

Patched firmwares for the various FlySky receivers to inject RSSI in IBUS channel 14

Makefile 21.72% Assembly 5.67% C 72.61%
flysky rssi receiver mod patch firmware

flyskyrxfirmwarerssimod's Introduction

RSSI support for FlySky receivers

Supported receivers:

  • IA6B
  • IA10B
  • X6B
  • IA6C
  • X8B
  • IA8X
  • A8S
  • 8A
  • X14S
  • Flit10 - Reported to work with the IA6B firmware. See here.
  • RX2A Pro/Pro V1 - Reported to work with the the A8S firmware. See here.

Most of these receivers have knowledge of RSSI (as it can be seen from the telemetry values at the transmitter side) but they do not make it available to the Flight Controller.

Some receivers (like A8S and 8A) do not have telemetry in their original firmware but using the code from the other receivers as reference, it was possible to implement RSSI measurement. Telemetry is not implemented.

This modification injects the Signal Strength value into one of the channels (most commonly channel 14) which is then read by the Flight Controller. All protocols (IBUS, SBUS and PPM) are supported (see below for an important note on PPM).

Signal Strength

The receivers have knowledge of Signal and Noise levels. The difference between the two is the Signal-To-Noise ratio (SNR). Additionally, on the telemetry screen at the TX side we can see that there is as SigS value which varies from 0 to 10 (10 being best signal). This is the value that is used in this mod. It is mapped to the standard channel range [1000; 2000], thus it can be easily used in BetaFlight/iNav.

In code the value actually varies between 100 (for worst signal) and 0 (best) - it seems it is flipped, divided by 10 and rounded at the TX side.

How to use

Montis has written a detailed flashing guide. You can find it here.

You can either build the images yourself or use the prebuilt ones in the build directory.

The prebuilt images have two versions each - one which injects the Signal Strength into channel 14 and one for channel 8.

You need the channel 8 version if you intend to use PPM. The reason for this is that PPM protocol (as implemented by these receivers) has only 8 channels and channel data for channels above 8 is ignored. Digital protocols (IBUS and SBUS) can use either version, but it is recommended to use the channel 14 version, because most transmitters can send only up to 10 channels, thus by using channel 14 you are not wasting one of your usable channels.

To flash the firmware you'll need a ST-Link dongle. Checkout povlhp's repo FlySkyRxFirmware for detailed instructions.

Note: If you are having problems with flashing, consider connecting also the RST (Reset) pad of the receiver to the RST pin of the ST-Link.
Also it might be better to power up the whole receiver with +5V (you can use the +5V from the ST-Link) instead of supplying just the +3.3V for flashing. GND should be connected in all cases. Never connect +5V to the +3.3V pad of the receiver.

!!!Always backup your existing firmware first!!!

Also consider replacing the four bytes at offset 0x1C00 (see the above link for details) if you want to avoid rebinding after flashing.

Note: DON'T DO THAT on the A8S and 8A receivers. They store the transmitter ID in EEPROM and it is not affected by flashing - you won't need to rebind. Offset 0x1C00 contains code in these receivers and if you modify it you'll corrupt the firmware.

Details about Signal Strength calculation

The original firmware reveals how the Signal Strength is calculated. It is based on SNR. Any value of SNR above 45dB is considered full signal. Values below 7.8dB are considered lost signal. The values in between are mapped to the percent-like Signal Strength. The mapping is non-linear. A lookup table in ROM is used. Here is how this mapping looks like in practice: snr/sigs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.