2.4 GHz LORA based telemetry and radio link for remote controlled vehicles

Related tags

Miscellaneous mLRS
Overview

mLRS

This is the mLRS project.

The goal is an open source 2.4 GHz LORA-based high-performance long-range radio link, which provides fully transparent bidirectional serial connection combined with full remote control.

The 'm' in the project name alludes to 'Mavlink', as it will have features which optimizes performance for Mavlink systems. However, it always will also provide a transparent serial link and hence will be of wider use and by no means be limited to Mavlink systems only. The 'LR' in the project name alludes to 'long range', which however should not be understood in terms of an absolute range, like 50 km or so, but - of course - as the best possible range under the given conditions. Physical laws simply say that the higher the data rate the shorter the range. So, mLRS cannot compete range-wise with systems which achieve their range by reducing data rate to the minimal, taking according compromises. The goal of mLRS is to achieve a high range under the condition of a relatively high data rate.

Typical specs could be 14 RC channels at "full" resolution (11 bit for channels 1-4, 8 bit for channels 5-14) with 50 Hz update rate, and serial data rates of about 3-5 kB/s.

Many LRS or radio links with telemetry exist, among them open source projects such as SiK radios, OpenLRS, ExpressLRS, but also befinitiv wifibroadcast based projects like OpenHD or Ruby, closed source hobbyist projects such as UltimateLRS, QczekLRS, as well as commercial systems such as DragonLink, RFD900, Dronee Zoon, Siyi, but also TBS Crossfire and alike.

However, while all these systems are truely excellent and achieve their goals, and some of them are indeed close to what the project aims at, none of them check all points, like

  • relatively cheap
  • 2.4 GHz
  • full-duplex with sufficient data rate
  • open source
  • rich features for Mavlink systems

Hence this project.

Disclaimer

You of course use the project fully at your own risk.

Project Status

The project is work in progress, and there is still a long mile to go before it could be called mature or reliable.

It is "working" in the sense that it offers a bidirectional serial link with RC data, and as such provides the basic framework. It also integrates with the MAVLink for OpenTx project. But as said, it is far from really usable.

Installation Bits and Bops

This is a STM32CubeIde project. I don't have yet much experience with this framework, so I can't say much reliable, but this may work:

  • download and install latest STM32CubeIde
  • clone this repository; ensure that the submodules are also retrieved (if not run git submodule --init --recursive)
  • open Stm32CubeIde and go to 'File'->'New'->'STM32 Project from existing .ioc' and browse to one of the .ioc files. IMPORTANT: before hitting 'Finish' check the 'C++' box.
  • repeat this for all .ioc you want to open
  • copy from the 'st-hal' folder the content of the respective 'STM32FXxx_HAL_Driver' folder to the equally named folder in the 'Driver' folder
  • run 'fmav_generate_c_library.py' in 'mLRS/Common/mavlink'

Not very convennient yet, but this will improve with time :)

Hardware

Hardware is quite a problem currently. One might be tempted to think that all the recent ExpressLRS hardware should be good platforms, but this is unfortuantely not so. The code so far is for the Siyi FM30 system (early version only, i.e., the version with the STM32 chips); the TX module needs few small hardware modifications.

