On mac os open preferences and Network pannel and then create a new interface Thunderboldt ethernet named RPI2.
Set manually and
192.168.20.20
255.255.255.0
192.168.20.0
Last active
October 27, 2015 09:38
-
-
Save vallettea/3939e04128ac2cbe99e9 to your computer and use it in GitHub Desktop.
Networking with the RPI
By default the Raspberry Pi disconnects the wlan0 of the wifi when we plug an ethernet cable. So we need to setup a static ip address on another network to make it work.
Here is how.
In /etc/network/interfaces:
auto lo
iface lo inet loopback
auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
auto eth0
allow-hotplug eth0
iface eth0 inet static
address 192.168.20.35
netmask 255.255.255.0
broadcast 192.168.20.255
Corresponding to the above picture. Also you need to remove a daemon that causes the automatic disconnection:
sudo apt-get remove ifplugd
sudo reboot
To restart the wifi:
sudo ifdown wlan0
sudo ifup wlan0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
| update_config=1 | |
| network={ | |
| ssid="networName" | |
| psk="pwd" | |
| proto=WPA | |
| key_mgmt=WPA-PSK | |
| pairwise=CCMP | |
| auth_alg=OPEN | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment