glv2 / gmsk-transfer Goto Github PK
View Code? Open in Web Editor NEWSend or receive data by SDR using GMSK modulation
License: GNU General Public License v3.0
Send or receive data by SDR using GMSK modulation
License: GNU General Public License v3.0
gmsk-transfer ============= The active repository is at https://codeberg.org/glv/gmsk-transfer gmsk-transfer is a command-line program to send or receive data by software defined radio using the GMSK modulation. ## Usage gmsk-transfer [options] [filename] Options: -a Use audio samples instead of IQ samples. -b <bit rate> (default: 9600 b/s) Bit rate of the GMSK transmission. -c <ppm> (default: 0.0, can be negative) Correction for the radio clock. -d <filename> Dump a copy of the samples sent to or received from the radio. -e <fec[,fec]> (default: h128,none) Inner and outer forward error correction codes to use. -f <frequency> (default: 434000000 Hz) Frequency of the GMSK transmission. -g <gain> (default: 0) Gain of the radio transceiver, or audio gain in dB. -h This help. -i <id> (default: "") Transfer id (at most 4 bytes). When receiving, the frames with a different id will be ignored. -n <bt> (default: 0.5) Bandwidth-time parameter of the GMSK modulation. -o <offset> (default: 0 Hz, can be negative) Set the central frequency of the transceiver 'offset' Hz lower than the signal frequency to send or receive. -r <radio type> (default: "") Radio to use. -s <sample rate> (default: 2000000 S/s) Sample rate to use. -T <timeout> (default: 0 s) Number of seconds after which reception will be stopped if no frame has been received. A timeout of 0 means no timeout. -t Use transmit mode. -u <maximum deviation> (default: (bit rate / 100) Hz) Maximum allowable deviation of the center frequency of a received signal. If its deviation if greater, frames will probably not be detected. -v Print debug messages. -w <delay> (default: 0.0 s) Wait a little before switching the radio off. This can be useful if the hardware needs some time to send the last samples it has buffered. By default the program is in 'receive' mode. Use the '-t' option to use the 'transmit' mode. In 'receive' mode, the samples are received from the radio, and the decoded data is written either to 'filename' if it is specified, or to standard output. In 'transmit' mode, the data to send is read either from 'filename' if it is specified, or from standard input, and the samples are sent to the radio. Instead of a real radio transceiver, the 'io' radio type uses standard input in 'receive' mode, and standard output in 'transmit' mode. The 'file=path-to-file' radio type reads/writes the samples from/to 'path-to-file'. The IQ samples must be in 'complex float' format (32 bits for the real part, 32 bits for the imaginary part). The audio samples must be in 'signed integer' format (16 bits). The gain parameter can be specified either as an integer to set a global gain, or as a series of keys and values to set specific gains (for example 'LNA=32,VGA=20'). When using the audio mode (with the '-a' option), the gain value in dB is applied to the audio samples. ## Compilation gmsk-transfer requires the following dependencies: - libliquid (https://github.com/jgaeddert/liquid-dsp) - libSoapySDR (https://github.com/pothosware/SoapySDR) It can be compiled with the usual: ./autogen.sh ./configure make ## Supported radios gmsk-transfer uses the SoapySDR API, therefore if your radio is supported by SoapySDR and you have the right driver installed, it should work. When used with the '-h' option to print the help message, gmsk-transfer will also list the radios that it has detected. ## Supported FEC codes The forward error correction codes that can be specified with the '-e' option are the codes that are supported by libliquid. These should always be available: - none - rep3: repeat(3) - rep5: repeat(5) - h74: Hamming(7,4) - h84: Hamming(8,4) - h128: Hamming(12,8) - g2412: Golay(24,12) - secded2216: SEC-DED(22,16) - secded3932: SEC-DED(39,32) - secded7264: SEC-DED(72,64) If your libliquid library has been compiled with support for the libfec library, the following codes should also be available: - v27: convolutional r1/2 K=7 - v29: convolutional r1/2 K=9 - v39: convolutional r1/3 K=9 - v615: convolutional r1/6 K=15 - v27p23: convolutional r2/3 K=7 (punctured) - v27p34: convolutional r3/4 K=7 (punctured) - v27p45: convolutional r4/5 K=7 (punctured) - v27p56: convolutional r5/6 K=7 (punctured) - v27p67: convolutional r6/7 K=7 (punctured) - v27p78: convolutional r7/8 K=7 (punctured) - v29p23: convolutional r2/3 K=9 (punctured) - v29p34: convolutional r3/4 K=9 (punctured) - v29p45: convolutional r4/5 K=9 (punctured) - v29p56: convolutional r5/6 K=9 (punctured) - v29p67: convolutional r6/7 K=9 (punctured) - v29p78: convolutional r7/8 K=9 (punctured) - rs8: Reed-Solomon, 223/255 ## Bandwidth The occupied bandwidth (99% power) of the generated signal is approximately (bit_rate * 0.7 * (1 + BT)) Hertz. ## Examples Send a file at 9600 b/s on 434 MHz using a HackRF: gmsk-transfer -t \ -r driver=hackrf \ -s 4000000 \ -f 434000000 \ -o 100000 \ -b 9600 \ -g 30 \ -w 1 \ input_file Receive a file at 9600 b/s on 434 MHz using a RTL-SDR: gmsk-transfer -r driver=rtlsdr \ -s 2000000 \ -f 434000000 \ -o 100000 \ -b 9600 \ -g 20 \ -T 30 \ output_file Generate audio samples for a 1200 b/s transmission centered at 1500 Hz and play them: gmsk-transfer -t \ -r file=/tmp/samples.s16 \ -a \ -s 48000 \ -f 1500 \ -b 1200 \ input_file aplay -f S16_LE -r 48000 -c 1 /tmp/samples.s16 Send a file at 16 kb/s using an audio cable: cat file.dat | gmsk-transfer -t -a -r io -s 48000 -f 12000 -b 16000 | aplay -q -f S16_LE -r 48000 -c 1 Receive a file at 16 kb/s using an audio cable: arecord -q -f S16_LE -r 48000 -c 1 | gmsk-transfer -a -r io -s 48000 -f 12000 -b 16000 -T 10 > file.dat ## Library You can add GMSK transfer support to your programs easily by using the 'libgmsk-transfer' library. The API is described in the 'gmsk-transfer.h' file. The 'echo-server' example program shows how to use the API to make a server receiving messages from clients and sending them back in reverse order. The 'full-duplex' example program shows how to use the API to make a full-duplex link using two devices. The 'full-duplex-ppp.sh' script shows how to make a PPP connection between two machines using the 'full-duplex' example program. The 'half-duplex.sh' script shows how to make a half-duplex link between two (not SDR) transceivers using audio, like a sound modem TNC.
Hello
What we need to support higher bit rates ( firstly in receiver side ) ?
The max bit rate I cloud reach ( I7 8th cpu ) is 700000 at reeciver side, because it use just one core , I have done a C profiling on the code to see the bottle nick
a small digging in liquid-dsp docs I have found this article and wish it can help :
benchmark_threaded.txt
also it is good to add run examples for real hardware test (commands and images ) .
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.