Skip to content

Commit 7a21f89

Browse files
committed
Merge branch 'master' into ms-arm-flex6k-nomerge
2 parents aebc31a + c6eff7b commit 7a21f89

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1335
-8505
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Also included:
88
+ APIs for raw and Ethernet packet data over radio [README_data](README_data.md)
99
+ High performance coherent OFDM modem for HF channels [README_ofdm](README_ofdm.md)
1010
+ High performance non-coherent FSK modem [README_fsk](README_fsk.md)
11-
+ An STM32 embedded version of FreeDV 1600/700D for the [SM1000](stm32/README.md)
11+
+ An STM32 embedded version of FreeDV 1600/700D/700E for the [SM1000](stm32/README.md)
1212
+ Coherent PSK modem [README_cohpsk](README_cohpsk.md) for HF channels
1313
+ FDMDV DPSK modem [README_fdmdv](README_fdmdv.md) for HF channels
1414

README_freedv.md

Lines changed: 55 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,41 @@ This document gives an overview of the technology inside FreeDV, and some additi
1010

1111
![FreeDV mode knob](http://www.rowetel.com/images/codec2/mode_dv.jpg)
1212

13-
## Reading Further
13+
## FreeDV API
1414

15-
1. [FreeDV web site](http://freedv.org)
16-
1. [FreeDV GUI User Manual](https://github.com/drowe67/freedv-gui/blob/master/USER_MANUAL.md)
17-
1. [Codec 2](http://rowetel.com/codec2.html)
18-
1. FreeDV can also be used for data [README_data](https://github.com/drowe67/codec2/blob/master/README_data.md)
19-
1. [FreeDV 1600 specification](https://freedv.org/freedv-specification)
20-
1. [FreeDV 700C blog post](http://www.rowetel.com/wordpress/?p=5456)
21-
1. [FreeDV 700D Released blog post](http://www.rowetel.com/wordpress/?p=6103)
22-
1. [FreeDV 2020 blog post](http://www.rowetel.com/wordpress/?p=6747)
23-
1. [FreeDV 2400A blog post](http://www.rowetel.com/?p=5119)
24-
1. [FreeDV 2400A & 2400B](http://www.rowetel.com/?p=5219)
25-
1. Technical information on various modem waveforms in the [modem codec frame design spreadsheet](https://github.com/drowe67/codec2/blob/master/doc/modem_codec_frame_design.ods)
26-
1. [Modems for HF Digital Voice Part 1](http://www.rowetel.com/wordpress/?p=5420)
27-
1. [Modems for HF Digital Voice Part 2](http://www.rowetel.com/wordpress/?p=5448)
28-
1. [FDMDV modem README](README_fdmdv.md)
29-
1. [OFDM modem README](README_ofdm.md)
30-
1. Many blog posts in the [rowetel.com blog archives](http://www.rowetel.com/?page_id=6172)
15+
The general programming model is:
16+
```
17+
speech samples -> FreeDV encode -> modulated samples (send over radio) -> FreeDV decode -> speech samples
18+
```
19+
20+
The `codec2/demo` directory provides simple FreeDV API demo programs written in C and Python to help you get started, for example:
21+
22+
```
23+
cd codec2/build_linux
24+
cat ../raw/ve9qrp_10s.raw | ./demo/freedv_700d_tx | ./demo/freedv_700d_rx | aplay -f S16_LE
25+
```
26+
27+
The current demo programs are as follows:
28+
29+
| Program | Description |
30+
| --- | --- |
31+
| [c2demo.c](demo/c2demo.c) | Encode and decode speech with Codec 2 |
32+
| [freedv_700d_tx.c](demo/freedv_700d_tx.c) | Transmit a voice signal using the FreeDV API |
33+
| [freedv_700d_rx.c](demo/freedv_700d_rx.c) | Receive a voice signal using the FreeDV API |
34+
| [freedv_700d_rx.py](demo/freedv_700d_rx.py) | Receive a voice signal using the FreeDV API in Python |
35+
| [freedv_datac1_tx.c](demo/freedv_datac1_tx.c) | Transmit raw data frames using the FreeDV API |
36+
| [freedv_datac1_rx.c](demo/freedv_datac1_rx.c) | Receive raw data frames using the FreeDV API |
37+
38+
So also [freedv_api.h](src/freedv_api.h) and [freedv_api.c](src/freedv_api.c) for the full list of API functions. Only a small set of these functions are needed for basic FreeDV use, please see the demo programs for minimal examples.
39+
40+
The full featured command line demo programs [freedv_tx.c](src/freedv_tx.c) & [freedv_rx.c](src/freedv_rx.c) demonstrate many features of the API:
41+
42+
```
43+
$ ./freedv_tx 1600 ../../raw/hts1.raw - | ./freedv_rx 1600 - - | aplay -f S16_LE
44+
$ cat freedv_rx_log.txt
45+
```
46+
47+
Speech samples are input to the API as 16 bit signed integers. Modulated samples can be in real 16 bit signed integer or complex float. The expected sample rates can be found with `freedv_get_speech_sample_rate()` and `freedv_get_modem_sample_rate()`. These are typically 8000 Hz but can vary depending on the current FreeDV mode.
3148

3249
## FreeDV HF Modes
3350

@@ -49,7 +66,7 @@ Notes:
4966

5067
1. *Multipath* is the relative resilience of the mode to multipath fading, the biggest problem digital voice faces on HF radio channels. Analog SSB would be rated as "good".
5168

52-
1. *Text* is a side channel for low bit rate text such as your location and call sign. It is generally unprotected by FEC, and encoded with varicode.
69+
1. *Text* is a side channel for low bit rate text such as your location and call sign. It is generally unprotected by FEC, and encoded with varicode. The exception is if reliable_text support is turned on (see reliable_text.c/h); this results in text protected by LDPC(112,56) FEC with interleaving.
5370

5471
1. *SNR Min* is for an AWGN channel (no multipath/fading).
5572

@@ -80,19 +97,6 @@ These modes use constant amplitude modulation like FSK or FM, and are designed f
8097

8198
The FSK_LDPC mode is used for data, and has user defined bit rate and a variety of LDPC codes available. It is discussed in [README_data](README_data.md)
8299

83-
## FreeDV API
84-
85-
The `codec2/demo` directory provides simple FreeDV API demo programs written in C and Python to help you get started, for example:
86-
```
87-
cd codec2/build_linux
88-
cat ../raw/ve9qrp_10s.raw | ./demo/freedv_700d_tx | ./demo/freedv_700d_rx | aplay -f S16_LE
89-
```
90-
91-
See also [freedv_api.h](src/freedv_api.h) and [freedv_api.c](src/freedv_api.c), and the full featured command line demo programs [freedv_tx.c](src/freedv_tx.c) & [freedv_rx.c](src/freedv_rx.c):
92-
```
93-
$ ./freedv_tx 1600 ../../raw/hts1.raw - | ./freedv_rx 1600 - - | aplay -f S16_LE
94-
$ cat freedv_rx_log.txt
95-
```
96100
## FreeDV 2400A and 2400B modes
97101

98102
FreeDV 2400A and FreeDV 2400B are modes designed for VHF radio. FreeDV 2400A is designed for SDR radios (it has a 5 kHz RF bandwidth), however FreeDV 2400B is designed to pass through commodity FM radios.
@@ -189,3 +193,23 @@ $ ./src/freedv_tx 700D ../raw/ve9qrp.raw - --clip 0 --testframes | ./src/cohpsk_
189193
```
190194

191195
Adjust `--clip [0|1]` and 3rd argument of `cohpsk_ch` to obtain a PER of just less than 0.1, and note the SNR and PAPR reported by `cohpsk_ch`. The use of the `ve9qrp` samples makes the test run for a few minutes, in order to get reasonable multipath channel results.
196+
197+
## Reading Further
198+
199+
1. [FreeDV web site](http://freedv.org)
200+
1. [FreeDV GUI User Manual](https://github.com/drowe67/freedv-gui/blob/master/USER_MANUAL.md)
201+
1. [Codec 2](http://rowetel.com/codec2.html)
202+
1. FreeDV can also be used for data [README_data](https://github.com/drowe67/codec2/blob/master/README_data.md)
203+
1. [FreeDV 1600 specification](https://freedv.org/freedv-specification)
204+
1. [FreeDV 700C blog post](http://www.rowetel.com/wordpress/?p=5456)
205+
1. [FreeDV 700D Released blog post](http://www.rowetel.com/wordpress/?p=6103)
206+
1. [FreeDV 2020 blog post](http://www.rowetel.com/wordpress/?p=6747)
207+
1. [FreeDV 2400A blog post](http://www.rowetel.com/?p=5119)
208+
1. [FreeDV 2400A & 2400B](http://www.rowetel.com/?p=5219)
209+
1. Technical information on various modem waveforms in the [modem codec frame design spreadsheet](https://github.com/drowe67/codec2/blob/master/doc/modem_codec_frame_design.ods)
210+
1. [Modems for HF Digital Voice Part 1](http://www.rowetel.com/wordpress/?p=5420)
211+
1. [Modems for HF Digital Voice Part 2](http://www.rowetel.com/wordpress/?p=5448)
212+
1. [FDMDV modem README](README_fdmdv.md)
213+
1. [OFDM modem README](README_ofdm.md)
214+
1. Many blog posts in the [rowetel.com blog archives](http://www.rowetel.com/?page_id=6172)
215+

demo/freedv_700d_rx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
AUTHOR......: David Rowe
55
DATE CREATED: April 2021
66
7-
Demo receive program for FreeDV API 700D mode, see freedv_700d_tx.c for
7+
Demo receive program for FreeDV API (700D mode), see freedv_700d_tx.c for
88
instructions.
99
1010
\*---------------------------------------------------------------------------*/

demo/freedv_700d_tx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
AUTHOR......: David Rowe
55
DATE CREATED: April 2021
66
7-
Demo transmit program for FreeDV API 700D functions.
7+
Demo transmit program using the FreeDV API (700D mode).
88
99
usage:
1010

misc/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,8 @@ target_link_libraries(timpulse m)
2828
add_executable(vq_mbest vq_mbest.c)
2929
target_link_libraries(vq_mbest codec2)
3030

31+
add_executable(vq_binary_switch vq_binary_switch.c)
32+
target_link_libraries(vq_binary_switch m)
33+
3134
add_executable(pre pre.c)
3235
target_link_libraries(pre codec2)

0 commit comments

Comments
 (0)