Wi-Fi for Raspbian

From KlavoWiki
Revision as of 09:08, 9 August 2014 by David (talk | contribs)
Jump to navigationJump to search

Check if Raspbian can see the USB device.

lsusb

the result should be something like

Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Bus 001 Device 005: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 006: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 007: ID 4971:1020 SimpleTech

You can see my Wi-Fi device as device number 004.

Run the following commands

wpa_cli

from within this cli use the following commands

To view the current SSID's within range

scan
scan results

Configure the required SSID

add network
set_network 0 ssid "ssid-name"
set_network 0 psk "psk-password"
enable_network 0
save_config
quit

Check for configuration

iwconfig

By default the interface will use DHCP to get an IP address. If you wish to assign a static IP address to wlan0 refer to Static_IP_Address_for_Raspbian

Here is a reference for my configuration
/etc/wpa_supplicant/wpa_supplicant.conf

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

network={
        ssid="ssid-name"
        psk="psk-password"
}