Skip to content

Basic Frequency Shift Keying in Web Audio API and C with Portaudio

Notifications You must be signed in to change notification settings

libbymiller/beep

Repository files navigation

beep

Basic Frequency Shift Keying using Web Audio API on its own, or with Portaudio. This is a way to map characters to frequencies, which can be audible or not (these are audible), which can then be used to transmit short sentences between devices.

Audio is one way of out of band token-passing instead of QR codes or pin numbers, or for example for connecting devices to a network. The second of these is the application we're currently thinking of, for our Radiodan work.

Many thanks to Richard Sewell for hints and the loan of Sklar which I've not read yet :-)

Thanks to Richard and Danbri for doing a bunch of thinking about this stuff in 2010 where they were looking at Digital Voices.

Using it

Webaudio API

  • clone the repo
  • cd beep
  • run a server, e.g. python -m SimpleHTTPServer
  • open beep and listen page in separate windows; allow it access to microphone
  • type something in the box in beep.html to transmit it to listen.html

or

Raspberry Pi C code

On a Pi,

Install portaudio bits:

sudo apt-get install portaudio19-dev

Install wiring pi for fun

git clone git://git.drogon.net/wiringPi
cd wiringPi
./build

compile:

gcc listen.c -o listen -lportaudio -lwiringPi -lm

then:

./beep Hello

to play a the text.

Useful links

A few interesting vaguely related things:

About

Basic Frequency Shift Keying in Web Audio API and C with Portaudio

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published