0

WiFi: Fool BIOS white-list

Tue, 17 Sep 2013 (tags:linux, wifi)

Once I needed to use WiFi card with A standard and all available cards for mine laptop didn’t supported it.

Found one with superb quality based on Atheros chipset. Of course laptop with such card refused to boot up. In BIOS there is whitelist check for PCI-ID, and if the card is not allowed then it will halt the system.

There are couple solutions to it:

  • Alter the BIOS files and update the BIOS flash. Very recommended if you want have fancy paperweight.
     
  • Reroute power traces on the miniPCI PCB to a physical toggle switch. When BIOS is checking for PCI-ID the card can be powered down. And after the check, it can be powered up. And to have it reliable it needs to be even more complicated than this.
     
  • Faking the card ID. Modify card in such way that it will identify itself as a card from the white-list. Then alter driver to accept this ID. In windows not practical to archive (disassembling and reverse engineering the driver), but under Linux it’s pretty simple. 

I decided to fake the ID, it required less alterations on hardware. There were 4 ways to change its ID:

  1. Use a desktop computer and miniPCI to PCI adapter. Then there is a software available to alter EEPROM content. But it requires to have a desktop. 
     
  2. Boot a laptop without it, when booted put laptop into a sleep. While in standby insert the card. Pretty risky.
     
  3. Physically remove the EEPROM from the card and build a EEPROM reader/writer. It can be done easily with Atmel AVR MCUs, for example with Arduino. Usually these EEPROMs are using I2C bus and have low pin count (6-8pins). CodeVision and Arduino IDE have already libraries to handle I2C
  4. Very similar to (3) but the EEPROM is not removed. Set of needles is made to tap into the legs of the chip. Similar to In-Circuit-Programming, but not always recommended and doesn’t have to work.

I prefer (1), or (3) when I can’t use desktop.

Now is the turn for the driver. In past it was more tricky, modifying source code of Atheros module. Nowdays just simple script is enough, it will associate Atheros driver with cards using this FAKE_PCI_ID.

#!/bin/sh
FAKE_PCI_ID=“14e4 4320”
modprobe ath5k
echo “$FAKE_PCI_ID” > /sys/bus/pci/drivers/ath5k/new_id
ifconfig wlan0 up

 

Now we can enjoy wireless networking with a card which wasn’t meant to work on our laptop.

0 Responses so far.