July 13, 2014

Removing the Thinkpad BIOS WLAN Whitelist

Background

All ThinkPad laptops that ship with an internal WLAN card have a wireless device whitelist built into the BIOS. If the laptop is turned on with a card in the wireless slot whose PCI ID is not found in the whitelist the BIOS will halt with a message similar to “Error 1802: Unauthorized Wireless Card.” IBM (now Lenovo) claims that this is because the antennas built into ThinkPads require them to get FCC, EU and whatever other country regulatory administration certification for each combination of WLAN card with the antennas, thus the white list of the five or so cards allowed per model.
This is understandably annoying, as the WLAN cards which IBM/Lenovo sells for it’s models aren’t necessarily the best or the cheapest. So, what can we do?
With my old ThinkPads T41 and I assume other ThinkPads with the same BIOS from the era of the Pentium-M and Mini-PCI wifi cards (T40, T60, R50, X30, X40) this was thankfully not that hard. All you had to do was change the value in the system’s non-volatile memory, which could be done by writing to a port IO address, an easy task in DOS or Linux using the nvram kernel module and a short c program. The card would still fail the whitelist, but the whitelist check would not be run. (See ThinkWiki.)
With my new X200s this solution doesn’t work, probably because it doesn’t share the same version of BIOS and the wifi card is now of the Mini-PCIe type. However, there are two ways to defeat the whitelist.
The first way is because the BIOS only checks the card in the WLAN Mini-PCIe slot, you can install the card in the WWAN Mini-PCIe slot and put tape over pin 20. Pin 20 of the Mini-PCIe standard isn’t defined, but is usually held low (connected by a small resistor to ground.) WLAN cards use whether pin 20 is held low to enable or disable the radio circuitry, the radio killswitch toggle. It so happens that a WLAN card in the WWAN slot cannot enable it’s radio. This method works, and I’ve used it for a year, but it has two downsides. The first is that you need an empty WWAN slot, which you might not have if you use WWAN or your laptop isn’t WWAN capable. The second downside is cosmetic, in that the WLAN-status LED doesn’t work.
The second way is to modify your BIOS so that the whitelist check is disabled. This second way is more elegant, because in the end hardware works how you think it should; more fulfilling, because you have exerted your ownership and mastery of your hardware over the manufacturer’s wishes; and more dangerous, as BIOS are crufty binary hunks that are hard to fix once broken. PC BIOSs are something between clever horribleness and horrible cleverness. The BIOS found in ThinkPads is made by Phoenix Technology. Modifying a Phoenix BIOS image is difficult and tedious, so why would anyone bother to do this?
Recent versions of Windows bypass activation if it finds something called a SLIC table in the BIOS put there by an OEM. The has caused a large community of Windows PC enthusiasts to reverse engineered most of the major BIOSs. The annoying thing about this from a Linux perspective is that it means you need a working Windows install and you will have to deal with the usual didn’t-need-to-be-a-gui-but-you-made-it-one-anyways software that typifies the Windows world.

