Difference between revisions of "Explorer/RaspberryPi/Wifibroadcast"

From PaparazziUAV
Jump to navigation Jump to search
Line 56: Line 56:
  "
  "


/home/pi/wfbnet.sh
"
  ifconfig wlan1 down
  ifconfig wlan1 down
  sleep 1
  sleep 1
Line 64: Line 66:
  iw dev wlan1_DEV set txpower fixed 4000
  iw dev wlan1_DEV set txpower fixed 4000
  #iw wlan1 info
  #iw wlan1 info
"


* Airpi
* Airpi

Revision as of 07:24, 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
"
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
"
  • Airpi
/home/pi/wifibroadcast-svpcom/wfb_tx -K /home/pi/wifibroadcast-svpcom/drone.key -p 1 -u 5600 wlan1
  • Groundpi
/home/pi/wifibroadcast-svpcom/wfb_rx -K /home/pi/wifibroadcast-svpcom/drone.key -p 1 -c 127.0.0.1 -u 6500 wlan1