Reverse engineering and building firmware for the Meteomodem M20 radiosonde for use in ham radio balloons
 
 
 
Go to file
sq2ips e48f0e199f
Update README.md
2025-02-22 19:34:51 +01:00
.vscode rewrite of the whole project to support the original stm32l0 using LL libs 2025-02-22 12:36:55 +01:00
img another image 2025-02-22 19:29:18 +01:00
m20 changes in photos, new pinout 2025-02-22 18:56:36 +01:00
.gitignore rewrite of the whole project to support the original stm32l0 using LL libs 2025-02-22 12:36:55 +01:00
LICENSE Initial commit 2024-03-15 16:11:56 +01:00
README.md Update README.md 2025-02-22 19:34:51 +01:00

README.md

m20-custom-firmware

The goal of the project is to reverse engineer the Meteomodem M20 radiosonde and build custom firmware for it for use in ham radio baloons and the Horus Binary V2 radio protocol.

Code

The code is writen in C using STM32CubeMX and Low Layer (LL) libraries and compiled using arm-none-eabi toolchain. Now fits into the original STM32L051R6T6 chip.

Stage

In this state the code works to the point where it gets GPS data and sends it using Horus Binary over radio. However this code is currently highly experimental and will probably not yet work correctly in the intended application.

What works

  • GPS (NMEA): ✔️
  • GPS (XM1110) ✔️
  • Radio: ✔️
  • Uart: ✔️
  • Outside temperature sensor:
  • LPS22 barometer + temp sensor: (to be done soon)
  • humidity sensor:

Images

alt text alt text alt text

Schematics

Great pcb reverse enginering work was made by joyel24, PDF link (although there are some errors in it)

Used libraries

GPS

There are 2 variants of GPS modules, both of them are supported.

New GPS (NMEA)

In newer M20 sondes u-blox MAX-M10M that uses NMEA protocol.

alt text

Old GPS (XM1110)

In older M20 sondes XM1110 GPS module was used. It transmits data over UART but with custom firmware that transmits only binary protocol data.

alt text Data format:

alt text

Barometer and temp sensor

LPS22HB sensor is used with SPI interface. File lps22hb.c and lps22hb.c are a library for this sensor.

Radio

TODO

Running the firmware

First you need to obtain the code, you can do it with git:

git clone https://github.com/sq2ips/m20-custom-firmware.git

Or directly from github.

Configuration

Before building the firmware you fist need to configure parameters located in the config.h file. TODO description

Building the firmware

Beofere flashing the firmware you need to build it first, there are a few ways you can do it depending on the platform:

Building directly on Linux

To build directly on linux you need the arm-none-eabi toolchain, you can install it from your package manager depending on the linux distro. For example, on Debian it will look like this:

sudo apt install gcc-arm-none-eabi

WARNING: in difrent distros version of the toolchain can varry and result in a too big result file

Another way that avoids this problem is downloading the toolchain from here. After downloading you need to extract it:

tar -xvf arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi.tar.xz

and install the binaries into your system:

sudo cp arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi/bin/* /usr/local/bin/

You will also need make to build.

sudo apt install make

After installing everything you can go into the directory where you do downloaded the code, then:

cd m20

And now you can make the firmware:

make

After succesful building you should see a memoy usage table like this:

alt text

Building with Docker on Linux

Building with Docker on Windows

Building with WSL on Windows (TODO)