Skip to content

Instantly share code, notes, and snippets.

@nicegraham
Last active August 29, 2015 14:19
Show Gist options
  • Save nicegraham/b0b564173a100e206163 to your computer and use it in GitHub Desktop.
Save nicegraham/b0b564173a100e206163 to your computer and use it in GitHub Desktop.
#!/bin/bash
# rx script
NIC="wlan0"
CHANNEL="6"
echo "updating wifi ($NIC, $CHANNEL)"
sudo ifconfig $NIC down; sudo iwconfig $NIC mode monitor
sleep 1
sudo iwconfig $NIC channel $CHANNEL
sudo ifconfig $NIC up
sleep 1
echo "Starting rx for $NIC"
sudo /home/pi/fpv/wifibroadcast/rx -p 0 -b 16 $NIC | /opt/vc/src/hello_pi/hello_video/hello_video.bin
#!/bin/bash
# tx script
NIC="wlan0"
CHANNEL="6"
echo "updating wifi ($NIC, $CHANNEL)"
sudo ifconfig $NIC down; sudo iwconfig $NIC mode monitor
sleep 1
sudo iwconfig $NIC channel $CHANNEL
sudo iwconfig $NIC rate 54M
sudo ifconfig $NIC up
sleep 1
echo "Starting tx for $NIC"
sudo raspivid -ih -t 0 -w 1280 -h 720 -fps 48 -b 7000000 -n -g 48 -pf high -o - | sudo /home/pi/fpv/wifibroadcast/tx -p 0 -r 2 -b 16 -f 1024 $NIC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment