Monday, March 25, 2013

KludgEee

Couple of years ago I bought a supposedly broken EEE 901 netbook motherboard for $5. Not really sure what I wanted with it. Could've been during a time when I wanted to practice soldering BGAs or maybe I just couldn't pass it up for the price. Either way the motherboard turned out to function perfectly. What now?

The thing ended up at the bottom of one of my junk boxes surfacing from time to time to help test the odd monitor. Then around two weeks ago I realized I have enough junk lying around in random boxes for a functioning PC.
While not doing a very good job at it I'm constantly trying to do something with stuff that's just taking up space and doing nothing because it annoys me. Combining them into a single piece is one way ease that so I finally broke down and decided to build a Trash PC.





Ingredients:
The aforementioned EEE motherboard
1 GB DDR2 SO-DIMM ram
The cheapest Chinese mSATA/SATA converter card I could find (that I had to ghetto-solder a SATA-cable to because it wouldn't fit into the mobo with the connector in place)
Samsung 20GB 2.5" HDD (this was inside a Chinese Xbox HDD. Sold the enclosure for a profit, kept the hdd. Result: 1 (almost) Free HDD!)
Intel 4965ABGN miniPCIe wifi card from a Lenovo laptop, that was the main reason for the previous article.
Antenna connector/cable from a  miniPCIe PCIe WLAN adapter card
3 random heatsinks from the junk-box
Random fan from the junkbox
VGA breakout cable from previous scrapped case-build project
The case of an ancient Amstrad Satellite STB from the dumpster
A piece of veroboard and a switch from the junkbox (power button)
A chinese USB IR PC-Remote (actually not bad for $4.38)
A KIS3R33S based 5V reg built on a piece of veroboard (power supply for the HDD)
Random salvaged wires, mounting screws, nuts, a piece of PCB, zipties, epoxy and hot glue!




The idea was basically: The simpler/easier the mounting option the better, the less holes to drill the better, the less time it takes the better. As long as it stays in one piece everything goes.

The end result is inevitably kludgey and trashy but in the end it works, doesn't fall apart from a jostle and only looks as hideous from the outside as the STB case did to begin with so.. All good!








I didn't take any pictures during the build because I wanted to be done with it ASAP that's why there are only ones of the finished box.


With a $13 VGA/Composite converter it might even see some use on an old CRT TV as an IPTV and media player box now. The 900Mhz Celeron CPU is enough for SD streams and SD content.

I measured the DC power consumption on a whim:
Standby: 1.4W, Idle: 16W, Peak: 22W

Sunday, January 20, 2013

Intel wifi driver brand-check removal

It's fairly common knowledge that Lenovo like many other makers uses a bios whitelist to restrict the wireless cards that can be used in their laptops. I've bypassed that with a modded bios on mine a long time ago when I upgraded various parts of the machine and I've had the original Intel 4965AGN lying around collecting dust ever since. The time has come to finally use it somewhere and ... it doesn't work!

Windows complains about failing to start the device. "This device cannot start! Code 10"

Event log contains two entries
5001 - Could not allocate the resources necessary for operation
5006 - The version number is incorrect for this driver

Head-scratching ensues then Linux is booted where the card works flawlessly.
Several other driver versions are installed on Windows yielding the same result.
Time to Google.
It seems like the issue is fairly common and usually appears when people try to use branded cards in different machines than they are originally for.. At this point I'm beginning to suspect that the Intel drivers are specifically blocking the branded cards from working in non-matching machines. 
With a very low tolerance for annoying practices like this and a free weekend I load up the driver in IDA.

I have to confess never reaching the source of the issue. I've run out of time and got the driver working so I didn't investigate any further. There could be a less nefarious explanation for the behavior, although the same driver working flawlessly with the card in a Lenovo machine would suggest otherwise.
[Update: Next weekend] -
I can now confirm that the driver checks for a special entry in the DMI table for Lenovo branded cards and checks the manufacturer name of the machine for HP branded ones. It would seem that Lenovo branded cards would work fine in HP machines without any modifications to the driver. I'm not sure that patch #2 below is required at all. Just nop-ing out all the brand-check specific ID comparisons in #1 might/should be enough to get a completely unlocked driver.


There are two areas that I patched.
#1 Seems to be doing something specifically for my card's device ID (0x4230). Since my card doesn't work right now and I'm suspecting that the driver does an extra check for branding on my card (and AFAIK the 0x4230 ID is strictly a Lenovo ID) this seemed fairly suspicious so I nop-ed out the jump at 53DF5




#2 0x4229, a generic ID is receiving some attention here that looks to be the right kind. I want in on that. Changed 0x4229 to 0x4230



A PE checksum fix and a driver reinstall later I had working wifi.

I did have a couple of cases where I had to "powercycle" the card get it to see networks or to connect to one. Not sure if that's due to the patch since I couldn't reproduce the behavior after switching to Intel's PROSet tool to manage the connection. Will update this post if the problem resurfaces but even with that issue the driver was working well once it was connected to an AP even after downloading several hundred megabytes so it could be that this driver just doesn't like being managed by XP directly.

[Update: Few Days Later]  - The problem hasn't surfaced since.

Patch info:
File: NETwLx32.sys
Version: 13.4.0.139 (but note that every newer version of the driver seems to contain the same version of this sys at least. Guess it was never developed further)


fileoffset original patch
000002B1 2E 62
000002B2 B8 BB
00043DF6 0F 90
00043DF7 84 90
00043DF8 9F 90
00043DF9 00 90
00043DFA 00 90
00043DFB 00 90
00044103 29 30

Checksum fix included

ps.
This is almost guaranteed to not work with any other card (besides device id 0x4230) as-is but working patches could be created for other cards based on the principle.. maybe.

I'm not responsible for anything you do with this information, you do it at your own risk.
Please don't ask me to patch drivers :)
Leave a comment if this has helped you get your wifi card working.

Sunday, November 18, 2012

Chinese solar keychain lamp upgrade

I got one of these chinese solar rechargable keychain lights last christmas from my brother.
 

 Originally the light uses an LR2032 which is a rechargable lithium version of a traditional CR2032 button cell.

 
 I had an ultracapacitor I ordered from Farnell for the heck of it left over that I didn't really have any plans for along with some higher power (though smaller) LEDs. The result is what you see below.
I also changed the blocking diode to a schottky so that the ultracap charges to a somewhat higher voltage.



It supplies a good amount of light for a reasonable time. I keep it under a light source (on top of my water heater next to a light bulb) so it's always ready in case of a powerout. (I can easily get to the water heater in complete darkness from anywhere) It's come in useful a number of time already :) Not really worth the price of the ultracap though but whatever...

Tuesday, October 16, 2012

Solid state relay out of monster SCRs

This is what I made out of the PowerSem modules I salvaged from the motor soft start controller. 
The SCR is connected back to back making it analogous to a triac. 
PCB was hand drawn due to it's simplicity and my general laziness.





MOC3020 triac output optocoupler drives the "big triacs" with mains AC. The LED input is driven from low voltage DC as one would expect.

I think the resistor in this one fits a 12V input but 3.3v shouldn't be an issue with another one. Fairly large AC loads could be switched on the output considering the power rating of these SCRs.