Monday, December 21, 2009

Playing with a 555 Timer Circuit

So I was bored yesterday and started going through my box of ICs. I came across a 555 timer chip, and an LED in my head went off:

Why not try to make some LEDs blink?? 

The original idea was to make a little blinking ornament or something. I still may, but I'm just happy I got it to work. Here's what I did.

I looked up the 555 timer datasheet and some example circuits. The Wikipedia article had some really good information as well. I learned that there are two modes which the timer can operate: monostable and astable. Monostable mode is a one-time pulse. Astable mode repeats that pulse indefinitely.

Armed with my new knowledge on monostable and astable operation, I realized that I needed an astable circuit, because who wants their decoration to blink once and quit? That's no fun. Anyway, I looked up some of the formulas, which would have been intimidating, had I not been tortured by introduced to all of these concepts during my university career.

In my net travels, I came across this excellent 555 resource. I learned that in order to get a duty cycle close to 50%, I need to choose R1 = 1k.

After I had everything all wired, I powerd it up and the LED lit up....but it didn't blink. This bothered me for a second, then I realized what was the culprit: the capacitor I used was a really large value. I switched it out for a 100uF and it blinked, still slowly, but blinked nonetheless. The duty cycle was at 50% because of my R1 resistor value. Then, I switched out the capacitor for an even smaller value (1uF). This blinked very rapidly - much faster than I would like, but at least I was learning how the timer worked.

I realize that by using the formula, I can more accurately pinpoint a frequency. This was just a preliminary exercise though. I definitely hope to get deeper into this chip later.

Monday, November 30, 2009

Power Supply Design

For the project I'm working on, I need to design a power supply which results in an output voltage of 3.8V. I think I'm going to have the GE864 chip controlled by another micro in order to more easily control the timing required for power (turning the chip on and off requires a 1s pulse, restarting requires a 200ms pulse on a different pin).

Although I haven't selected the microcontroller I'm going to use yet, I have designed the circuit which will interface with its output, which corresponds to the GE864's input (ON or RESET pins). I have designed my power supply circuit with an input of +5V from the micro and an output of +3.8V going to the GE864.

Right now I'm getting power from an old PC power supply. I found the pinout for the main harness and switched the green and black wires in order to turn it on and off. Using my multimeter, I measured different output voltages between pairs of wires. Some were +12V, some were +5V. I decided to start with the +12V coming from one of the floppy connectors.

I ran power from the yellow wire on the floppy harness to the power block on my breadboard, and did the same with ground. To clean up the input some, I used a 100uF electrolytic capacitor. In order to bump down from +12V to +5V, I just used a 7805 +5VDC Voltage Regulator from Radio Shack (way overpriced, I know, but instant gratification). I chose to go this route instead of just using the +5V from the PC's power supply because I wanted a more accurate reading. Coming directly from the supply wouldn't have given me as close to +5V as bumping down with the regulator.

So now, I have a clean +5V to work with. But I need to get to +3.8V. For this, I decided to use the LM317T Adjustable Voltage Regulator, and I'd just design a circuit around it.

I just decided to use a good old-fashioned voltage divider. The LM317 was too tricky. The voltage divider was straightforward and since I was on campus, obtaining the parts was free, as opposed to  unnecessarily expensive.

Designing a circuit with my specifications was not difficult at all (Prof. Dragon is the MAN!). Here are my calculations:





Vin to the voltage divider was my +5V from the voltage regulator. Vout is the +3.8V that I need to power my chip. I selected a random value for R2 = 3k and just calculated R1 from the voltage divider formula.

Here's the schematic representing my circuit:




I used the 1N401 diode to protect against backwards current and the capacitors to filter the input and output. My theoretical output was 3.75. I actually measured 3.73, which should be fine for this

SO glad I got this working now! Next I can work on how I actually want to go about turning the chip on and off. I'm thinking of using a separate micro to send ON/OFF signals to the GE864 instead of doing it manually.







Monday, November 23, 2009

Project Schematic

I'm working on a project using the Telit GE864 chip, and have been having a hard time learning PCB design software so I can make the schematic for my circuit.

