Saturday, January 15, 2011

Two fucking bytes can make a difference

Don't we all love the crazy shenanigans that some vendors make us deal with?
The concept of building just a single piece of hardware and selling it for different prices by locking features is nothing new. Ask for the Siemens HiPath series and what it costs to use the basic hardware with all it can do. Even without additional hardware you easily pay 10k bucks for some small sized company if you want IP based telephony and you do not have a single phone to plug in yet.

What Intel and some notebook vendors have done (again!) now is not a thing for all of us people who like to play around with their hardware. No, this time there's no sexual innuendo intended.
Some time ago I bought myself a new Wifi card for a new toy i have for some time already. You'll hear about that toy and what I have done to it soon, too. Well, exchanging a miniPCIe card in a laptop is usually nothing challenging or complicated. It's the old in-and-out-game, getting drivers and then being happy - usually. But if the card you wanna push in as some intel Wifi Link 5100 or 5300 you might face some challenges. Google for "Code 10" and intel wifi link, then you'll see there's a lot of people who wonder why those things do not work in their units. The usual, completely useless, answer is, that it worked like a charm for some others. Why that is you seldomly hear, but there actually is a "special version" of those cards made for IBM/Lenovo and HP/Compaq. Those things simply won't work like they should, likely even in units from these brands because they are known to use BIOS whitelisting. And unless they sell you their version of the Wifi cards explicitly for your model, it will likely not be whitelisted. And if they sell it to you expect the price to be at least twice what the card would cost as a normal, not brand specific version. And I guess that's the only thing this is about, being able to force their customers to pay unreasonable prices by artificially restricting their stuff from working together with standard hardware.

Of course, I got such a crippled Wifi card and was pissed like hell after I found out about this. Curious as I am, I at least wanted to know what the actual difference is and if I could give my oversized soldering iron a shot in turning this thing from crippled to normal. I found nothing about any such mod, not even later when I knew how it all worked. Soon enough I found out that the same thing already happened some time ago with the Intel 2200BG miniPCI card and that there was a fix. Intel just used a different set of hardware ID and subsys ID for the specially crafted kind and those were saved in the EEPROM of those cards. Google soon confirmed my suspicion about this being at least one difference this time, too. I didn't find a single post or anything about this where someone suspected or stated that, though, but only a lot of diagnosis logs from people with a laptop that showed this difference clearly and consistent. So why not do what had been a success in the past and change the EEPROM with ethtool and some linux live disc?
Because it does not work. I tried my standard Knoppix and also mint linux, which was quite newly released, and ethtool does not support dumping the EEPROM from those cards. By chance I stumbled upon some GoogleCode project that was developing a tool for axactly what I wanted: dumping and writing the EEPROMs of Intel Wifi cards. It's here: http://code.google.com/p/iwleeprom/
As I did not find anything better, I decided to check this out, second meaning intended. Compiling worked as wonderfully as dumping the ROM. In some old fashioned hex editor I immediately saw what I wanted to see...

PCIVEN_8086&DEV_4237&SUBSYS_12118086 and PCIVEN_8086&DEV_4232&SUBSYS_12018086 are the 2 ID sets of the Wifi link 5100, the earlier being the IBM/HP one, the latter being the sane one. Now look for yourself.
Oh yes, as simple and obvious as one could wish. And soon after that even the MAC address is stored, which is why I chose to delete this. If you wonder why the words are seemingly swapped google big and little endian.

Ok, altering this was dead simple and guess what happened after writing this thing back to the wifi card. Yes, it worked. Goodbye crappy Atheros card, hello 802.11n. Now I can finally have sufficient network speed while in bed on the second floor and forwarding in some video file won't take ten VLC ten seconds to cache data.

If you know who had the idea to ask for a crippled version of the wifi cards to rip off customers at IBM/HP or who has agreed with that deal on Intel's side, please greet them from me and smack them in the face heavily.

1 comment:

  1. Hi, I admit Im noob in this and wish you can help me out, on how to compile this proyect which I already downloaded and then how to dump change and put the new rom in the card.

    Thanks!

    ReplyDelete