Giter Site home page Giter Site logo

quiet-lwip's Introduction

Quiet Modem Project logo

Build Status

Documentation

This library uses liquid SDR to transmit data through sound. This makes it suitable for sending data across a 3.5mm headphone jack or via speaker and mic. Quiet can build standalone binaries for encoding/decoding data via .wav files or for streaming through your soundcard via PortAudio. It can also be built as a library to be consumed by other C programs.

Build

With the dependencies installed, run ./bootstrap provided by this library, which will create a build directory and invoke cmake. If you would like to install it after building, do cd build && make install.

Profiles

The encoding and decoding processes are controlled by the profiles in quiet-profiles.json. Each profile contains a complete set of parameters such as modem type and error correction.

Cable

For cable transmission, use the cable- profiles. These will attempt to use nearly the full spectrum provided by your soundcard. As such, they contain many audible frequencies and should not be used on channels that could be heard by people.

Ultrasonic

The ultrasonic- profiles encode data through a very low bitrate, but the audio content lies above 16kHz, which should pass through audio equipment relatively well while being inaudible to the average person. This is a good option for sending data through a channel where you would prefer not to disrupt human listeners.

Dependencies

Acknowledgements

I'd like to thank the people who provided feedback and helped me with pull requests and advice on software

  • Joseph Gaeddert, for his excellent SDR library, encouragement, and feedback on all things DSP
  • Alon Zakai and @juj for advising me on emscripten and for taking my PRs
  • Jan-Ivar Bruaroey and Maire Reavy for helping me patch the echo cancellation behavior of Firefox's getUserMedia
  • Josh Gao for advising me on API design and C idioms.
  • Ryan Hitchman for extensive testing on Android Chrome
  • Fabrice Bellard for thoughtfully answering a stranger's question out of the blue about digital communications

quiet-lwip's People

Contributors

brian-armstrong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quiet-lwip's Issues

Compile Breaks on "make examples"

Hi Brian:

So I was able to compile the quiet-lwip correctly, but when I try to compile the examples, as noted on your wiki. I get this error? It's a Linker error actually.

mikek@mike-M6700:/Documents/Mike_Play_Learn/SDR_Radio/quiet/quiet-lwip-master/build$ make examples
[ 1%] Built target lwip_netif
[ 3%] Built target lwip_sys
[ 19%] Built target lwip_api
[ 50%] Built target lwip_core
[ 65%] Built target lwip_ipv4
[ 73%] Built target quiet_lwip
[ 75%] Building C object examples/CMakeFiles/kv_server.dir/src/kv_server.c.o
[ 76%] Linking C executable ../bin/kv_server
//usr/local/lib/libquiet.so: undefined reference to ofdmflexframesync_is_frame_open' //usr/local/lib/libquiet.so: undefined reference to ofdmflexframesync_set_header_len'
//usr/local/lib/libquiet.so: undefined reference to ofdmflexframegen_set_header_len' //usr/local/lib/libquiet.so: undefined reference to gmskframesync_set_header_len'
//usr/local/lib/libquiet.so: undefined reference to flexframesync_set_header_len' //usr/local/lib/libquiet.so: undefined reference to gmskframegen_set_header_len'
//usr/local/lib/libquiet.so: undefined reference to flexframegen_set_header_len' //usr/local/lib/libquiet.so: undefined reference to flexframesync_is_frame_open'
//usr/local/lib/libquiet.so: undefined reference to gmskframesync_is_frame_open' //usr/local/lib/libquiet.so: undefined reference to resamp_rrrf_execute_output_block'
collect2: error: ld returned 1 exit status
examples/CMakeFiles/kv_server.dir/build.make:95: recipe for target 'bin/kv_server' failed
make[3]: *** [bin/kv_server] Error 1
CMakeFiles/Makefile2:760: recipe for target 'examples/CMakeFiles/kv_server.dir/all' failed
make[2]: *** [examples/CMakeFiles/kv_server.dir/all] Error 2
CMakeFiles/Makefile2:607: recipe for target 'examples/CMakeFiles/examples.dir/rule' failed
make[1]: *** [examples/CMakeFiles/examples.dir/rule] Error 2
Makefile:261: recipe for target 'examples' failed
make: *** [examples] Error 2
mikek@mike-M6700:
/Documents/Mike_Play_Learn/SDR_Radio/quiet/quiet-lwip-master/build$


Any idea's

Thanks.
MikeK

bin/discovery_server not working