Required Resources


  • rw-everthing: http://jacky5488.myweb.hinet.net/ (quality software eh?)
  • Competency

  • Instructions

    BEWARE: Modifying a BIOS is a potentially dangerous activity. A wrong bit somewhere WILL render the systemboard useless. Do not follow these instructions if you don’t own the laptop or don’t feel like waiting for Lenovo to replace your systemboard for a lot of money. You may want to price that first.

    I do not claim any guarantee of success or correctness of the information which follows. Read at your own risk.

    Using your Windows install, download the latest BIOS update from Lenovo. After it installs the files, opt not to run it automatically. Seek to ‘C:DRIVERSFLASH<version>’. Open phlash.ini and add the line ‘advanced=1′ to the [ui] section. You need to flash your BIOS with the original image so that you ensure your later patched version is the same version as the BIOS you are currently using (as we read tables out of the running BIOS later) as well as to be familiar with the process of flashing. Run winphlash64.exe (if you’re on 64-bit) and open the file ending with FL1 in the directory which is also ‘<version>WW’. Once you’ve flashed your BIOS, and felt a sigh of relief when it booted again, the fun can begin. First, run the program RW-Everything and get a dump of all your ACPI tables in the .rw format. Once you have that, open the same .FL1 file you just flashed again in phoenixtool. After churning, phoenix tool creates a dump of your BIOS in a directory named ‘DUMP’ inside the directory which holds your image. I’d keep a copy of this dump around for curiosity’s sake. Select Lenovo as the Manufacture and the .rw file you made earlier in the correct entry. Don’t select anything for the SLIC file option. Check the Log option. Select advanced. In the new dialog that pops up select “No SLIC” and “Allow user to modify other modules.” Once this is done, click Go in the main dialog. Phoenixtool will churn and then pop-up a dialog informing you that you have until you click okay to mess around the with the files in the BIOS dump directory. Notice that if you had modified the dump before clicking Go the changes were lost as the first stage of clicking Go appears to be dumping the image again.Phoenixtools Advanced options
    Leave Phoenixtool waiting for a bit, and go into the dump directory. Copy the files BIOSCOD0[0-9].ROM to a new directory. I would recommend <version>/modules . Run Zender’s Phoenixpatch on the directory you made. You should end up with a BIOSCOD06.ROM.modified. Copy this file over the version of BIOSCOD06.ROM in the dump directory and click okay in the Phoenixpatch modification dialog. Phoenixpatch will create a file named the same as the .FL1 but ending in _SLIC.ROM. This is your new BIOS image. You may notice that the file is quite a bit larger than the original. This is normal as the regenerated image is not compressed. The SLIC.log should state quite clearly that Phoenixtool found BIOSCOD06.ROM to be modified.
    Open up the new image using winphlash. In the advanced section ensure only the options “Verify blocks after programming”and “Disable Axx swapping automatitic detection” are selected on the flags tag and “Update: Update the BIOS and not the DMI” in the DMI tag. After this is done flash the image and cross your fingers. If all was successful, your system will reboot. Otherwise, you have to take your laptop in for servicing to get a new system board. If you system booted, try installing your new wifi card. If the BIOS lets you boot, you have 100% success.

    References

    IBM Thinkpad Unauthorized Network Card

    A week ago my wireless network card died on my IBM Thinkpad T42. I visited the IBM shopping website to look for the Intel Pro/Wireless 2200BG and found it cost approximately $80 not including taxes and shipping. Knowing the price tag was totally unreasonable, I looked somewhere else, and I ended up getting it at Dell for half the price! After the network card arrived, I immediately replaced the card and booted up my laptop. Next thing I know, I see an error message: 1802: Unauthorized network card is plugged in Power off and remove the miniPCI network card. Apparently IBM insists on only accepting “IBM brand” wireless cards through a restriction set in the BIOS. However, there is a fix available for the 1802 error: a DOS program no-1802.com, which will flip a single bit in the CMOS, allowing use of any Mini-PC wireless card. I disabled the wireless card through the BIOS, to avoid having to physically remove it. Then follow the steps to apply the fix: Download no-1802.com Boot the laptop in DOS mode Run no-1802.com Nothing happened after running the command, I rebooted the laptop and re-enable the wireless card from the BIOS. The laptop was able to boot without any issues, and I’m able to use my new wireless card successfully! For better conveniences, I downloaded bootable CD image which allowed me to boot in DOS. A floppy disk image is also available to download as well.

    IBM ThinkPad displays fan error message

    Let’s say you have an IBM ThinkPad laptop and when you turn it on all you get is a black screen with “Fan error” message. What could be wrong?

    A few weeks ago, the fan in my trusty IBM T42 bought the farm. This resulted in the unit heating up considerably, as well as numerous “fan error” messages on bootup. It eventually became so bad that to boot up at all, I had to blow compressed air into the fan’s exhaust grill for 5-10 seconds, in order to fool the BIOS and make it believe the fan was actually spinning.

    According to the IBM hardware maintenance guide (HMM) for ThinkPad T40, T40p, T41, T41p, T42, T42p this error message indicates a problem with the fan, you can find symptom-to-FRU index on the page58.

    The symptom-to-FRU index in this section lists symptoms and errors and their possible causes.

    Apparently it’s time to replace the fan assembly. The cooling fan comes together with the heat sink, that’s why you’ll have to replace the whole fan assembly.

    You can easily replace the assembly after you remove the palm rest and keyboard.

    1. Remove the battery and unplug the AC adapter.
    2. Remove four screws marked with yellow circles. These screws securing the keyboard.
    3. Remove eight screws marked with orange circles. These screws securing the palm rest.
    4. Lift up the keyboard and upnlug the keyboard cable from the motherboard.
    5. Lift up the palm rest and unplug the touchpad cable from the motherboard.
    6. Remove three screws securing the fan assembly, unplug the fan cable from the motherboard. Lift up and replace the fan assembly.

    IBM ThinkPad T42 take apart

    You’ll find step-by-step laptop disassembly and fan replacement instructions in the HMM in the chapter “Removing and replacing a FRU” on the page 70.

    You can find a new fan assembly using the FRU number located on your failed fan, it might look like 91P8393, 26R7860, 13R2919, 13N5442, or 13R2657. Just google the FRU number and find a place to buy it from. Different laptop types with different screen sizes use different fans, so you have to find the correct one witch fits your model. If for some reason your fan assembly doesn’t have the FRU number, you’ll have to refer to the HMM page 216-217. On these pages you’ll find witch fan belongs to your laptop.
    For example, if have a type 2378-FVU laptop with 15.0″ LCD screen, then you need a fan assembly with FRU: 13R2657

    IBM ThinkPad T42 fan FRU