For what it’s worth, here are steps I documented for reliably using an ‘ath9k_htc’ usb wifi dongle with Angstrom (systemd-image):
Building and Installing ‘compat-wireless’ Drivers (on the Beaglebone itself):
- Prepare local environment for building drivers. Following instructions here: ‘http://nomel.org/post/30357133735/beaglebone-tutorial-how-to-compile-kernel-module’):
a. opkg install task-native-sdk
b. opkg install kernel-headers
c. opkg install kernel-dev
d. ‘ln -s /usr/src/kernel /lib/modules/3.2.30/build’ (Replace 3.2.30 with appropriate kernel version… Make sure the headers downloaded to ‘/usr/src/linux-3.2….’ match the actual kernel version ‘uname -r’, otherwise the modules built in this way will not work)
e. cd /usr/src/kernel
f. make scripts
- Download and build the ‘compat-wireless’ drivers. Following instructions here: (http://wireless.kernel.org/en/users/Download/stable/#compat-wireless_3.6_stable_releases):
a. mkdir ~/compatwireless
b. cd ~/compatwireless
c. wget http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.6/compat-wireless-3.6.2-1-snp.tar.bz2
d. tar -xzvf compat-wireless-3.6.2-1-snp.tar.bz2
e. cd compat-wireless-3.6.2-1-snp
f. ./scripts/driver-select ath9k_htc
g. make (this step is redundant if the following line is run…)
h. make install-modules (Automatically copies the modules to the correct place)
i. Run ‘depmod -a’ to update the ‘known module dependencies’ list with the ones just made/copied.
- Alternately (much faster/better), cross-compile the wireless drivers on a host machine and transfer them across:
a. [From the host machine e.g. Ubuntu…]:
b. mkdir ~/compatwireless
c. cd ~/compatwireless
d. wget http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.6/compat-wireless-3.6.2-1-snp.tar.bz2
e. tar -xzvf compat-wireless-3.6.2-1-snp.tar.bz2
f. cd compat-wireless-3.6.2-1-snp
g. ./scripts/driver-select ath9k_htc
h. Build with cross-compiler (using the kernel source git repo path as KLIB and KLIB_BUILD):
i. make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- KLIB=~/angstrom/setup-scripts/build/tmp-angstrom_v2012_05-eglibc/work/beaglebone-angstrom-linux-gnueabi/linux-ti33x-psp-3.2.23-r14i+gitr720e07b4c1f687b61b147b31c698cb6816d72f01/git KLIB_BUILD=~/angstrom/setup-scripts/build/tmp-angstrom_v2012_05-eglibc/work/beaglebone-angstrom-linux-gnueabi/linux-ti33x-psp-3.2.23-r14i+gitr720e07b4c1f687b61b147b31c698cb6816d72f01/git [Note: Change paths to suit…]
j. Package up the module files and move to the target (Borrowing steps from here: http://wiki.chumby.com/index.php/Compat-wireless_driver_on_chumby#Cross-compile_compat-wireless_driver):
k. find ./ | grep ko$ | xargs tar cvjf wireless-compat_modules.tar.bz2
l. [On the beaglebone]:
m. cd /lib/modules/3.2.23
n. mv updates old-updates (only if there is an old version of the wifi drivers present…)
o. mkdir updates
p. cd updates
q. Copy from host machine:
r. scp bone@10.192.0.95:/home/bone/compatwireless/compat-wireless-3.6.2-1-snp/wireless-compat_modules.tar.bz2 ./
s. tar -xvf wireless-compat_modules.tar.bz2
t. Run ‘depmod -a’ to update the ‘known module dependencies’ list with the ones just made/copied.
- Download and copy the two firmware files ‘htc_7010.fw’ and ‘htc_9271.fw’ from http://linuxwireless.org/download/htc_fw/1.3/ to ‘/lib/firmware’:
a. cd /lib
b. mkdir firmware
c. cd firmware
d. wget http://linuxwireless.org/download/htc_fw/1.3/htc_7010.fw
e. wget http://linuxwireless.org/download/htc_fw/1.3/htc_9271.fw
-
Make sure to check the file ‘/var/lib/connman/settings’ and ensure that line after ‘[WiFi]’ reads ‘Enabled=true’
-
Reboot.
-
Plug in the usb-wireless dongle. Check ‘dmesg | tail’ to see that it is recognized and that the firmware files are properly transferred. Check ‘lsmod’ to see that all the ‘ath…’ modules have installed correctly.
-
Follow Steps here to verify wifi works (in client mode…): (http://support.criticallink.com/redmine/projects/arm9-platforms/wiki/USB_WiFi_Configuration?version=6)
a. opkg install wpa-supplicant
b. opkg install wireless-tools
c. opkg install kernel-module-rfkill (annoyingly, needs to update the kernel image – not required for kernel build versions 3.2.30 onwards)
d. In the following files:
/usr/share/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service
/usr/share/dbus-1/system-services/fi.w1.wpa_supplicant1.service
Change the “Exec=” line to be “Exec=/usr/sbin/wpa_supplicant -u -s -O /var/run/wpa_supplicant” in both files. (initially it is the same up to ’–u’)
e. wpa_supplicant –B –Dwext –iwlan0 –c/etc/wpa_supplicant.conf (runs wpa_supplicant in thebackground)
f. call ‘wpa_cli’, then call ‘status’ to see how the connection is going.
g. Sometimes it can take a long time to connect – perhaps removing connman service helps.
i. What definite helps is setting ‘ap_scan=…’ to ‘ap_scan=1’ in the ‘wpa_supplicant.conf’ configuration file.