Difference between revisions of "Explorer/RaspberryPi/Wifibroadcast"
Jump to navigation
Jump to search
Line 75: | Line 75: | ||
* Airpi | * Airpi | ||
UDP packet received on port 5600 are send to wlan1 (wifibroadcast) using channel 1 | |||
/home/pi/wfbnet.sh | /home/pi/wfbnet.sh | ||
" | " | ||
/home/pi/wifibroadcast-svpcom/wfb_tx -K /home/pi/wifibroadcast-svpcom/drone.key -p 1 -u 5600 wlan1 | /home/pi/wifibroadcast-svpcom/wfb_tx -K /home/pi/wifibroadcast-svpcom/drone.key -p 1 -u 5600 wlan1 | ||
" | " | ||
* Groundpi | * Groundpi | ||
Data received on wlan1 (wifibroadcast) and channel 1 are send on port 6500 | |||
/home/pi/wfbnet.sh | /home/pi/wfbnet.sh | ||
" | " | ||
/home/pi/wifibroadcast-svpcom/wfb_rx -K /home/pi/wifibroadcast-svpcom/drone.key -p 1 -c 127.0.0.1 -u 6500 wlan1 | /home/pi/wifibroadcast-svpcom/wfb_rx -K /home/pi/wifibroadcast-svpcom/drone.key -p 1 -c 127.0.0.1 -u 6500 wlan1 | ||
" | " |
Revision as of 07:50, 23 June 2020
The software installation should be done on board (Airpi) and ground (Groundpi) RaspberryPi
sudo apt-get install libpcap-dev libsodium-dev -y
git clone https://github.com/svpcom/wifibroadcast mv wifibroadcast wifibroadcast-svpcom cd wifibroadcast-svpcom make
Don't worry with error (/bin/sh: 1: trial: not found make: *** [Makefile:43: test] Error 127)
The Wifibroadcast build process, generates two files used to encrypt transmitted data:
drone.key & gs.key, must be the same on Airpi and Groundpi.
- Airpi and GroundPi
/etc/wpa_supplicant/wpa_supplicant.conf " ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 country=FR network={ ssid="Androidxp" psk="pprzpprz" } network={ ssid="pprz_router" key_mgmt=NONE } "
For maintenance purpose:
- wlan0 should be enable (#denyinterfaces wlan0) to connect through hotspot
- wlan0 should can be disable (denyinterfaces wlan0) if the Groundpi can be connected with ethernet
- wlan1 should be disable (denyinterfaces wlan1) to be used by wifibroadcast
/etc/dhcpcd.conf " #denyinterfaces wlan0 denyinterfaces wlan1 " " denyinterfaces wlan0 denyinterfaces wlan1 "
/etc/dhcpcd.conf " # It is possible to fall back to a static IP if DHCP fails: # define static profile profile static_eth0 static ip_address=192.168.3.2/24 static routers=192.168.3.1 static domain_name_servers=192.168.3.1 # fallback to static profile on eth0 interface eth0 fallback static_eth0 "
/home/pi/wfbnet.sh chmod ugo+xwr /home/pi/wfbnet.sh " ifconfig wlan1 down sleep 1 iw dev wlan1 set monitor otherbss iw reg set DE ifconfig wlan1 up iw dev wlan1 set channel 36 iw dev wlan1_DEV set txpower fixed 4000 #iw wlan1 info "
/etc/rc.local " su root -c /home/pi/wfbnet.sh & "
- Airpi
UDP packet received on port 5600 are send to wlan1 (wifibroadcast) using channel 1
/home/pi/wfbnet.sh " /home/pi/wifibroadcast-svpcom/wfb_tx -K /home/pi/wifibroadcast-svpcom/drone.key -p 1 -u 5600 wlan1 "
- Groundpi
Data received on wlan1 (wifibroadcast) and channel 1 are send on port 6500
/home/pi/wfbnet.sh " /home/pi/wifibroadcast-svpcom/wfb_rx -K /home/pi/wifibroadcast-svpcom/drone.key -p 1 -c 127.0.0.1 -u 6500 wlan1 "