Git Product home page Git Product logo

txt2sine's Introduction

txt2sine

Transmit a text file between 2 computers by sound signal. The sender side encode binary data into sine chunks and writes them into oss sound device. The receiver listen the sound device (mic recording), get the signal and decode it onto binary data.

Compile

Requirements

  • Linux operating system
  • fftw-devel package (libfftw v3)

On sender side, execute "make encode" for compile binary program

$ make encode
gcc -c iofile.c
gcc -c iomixer.c
gcc -c iodsp.c
gcc -I/usr/local/include -c encode.c
gcc -c main_encode.c
gcc -L/usr/local/lib -fexpensive-optimizations -funroll-loops -finline-functions  -ffast-math -Wall -g -O2  -o	bin/decode -export-dynamic iofile.o iomixer.o iodsp.o encode.o main_encode.o -lm -lfftw3

On receiver side, execute "make decode" for compile binary program

$ make decode
gcc -c iofile.c
gcc -c iomixer.c
gcc -c iodsp.c
gcc -I/usr/local/include -c decode.c
gcc -c main_decode.c
gcc -L/usr/local/lib -fexpensive-optimizations -funroll-loops -finline-functions  -ffast-math -Wall -g -O2  -o	bin/decode -export-dynamic iofile.o iomixer.o iodsp.o decode.o main_decode.o -lm -lfftw3

Folders

/		Sources are on the root of Repository
+--bin/		Binary folder where encode / decode executable is written
+--assets/      Output sample (file to send), input sample (file received), and frequencies signal chunk files

Run

You can replace the assets/sampleout file if you want transmit other than default text file.

On receiver side, launch decode binary

bin/./decode

If you have not oss natively (oss is removed from recent linux distro)

padsp bin/./decode

After that, you can execute the sender side

bin/./encode

If you have not oss natively (oss is removed from recent linux distro)

padsp bin/./encode

Todo

  • Add file path parameter to encode binary for choose any file to transmit
  • Increase throughtput (currently, no realistic with some o/s)
  • Use alsa library instead of deprecated oss

txt2sine's People

Contributors

ricofehr avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

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.