Comments
  • STM32WLE5JC Support?

    STM32WLE5JC Support?

    First of all, I love that this project exists. I have done some custom LoRa mavlink RTK correction links and have been wanting to do a generic LoRa based telemetry radio. I used the STM32WLE5JC with the built in LoRa radio and STCubeMX radio middleware.

    I would be interested in producing hardware using this module and getting mLRS running on it.

    https://www.seeedstudio.com/LoRa-E5-Wireless-Module-p-4745.html

    opened by AlexKlimaj 22
  • R9 mx as tx 2nd try

    R9 mx as tx 2nd try

    Hi @olliw42,

    Here you will find a cleaned version of the first PR.

    PS: For the time being the R9MM is my favorite target as "Sik-radio-replacement". It's even smaller and lighter. And I have a few laying around here back from the days you got one free with any Frsky-order.

    opened by vrquaeler 19
  • Allow for 32 bit TIM2

    Allow for 32 bit TIM2

    The cause of the large bursts of lost frames on the R9 Tx side turns out to be a problem on the Rx side. But it's not a difference with the radio chip. It's a difference with the STM32 controller used. The code in clock.h assumed that TIM2 has a 16 bit wide counter, but on the STM32L4, TIM2 is 32 bits wide. So, when Reset() is called, after CNT is larger than 2^16, the timer never fires and the receiver looses sync when the next frame is lost.

    Note, I was unable to test this code on other receivers so this still needs testing. I'm guessing that passing 0xFFFFFFFF in tim_init_up is ok even for 16 bit timers and that it will be truncated, but I haven't actually checked to be sure.. This is probably also not the only way to fix this bug.

    I still see many more lost frames on the Tx side than on the Rx side. Do you see this with other transmitters?

    opened by brad112358 14
  • PR

    PR "rx, that's the correct way of injecting radio_status" breaks things?

    @Imen-D wrote here https://github.com/olliw42/mLRS/commit/92bcd2f914d1a90380ead24ed95fde947141a73e#commitcomment-67754991

    Hi olliw, with this commit I can't do write fast mission anymore, is this related ?

    hmmm .... it all should work as before

    can you pl tell me what "write fast mission" is? you mean, writing missions is not fast anymore, but very slow?

    not sure you've noticed: the setup parameters have changed, you need to set now BOTH SETUP_RX_SERIAL_LINK_MODE and SETUP_RX_SEND_RADIO_STATUS to 1. Maybe it's just this?

    opened by olliw42 12
  • SX1262, rx-main: can it be reset to Idle also when it is in receive state?

    SX1262, rx-main: can it be reset to Idle also when it is in receive state?

    @Imen-D

    it would be great if you could test this:

    it is about these code lines https://github.com/olliw42/mLRS/blob/main/mLRS/CommonRx/mlrs-rx.cpp#L729-L736

    #ifdef DEVICE_HAS_SX127x
          if ((connect_state >= CONNECT_STATE_SYNC) || (link_state == LINK_STATE_RECEIVE)) {
    #else
          if (connect_state >= CONNECT_STATE_SYNC) {
    #endif
            sx.SetToIdle();
            sx2.SetToIdle();
          }
    

    for the SX1276 I found that one needs to call SetToIdle() also when link_state is being switched to LINK_STATE_RECEIVE in the doPostReceive handler. I wonder if the code can be simplified, i.e., if the define can be removed and the same code be used also for the SX1262

    I thus would kindly ask you if you could test it for your system if it would also work with this change

          if ((connect_state >= CONNECT_STATE_SYNC) || (link_state == LINK_STATE_RECEIVE)) {
            sx.SetToIdle();
            sx2.SetToIdle();
          }
    

    Secondly, I wonder if calling SetToIdle() is needed at all for the SX1262, that is, if it would work if one would just remove (out-comment) these lines completely (in this case one could define SetToIdle() to be just an empty function for the SX1262)

    THX!

    opened by olliw42 6
  • move clear event and restart the rtc

    move clear event and restart the rtc

    Hi Olliw, this is me jinchuuriki on rc groups As we enter the rx function, I forgot to re start the rtc timer, so interrupt based on rtc timer (time out) can't fire anymore.

    opened by Imen-D 6
  • Prompt when compiling firmware: ld.exe: ./CommonTx/mlrs-tx.o:(.bss.gdisp+0x0): multiple definition of `gdisp';

    Prompt when compiling firmware: ld.exe: ./CommonTx/mlrs-tx.o:(.bss.gdisp+0x0): multiple definition of `gdisp';

    https://github.com/olliw42/mLRS/blob/e0f8f91486ef010261720bb82fdebf697f5ff374/mLRS/CommonTx/gdisp.h#L110

    It is suspected that the gdisp variable is created here. The gdisp variable is defined in gdisp.c file, and in disp.h file "extern tgdisplay gdisp;" Can be compiled and passed.

    opened by suiaiyun 5
  • 31 Hz mode for SX1262 needs testing

    31 Hz mode for SX1262 needs testing

    @Imen-D

    I have just pushed support for the 31 Hz mode. On the Sx1280 it appears to work great. Could you test it also for the SX1262? All you need to do is setting the mode in common_config.h

    THX in advance :)

    opened by olliw42 5
  • introduce GetAndClearIrq and clear event on sx1262, also fix the calc_sx_power

    introduce GetAndClearIrq and clear event on sx1262, also fix the calc_sx_power

    Sx1262 setTxParameter (power) use actual value in dbm. with set PA config to max 22dbm we have range -9 to 22 dbm and value we pass on setTxParameter is actual value (-9 ... 22)

    opened by Imen-D 5
  • No data for FM30 and DIY E20

    No data for FM30 and DIY E20

    I have been paying attention to the progress of the mlrs project, the hardware preparation is completed, but the radio configuration still does not understand the working principle. I noticed that the author is testing the mlrs hardware on the opentx mavlink branch. Does it mean that the opentx main body is not supported? Currently using edgex2.6 Chinese version, FM30 transmitter and DIY E28-F103C8T6 receiver, the hardware is working normally FM30 transmitter green light flashes, receiver 3 serial ports only have debug content, serial No. 1 is not detected SBUS signal. Does the FM30 hardware need additional modification?

    opened by whqsz 5
  • Engineering STM32CubeIDE 1.8.0 not smooth

    Engineering STM32CubeIDE 1.8.0 not smooth

    Hello author, let us see hope on LORA mavlink. This open source project has been paying attention since last year. Recently, I found that there has been a major update on the progress. I will promote it in the hobby circle as soon as possible. Unfortunately, we strictly followed the Installation Bits and Bops steps and added the project to STM32CubeIDE 1.8.0. The project compilation was not smooth, and most of us did not understand how this IDE target works. So ask for help! This is an image

    opened by whqsz 5
  • Add reversible flashing r9*

    Add reversible flashing r9*

    I tried myself on flashing a r9m tx module with just a opentx remote, or rather like elrs is doing.

    What I found out:

    • fkr files are bin files with a header that can be used for flashing an app (not bootloader), this works with the original and the elrs bootloader. The files have a 16byte header that is detected by opentx and the app in binary. (This pr adds a modified version of the elrs script)
    • elrs files are bin files without a header that also can be used for flashing an app, this only works with the elrs bootloader.
    • The elrs bootloader is flashed by using an app that overrides the bootloader on first startup.
    • I don't know what exactly is different between the two bootloaders (appart from the elrs files), but one is opensource https://github.com/ExpressLRS/ExpressLRS/tree/master/src/bootloader/src so that one should probably be prefered.

    It sadly doesn't just work to convert the mlrs hex file to a bin file and then to a frk or elrs file, I guess because the mlrs hex file also includes a bootloader (and maybe other offsets are wrong). I think the preferred way is to use the eLRS bootloader and provide elrs files that only include the app. I have no clue on how the use the stm32cubemx software, so it would be nice if someone could help me with building an app only bin file.

    opened by TilCreator 13
  • Reset mavlink parser when a radio frame is lost to avoid likely loss of valid message(s) in the next frame(s)

    Reset mavlink parser when a radio frame is lost to avoid likely loss of valid message(s) in the next frame(s)

    When a frame is lost, the parser may be in the middle of parsing a message. We should reset it to start looking for the next frame so it doesn't discard all or part of the next message(s) while trying to finish accumulating the damaged message.

    @olliw42 , you didn't say yet what you concluded after our call. Perhaps you are still thinking about it. But, I'm submitting this here anyway for further discussion.

    The high frame loss of the current R9M seems at first a good environment for test, but the loss is so inconsistent that it's hard to judge the improvement. When I averaged the time required to download parameters for 12 runs with and 12 runs without this change, the average showed a little less than a second improvement, so, at least this code didn't make it worse.

    In any case, this needs a good code review before possible merge.

    opened by brad112358 9
