3

I have a headless Raspberry PI model B, with a RealTek 802.11n dongle, running the very latest version of Raspbian.

I would like to configure both the wired and wireless connections so that I can choose to plugin to the Ethernet if need be. However, most of the time I would like to connect via wireless. The wireless network utilizes WPA2 Personal with a hidden SSID.

  • If I boot with both the Ethernet and Wifi plugged in, the network connectivity will work over both Ethernet and WiFi.

  • If I boot without the Ethernet, I can not connect to the Pi via WiFi.

    • About 15-30 seconds after plugging in the Ethernet, both Ethernet and WiFi network connectivity will work.
  • If I unplug the Ethernet, I can no longer connect to the Pi via WiFi.

Below is my /etc/network/interfaces file. What changes do I need to make so I can use the Wireless connection without the wire? :-)

auto lo
iface lo inet loopback

iface eth0 inet static
   metric 1
   address 192.168.0.144
   netmask 255.255.255.0
   gateway 192.168.0.1
   dns-nameservers 8.8.8.8 8.8.4.4

auto wlan0
iface wlan0 inet static
   metric 2
   address 192.168.0.244
   netmask 255.255.255.0
   gateway 192.168.0.1
   dns-nameservers 8.8.8.8 8.8.4.4
   wpa-scan-ssid 1
   wpa-ap-scan 1
   wpa-key-mgmt WPA-PSK
   wpa-proto RSN WPA
   wpa-pairwise CCMP TKIP
   wpa-group CCMP TKIP
   wpa-ssid SSIDWASHERE
   wpa-psk PSKWASHERE
eat-sleep-code
  • 131
  • 1
  • 5
  • I have a similar arrangement, albeit using dhcp, my configuration doesn't have the metric statement in the configuration of either interface – nwaltham Mar 08 '16 at 12:40
  • Since upgrading to Jessie, the system locks up after about 20 seconds if the wifi adapter is plugged in. I am using a 2.4a charger. I think the 1st generation Pi just doesn't have the guts to do much of anything. – eat-sleep-code Mar 08 '16 at 15:53

1 Answers1

1

Try allow-hotplug eth0 in the config above

Mike Redrobe
  • 951
  • 7
  • 13