Difference between revisions of "How to install ndiswrapper for the ThinkPad 11a/b/g/n Wireless LAN Mini Express Adapter"

From ThinkWiki
Jump to: navigation, search
(Card gets stuck in 802.11n mode)
m (No suspend with ndiswrapper)
Line 66: Line 66:
 
  :~> sudo rmmod ndiswrapper  
 
  :~> sudo rmmod ndiswrapper  
  
With Suse 10.1 (and probably older 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:
+
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_SUSPEND2DISK="ndiswrapper"
 
  UNLOAD_MODULES_BEFORE_SUSPEND2RAM="ndiswrapper"
 
  UNLOAD_MODULES_BEFORE_SUSPEND2RAM="ndiswrapper"

Revision as of 23:08, 18 December 2006

You need a recent version of ndiswrapper (I used driver version 1.30). Get it at ndiswrapper's sourceforge site.

This is the procedure I used:

  • Download the Windows driver from Lenovo/IBM's support site. Enter your Thinkpad model number (mine is 2007VEH), go to "Software and Device Drivers" and search for the "ThinkPad 802.11abgn wireless LAN" driver. Click on the link and download the .exe file.
  • Extract its contents with cabextract:
:~> cabextract 7iwc16ww.exe
Extracting cabinet: 7iwc16ww.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.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/
:~> sudo /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. I had to compile ndiswrapper from source to get the new version. This went smoothly on SUSE 10.1 with the kernel-developer selection installed.

  • ndiswrapper (run as root) tells you that the driver is installed:
root:~> 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:
root:~> modprobe ndiswrapper
  • iwconfig shows the card:
root:~> 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.

Quirks

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!

Hint:
Well, yes, it seems I have a workaround for this particular problem. There are some hints in the ndiswrapper-FAQ. As I had the same problem as above, WLAN was unusable before.

Setting "iwpriv wlan0 network_type g" (or "iwpriv wlan0 network_type b" as you like) switches the card back to 2.4GHz channels.

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 other distros a similar mechanism may exist. Any pointers are appreciated!