I have been trying to get this to work, but one issue that I am getting after running the discovery_server is the following:
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
failed to write to port audio stream, Can't write to a callback stream
failed to write to port audio stream, Can't write to a callback stream
failed to write to port audio stream, Can't write to a callback stream
failed to write to port audio stream, Can't write to a callback stream
failed to write to port audio stream, Can't write to a callback stream
failed to write to port audio stream, Can't write to a callback stream
failed to write to port audio stream, Can't write to a callback stream
failed to write to port audio stream, Can't write to a callback stream
failed to write to port audio stream, Can't write to a callback stream
failed to write to port audio stream, Can't write to a callback stream
failed to write to port audio stream, Can't write to a callback stream

and this keeps repeating.

I have seen that there was a closed issue talking about the same, and it looks like quiet-lwip broke after some changes were introduced to quiet portaudio, but the problem seems to be still not fixed.

I have even tried going back to an older version of quiet but no luck.

Any help would be highly appreciated.

Write to port audio stream failed.

I recently compiled quiet-lwip and it's examples but none of the examples are working. The console output is:

pi@raspberrypi:~/quiet-lwip/build/bin $ ./discovery_server ALSA lib confmisc.c:674:(snd_determine_driver) could not open control for card 0 ALSA lib conf.c:3339:(snd_config_hooks_call) function snd_config_hook_load_for_all_cards returned error: Invalid argument ALSA lib confmisc.c:674:(snd_determine_driver) could not open control for card 0 ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_card_driver returned error: Invalid argument ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_concat returned error: Invalid argument ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: Invalid argument ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: Invalid argument ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.default ALSA lib confmisc.c:674:(snd_determine_driver) could not open control for card 0 ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_card_driver returned error: Invalid argument ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_concat returned error: Invalid argument ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: Invalid argument ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: Invalid argument ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM sysdefault ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21 ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21 ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40 ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41 ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50 ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51 ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71 ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958 ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958 ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958 ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline ALSA lib confmisc.c:674:(snd_determine_driver) could not open control for card 0 ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_card_driver returned error: Invalid argument ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_concat returned error: Invalid argument ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: Invalid argument ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: Invalid argument ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM dmix Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred failed to write to port audio stream, Can't write to a callback stream failed to write to port audio stream, Can't write to a callback stream failed to write to port audio stream, Can't write to a callback stream failed to write to port audio stream, Can't write to a callback stream failed to write to port audio stream, Can't write to a callback stream failed to write to port audio stream, Can't write to a callback stream failed to write to port audio stream, Can't write to a callback stream failed to write to port audio stream, Can't write to a callback stream
The 'failed to write to port audio...' is printed over 70 times per second and lasts until the program is killed.

I was testing originally on a Raspberry Pi3 but confirmed the issue on a 64bit laptop running ubuntu 16.04.

The commands used to install on both were:
sudo apt update sudo apt install -y cmake autoconf automake libtool git mkdir lwip cd lwip git clone https://github.com/quiet/quiet-lwip git clone https://github.com/quiet/quiet git clone https://github.com/quiet/libfec git clone https://github.com/akheron/jansson git clone https://github.com/quiet/quiet-dsp -b devel wget http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.28.tar.gz wget http://www.portaudio.com/archives/pa_stable_v190600_20161030.tgz wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.1.4.1.tar.bz2 tar -xvf alsa-lib-1.1.4.1.tar.bz2 tar -zxvf pa_stable_v190600_20161030.tgz tar -zxvf libsndfile-1.0.28.tar.gz cd alsa-lib-1.1.4.1/ ./configure make -j4 sudo make install cd ../libfec ./configure make -j4 sudo make install cd ../libsndfile-1.0.28 ./configure make -j4 sudo make install cd ../jansson autoreconf -fi ./configure make -j4 sudo make install cd ../portaudio ./configure make -j4 sudo make install cd ../quiet-dsp ./bootstrap.sh ./configure make -j4 sudo make install cd ../quiet ./bootstrap cd build sudo make install cd ../../quiet-lwip mkdir build cd build cmake .. make make examples cd ../../ sudo ldconfig

Please let me know if there is any additional information I need to provide you with.

lwip_bind Assertion

Hi,

When trying to run the proxy_server.c I get following error:

Assertion "lwip_bind: invalid address" failed at line 421 in /home/hans/git/quiet-lwip/src/lwip/api/sockets.c

I am running the example without code modification and disocvery_server and client are working fine

I am not familiar with C coding and am not sure how to make the example work, I can provide more information when needed but not quiet sure which info is usefull

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.