Skip to content

Basic Network Configurations

Vasco Craveiro Costa edited this page Jan 22, 2017 · 17 revisions

1 - Disable IPv6 (Run sudo -i command first or you won't be able to run the following commands successfully. Run exit command at the end):

echo "blacklist ipv6" >> /etc/modprobe.d/raspi-blacklist.conf
sed -i "/::/s%^%#%g" /etc/hosts

You can test if IPv6 is enabled by runing netstat -tunlp |grep p6 |wc -l command after reboot. If the output is other than 0, then IPv6 is enable.

2 - Configure network interfaces by putting the following content in /etc/network/interfaces file, replacing the existent content (the entries regarding eth0 are specific to ISCTE-IUL network, so they may need to be changed for non-ISCTE-IUL situations):

auto lo

iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth0 inet static
	address 10.40.50.243
	netmask 255.255.255.0
	gateway 10.40.50.1

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
post-up /home/pi/src/initNetworkScript.sh

iface default inet dhcp

3 - Replace the content of /etc/hosts with the following, considering that where is XX you should put the number of the drone (the second IP address should be equal to the one that you configured on bullet point 2):

127.0.0.1       localhost

10.40.50.243    biomachines-XX
192.168.3.XX    biomachines-XX

4 - Add the following server name's IP to /etc/resolv.conf file (the last entry is ISCTE-IUL DNS server that we use on eth0 connection, so non-ISCTE-IUL users do not need to add it):

domain biomachineswlan
search biomachineswlan
nameserver 192.168.3.254
nameserver 10.19.90.11

5 - As wisely suggested by Adafruit in here, run the following command:

sudo mv /usr/share/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service ~/