YMMV

* your mileage may vary

Friday, 30 May 2014

Beaglebone Black (BBB) with Realtek RTL8188CUS WiFi Adapter

The Realtek 802.11n WLAN Adapter is a troublesome little thing.  Two files need to be updated to make this work. In the end, the most predicable/stable situation is to assign a static IP address to the adapter.  I got my adapter from the PiHut for 6 quid. http://thepihut.com/products/usb-wifi-adapter-for-the-raspberry-pi


Verify version
  • uname -a 
Linux arm 3.8.13-bone54.1 #1 SMP Mon May 26 07:23:33 CEST 2014 armv7l GNU/Linux
Install latest firmware
  • apt-get install firmware-realtek
Plug in adapter and check it was loaded
  • lsusb
Bus 001 Device 005: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter

  • lsmod
Module                  Size  Used by
8192cu                423038  0

Check the wireless signals 
  • iwlist scan
Edit interfaces file
  • nano /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
#auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp

# allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
#works best with a static IP
iface default inet static
    address 192.168.1.31
    netmask 255.255.255.0
    gateway 192.168.1.1
///
Create a psk key 
  • wpa_passphrase your_ssid your_psk

Edit wpa_suppilcant file 
  • nano /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
    ssid="SSSID"
    proto=RSN
    key_mgmt=WPA-PSK
    pairwise=CCMP TKIP
    group=CCMP TKIP
    #psk="PASSWORD"
    psk=1234574cc2a6786634ce618424c8cd0516434475a45148694c107629a0ba0d806
}
///
Bring up the wireless connection
  • ifup wlan0
check for IP address
  • ifconfig 
  • iwconfig 
note:  wlan0 and dhcp looks like it is working if you take down eth0 (ifdown eth0) before bring up (ifup) wlan0

1 comment:

  1. The problem is not solely with the RealTek WIFi, as a Ralink dongle had the same problem. Rather the problem is due to a Bug now reported at

    http://bugs.elinux.org/issues/163#note-1
    rfkill turns all radios off after boot, regardless of setting before rebooting (Bug #163)

    A termporary easy fix is to do (verbosely)
    $ sudo iwconfig
    which will show the name of the WiFi channel, which herein is named "wifi", just for brevity
    $ sudo ifconfig wifi up
    reports blockage by rfkill, so
    $ sudo rfkill list
    reported WiFi had designation "0"
    $ sudo rfkill unblock 0
    was ok., and WiFi than came up with:
    $ sudo ifconfig WiFi up

    This has succeeded with both RaalTec and Ralink USB dongles


    ReplyDelete