I got fed up with crappy wireless reception in a hotel and decided to use my RTL8187 based Alfa USB wireless adapter with my Prime. Here's how it works, pretty rough and open to improvement but it works.
To stop using external usb wifi, reverse the steps; basically:
To be able to insert mac80211 without it complaining about missing symbols for ewma_init and ewma_add, I had to add lib/average.c to the mac80211 module; it's pretty simple, here's how i did that:
For simplicity sake I've added the modules for an rtl8187 based usb nic to this post. These are built against the 9.4.2.7 kernel source, and work fine for the 9.4.2.11 release (current ICS release as of Feb 07 2012).
Oh and I don't recommend doing this with androids wifi turned on, it kind of breaks it until you reboot your tab. So if you're smart you'll script the above and spit out a nice warning that your broadcom module is still loaded and then exit. I had no problems switching between external USB wifi and built-in wifi as long as I only turned one of them on exclusively.
Enjoy solid wifi on your prime
- Set up a chroot (ubuntu/debian will work); everything is done within that chroot
- Compile and install the drivers for your usb adapter (see the Kernel modules thread for instructions)
- apt-get install wicd-curses (or wicd-cli if you prefer), wpasupplicant and dbus plus any of its dependancies
- Turn off the broadcom wifi that's controlled by android
- insmod your modules (in my case eeprom_93cx6.ko, mac80211.ko, rtl8187)
- start dbus and wicd (/etc/init.d/dbus start; /etc/init.d/wicd start)
- run wicd-curses (or wicd-cli), refresh the network list and connect to your network
- configure dns for android to your dns or to googles (setprop net.dns1 8.8.8.8)
- ???
- Profit
To stop using external usb wifi, reverse the steps; basically:
- stop wicd and dbus (/etc/init.d/wicd stop; /etc/init.d/dbus stop)
- kill any running dhcp clients (killall dhclient)
- rmmod your modules (in my case eeprom_93cx6.ko, mac80211.ko, rtl8187)
To be able to insert mac80211 without it complaining about missing symbols for ewma_init and ewma_add, I had to add lib/average.c to the mac80211 module; it's pretty simple, here's how i did that:
- Go to your prime kernel source tree (e.g. /usr/src/linux)
- cp lib/average.c net/mac80211/
- Edit net/mac80211/Makefile and add average.o to the list of objects for mac80211-y (don't miss the trailing backslash if you add it halfway)
For simplicity sake I've added the modules for an rtl8187 based usb nic to this post. These are built against the 9.4.2.7 kernel source, and work fine for the 9.4.2.11 release (current ICS release as of Feb 07 2012).
Oh and I don't recommend doing this with androids wifi turned on, it kind of breaks it until you reboot your tab. So if you're smart you'll script the above and spit out a nice warning that your broadcom module is still loaded and then exit. I had no problems switching between external USB wifi and built-in wifi as long as I only turned one of them on exclusively.
Enjoy solid wifi on your prime