目录
Ken Chan

Uplink an LLM prompt in one frame with a 256-byte field

Replace the six-chunk PR/PR?/PRX prompt protocol with a single telecommand:

"KO6IKZ <AUTH> PROMPT " + field[256]

The field is the prompt as printable ASCII, NUL-padded to exactly 256 bytes. A valid PROMPT starts an inference on arrival and is acknowledged “PROMPT B h=“ so the ground can confirm what was received. Bad fields are NAKed with the reason (len=, char@, pad@, empty); a repeat while the same run is pending is ACKed “dup” instead of queuing a second run, and a different prompt while the payload is busy is NAKed “busy”. RUN with no argument now means the next library prompt. JETSON_PROMPT_MAX and the daemon’s cap go from 240 to 256.

A ~280 B frame needs two radio changes (task_si4463.c):

  • a 2-byte big-endian length field (PKT_LEN 0x3A, per AN625), FIELD_2 max raised to SI4463_RX_MAX_PAYLOAD = 300;
  • draining the 64 B RX FIFO while the frame arrives. nIRQ is now raised on PREAMBLE/SYNC_DETECT while listening, and the 400 ms poll that sees one stays with the frame until PACKET_RX/CRC_ERROR (<= ~0.9 s, timed in Salvo ticks). The ground preamble must outlast the poll period, so pluto_tx.py now sends 768 B (640 ms). A frame is only accepted if exactly 2 + length bytes came out of the FIFO.

Also fixes two receive bugs:

  • SI4463_PH_PEND_CRC_ERROR was 0x20 (PACKET_SENT); CRC_ERROR is bit 3, 0x08. A corrupt frame was taken for a modem-only event and the radio stayed parked in READY, deaf until the next listening window.
  • The uplink FIELD_2_CRC_CONFIG was 0xA2, restarting the CRC after the length byte, while every ground builder CRCs length + payload. Now 0x2A (no restart, CHECK_CRC).

Uplink log lines are bounded (%.80s / %.40s) now that a frame can exceed the 160 B strTmp. The bench ‘n’ command injects a full PROMPT frame.

ground-station/pluto_tx.py gains –prompt/–prompt-file/–cmd (sent N times, then TX stops), –len-bytes 1 for the ESP32 bench radio, and –selftest. Docs updated to match.

Verified on the host: the real task_si4463.c against a timed Si4463 model (9600 bps, 64 B FIFO, preamble/sync IRQs) receives the PROMPT frame intact at all 80 poll phases with up to 150 ms of jitter and rejects corrupt, noise-preamble and 1-byte-length frames; the real dispatcher passes every ACK/NAK case and its ACK hash matches pluto_tx.py’s. Not yet built with XC16 or flashed.

2个月前10次提交

KENSAT — Edge-AI Compute in Orbit

A 2U CubeSat that runs a large language model on-orbit. A power-gated NVIDIA Jetson Orin Nano executes neural-network inference in space, and the results are downlinked over a custom UHF radio link to amateur ground stations.

The assembled KENSAT 2U CubeSat on the bench — Pumpkin chassis with body-mounted solar panels and a Remove-Before-Flight tag

KENSAT’s mission is to demonstrate autonomous AI compute on a small satellite — taking a GPU-class accelerator and a quantized LLM out of the data center and running them inside the tight power, thermal, and reliability envelope of a 2U CubeSat. The on-board computer wakes the Jetson only when needed, runs an inference within a measured energy budget, and frames the output for downlink. Everything else in the spacecraft — the flight software, the UHF radio and its RF matching networks, the power system, and the antenna-deployment hardware — exists to get that compute on orbit, keep it alive, and get its results to the ground.

Why it’s hard. Edge AI in orbit means treating a multi-watt accelerator as a scheduled, fault-tolerant load: powering it from a battery-backed bus only in defined windows, dissipating its heat passively in vacuum, recovering it if it hangs, and surviving the brownouts and resets that come with switching that much current on a small satellite. KENSAT is built end to end around that problem.

