Configuring USB Wireless Devices

From Yantrr Wiki
Jump to: navigation, search

Note : Ensure the USB WiFi is connected to Beaglebone Black/VIBE before device bootup

Instructions

  • Check that USB WiFi is visible on the USB bus by:
# lsusb
Bus 001 Device 002: ID 0424:2412 Standard Microsystems Corp. 
Bus 002 Device 002: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Idetify USB WiFi Device listed above supported by Debian

Search your WiFi module is listed on page https://wiki.debian.org/WiFi#USB_Devices
For example, The WiFi module RTL8188CUS is supported under module name rtl8192cu.
If its not supported, Please contact Yantrr Support team.

  • Installing wireless tools and wpasupplicant
# apt-get install wireless-tools
# apt-get install wpasupplicant
  • List available wireless interface on system
# iwconfig
wlan0     IEEE 802.11bgn  ESSID:"YES"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:2.412 GHz  Access Point: 0C:D2:B5:3B:A5:48   
          Bit Rate:72.2 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:****-****-****-****-****-****-****-****   Security mode:open
          Power Management:off
          Link Quality=100/100  Signal level=-52 dBm  Noise level=0 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

lo        no wireless extensions.

eth0      no wireless extensions.
  • Bring the intended wireless interface up (here its wlan0)
# ip link set wlan0 up
  • List names of available access points nearby
# iwlist scan
wlan0     Scan completed :
          Cell 01 - Address: 0C:D2:B5:3B:A5:48
                    ESSID:"YES"
                    Protocol:IEEE 802.11bgn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:150 Mb/s
                    Extra:rsn_ie=30140100000fac040100000fac040100000fac020000
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    Quality=100/100  Signal level=-53 dBm  

lo        Interface doesn't support scanning.

eth0      Interface doesn't support scanning.
  • Calculate the WPA PSK hash for SSID
# wpa_passphrase ssid_name wifi_password
network={
        ssid="myssid"
        #psk="my_very_secret_passphrase"
        psk=ccb290fd4fe6b22935cbae31449e050edd02ad44627b16ce0151668f5f53c01b
}
  • Add configuration of wlan0 in /etc/network/interfaces, (copy psk value from above step and assign it to wpa-psk)
# nano /etc/network/interfaces
auto wlan0
iface wlan0 inet dhcp
    wpa-ssid ssid_name
    wpa-psk ccb290fd4fe6b22935cbae31449e050edd02ad44627b16ce0151668f5f53c01b


  • To route all traffic through WiFi connection
# ip route replace default via IP_ADDRESS_OF_WiFi_ROUTER dev wlan0

For example,

# ip route replace default via 192.168.1.1 dev wlan0
  • Test your setup

Ping to WiFi router

# ping IP_ADDRESS_OF_WiFi_ROUTER

If getting successful reply, then your wifi connection is configured successfully If getting reply unable to reach destination, down your Ethernet eth0 connection

# ifdown eth0

Again test ping to WiFi router.