Monday, March 28, 2011

PICKIT to dsPIC30F4011 pin connection

Just a random post I'm saving for future reference. :)

1 -> 1
2 -> 11
3 -> 20
4 -> 25
5 -> 26

Thursday, May 6, 2010

Repair your own laptop & cell phone screens

So I had a Compaq Presario v5000 laptop with a busted screen given to me. I was strapped for cash and also desperate to get away from the Dell Dimension desktop I was using. Initially I was using it as I would a regular desktop by having my trusty old CRT monitor hooked up to the laptops VGA port but finally I broke down and bought an LCD replacement at yallstore.com. After doing a bit of googling I discovered this magical thing called a service manual: a very detailed guide on EXACTLY how to disassemble (and reassemble!) your laptop! Who would have thunk it!?

When the LCD arrived it wasn't an hour later and I had the new screen installed and working perfectly. It wasn't a completely flawless process however -- I had an issue with the screw drivers I was using early on. The heads of the screw drivers I was using all broke on me. They were cheap dollar store material and were obviously not the exact size. I needed Phillips size 0 and 1 for the project but I was using just any old tool lying around. This almost cost me dearly with a screw that stripped very badly. After that scare I decided to go invest $15 in a decent tool at Home Depot. From there on everything went flawlessly.

Feeling accomplished, I also realized I had a Sony Ericsson w580i in my closet that had a busted screen as well. I found a youtube video explaining exactly how to replace the screen (using only one tool, one of my guitar picks) and $15 later I had a new screen installed.

Wednesday, September 23, 2009

NAT without ICS using Windows XP and a Linux workstation

So I had a Windows system with an Internet connection that I wanted to share with a headless Linux system. Initially I tried Windows XP ICS but I ran into a limitation that didn't exist in earlier versions of the software.

The limitation is the device connecting to the internal network (in this case my headless Linux system) must be assigned the IP address 192.168.0.1. This was conflicting with my wireless router and as shown here Microsoft doesn't support or even suggest a work around so you're left scratching your head. Many message board responses break down to "just connect the other system to your router," but as I personally know there are situations where this is not always possible.

Thankfully there is another way to do NAT in Windows XP. All it involves is a little bit of command line magic and some basic administration tools. As described by Microsoft, "Netsh is a command-line scripting utility that allows you to, either locally or remotely, display or modify the network configuration of a computer that is currently running." It was pre-installed on my Windows XP Professional system. Ok, let's get down to business.

The first thing you should do is change the startup type for the "Routing and Remote Access" service. You do this by going to Control Panel > Administrative Tools > Services, finding the "Routing and Remote Access" item in the name column, double click it and change the "Startup type" to "Automatic."

Next open up your registry by going to Start > run and typing in "regedit". Now go to My Computer > HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > Tcpip > Parameters and change the "IPEnableRouter" value to 1.

Restart your system.

Now make sure the "Routing and Remote Access" service is stopped for the next steps.

Find out the names of your two network devices by going to Control Panel > Network Connections. Open up the command line by going to Start > run and typing in "cmd". Enter the following changing "INTERNET DEVICE NAME" and "INTERNAL NETWORK NAME" to the appropriate values:
pushd routing ip nat
uninstall
install
set global tcptimeoutmins=1440 udptimeoutmins=1 loglevel=ERROR
add interface name="INTERNET DEVICE NAME" mode=FULL
add interface name="INTERNAL NETWORK NAME" mode=PRIVATE
popd
exit
Now enable the "Routing and Remote Access" service. Congratulations, you now have NAT set up properly on your Windows XP system. Now it's time to setup your Linux system with the proper gateway and DNS.

To specify the gateway enter the following in the command line of your Linux system changing 192.168.1.1 to the IP address of your Windows XP system on the internal network:
route add default gw 192.168.1.1 eth0
Now try pinging an Internet IP address like google at 74.125.91.104. If that works then your gateway is setup correctly and NAT is working on your Windows XP system. If it doesn't try restarting the Windows XP system and try pinging google again.

Now all you have to do is setup the DNS for your Linux system. All you have to do is add a line to /etc/resolv.conf with the following command, changing 192.168.0.1 to your routers IP address or your desired DNS address:
echo nameserver 192.168.0.1 >> /etc/resolv.conf
At this point everything should be working. Enjoy!