The objective of Week 1 was to understand the communication protocol and software architecture used in the CubeSat TT&C (Telemetry, Tracking & Command) system.
The work was divided into three tasks:
- Understanding the NGHam communication protocol.
- Learning the fundamentals of FreeRTOS.
- Designing the packet handling pipeline using FreeRTOS tasks.
.
The goal of this task was to understand how telemetry data is transformed into an NGHam packet before being transmitted over the radio.
- Packet-based communication
- Payload vs Packet
- Binary data representation
- NGHam packet structure
- CRC error detection
- Reed-Solomon Forward Error Correction (FEC)
- Packet scrambling
- NGHam Serial Port Protocol (SPP)
During this task I learned:
- The difference between a payload and a transmission packet.
- How NGHam improves communication reliability compared to AX.25.
- The complete NGHam packet structure.
- The purpose of CRC and Reed-Solomon error correction.
- How packets are prepared before radio transmission.
- The communication flow between a host computer and a radio using NGHam SPP.
NGHam/
├── ngham-packet-explained.md
└── ngham-spp-explained.md
The objective of this task was to understand the fundamentals of FreeRTOS and how embedded applications are divided into independent concurrent tasks.
These concepts are required before implementing the packet handling system.
- What is an RTOS?
- Bare-metal vs RTOS
- FreeRTOS architecture
- Task creation
- Scheduler
- Task priorities
- Context switching
- Delays (
vTaskDelay) - Queues
- Semaphores
- Mutexes
- Memory management
- Software timers
After completing this task I understood:
- How FreeRTOS schedules multiple tasks.
- Why tasks execute independently.
- How queues enable communication between tasks.
- How synchronization primitives protect shared resources.
- Why FreeRTOS is widely used in embedded systems and CubeSat software.
FreeRTOS/
├── Lesson 1
├── Lesson 2
└── Lesson 3
The objective of this task was to understand how payload data can be prepared for transmission using multiple FreeRTOS tasks.
The implementation focuses on reading payload data, fragmenting it into packets, maintaining transmission order, and preparing packets for NGHam encoding.
Payload Memory
│
▼
Memory Reader Task
│
▼
Fragmentation Task
│
▼
Packet Builder
│
▼
FIFO Queue
│
▼
NGHam Encoder Task
│
▼
Radio Driver
│
▼
Transmission
Large payloads cannot always fit inside a single transmission packet.
Each packet fragment contains:
- Payload data
- Sequence number
- Occultation ID
- Payload size
- Additional packet metadata
These fields allow the receiver to correctly reconstruct the complete payload after transmission.
Responsibilities:
- Simulate payload memory
- Read payload data
- Divide large payloads into fixed-size chunks
Responsibilities:
- Receive fragmented packets
- Store packets in transmission order
- Deliver packets to the encoder
Responsibilities:
- Receive packets from the queue
- Create NGHam payloads
- Apply CRC
- Apply Reed-Solomon FEC
- Scramble packets
- Generate complete NGHam frames
These frames are then ready for transmission by the radio.
The implementation will initially simulate payload memory on a microcontroller.
Simulation workflow:
- Store sample payload data.
- Read data from simulated memory.
- Fragment payload into packets.
- Push packets into a FreeRTOS queue.
- Build NGHam frames.
- Output generated packets for testing.
This task demonstrated how a communication pipeline can be divided into multiple FreeRTOS tasks.
The use of queues provides:
- Ordered packet transmission
- Modular software design
- Independent processing stages
- Scalable architecture suitable for CubeSat firmware
FreeRTOS/
├── Lesson 1
├── Lesson 2
FreeRTOS practical/
├── Task 1
updating soon
| Phase | Topic | Duration | Timeline | Deliverables / Goals | Status |
|---|---|---|---|---|---|
| 1 | PyNGHam Documentation & Repository | 1 Week | 15 Jun – 22 Jun | - Study PyNGHam documentation - Explore GitHub repository - Practical implementation - Complete 3 implementation tasks |
✅ Completed |
| 2 | FreeRTOS Documentation | 1 Week | 25 Jun – 2 Jul | - Learn FreeRTOS fundamentals - Understand task scheduling, queues, semaphores, and synchronization |
✅ Completed |
| 3 | TT&C Firmware Repository | ~1 Week | 2 Jul – 10 Jul | - Study Queue implementation examples - Study NGHam implementation - Analyze FreeRTOS task architecture - Complete 3 implementation tasks |
✅ Completed |
| 4 | Housekeeping Data | ~1 Week | 20 Jul – 27 Jul | - Study telementaroy data(ttc) implementation examples - Perform task to continous display data |
Working On... Pending... |
- FreeRTOS Documentation
- PyNGHam Documentation
- PyNGHam GitHub Repository
- Original NGHam Protocol Repository
- TT&C Firmware Repository (for queue and NGHam implementation examples)
The next stage of the project will focus on implementing the packet handling pipeline on an MCU using FreeRTOS, including:
- Simulated payload memory
- Payload fragmentation
- FIFO queue implementation
- NGHam packet generation
- End-to-end packet transmission simulation
