Monday, 20 June 2016

Navio2 Wifi Config

Navio2 Wifi

I have a Raspberry Pi 3 and have configured the onboard Wifi module to talk to my home network.
The second Wifi dongle will be used in the field for Telemetry. No idea what the range will be yet...

Configuration:

/etc/rc.local

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi

sudo ArduCopter-hexa -A udp:192.168.1.203:14550 -C /dev/ttyAMA0 > /home/pi/star$
#sudo ArduCopter-hexa -A udp:192.168.43.1:14550 -C /dev/ttyAMA0 > /home/pi/star$

exit 0


/etc/network/interfaces
 # interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

allow-hotplug lo
iface lo inet loopback

allow-hotplug wlan0
iface wlan0 inet dhcp
    wpa-conf /boot/wpa_supplicantwlan0.conf


allow-hotplug wlan1
iface wlan1 inet dhcp
    wpa-conf /boot/wpa_supplicant_adhoc.conf

allow-hotplug eth0
iface eth0 inet manual



/boot/wpa_supplicantwlan0.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
        ssid="MyAccessPoint"
        psk="My Wifi Key"
}


/boot/wpa_supplicant_adhoc.conf

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
        ssid="copternet"
        psk="sausages99"
}
 

No comments:

Post a Comment