Releases(v0.3.00)
Owner
null
CC2500 Low-Cost Low-Power 2.4 GHz RF Transceiver driver for esp-idf

esp-idf-cc2500 CC2500 Low-Cost Low-Power 2.4 GHz RF Transceiver driver for esp-idf. I ported from this. 2.00mm pitch External Antena 1.27mm pitch PCB

null 3 May 29, 2022
LoRa Driver for Semtech SX1262 on Linux (PineDio USB Adapter) and BL602 (PineDio Stack BL604)

LoRa Driver for Semtech SX1262 on Linux (PineDio USB Adapter) and BL602 (PineDio Stack BL604) Read the articles... "Build a Linux Driver for PineDio L

Lee Lup Yuen 8 Sep 17, 2022
Prototipe of LoRa nodes for airelib.re

Suchi and Ma-ti This repository contains the information for devices that sends Particulate Matter information to receiving nodes using LoRa for AireL

Pedro Flores 7 Dec 23, 2021
LoRaWAN end node built from scratch using CubeMX for WLE5x in the LoRa-E5

Seeed-LoRa-E5 LoRaWAN end node built from scratch using STM32CubeIDE/CubeMX for the LoRa-E5 WLE5x This assumes a general familiarity with STM32CubeIDE

Dana 25 Nov 21, 2022
The movements of your RC vehicles are jerky and not smooth? This Arduino device will solve this issue by adding acceleration and deceleration ramps to the PWM signals!

