How to install ndiswrapper for the ThinkPad 11a/b/g/n Wireless LAN Mini Express Adapter
You need a recent version of ndiswrapper. Version 1.30 and above is known to work.
# aptitude install module-assistant
# m-a prepare
# m-a a-i ndiswrapper
Adding the windows driver
- Download the Windows driver. Note that this is a 32 bit driver and unless a 64 bit XP driver is released (unlikely) or ndiswrapper adds support for vista drivers (has to happen eventually), this will not work with 64 bit kernels. If you try, you will get kernel messages like
ndiswrapper version 1.51 loaded (smp=yes, preempt=no) ndiswrapper (check_nt_hdr:150): kernel is 64-bit, but Windows driver is not 64-bit;bad magic: 010B ndiswrapper (load_sys_files:216): couldn't prepare driver 'net5416' ndiswrapper (load_wrap_driver:118): couldn't load driver net5416; check system log for messages from 'loadndisdriver'
- Extract its contents with cabextract:
$ cabextract 7iwc28ww.exe
Extracting cabinet: 7iwc28ww.exe
extracting DATA1.CAB extracting DATA1.HDR extracting DATA2.CAB extracting IBMTPI.XML extracting IKERNEL.EX_ extracting IMDRV/WSIMD.CAT extracting IMDRV/WSIMD.INF extracting IMDRV/WSIMD.SYS extracting IMDRV/WSIMDP.CAT extracting IMDRV/WSIMDP.INF extracting LAYOUT.BIN extracting SETUP.DLL extracting SETUP.EXE extracting SETUP.INI extracting SETUP.INX extracting SETUP.ISS extracting UNINSTLL.ISS extracting WINXP_2K/AR5416.SYS extracting WINXP_2K/NET5416.CAT extracting WINXP_2K/NET5416.INF extracting WLLANATH.TPI
- In the WINXP_2K directory, install the driver .inf file with ndiswrapper:
# cd WINXP_2K/ && /usr/sbin/ndiswrapper -i NET5416.INF
installing net5416 ... forcing parameter MapRegisters from 256 to 64 [...last line repeats a few times...]
Note that the last line only occurs with a recent version of ndiswrapper.
- ndiswrapper tells you that the driver is installed:
$ /usr/sbin/ndiswrapper -l
net5416 driver installed, hardware (168C:FF1D) present
Strange, the PCI ID changed. ndiswrapper reports it as 168C:FF1D, while lspci -l reports 168c:0024. Don't know what this means.
- load the ndiswrapper module:
# modprobe ndiswrapper
- iwconfig shows the card:
# iwconfig wlan0
wlan0 IEEE 802.11b ESSID:"youknowit" Mode:Managed Frequency:2.462 GHz Access Point: 01:23:45:67:89:AB Bit Rate:11 Mb/s Encryption key:off Power Management:off Link Quality:42/100 Signal level:-69 dBm Noise level:-96 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0
This is with KNetworkManager running; it automatically connected to the network. ESSID and Access Point MAC are faked for this howto.
No adapters found in KNetworkManager
In vanilla debian at least, desktop users don't have access to network interfaces by default and thus when you click it to activate a connection, you won'll get a "No adapters found" error, but if launched as root it works. To fix this add your user to the "netdev" group (using "adduser <UserName> netdev")
Card hangs after 5-6 hours online
I've had stability issues with this card ever since I got it working with ndiswrapper. That is, after being online for five to six hours, it'll stop transferring packets. First I tried just reconnecting to the access point, when that didn't work, I tried disabling wireless from knetworkmanager, I tried disabling with the Fn+F5 thingie and such - no luck. At last I figured I'd try unloading ndiswrapper and see if that helped
sudo rmmod ndiswrapper
and behold: a minute later knetworkmanager had me re authenticated with the AP. Now, this "solution" seems to work most of the time, but from time to time it'll get stuck somehow, and refuse to unload ndiswrapper (no error message, the console just hangs at trying to rmmod ndiswrapper). In my experience, all one can do at this point is to save your work, and reboot. In the console, you'll probably see an error message like "unregister_netdevice: waiting for wlan0 to become free. Usage count = XX" (I've had both 25 and 7 at the XX mark - have no idea as too what that's supposed to mean). In the end, I had to press and hold the power button to turn the computer off. I'll update here if I figure some way of fixing this issue.
Card gets stuck in 802.11n mode
I had the machine running under windows, where no WLAN was available. When booting into Linux, the card was tuned to some 5.?? GHz (maybe 802.11n?) and would not recognize the 802.11g network that was present. I tried to change settings via iwconfig, without any effect (not even an error message, nothing in the logs). Windows must have left the card in a state where iwconfig cannot con figure it.
I rebooted into Windows and connected to a 802.11g WLAN. Then, the card works again under Linux. If anyone finds out how to reset the card to 802.11g without having to boot windows: Let us know!
No suspend with ndiswrapper
The machine hangs upon Suspend to RAM (and most likely Suspend to Disk, too, although I didn't test) if the ndiswrapper module is loaded. Unload the ndiswrapper module before suspending:
:~> sudo rmmod ndiswrapper
With Suse 10.1 (and probably other versions), you can tell powersaved to unload the module upon suspend. Edit /etc/powersave/sleep and change the values of the following variables to contain ndiswrapper:
UNLOAD_MODULES_BEFORE_SUSPEND2DISK="ndiswrapper" UNLOAD_MODULES_BEFORE_SUSPEND2RAM="ndiswrapper" UNLOAD_MODULES_BEFORE_STANDBY="ndiswrapper"
If there are already any modules present, separate them with a single space.
For Fedora Core 6 and RHEL 5, modify the SUSPEND_MODULES variable in the file /etc/pm/config to include the ndiswrapper module, also separating it and other modules with a single space. For example, the first line in this file will look as follows:
For Ubuntu 7.04, I think the MODULES variable in the file /etc/default/acpi-support is the place to remove this module. However, I have not been able to verify that this solution works yet.
For other distros a similar mechanism may exist. Any pointers are appreciated!