Mission profile: a 520 km sun-synchronous orbit, operating UHF amateur radio at 437.08 MHz for beaconing, telemetry downlink, and command uplink. Telemetry — including downlinked inference results — is intentionally unencrypted so amateur operators worldwide can receive and decode it.


KENSAT beacons openly on the UHF amateur band — no encryption, no keys. Anyone with a 70 cm receiver and a G3RUH-capable TNC (Direwolf, gr-satellites, SatNOGS) can decode it.

Beacon / downlink frequency 437.080 MHz
Transmitter Mode U — GFSK 1k2 AX.25 G3RUH
Modulation GFSK
Baud 1200
Framing AX.25 UI, NRZI + G3RUH
Source callsign KO6IKZ
Beacon interval ~10 s
Status active
Encryption none — telemetry is open by design

Everything in the info field is plain ASCII. Frames are identified by their first token:

Frame Carries
BCN Housekeeping beacon: cumulative sequence number, boot count, reset cause, uptime, body rates, uplink frames received
LLM One per on-orbit inference: Jetson temperatures and peaks, power, RAM, model-load and inference times, result CRC-32, and how many text frames to expect
TXT The text the on-board LLM generated, as numbered chunks — s= result, c=<k>/<m> chunk, h= CRC-32 of the whole result
ACK Acknowledgement of a received telecommand

A result is sent one chunk per beacon cycle and the whole set twice, because the link has no ARQ. To reassemble: group by s=, order by c=, concatenate, and check h= (standard CRC-32). ground-station/llm_downlink.py does this for you, from live decoder output or a saved log.

Command uplink is a short authenticated ASCII telecommand (Si4463 native framing, CRC-16) that can inhibit the transmitter, ping the spacecraft, uplink a prompt of up to 256 characters for the LLM in a single frame (which starts the inference), or run a library prompt. Formats, verbs and the reasoning behind them are in firmware/obc/README.md.

Decoders, the result reassembler and an end-to-end test harness live in ground-station.


System at a glance

        ┌──────────────────────────────────────────────┐
        │  Burn-Wire Board (custom)                     │  Slot 4 (top)
        │  Antenna-release driver · resistive heating   │
        ├──────────────────────────────────────────────┤
        │  Radio Board (custom)                         │  Slot 3
        │  Si4463 UHF transceiver + AS179 T/R switch    │
        │  Jetson Orin Nano (edge-AI payload)           │
        ├──────────────────────────────────────────────┤
        │  EPS Board (custom)                           │  Slot 2
        │  2S2P 18650 pack · rails · hardware watchdog  │
        ├──────────────────────────────────────────────┤
        │  Pumpkin MB + PPM D1 (PIC24FJ256GB210)        │  Slot 1 (bottom)
        │  OBC — always-on C&DH, Salvo RTOS             │
        └──────────────────────────────────────────────┘
              104-pin CubeSat Kit Bus (H1/H2)

   UHF dipole ── U.FL ── matching network ── AS179 ── Si4463 ── SPI ── PIC24

Boards interconnect over the 104-pin CubeSat Kit Bus. The PIC24 is the always-on flight computer; it talks to the EPS over I²C, drives the Si4463 radio over SPI, controls and exchanges data with the Jetson over UART, and fires the antenna-deployment burn wires over GPIO.

See docs/system-architecture.md for the full spec: pinouts, bus map, operational modes, deployment state machine, power budget, and thermal analysis.


Subsystems

