{"id":30582872,"url":"https://github.com/alissonjsb4/stm32-lora-telemetry-relay","last_synced_at":"2025-08-29T08:06:02.937Z","repository":{"id":308626553,"uuid":"1033498179","full_name":"alissonjsb4/stm32-lora-telemetry-relay","owner":"alissonjsb4","description":"Firmware for a dual-node STM32-based LoRa telemetry relay system, featuring DMA-driven UART capture and state-machine validation.","archived":false,"fork":false,"pushed_at":"2025-08-17T03:37:04.000Z","size":28396,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-17T05:27:11.510Z","etag":null,"topics":["academic-project","c-language","dma","embedded-systems","firmware","hal-library","iot","lora","rf-communication","state-machine","stm32","stm32wl","telemetry","uart"],"latest_commit_sha":null,"homepage":"https://www.linkedin.com/in/alissonjsb4/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alissonjsb4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-06T23:05:51.000Z","updated_at":"2025-08-17T03:37:07.000Z","dependencies_parsed_at":"2025-08-17T05:37:18.703Z","dependency_job_id":null,"html_url":"https://github.com/alissonjsb4/stm32-lora-telemetry-relay","commit_stats":null,"previous_names":["alissonjsb4/projeto_lora","alissonjsb4/stm32-lora-telemetry-relay"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alissonjsb4/stm32-lora-telemetry-relay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alissonjsb4%2Fstm32-lora-telemetry-relay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alissonjsb4%2Fstm32-lora-telemetry-relay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alissonjsb4%2Fstm32-lora-telemetry-relay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alissonjsb4%2Fstm32-lora-telemetry-relay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alissonjsb4","download_url":"https://codeload.github.com/alissonjsb4/stm32-lora-telemetry-relay/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alissonjsb4%2Fstm32-lora-telemetry-relay/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272652306,"owners_count":24970576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["academic-project","c-language","dma","embedded-systems","firmware","hal-library","iot","lora","rf-communication","state-machine","stm32","stm32wl","telemetry","uart"],"created_at":"2025-08-29T08:06:01.056Z","updated_at":"2025-08-29T08:06:02.927Z","avatar_url":"https://github.com/alissonjsb4.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# STM32 LoRa Telemetry Relay System\n\nA robust firmware project for a dual-node STM32 NUCLEO-WL55JC1 system designed to capture, validate, and retransmit data from a radiosonde via LoRa for long-range telemetry. This project was developed as a technical study in embedded systems and wireless communication.\n\n## Key Features\n\n- **Robust Hardware Platform:** Utilizes two **STM32 NUCLEO-WL55JC1** development boards, which integrate a powerful microcontroller and a LoRa transceiver on a single chip.\n- **Efficient Firmware:** Employs **DMA in circular mode** for non-blocking UART data reception from the radiosonde, freeing up the CPU for other tasks.\n- **Reliable Data Parsing:** A **Finite State Machine (FSM)** validates incoming data packets using a `SYNC_WORD` and `checksum` to ensure data integrity before retransmission.\n- **Low-Power, Event-Driven Receiver:** The base station is fully interrupt-driven, operating in a low-power sleep mode until a LoRa packet is received, making it highly efficient.\n- **Layered Software Architecture:** The firmware is built on STMicroelectronics' **HAL (Hardware Abstraction Layer)** and **BSP (Board Support Package)**, ensuring clean, portable, and maintainable code.\n\n## Project Structure\n\nThe repository is organized into a clean, modular structure:\n\n```\n/\n├── README.md\n├── src/\n│   ├── Field_Node/\n│   ├── Base_Station/\n│   └── common/\n│       └── protocol.h\n├── docs/\n│   ├── Relatorio_Tecnico.pdf\n│   └── images/\n└── .gitignore\n```\n\n## System Architecture\n\nThe system consists of two main nodes that work in tandem:\n\n1.  **Node 1: Field Node (Transmitter)**\n    * Connects directly to a radiosonde via `USART1` (19200 baud) to capture a continuous stream of telemetry data.\n    * Parses the data stream using an FSM to identify and validate complete data packets.\n    * Valid packets, verified by a checksum, are transmitted wirelessly using the onboard LoRa radio.\n\n2.  **Node 2: Base Station (Receiver)**\n    * Acts as a LoRa gateway, remaining in a continuous reception mode.\n    * Upon receiving a valid LoRa packet, it decodes the binary payload into human-readable data.\n    * Sends the formatted data to a connected PC via a Virtual COM Port (`USART2` at 115200 baud) for real-time monitoring.\n\n## LoRa Communication Parameters\n\nTo ensure a robust and long-range communication link, the following LoRa parameters were configured for both nodes:\n\n| Parameter               | Value      |\n|:------------------------|:-----------|\n| **Frequency** | 915.0 MHz  |\n| **Spreading Factor (SF)** | 10         |\n| **Bandwidth (BW)** | 125 kHz    |\n| **Coding Rate (CR)** | 4/8        |\n| **Transmission Power** | 22 dBm     |\n| **Packet Mode** | Fixed Size (Implicit Header) |\n\n## How to Use\n\n1.  **Hardware Required:**\n    * 2x STM32 NUCLEO-WL55JC1 development boards\n    * 2x 915 MHz Antennas\n    * A radiosonde or other serial data source (19200 baud)\n\n2.  **Setup:**\n    * Clone this repository.\n    * Open **STM32CubeIDE** and import the two projects located in `src/Field_Node/` and `src/Base_Station/`.\n    * Compile both projects.\n    * Flash the `Field_Node` firmware onto the first board and `Base_Station` onto the second.\n\n3.  **Execution:**\n    * Connect the Field Node to the radiosonde.\n    * Connect the Base Station to a PC and open a serial terminal (like PuTTY) on the corresponding COM port at 115200 baud to view the received telemetry data.\n\n## Validation \u0026 Results\n\nThe system was fully tested, demonstrating a successful end-to-end communication link. The following are sample outputs captured from the serial terminals of both nodes during a test run.\n\n**Transmitter (Field Node) Terminal Output:**\n```\nChecksum OK. Pacote da radiosonda validado.\nTransmitindo pacote LoRa ID: 1\nLoRa TX Done.\n```\n\n**Receiver (Base Station) Terminal Output:**\n```\nPacote LoRa Recebido! RSSI: -50 dBm, SNR: 9\n\n---[ PACOTE DE TELEMETRIA DECODIFICADO ]---\nID do Pacote: 1\nLatitude:     -3.740123\nLongitude:    -38.570456\nAltitude:     50.12 m\nVoltagem:     3300 mV\nTemp. Radio:  25 C\nStatus GPS:   FIX OK (Satelites: 8)\n```\n\n## Future Work \u0026 Roadmap\n\nThis project serves as a solid foundation for a field-ready telemetry system. Recommended next steps include:\n\n- [ ] **Power Optimization:** Implement the final low-power sleep modes (`SUBGRF_SetSleep`) on the Field Node to maximize battery life.\n- [ ] **Data Visualization:** Develop a GUI or logging script on the PC to better visualize, store, and analyze the incoming telemetry data.\n- [ ] **Field Testing:** Conduct real-world, open-field range tests to validate the performance and maximum range of the LoRa link.\n- [ ] **Bi-directional Communication:** Implement a command system to send configuration messages from the Base Station back to the Field Node.\n\n## Authors\n\n- Alisson Jaime Sales Barros\n- Danilo Mota Alencar Filho\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falissonjsb4%2Fstm32-lora-telemetry-relay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falissonjsb4%2Fstm32-lora-telemetry-relay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falissonjsb4%2Fstm32-lora-telemetry-relay/lists"}