Thursday, December 26, 2013

ASUS USB-N10 Nano on OpenSuse 13.1 Linux

Today I bought myself a wifi adapter for my Opensuse desktop PC. I was tired of running a network cable across the carpet to my modem.

The model I bought was an ASUS USB-N10 Nano from PB Technologies in Henderson. It was less than $20 so I thought a good deal. When I bought it, I completely ignored all the printed garbage about support for Windows and Mac and figured, that it will be supported under linux.

It is supported under Linux but it was not too simple to set up on my Opensuse.

In the end and after much google-ing, I found this repository:
https://github.com/pvaret/rtl8192cu-fixes

The driver that ships with the kernel is not so hot. The network keeps dropping even though it appears to remain connected. With this version, things are much more stable.

Also it compiles nicely under the latest kernel. The proprietry driver from Realtek did not compile under the kernel shipped with Opensuse 13.1.

So here is what I ended up doing:

~ git clone https://github.com/pvaret/rtl8192cu-fixes.git
~ su - (become root)
# zypper in dkms kernel-devel kernel-headers gcc make
# cd /path/to/git/repo... (you get the picture)
# cd ../ (go to directory above tree) on my system I put this source tree under /usr/local/src/
# dkms add rtl8192cu-fixes
# dkms install 8192cu/1.8
# depmod -a
# cp blacklist-native-rtl8192.conf /etc/modprobe.d
# echo "options 8192cu rtw_power_mgnt=0 rtw_enusbss=0" > /etc/modprobe.d/50-8192cu.conf
# reboot

And that's it. Now if the kernel is ever updated during normal patching, dkms will recompile our driver.

EDIT:
I have made an RPM package for this driver. It's hosted on the openSUSE build service. Currently I have successfully managed to create rpm's for Centos, Redhat and Fedora (x86_64) only. The openSUSE one failed because the build environment does not have DKMS installed and so the install test fails at the very end.
Anyway - find the packages here: https://build.opensuse.org/package/show/home:linuxplayground/8192cu-1.8

so the openSUSE version is here: 8192cu-1.8-1.0.x86_64.rpm

These RPM packages will:
  • save the source in /usr/src/8192cu-1.8
  • Add the source tree to DKMS
  • Build the kernel module using dkms build ...
  • Install the kenrel module using dkms install ...

To uninstall the module and all the dkms source, builds and modules then just execute: #rpm -e 8192cu
:-)
Post a Comment