This is an Arduino Pro Mini 3.3V / 8MHz based RC servo ramp / delay generator Features: 4 RC servo PWM inputs and outputs (can be enhanced) Reads the

null 4 Apr 15, 2022
Audacity fork without Telemetry and with new features

Audacity fork without Telemetry and with new features

Sartox Free Software 693 Dec 1, 2022
Fast and Light-weight path smoothing methods for vehicles

path_smoother About Fast and Light-weight path smoothing methods for vehicles Denpendencies This project has been tested on Ubuntu 18.04. sudo apt-get

MingwangZhao 4 Dec 1, 2021
Tiny blocker of Windows tracking and telemetry written in plain C++/Win32 API.

Tiny blocker of Windows tracking and telemetry written in plain C++/Win32 API. Just run once as admin and forget. No questions asked. No harmful actions performed like other Windows spying blockers try.

null 5 Mar 30, 2022
Turn 2 esp32 boards into pixhawk telemetry for use with Ardupilot/Ardurover Mission Planner.

RoverLink Turn 2 esp32 boards into pixhawk telemetry for use with Ardupilot/Ardurover Mission Planner I used to use these cheap Chinese 900mhz Pixhawk

Jeffrey Berezin 2 Jan 18, 2022
PUBG ESP Hack for Emulator using C++ code. Player Position, Bones, Loots, Weapons, Vehicles, Boxes ... etc.

PUBG 1.7 ESP Hack for Emulator (C++ Source Code) PUBG ESP Hack for Emulator using C++ code. Player Position, Bones, Loots, Weapons, Vehicles, Boxes ..

Zero One Billion 37 Nov 1, 2022
Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research

Welcome to AirSim AirSim is a simulator for drones, cars and more, built on Unreal Engine (we now also have an experimental Unity release). It is open

Microsoft 13.7k Nov 25, 2022
Appscope - General-Purpose Observable Application Telemetry System

AppScope AppScope is an open source, runtime-agnostic instrumentation utility for any Linux command or application. It helps users explore, understand

Cribl 181 Dec 1, 2022
Multi-sensor perception for autonomous vehicles

Multi-Sensor Fusion for Perception -- 多传感器融合感知 Maintained by Ge Yao, [email protected] Up & Running Overview 本Repo为基于ROS melodic @ Ubuntu 18.04的Mul

Ge Yao 4 Jun 11, 2022
Iot-Surveillance-Car - This is a IOT Based Surveillance Car which can be controlled, tracked globally as well as its data can be accessed globally

Iot-Surveillance-Car - This is a IOT Based Surveillance Car which can be controlled, tracked globally as well as its data can be accessed globally. The camera on the front of the car can also be monitored globally. It can go anywhere where sim connection is available. 5th Sem Mini project

Rahul Vijan 5 Nov 24, 2022
Allows for multiple SwitchBot buttons and curtains to be controlled via MQTT sent to ESP32. ESP32 will send BLE commands to switchbots and return MQTT responses to the broker. Also supports Meter/Temp Sensor

SwitchBot-MQTT-BLE-ESP32 Switchbot local control using ESP32. no switchbot hub used/required. works with any smarthub that supports MQTT https://githu

null 332 Nov 26, 2022
QN8035 based Raspberry Pi FM radio receiver

QN8035 based Raspberry Pi FM radio receiver. QN8035 is a single-chip stereo FM radio receiver IC designed by the Quintic Corporation. This receiver su

Dilshan R Jayakody 8 Oct 6, 2022
A set of tutorial projects for creating a simple digital radio receiver based on the STM32G431KB microcontroller

simple-radio Обучающие проекты по созданию простого цифрового радиоприемника на базе микроконтроллера STM32G431KB. Разработка программ выполнялась в W

null 9 Sep 21, 2022
A simple tool using PC mouse via USART to control MCU and LCD/OLED (with LVGL library), if your screen cannot be controlled by touch.

LVGL_USB_Mouse A simple tool using PC mouse via USART to control MCU and LCD/OLED (with LVGL library), if your screen cannot be controlled by touch. 如

k_ying 5 May 5, 2022
ESP32-Skid-Steer - Bruder Catepillar Skid Steer model converted to RC, controlled by an ESP32 with 2 analog joysticks and a receiver that is an ESP32 on the model.

ESP32-Skid-Steer Bruder Catepillar Skid Steer model converted to RC, controlled by an ESP32 with 2 analog joysticks and a receiver that is an ESP32 on

null 6 Oct 27, 2022