Raspberry Pi connects to open wifi network at startup, command line

At first check if the wifi dongle actually works on any other kind of computer.

Make sure the mac address of you usb wifi dongle is allowed to access the router ;)

Without a wifi dongle turn the pi on.

On fresh Wheezy Raspbian 2014-01-07 run
sudo update
sudo upgrade -y
This will also update your pi with latest drivers

open /etc/network/interfaces and leave it like this:
auto lo

iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wireless-essid Bentlijs
wireless-mode managed 


wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
Bentlijs is network name

With static wifi address
auto lo

iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
  address 192.168.50.121
  network 192.168.50.0
  netmask 255.255.255.0
  broadcast 192.168.50.255
  gateway 192.168.50.1
wireless-essid Bentlijs
wireless-mode managed 

wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
Power off the pi and plug the wifi dongle.

Turn on the pi and the wait till wifi starts to having a good time :)

If nothing works at all then look at the loaded modules with lsmod command and try to figure out if wifi driver is loaded:
Without the wifi dongle plugged in the list is bit smaller:
This experiment was taken just exactly with VID_148F&PID_5370&REV_0101: https://uk.pi-supply.com/products/usb-wireless-n-802-11n-nano-dongle-wifi-adapter

No comments: