blob: 976947cb1fc10e04dde8b61578f8c1a599ba0911 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
# T-Modem-s1224 — Pico USB KISS half-TNC + softmodem
**AS-IS** · GPLv3 (repo `LICENSE`) · no support, no warranty · **v1.0-prototype**.
**Three** UF2 images for Raspberry Pi Pico (RP2040). Softmodem does air AFSK; Pico is **USB KISS half-TNC** (HDLC) plus display / PTT / sense. **No** TCM3105 chip path.
| Owns | Does **not** |
|------|----------------|
| HDLC TX/RX (flags, bit-stuff, FCS-CCITT) | Chip bitbang / TCM3105 TXD-RXD |
| Soft AFSK: PWM TX (GP6) · Goertzel RX (GP26 ADC) | Runtime baud switch |
| USB CDC: KISS `0xC0` + ASCII service | XTAL-rate crystal steering |
| Auto PTT GP9 during KISS TX · `PTT ON`/`OFF` | Modem IC / socket |
| Display / INI texts · carrier sense · fixed boot banner | INI/CDC boot-banner toggle |
## Tone profiles
| `-DS1224_BITRATE=` | UF2 | Mark / Space Hz |
|--------------------|-----|-----------------|
| `300` | `s1224-300.uf2` | 1600 / 1800 |
| `1200` (default) | `s1224-1200.uf2` | 1200 / 2200 (Bell 202) |
| `2400` | `s1224-2400.uf2` | ~1775 / 3250 (c1224 Y2-class) |
## Build
Requires [Pico SDK](https://github.com/raspberrypi/pico-sdk) and `arm-none-eabi-gcc`.
```bash
export PICO_SDK_PATH=/path/to/pico-sdk # e.g. T-Modem-c1224/.deps/pico-sdk
cd firmware/s1224
mkdir -p build && cd build
cmake .. -DS1224_BITRATE=1200 # or 300 / 2400
make -j$(nproc)
# → s1224-1200.uf2 s1224-1200.elf
```
Rebuild separately for each bitrate (clean build dir or out-of-tree dirs recommended).
### Flash
1. Hold **BOOTSEL**, plug USB (board power = **12 V** barrel).
2. Copy `s1224-*.uf2` to RPI-RP2 (or `picotool load -f …`).
3. Host opens `/dev/ttyACM*` (USB CDC).
## Any KISS terminal (standalone — no MAX25)
**MAX25-Stack is not required.** **All terminals should work insofar as applicable** — flash UF2 → plug USB → open `/dev/ttyACM*` → KISS `0xC0` or ASCII `HELP`.
| Step | Detail |
|------|--------|
| Device | `/dev/ttyACM*` |
| Framing | Raw **8N1** · binary **KISS** (`0xC0` … `0xC0`) · DATA cmd `0x00` |
| Boot | Fixed source banner **always** once · `quiet=1` damps extra STATUS/CONFIG ASCII only |
## Pins
| GPIO / rail | Role |
|-------------|------|
| GP0 / GP1 | I2C LCD |
| GP6 | **AF_TX** — PWM AFSK out (bypass DNI modem footprint) |
| GP26 | **AF_RX** — ADC0 soft demod in |
| GP7 / GP8 | Legacy chip pads — leave open on softmodem boards |
| GP9 | **PTT** (auto on TX + manual CDC) |
| GP10–12 | Optional LEDs |
| — | LED_PWR on **5 V rail** |
## Boot banner
Fixed source text in `src/common/banner.c` / `include/version.h`. **Always** printed once after USB CDC ready.
## USB CDC ASCII
| Command | Effect |
|---------|--------|
| `HELP` | Command list |
| `STATUS` | state, PTT, signal, packet, carrier, bitrate |
| `ID` | `device_id` / `callsign` / bitrate / quiet |
| `PTT ON` / `PTT OFF` | Key GP9 |
| `QUIET ON` / `OFF` | Suppress extra unsolicited CDC ASCII |
| `INI` / `GET` / `SET` / `SAVE` / `RELOAD` / `DEFAULTS` | Config |
**`SAVE`:** writes a config **blob** into the **last 4 KiB** of Pico flash — **not** a filesystem.
## INI (`[terminal]`)
| Key | Default | Role |
|-----|---------|------|
| `callsign` | empty | Operator call / station string for `ID` |
| `device_id` | `s1224` | Short device mark |
| `quiet` | `1` | Suppress extra unsolicited CDC ASCII (not boot banner) |
See [`share/s1224.ini.example`](../../share/s1224.ini.example).
## Rate
Firmware does not switch baud at runtime. Flash the UF2 that matches the intended tone profile.
|