blob: 9c36e21bb6e1932bc2a990889bb8454ec6dd4f01 (
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
|
# CRDOP hardware interface specification
Generic specification for builders who manufacture **radio ↔ sound-card interfaces** for CRDOP (MAX25-SoftModem). **No product-specific wiring examples** — apply these rules to your own design.
**CRDOP** = **MAX25-SoftModem**. Project rule: [docs/CRDOP.md](../../../docs/CRDOP.md).
---
## Scope
CRDOP connects a host sound card to a transceiver via one of:
| Path | Typical use | Max practical baud |
|------|-------------|-------------------|
| **Audio AFSK** | Mic IN / speaker OUT / line level | **1200** (P0) |
| **Direct FSK** | Varactor TX + FM discriminator RX | **9600–19200** (P1) |
| **SSB audio** | USB/LSB suppressed carrier | **300** (P2 optional) |
| **Acoustic coupling** | Speaker ↔ microphone (test / field) | **1200** |
RF path matrix and delivery milestones: [ROADMAP.md](../ROADMAP.md).
---
## Audio levels
### Line level (preferred)
| Signal | Typical level | Notes |
|--------|---------------|-------|
| **Playback → radio mic IN** | −20 to −10 dBV (adjust per rig sensitivity) | Use potentiometer or fixed attenuator; verify with sniffer or oscilloscope |
| **Radio speaker/line → capture** | 0.1–1.0 V RMS typical | Attenuate hot speaker outputs before codec input |
| **Full-scale digital** | Avoid clipping on TX and RX | Leave 6–12 dB headroom |
### Mic level
Some transceivers expose mic-level inputs only. Attenuate line output to mic sensitivity (often 5–20 mV). Use coupling capacitor if DC bias is present on the mic jack.
### Isolation
| Method | Purpose |
|--------|---------|
| **Audio transformer** (1:1 or step-down) | Galvanic isolation; breaks ground loops |
| **Opto-isolator** (digital PTT path) | Isolate PTT from radio ground |
| **Separate ground reference** | Star ground at interface PCB; one tie point to radio chassis if required |
**Ground loops** cause hum, false transitions, and decode failures. Always isolate PC USB ground from radio chassis when using direct cable coupling.
---
## PTT control
CRDOP is **half-duplex by default**. The host must key the transmitter before playback and unkey after tail.
| Method | Interface | Caveats |
|--------|-----------|---------|
| **GPIO** | USB-serial RTS/DTR, parallel port, dedicated GPIO | Cleanest; software-controlled timing |
| **Serial CAT** | Radio command port | Latency depends on radio firmware |
| **VOX** | Audio-derived keying | **Not recommended** for packet — tail timing unpredictable; false keys from noise |
| **Manual** | Operator PTT | Acceptable for bench only |
### Timing parameters
Configure in `crdop.ini` / `max25d.ini`:
| Parameter | Typical half-duplex | Full-duplex |
|-----------|--------------------|-------------|
| Pre-TX delay (`extra_delay_ms`) | 80–200 ms | 0 |
| TXTAIL | Match radio requirement | N/A |
| PTT release | After last space tone + margin | N/A |
**Rule:** explicit GPIO/serial PTT beats VOX for AX.25 UI bursts.
---
## Acoustic coupling
Valid for **bench validation** and some field setups:
```
[Host speaker] ──air gap──► [Radio mic]
[Radio speaker] ──air gap──► [Host mic]
```
| Principle | Detail |
|-----------|--------|
| **Distance** | Minimize path loss; foam gasket reduces room noise |
| **Frequency response** | FM voice channel ≈ 3 kHz — sufficient for 1200/2200 Hz Bell 202 |
| **Level** | Low volume on playback; avoid speaker distortion |
| **Duplex** | Half-duplex only — acoustic feedback if TX and RX paths overlap |
| **Test** | Run `max25-signal-sniffer --loopback` on host before acoustic trial |
Acoustic coupling does **not** scale to G3RUH direct FSK (P1).
---
## Direct FSK path (P1 — G3RUH)
When audio AFSK is insufficient (9600–19200 baud):
| Element | Requirement |
|---------|-------------|
| **TX** | Discriminator input bypassed; varactor or dedicated FSK input on data port |
| **RX** | Flat FM discriminator output (de-emphasis off or compensated) |
| **Bandwidth** | ~20 kHz IF for 9600; wider for 19200 |
| **Scrambler** | G3RUH polynomial — implemented in future `lib/` module |
| **Radio** | Data-port capable; standard FM mic/speaker path **not** sufficient |
CB FM rigs at 27 MHz are generally **not** direct-FSK capable at 9600+ — P1 targets VHF/UHF amateur backbone paths.
---
## Sound card requirements
| Requirement | 1200 baud (P0) | 9600–19200 (P1) |
|-------------|----------------|-----------------|
| **Sample rate** | ≥ 48 kHz recommended | ≥ 48 kHz; 96 kHz preferred |
| **Bit depth** | 16-bit mono | 16-bit mono |
| **Duplex** | Full-duplex USB codec or half-duplex with PTT | Full-duplex, low jitter |
| **Clock** | Stable crystal; avoid drift during TX | Jitter < 50 ppm class |
| **Driver** | Kernel ALSA (`hw:` / `plughw:`) | Same |
| **Isolation** | Transformer on radio side | Same + verified loopback |
### Unsuitable interfaces
- Onboard laptop mic/speaker without external interface
- Bluetooth audio bridges
- PulseAudio / PipeWire virtual devices
- Consumer "USB sound sticks" without galvanic isolation
Configure devices in `crdop.ini`:
```ini
[audio]
backend = alsa-kernel
no_pulse = yes
capture = plughw:1,0
playback = plughw:1,0
sample_rate = 48000
```
Verify with:
```bash
max25-signal-sniffer --loopback
max25-signal-sniffer -D plughw:1,0 -t 2.0
```
---
## Compliance and operator responsibility
| Topic | Policy |
|-------|--------|
| **Transmit licence** | Operator must hold valid authorization for the band and mode |
| **CB (27 MHz EU)** | EN 300 433 / national rules — voice primary; data may be restricted or channel-specific |
| **Amateur bands** | Band plan, power limits, identification |
| **EMC** | Builder responsible for conducted/radiated emissions from interface hardware |
| **CRDOP software** | GPLv3 — no warranty; see [LICENSE-USAGE.md](LICENSE-USAGE.md) |
CRDOP documentation does **not** constitute legal advice. Check local regulations before on-air operation.
---
## Acceptance checklist (builder)
| Step | Pass criterion |
|------|----------------|
| Loopback | `max25-signal-sniffer --loopback` decodes test UI |
| Level | Mark/space tones within radio spec; no clipping |
| Isolation | No hum on decode when PC and radio share mains |
| PTT | Key before TX audio; clean tail; no truncation |
| On-air | AX.25 UI exchange with known-good peer at 1200 baud |
| Duplex | Half-duplex CSMA behaviour matches `persist` / `extra_delay` INI |
---
## Related in-repo docs
| Topic | Document |
|-------|----------|
| Sound-card requirements | [SOUNDCARD-QUALIFICATION.md](SOUNDCARD-QUALIFICATION.md) |
| Bell 202 / 1200 AFSK (P0) | [ROADMAP.md](../ROADMAP.md) · [SOFTMODEM.md](SOFTMODEM.md) |
| G3RUH 9600–19200 (P1) | [G3RUH-DESIGN.md](G3RUH-DESIGN.md) |
| AX.25 / packet context | [docs/PACKET-RADIO.md](../../../docs/PACKET-RADIO.md) |
---
## Related
| Doc | Topic |
|-----|--------|
| [AUDIO-ARCHITECTURE.md](AUDIO-ARCHITECTURE.md) | Kernel ALSA, sound-proxy |
| [MAX25-USAGE.md](MAX25-USAGE.md) | Stack integration and bench modes |
| [ROADMAP.md](../ROADMAP.md) | P0/P1/P2 phases |
|