The package contains a DSP lilbrary libdspfec.a and various utility programs for testing and demonstration purposes. The included Makefile will build the library and all executables.
- The reference implementation uses 48 ksps. For other sample rates the filter coefficients in nyquist.c must be reworked. It is therefore easier to resample to 48 ksps.
- The sample type is 16 bit linear PCM little-endian with range ±32767
libdspfec.a and dsfec.h
Top level applications
Complete encoder and modulator.
Takes arbitrary data stream as input (LSB first according to HDLC standard), applies CRC and FEC, and outputs modulated baseband.
- Input: 500 bps arbitrary data; becomes 1000 symbols/sec with FEC (Since it is R=1/2 FEC, the HDLC framing code and CRC are part of the 500bps, i.e. 6 bytes / packet)
- Output: 48 kHz 16-bit linear PCM little-endian
Complete demodulator and decoder.
- Input: 48 kHz 16-bit linear PCM little-endian
- Output: 500 bps data stream
The following will take the data from input.dat, and output 48 ksps baseband that can be sent to audio:
cat input.dat | ./mod > baseband.raw
The following will take the baseband data, demodulate and decode it:
can baseband.raw | ./demod > output.dat
We can also combine it into one command:
cat input.dat | ./mod | ./demod > output.dat
input.dat and output.dat should be identical.
In case the cat command is not useful, e.g. because we call demod from a GUI and use pipes to connect we can use:
./demod < input.pipe > output.pipe
input.pipe would be the pipe for raw samples from the receiver (connected to the output of an USB demodulator at 48ksps) and output.pipe will contain the demodulated data. The same trick can be sued with mod.
Generates morse code signal and adds it to the input signal. See manual page for details.
Generates Gaussian noise and adds it to the input signal. See manual page for details.
- dpsk.h line 58-61