Skip to content

Commit 71ab5b0

Browse files
turnryesilseva
authored andcommitted
dev: linux: add docs explaining how to use the linux target
Add a dedicated linux page behind the developers guide that reminds devs to use linux for UI testing and informs them about the presence of the file source. Signed-off-by: Ryan Turner <ryan@turnrye.com>
1 parent 8b1ddd9 commit 71ab5b0

2 files changed

Lines changed: 42 additions & 0 deletions

File tree

developers_guide.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
* [Compilation instructions](compiling.md)
44
* [Writing and running test suites](tests.md)
5+
* [Validating changes using the Linux platform](linux.md)
56
* [Software documentation](software.md)
67
* [Notes on handling of non-native digital modes](software_modes.md)
78
* [Code style guidelines](coding_style.md)

linux.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Testing on Linux
2+
3+
While it poses limited to no utility for users, the Linux build may be very helpful for developers.
4+
5+
## User interface testing
6+
7+
The `openrtx_linux` and `openrtx_linux_mod17` targets may be used to validate changes to the UI without having to have a physical device present.
8+
9+
## Testing Software-Decoded Baseband
10+
11+
The Linux build can demodulate a pre-recorded baseband file, which is useful for testing the receive path end-to-end without RF hardware.
12+
13+
### Sample baseband files
14+
15+
The `tests/unit/assets` directory contains the following baseband recordings:
16+
17+
| File | Use |
18+
|----------------------------|-----------------------------------------|
19+
| `M17_test_baseband.raw` | Runtime demodulation; src callsign only |
20+
| `M17_test_baseband_dc.raw` | Runtime demodulation; src callsign only |
21+
22+
23+
### Demodulating a raw baseband file with OpenRTX Linux
24+
25+
The Linux build uses a file source driver that reads, on loop, a raw 16-bit, little-endian, mono, 24 kHz file from `/tmp/baseband.raw`. Simply place the sample file in this location and launch the application in order for it to demodulate. Note that since the linux build has no audio driver, it is not expected that received audio can be heard.
26+
27+
```bash
28+
# Copy the sample to the path the file-source driver reads from:
29+
cp tests/unit/assets/M17_test_baseband.raw /tmp/baseband.raw
30+
# Build
31+
meson setup build_linux
32+
meson compile -C build_linux openrtx_linux
33+
# Launch
34+
./build_linux/openrtx_linux
35+
```
36+
37+
In this example, a receive screen with callsign OPNRTX is expected.
38+
39+
### Going Further
40+
41+
In theory, you could create a named pipe at `/tmp/baseband.raw` and write to it useing GNU Radio. Something like a source, with resampling to 24kHz if required, then float to short, then a file sink should work.

0 commit comments

Comments
 (0)