Subsystem What it is Highlights
firmware/obc PIC24 flight software (C, Salvo RTOS) Fault-tolerant antenna deployment with flash-persisted state, AX.25 beacons, Si4463 driver, IMU, SD/serial-flash logging, command parser
radio Custom 437 MHz UHF radio board Si4463 + AS179 T/R switch, ESP32-S3 firmware, KiCad 2-layer design
radio/rf-design RF matching-network design & test Custom scikit-rf optimizer over LCSC-stocked parts, CPWG parasitic modeling, ADALM-Pluto SDR test bench
eps Electrical power system board 2S2P 18650 pack, regulated rails, hardware watchdog (KiCad)
burnwire Antenna-release deployment board Redundant nichrome burn-wire driver (KiCad)
jetson Edge-AI payload Jetson Orin Nano running a quantized LLM (llama.cpp/TinyLlama) over UART, systemd daemons, thermal management
ground-station SDR ground station & decoders ADALM-Pluto RX/TX, AX.25 beacon decoder, DSP diagnostics, end-to-end test harness
docs System documentation Architecture spec, radio guide, Jetson startup, debug notes

Engineering highlights

  • An LLM running in orbit. The payload is an NVIDIA Jetson Orin Nano running a quantized TinyLlama model under llama.cpp. The always-on PIC24 keeps it powered down, then — on schedule or command — switches on its rail through a high-side load switch, waits for the Jetson to boot and signal READY over UART, dispatches a prompt, collects the generated text, powers the Jetson back off, and queues the result for downlink. The whole cycle is bounded by a measured per-inference energy budget so a single run can’t drain the pack. Prompts come either from a library pre-loaded on the payload — so the mission produces results with no uplink at all — or from the ground, uplinked as a single 256-byte prompt field that the OBC runs as soon as it arrives. (docs/system-architecture.md §6.2, jetson/)

  • Treating a GPU as a spacecraft load. Running multi-watt edge compute on a 2U bus is a systems problem: the EPS sizes a battery-backed rail and a hardware watchdog around the Jetson’s draw, the OBC power-gates it and can recover a hung payload by cutting power, and the design accounts for dissipating its heat passively in vacuum, where there’s no convection. (docs/system-architecture.md §8.1)

  • Fault-tolerant by construction. Both the inference cycle and the antenna burn-wire release are one-shot, flash-persisted state machines that survive the brownouts and resets that come with switching large currents: attempt counts are written before energizing, success flags only after completion, and the RF-silence hold fails safe toward staying quiet. (details)

  • A complete UHF link to get results down. TX / RX / antenna matching networks were designed with a custom scikit-rf grid-search optimizer that models PCB traces as CPWG transmission lines (elliptic-integral method) and snaps to real LCSC part values, then validated on an ADALM-Pluto SDR loopback bench (gain sweep, harmonics, insertion loss). Inference output is framed as AX.25 and downlinked openly. (radio/rf-design)

  • Signal-integrity-aware bus design. The Si4463 SPI bus crosses two board-to-board connectors; the design derates the clock and adds series termination accordingly. (docs/spi-debug-notes.md)


Repository layout

kensat/
├── docs/             System architecture spec + guides
├── firmware/obc/     PIC24 flight software (app/ + bsp/)
├── radio/            UHF radio: ESP32 firmware, KiCad board, RF design
├── eps/              Electrical power system board (KiCad)
├── burnwire/         Antenna deployment board (KiCad)
├── jetson/           Edge-AI payload daemon + systemd units
└── ground-station/   SDR scripts, beacon decoder, diagnostics

Building

  • OBC firmware depends on proprietary vendor SDKs (Pumpkin CubeSat Kit BSP, Salvo RTOS) that are not redistributed here. See firmware/obc/BUILD.md.
  • Radio firmware builds with arduino-cli for the ESP32-S3.
  • RF design / ground-station tools are Python; see the requirements.txt in each directory.

License

Original work in this repository is released under the MIT License. Proprietary vendor SDKs the firmware builds against are not included and are not covered by that license — see the LICENSE file and firmware/obc/BUILD.md.


KENSAT — UHF amateur satellite, 437.08 MHz. Telemetry is open and unencrypted by design, in the tradition of the amateur radio community.

关于

2U 立方星在轨运行大语言模型(Jetson Orin Nano),星上智能代表项目,验证边缘 GPU 星上运行 LLM 的可行性。镜像收录自 https://github.com/kenchangh/kensat,License:MIT

5.2 MB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802047560号