mirror of
https://github.com/romanz/amodem.git
synced 2026-03-06 14:55:56 +08:00
fix and add comments to test.sh
This commit is contained in:
24
test.sh
24
test.sh
@@ -1,21 +1,29 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
set -e
|
||||
set -u
|
||||
set -e
|
||||
|
||||
# generate 1Mbit of random data
|
||||
dd if=/dev/urandom of=data.send bs=125kB count=1 status=none
|
||||
./send.py tx.int16 < data.send
|
||||
|
||||
# modulate data into audio file
|
||||
./send.py <data.send >tx.int16
|
||||
|
||||
# stop old recording and start a new one
|
||||
killall -q arecord aplay || true
|
||||
|
||||
./wave.py record rx.int16 &
|
||||
sleep 1
|
||||
sleep 1 # let rx.int16 be filled
|
||||
|
||||
./recv.py rx.int16 > data.recv &
|
||||
./wave.py play tx.int16
|
||||
# start the receiever
|
||||
./recv.py <rx.int16 >data.recv &
|
||||
|
||||
# play the modulated data
|
||||
./wave.py play tx.int16
|
||||
|
||||
# stop recording after playing is over
|
||||
killall -q arecord aplay || true
|
||||
|
||||
./errors.py data.*
|
||||
# verify transmittion
|
||||
./errors.py data.*
|
||||
sha256sum data.* | ./colorhash.py
|
||||
if [ -z $? ]; then
|
||||
./show.py tx.int16 rx.int16
|
||||
|
||||
Reference in New Issue
Block a user