Skip to main content

WiFi Dongle Driver

Install WiFi dongle Drivers and configure

ErleBrain is supplied with Edimax USB WiFi dongles - Amazon: http://www.amazon.com/dp/B00FW6T36Y

First install linux kernel headers so that you can compile the driver on beaglebone itself.

Ref: http://dumb-looks-free.blogspot.jp/2014/06/beaglebone-black-bbb-kernal-headers.html

# Check what's available
apt-cache search linux-headers-
sudo apt-get install linux-headers-$(uname -r)
sudo apt-get install linux-headers-generic

# If the above doesn't work (e.g. headers for 3.8.13-bone64.1 is not available on https://rcn-ee.net/deb as it was custom built by Erle)
wget https://github.com/senzai/beaglebone-ubuntu-scripts/raw/master/bb-get-rcn-kernel-source.sh
# Change http to https in the script
# Add --no-check-certificate to wget commands in the script

Download the driver source

http://www.edimax.com/edimax/download/download/data/edimax/global/download/

Copy the driver source archive to /boot mounted on the host PC

On host Mac/Linux

cp rtl8812AU_*.tar.gz /Volumes/boot/Drivers/Linux

On BBB

cp /boot/uboot/Drivers/Linux/rtl8812AU_*.tar.gz ~/src/
# OR
cp /media/BEAGLEBONE/Drivers/Linux/rtl8812AU_*.tar.gz ~/src/
cd ~/src/
tar -xvzf rtl8812AU_*.tar.gz

Build the WiFi dongle driver

cd rtl8812AU_*
make ARCH=arm
sudo make install

*NOTE: Copying the driver to /lib/firmware/ won't do anything as the actual driver lives in vmlinuz/zImage. see: https://github.com/RobertCNelson/boot-scripts/issues/4 *

Setup WiFi network

apt-get install usbutils
lsusb
lsmod
iwconfig

wpa_passphrase your_ssid your_psk
# paste the output of the command above into the file below.
vim /etc/wpa_supplicant.conf

# Now start wpa_supplicant
wpa_supplicant -B -i interface -c /etc/wpa_supplicant.conf

# Check settings in these config files
/etc/udev/rules.d/70-persistent-net.rules
/etc/dnsmasq.conf
/etc/udhcpd.conf
/etc/udhcpd.conf-dual
/etc/init.d/apm4-startup.sh

sudo vim /etc/network/interfaces
sudo /etc/init.d/networking reload
sudo /etc/init.d/networking restart
sudo ifconfig wlan0 up

# For setting up a hotspot
vim /etc/hostapd/hostapd.conf
# change `ssid` and `wpa_passphrase` accordingly.
# If you want to use 2.4GHz instead of 5GHz, change `channel` to 9 and `h_mode` to g
# For 11g (2.4GHz)
channel=9
hw_mode=g
# For 11a (5GHz)
channel=40
hw_mode=a

References