examples/r2t2/README.md
Transmit data with the PC speaker
<a href="https://user-images.githubusercontent.com/1991296/115141782-cba9f480-a046-11eb-9462-791477b856f5.mp4"></img></a>
<p align="center"> <i>Vid. <b>r2t2</b> demonstration</i> </p>This is a command-line program that encodes short messages/data into audio and plays it via the motherboard's PC speaker. To use this tool, you need to attach a piezo speaker/buzzer to your motherboard. Some computers have such speaker already attached.
You can then run the following commands:
# transmit the message "test" with default protocol "[R2T2] Normal"
echo test | sudo r2t2
# transmit the message "hello" with protocol "[R2T2] Fast"
echo hello | sudo r2t2 -t10
# transmit the message "foo bar" with protocol "[R2T2] Fastest"
echo "foo bar" | sudo r2t2 -t11
To receive the transmitted message, open the following page on your phone and place it near the speaker:
This tool can be useful when you need to transmit data from air-gapped machines. The hardware requirements are very cheap - you only need a PC speaker. For example, you can make an automated script to periodically emit some sensor data, which can be received by someone nearby running the r2t2 receiver application.
PC speaker / buzzer attached to the motherboard.
Here are the ones that I use:
pcspkr kernel module: sudo modprobe pcspkrsudo in order to access the PC speakergit clone https://github.com/ggerganov/ggwave --recursive
cd ggwave
mkdir build && cd build
make
./bin/r2t2
Thanks to Radoslav Gerganov for this cool idea!