I went back and forth between PCB123, ExpressPCB, and CadSoft Eagle. Although PCB123 and ExpressPCB seem like fine products, I eventually settled on Eagle because the others are proprietary. If I designed my schematic and board with their software, I had to buy from them (I think one of them has a free pizza offer when you order a board, which was tempting, but didn't quite seal the deal). And, from what I understand, Eagle is used in industry, so I figured it would be good to get familiar with it anyway.

My trouble was, I had never designed a schematic around a chip before. The only experience I had was designing simple circuits in MicroCap with simple components (resistors, capacitors, diodes, power/ current sources, etc), but nothing with an actual chip.

I recognize "the cloud" as an invaluable resource for engineering/ programming help. I registered for the forums on Sparkfun. Within 30 minutes, I had a reply. Within an hour, I had my solution. Someone pointed me in the direction of the Sparkfun tutorials, which are immensely helpful. This one, in particular, described how to create a breakout board in Eagle. . . . which is EXACTLY what I needed to do.

I found that instead of creating the library for the chip I want to use, I could just download the one the geniuses at Sparkfun had already created. While this simplifies my task greatly, it still leaves a great deal to be learned, which I completely appreciate!

Now I'm researching more on the chip and deciding what type of power supply I want to use. I may just design schematics for all of the suggested supply circuits in the GE864's instruction manual, for more experience with Eagle.

I'm very excited right now!

Monday, November 16, 2009

The Debate Over Software Patents. . .

I found this debate pretty interesting. Recently, there has been some controversy about the validity of patenting processes, which would directly affect software patents as well. The argument is that, since software is, in its most basic sense, purely mathematical, that it cannot be patented.

If this argument is upheld, I'm unsure of the repercussions for the world at large, but two things are for certain: Microsoft and Apple would be VERY unhappy, and the term "open-source software" would become a redundant phrase.

Since I have aspirations of becoming a patent attorney dealing with technology of this sort, I feel that this news directly affects me. I may have to adjust my career goals lol!

Here's the article I read.

Wednesday, October 28, 2009

Replacing a Zune 80 glass screen

My Zune has a history of breaking itself while I'm fixing it. Last time I took it apart, I got it to WORK again, but cracked the screen. This weekend when I was in a portable-electronics-screen-buying-and-replacing mood, I decided I'd grab a Zune glass as well.

So, let's get started. For the sake of completeness, I'll go through the entire process, even though it's partially documented here.

Required
  • Zune 80/ 120 (I guess the HDD size doesn't matter. Second generation or above, non-flash, non-HD (where HD stands for High Def, not Hard Drive))
  • New screen
  • T4 screwdriver
  • Tiny electronics flat head screwdriver (I prefer size 2.5 - 4.5) or a case opener tool


Procedure
  1. Remove the plastic clip from the top of the Zune with the flat screwdriver or case opener tool
  2. Unscrew the two T4 screws at the top of the Zune



  3. Carefully, take the flat head screwdriver and gently pry, starting at the top where you just removed the T4 screws, and work your way all the way around. What you're doing here is undoing the clips all around the casing. **This is the part where I cracked my screen last time**
  4. At this point, you should be able to remove the entire aluminum back, and see the Zune's nasty internals.








  5. Remove all that #$%@ tape!
  6. Take out the 6 screws holding down the motherboard. There are three pairs, each pair is a different size. Keep them in order! *Note - when you take out the screws on the side, a metal clip will also come loose.













  7. For safety's sake, I removed the hard drive at this point. Lift the black flap on the ribbon cable connector. Use the flat head screwdriver to gently pry this up. Start from one end, and work your way to the other. This is a long tab, and will likely take more than one (probably two) pry-points to lift. (I know the picture shows the screwdriver in the middle. . . . disregard that :-|. . . . it was only for illustration's sake)













  8. Now, gently pry the board up with the flat screwdriver. Go evenly and CAREFULLY all the way around until you can lift the motherboard out of the case.







Whew. . . . now for the hard part.
Removing the Glass Screen from the casing
I won't post the failed attempts and pictures of me trying to get this glass out; I don't wanna upset those who get queasy at the sight of blood. . . .

Nah, just kidding. Bud it did take me some time to figure this out. The glass is held in with a strong adhesive. I tried pushing it out, scoring around the edges, and prying. Some of these worked better than other, then I realized that I could just heat it up with my heat gun! Then I realized that I don't have a heat gun. Then I realized that my wife does!

HA! lookit the guy on the box



Apply heat to both sides, pressing the glass out every so often. After the adhesive melts enough, you're in business!

Remove the white tape from the new glass, replace the old one with it, and heat to activate the new adhesive. Put everything back together, and you're in there like swimwear!. . .

. . . . unless you put the hard drive ribbon cable on backwards. In which case, you'll get this screen. Fix it, and you'll get this one!

Sunday, October 25, 2009

Replacing an iPhone 3G glass screen

So lemme tell you about my crappy weekend. It all started Thursday night. I had just come back from a lovely night out with the Missus. I took my iPhone out of my pocket and threw it down on the bed. Unfortunately, I missed the welcoming, soft mattress, and hit the cold, hard, unforgiving wooden corner of the bed. The result: a shattered glass screen AND LCD.

To make a long, sad story short, I just opted to buy a new iPhone from the Apple store for $199 the next day instead of paying $150 for new glass and LCD. I traded them the broken one and they gave me the discounted price. I was in a rush when I left the store, so I couldn't stop by Micro Center and buy myself any screen protectors. And I wasn't going to pay the ridiculous prices for any accessories in the Apple store. I didn't want my screen to get smudged, so I didn't put it in the old case I had. So I just went home, happy with my new, unprotected iPhone.

Saturday, I was with my 2-year old nephew. I leaned over to pick him up, and out of my shirt pocket slides my brand new iPhone 3G (no S), kissing the cement floor face first. The result:



So, in a matter of 2 days, I had managed to destroy two iPhone screens. This time, since it was just the glass, I just bought it and decided to install it myself. Here's how:

Required:
  • Broken iPhone 3G or 3GS (The glass and LCD are separate on the 3G models. On the OG, they're glued together, making replacement difficult)
  • Replacement glass screen
  • Flat head screwdriver, size 1.5 (or a case opener tool if you're so fortunate to have one)
  • Phillips screwdriver, size 000

Procedure:
  1. Turn off the phone. This is to prevent shorting of any circuitry once we start digging in the iPhone's guts.
  2. Using the Phillips 000, remove the two screws from the bottom of the iPhone
  3. Use the 1.5 flat head screwdriver or the case opener tool to pry the screen up. Place the blade in between the chrome and the glass and separate the screen and LCD assembly from the back of the case.
  4. Carefully tilt the screen/ LCD assembly up so you can see the numbered connections on the board. They are numbered 1, 2, 3. Remove these from the board in order. 1 and 2 are relatively straightforward, just use the flat screwdriver to pry them loose. The connector for 3 has a tab you must lift before it slides out. Proceed carefully.
  5. Once the cables are disconnected, we can separate the LCD from the glass. Using the 000PH, remove the 5 screws indicated in the picture below. Some are covered with black tape, so you'll have to remove that.












  6. Slide, then lift the LCD out of the glass. If you lift it without sliding, you may bend or break parts of the assembly.







  7. Replace the broken glass with the new one, replacing all the screws in their proper places.
  8. Reconnect the ribbon cables.
  9. Slide the glass/ LCD assembly back onto the phone's back.
  10. Replace the two screws.
  11. Use protection! Don't wanna get burned again. . . 




Wednesday, October 14, 2009

Microsoft Interview Results

I got an email from Microsoft today. Although I knew I didn't perform well on the phone/ LiveMeeting interview last Friday, there was still that small bit of hope that maybe I displayed something that they liked. . .

The Microsoft interview is easily the most grueling technical interview I've ever endured. But it was also the most FUN! (Speaking of the process in Redmond). The problems given are designed to make you think, and they sure do. I understand that they don't expect a candidate to get the problem 100% correct right off the bat (or at all, for that matter). They're really observing problem solving skills. My head hurt so bad after that interview, I went back to the hotel and just slept for like 5 hours. Then I got up and went to the bar.

This phone interview is my third meeting with Msft. I had a preliminary interview at a national convention this past March, and was flown to Redmond the next month. I thought I gave the performance of a lifetime on the six (6) (yes, s-i-x) interviews I had that day. I left Redmond feeling really good about my chances, but was sorely disappointed a couple of day later. That was a really tough disappointment - I did my absolute best, and it was still not good enough. Eventually, I got over it and decided to reapply as soon as I was eligible again.

Back to the present. . .

As I opened the email, I braced myself for the imminent rejection, expecting to see an "unfortunately" right near the beginning. When I got to the fourth sentence, and there was still no "unfortunately," that little bit of hope began to shine brighter.

And then I read the second half of the fourth sentence:

we will be pursuing other candidates whose background and abilities more closely match our needs at this time.

And things quickly went back to normal. The world didn't end. As I said, I knew I didn't perform very well in this one. I'm not upset or discouraged; but I know what I have to do now. I'm on a mission to become a better programmer. I have dedicated myself to learning as much programming as I can. I'm going to immerse myself in so much code that by the time I'm eligible to interview again, I will be able to better display what I know, and be the ideal candidate.

Here's the problem I was given. . .

For an array of size n, choose the range of numbers which yields the greatest possible sum.





For this one, it happens to be array[0] through array[6], which equals 23. 
But these are just random numbers I came up with for this example. It doesn't always end up where it is the entire range.


I managed to explain a brute-force method of finding the solution. But drew a blank when asked to describe the efficiency of it using Big-Oh notation. So, I faltered there. Anyway, I have been working on my CS basics, so that should be sharper next time around. 

Very sleepy now. Good night!

PSP Programming

Still very excited about learning PSP Programming. Today, I completed another tutorial, which dealt with outputting different colors and formatted text to the screen.

Although right now, I'm just following steps, it's still a great learning experience. I'm commenting my code so that I can look back at it and tell what each block does. These tutorials are really good. I wish they were available in a nice little PDF instead of just on the website.

Here's the tutorial I did today. The final product is an application that looks like this


RED: 0
GREEN: 0
BLUE: 0














And using the direction pad, I can control the values of Red, Green, and Blue, respectively. As the values change, the number updates, and the background color changes accordingly.

My wife humored me by telling me how "cool" it was. She's obviously very good with children :-).

Monday, October 5, 2009

PSP Programming Progress


Hello World.










That phrase has never looked so good to me. Those 12 tiny characters in the top left corner of my PSP (Playstation Portable) screen represent, to me, a level of achievement I have been (mostly half-heartedly) trying to reach for over 3 years.

In 2006, I first began my interest in PSP Programming. I downloaded Cygwin (the Linux environment emulator for Windows), but had some trouble when compiling the PSP toolchain. I put it down and didn't resume again until 2008. I tinkered and read about it for a couple of weeks, then the same thing happened, and I again brushed it aside.

This time, I dug really deep, researched the exact problem I was having, and found a way around it. Apparently, the toolchain is broken, and I had to either download someone else's entire Cygwin setup, which already had the PSP Toolchain compiled, or download a precompiled solution. I opted for the first, then read a quick "Hello World" tutorial, and was up and running!

I know "Hello World" is generally hardly a means for celebration, but this has truly brought me some joy lol. . . . it's the little things. I'm especially happy that I got this accomplished just after one day of REALLY deciding to put my mind to getting this done. My goal for this week was to have a PSP development environment set up. Now that I've gotten that accomplished on MONDAY, I have to set a new goal lol.

Now to make it do something useful!

Sunday, October 4, 2009

Microsoft Interview Preparation

Earlier this year, I had the opportunity to fly to Redmond to interview with Microsoft for an SDET (Software Development Engineer in Test) position. To prepare, I read a couple of books, reviewed my materials from Cem Kaner's Blackbox Software Testing course, and went over some technical programming examples. This was the most intense, brain-squeezing, mind-bending interview I had ever been on. . . . but it was really fun! And although I performed what I thought was exceedingly well, I was still not offered a position. I was disappointed, but not discouraged.

My Microsoft recruiter consoled me and said that sometimes it takes people upwards of 3 tries to get hired. She said that I should work on my skills and try again in six months or so. I made it up in my mind that I would have that job, and that next time around, I would be more prepared, and give an even better shot than the first time.

Last week, I was scheduled for another phone interview (YES!!). Since that time, I feel that I have gained some very applicable knowledge directly pertaining to the type of positions I'm seeking. In addition, I've decided to take on some other projects. Among them are:
I should have a firm grasp on (at least 2 or 3 of) these things by the end of this week. In addition, I'm going to read peoples' blog posts of their experiences dealing with the grueling SDET interview and what skills they chose to polish and highlight during the process. I have a couple of friends who work there too, so I'll try to get some of their input as well.

As you can see, I have my work cut out for me, but I'm determined!

Wednesday, September 30, 2009

Installing Windows 7 on Acer Aspire 4330

I am a self-proclaimed MOOS - Master of Operating Systems. I like to install, reinstall, uninstall, and break operating systems. Eventually, I would like to build my own OS, for some reason or another. . .

Anyway, recently (almost a year ago), my sister gave me her laptop to fix, because she had FUBAR'd it with viruses. I went through great pains (finding a USB FLOPPY drive to install SATA drivers) to put Windows XP back on it, but she preferred Vista, oddly. Vista never acted right, so she ended up giving it right back after I did that. Instead of fooling around with either of those, or torturing her with OSX86 or Linux, I just decided to wait on Windows 7 to become available.

I have my 100% legal copy of Windows 7 now (via MSDNAA!), and it has JUST finished burning. Now I can get to the install process. I'm going to go through a fresh install of Windows 7 Ultimate on a hard drive. Let's go!

Formatting the hard drive.
I have traditionally preferred using a separate disk editing tool than the one included in the Windows installer. For this task, I generally use GPartEd (Gnome Partition Editor) Live CD. Download it and burn it to a disk. I won't go over how to do that here. But here are the steps for using it.
  1. Start up the laptop which you want to install Windows.
  2. While booting, enter the BIOS. On the Acer Aspire, just press F2 when prompted during the boot process.










  3. Once in the BIOS, move over to the "Boot" menu and ensure that your CD/ DVD drive has higher boot precedence than your hard drive. Otherwise, the system will try to boot from the hard drive first. If there is a current operating system on there, it will start that up. If the drive is blank, you will receive an error message. To change boot priority order, highlight the desired drive, and press the appropriate key to move it up or down in the list. In my BIOS, it is F6 to move up, and F5 to move down. Press F10 to Save and Exit.
  4.   **Note - I like to keep my boot options where the computer boots from the CD/ DVD drive whenever a bootable disk is present. If you prefer, you can change it back to HDD first after the install is complete.
  5. You can usually roll with the default settings with Linux Live CDs. If you're not familiar with terminals, don't be intimidated. Just read the prompts, Live CDs are generally pretty user-friendly.
  6. Think. . . are there any files on there that you really want? There's no turning back after this; they're about to disappear forever.
  7. Select any unwanted partitions and press "Delete." 
  8. Think some more. There's still time before you send all your files into oblivion.
  9. Hit "Apply" to make it official.








  10. Double click "Exit" and press OK to restart the computer
  11. Remove the GPartED disk when prompted.
Installing Windows
  1. Your boot order should still be CD/ DVD drive first, so insert the Windows disk right after removing GPartED, but before restarting.
  2. Press Enter to restart (as prompted by the GPartED live CD)


  3. After the installer loads, select your Language, Time and currency format, and Keyboard format.








  4. Click "Install Now"









  5. Read and accept the software license. Check "I accept the license terms." Click Next








  6. Click "Custom (Advanced)" since we're installing a fresh copy of Windows, and not upgrading.
  7. Select your hard drive or partition from the list.




    **I won't go into how to partition here. This guide is just for a single-partition, single-boot system.



  8. (It looks a lot like Vista, but don't worry; it's definitely not. . . . I hope)
  9. From this point on, it's pretty much auto-pilot, until it's time to fill in your user details.
  10. After the system reboots, type in your user information.
  11. Type in product key (this may be the last step for some of you posers out there heh heh heh)
  12. Finish the rest of the options using your own preferences and common sense. I'm done here.
P.S - I recommend antivirus software. Avast is wonderful, and I don't just say that because it's free. . . . OK yes I do. No, it's really wonderful. I use it every time someone asks me to "fix their computer" cuz they downloaded a virus. Home version is 100% free. Professional is a free trial. Home is perfectly good, even if you're a professional.

Saturday, September 26, 2009

Hacking into my Zune. . . . literally

OK, so over the past couple of years, my Zune 80 and I have had a love/hate/hate/hate/hate/love/hate/hate relationship. No matter how that may look in WRITING, the good truly has outweighed the bad. So when it zonked out on me this final time, I felt a moral obligation to try to save her (yes, "her". . . I actually named her Zoey). And since Zoey was [literally 2 days] outta warranty when I first started having this problem and Microsoft wanted $159 for service, I decided I had nothing to lose by finding a T4 screwdriver and trying to fix the problem myself.

The problem: I couldn't seem to turn her on anymore, no matter what buttons I pressed (heh heh). When I pressed the "Play" button, I got the "low battery" indicator image. While plugged up (AC or USB), the "charging" graphic flashed, but the OS would never load.

~~~...::flashback::...~~~
This had happened before, and I had simply given up on my baby. I just put her away in the box and used my PSP for a music player. I was sad, but it did the job. After leaving Zoey in the box for like 2 months, I came back, just to see what would happen, pressed the play button, and VIOLA!* She came right on for me.
~~~...::/end flashback::...~~~
*I know it's really voilà. . . just more fun this way

 ::siiiigh:: Back to reality. This time, I tried that and no luck. After exhausting all software options, my logic was that there must be something wrong with the battery. Maybe if I disconnected and reconnected it, then it would function again.If that didn't work I would go ahead and buy a replacement battery. Sooooooo, after a little deliberation, and a bit of mental preparation, I went ahead and got started.

Note: Though it'll go without saying, I didn't have a camera while actually taking it apart. This is more of a journal entry than a tutorial.


Procedure:
I got an idea of how to do this from Rapid Repair's Zune disassembly guide. I improvised some of it as well, as you'll soon see.

  1. Since the plastic cover at the top had already been lost, I didn't have to remove that. I just started by removing two T4 screws at the top of the unit.
  2.  
  3. Now, this part was pretty tricky - removing the aluminum back. I suppose there should be an intermediate step describing how to loosen the backing first. So maybe I wouldn't have CRACKED MY SCREEN!
  4.  
  5. To loosen the casing, I took a very slim flat-head screwdriver, inserted it between the front and back casings and twisted slightly. There are clips holding the external case together. Twisting the screwdriver essentially gently unclipped them, and methodically pried the case open. . . too bad I discovered this procedure AFTER I had already CRACKED MY SCREEN!
  6.  
  7. Now, once the casing was open, there was a lot of tape everywhere. Instead of just going on a tape-removing rampage, I drew a picture of what I had, just in case some wire or ribbon cable got disconnected in the process (which, inevitably, it did).






I took this picture after I got it apart (obviously). Although it's pretty crappy quality, you can see I flipped the hard drive over to have a better look at the battery connections.

It was here, when I saw one of the four wires (black, blue, red, white) leading from the battery to solder points on the board had come disconnected. I'm not sure if this happened with handling or if it was the cause of my problem. If it had come apart after I opened the Zune, then I still had accomplished my goal of disconnecting the battery. If it was already apart, then I had found a problem. Whatever the case, I knew it needed to be soldered back on.

It was a relatively simple solder job. I used some fingernail clippers to strip the blue wire back some, then heated the solder joint and set it in place. Turned it over, and saw the beloved Zune boot logo!

YIPPEEE!!!!

But that's not the end. . . after I got Zoey all buttoned up again, I noticed a new issue - the little "Hold" icon in the bottom of the screen was lit, and no button presses registered. Great. I pressed the Zune in a certain spot, and noticed while applying pressure directly over this particular place, the icon disappeared. So I took it apart again.

Here's the drawing I made:
 



At this point, I noticed that the ribbon cable which controlled the hold functionality was not being snugly held in place. I pressed down on the ribbon cable connection to the board, then toggled the hold switch, and it worked fine. I replaced the tape, put the zune back together, and all is well again. . . . . except for the cracked screen.




Thursday, September 24, 2009

How to Jailbreak an iPhone 3G

OK, so this being my first post, I'll start with something simple. Something which I've had to do many times over the past 9 months - jailbreaking my iPhone.


Let's start with defining "jailbreak." Well, in my own words, Apple has put stupid limitations on this wonderful piece of phonery, and jailbreaking is removing those limitations. A factory iPhone is like having a Lamborghini Murcielago with a governor at 15 mph. For example, Apple says that the iPhone 3g doesn't do video. The correct statement is, "Apple doesn't ENABLE the iPhone 3g to do video." Jailbreaking does. . . . among with a host of other things.

***Theoretically, jailbreaking DOES void your warranty, but if you have a problem, just restore your original software before taking it to the Apple store. It's the equivalent to GM saying your warranty is void because your car is dirty - just wash it before you take it in. Problem solved. Amen.

Anyway, enough blabber. Let's get to the biz.

This guide will go through jailbreaking NOT UNLOCKING the iPhone 3G for use with AT&T service. Unlocking allows you to use the iPhone with any GSM service provider (in the US, there are only 2: T-Mobile and AT&T). There are similar, but different, procedures for the first-generation iPhone, iPhone 3GS, and iPod Touch.


Things you'll need:
  1. An iPhone 3G (duh)
  2. The proper .ipsw (iPhone software file (which you can find relatively easily by Googling). . . . or better yet, here) This tutorial is stricly for 3.0 **(or 3.01. . . .so I guess that's not strictly. I suppose the more accurate way of saying it is, it's not for 3.1. Although I haven't tried jailbreaking 3.1 yet, I've just read bad things about it.)
  3. A jailbreak application. redsn0w is cute, but I like PwnageTool better. It's easy, and has more configuration options.
Procedure: 
  1. If you have your iPhone set up already, you may wanna back it up before proceeding. It'll preserve your texts, contacts, calendars, settings, etc. I recommend even doing a full back-up as opposed to just syncing. In iTunes, right-click (Ctrl+Click on Mac) your iPhone and select "Back Up." Let it do its thing
  2. Open PwnageTool and select iPhone 3G. Click Next arrow





  3. Browse to the correct .ipsw file "iphone1,2_3.0_7a341_restore.ipsw" and continue





  4. Select "General," then press Next arrow. (At this screen, you can customize your applications. I'm skipping that, because I've had trouble when I pre-install certain jailbroken apps. I haven't narrowed it down to which one(s) yet though. So just to be safe, don't mess with any more of these options unless you know what you're looking for).



  5. Deselect the Options "Activate the phone" and "Enable baseband update" and make the Root partition size 700 Mb. This is a safe number, maybe too big, but so what.



  6. Click the Back arrow to return to the options menu
  7. Click "Build" and then the Next arrow
  8. Choose a location for your jailbreak file. It will be named something like "iphone1,2_3.0_7a341_custom_restore.ipsw" 
  9. At some point in the building process, it will prompt you for your system password. Enter it.
  10. After the file builds, PwnageTool will guide you into putting the iPhone into DFU mode. 
  11.  
      Entering Device Firmware Update mode 
    • Although the application will guide you through this, I'll still cover it here.
    • Turn off the iPhone 3G
    • Hold Home and Power button for 10 seconds
    • Release Power button, but continue holding Home button for additional 10 seconds
    • If this procedure completes correctly, PwnageTool will tell you. 
       
  12. After entering DFU mode, open iTunes. You should get a pop-up saying iTunes has found an iPhone in recovery mode. You must restore this iPhone before it can be used with iTunes"
  13. Hold Shift (Option on Mac) while clicking "Restore" in iTunes. This will allow you to navigate to your custom restore file. 
  14. Select the custom restore file, and you're off!
  15. If the restore fails, restart your computer and try again. That usually fixes it.
  16. After iTunes finishes the restore, it will ask you to set up your iPhone. Sync from the latest version that you saved in the Preparation section of this tutorial.


Screenshots from PwnageTool by iPhone Dev Team