Thursday, March 4, 2010

iPhone with a prepaid plan

I liked the iPhone the first time I saw it, but I never could rationalize spending $80/month for service because I spend less than $8/month with a T-mobile prepaid plan.  Then I read a comment on an article about Google's Nexus One that said you can use a T-mobile SIM card in the iPhone because they both use GSM.  So I purchased a used iPhone 2G (I don't need 3G because I don't have a cellular data plan), unlocked the phone, and inserted my T-mobile SIM.  It works!  I have been using it since mid-January and I love it.  I don't miss the cellular data plan because there are lots of free Wi-Fi hotspots, and I don't really want to be "plugged in" all the time.

A few weeks later my mom asked me for a cell phone recommendation, and she has an AT&T GoPhone prepaid plan.  I thought a locked iPhone might work because it's AT&T, but I had to help unlock hers also.

I had to cobble together instructions and downloads from several sources, so I collected them in this blog entry in case I need to do the same thing again.

I tried unlocking the phone with version 3.1.2 software but BootNeuter didn't work, and I found that others had the same problem.  The most concise summary of the approach is provided in a comment from SOLUTION!!!, but there were no links.  So here are the instructions for Windows, step-by-step, with links:
  1. Buy a used 2G iPhone.  It doesn't matter what version of software it has.  If you buy one that is already unlocked then you can skip to the last step.
  2. Create a new folder for the following downloads:
    1. Download the 3.0 IPSW software for iPhone (not 3G) from here.
    2. Download RedSn0w 0.7.2 for Windows and unzip it.
    3. Download BL-39.bin and BL-46.bin
  3. Perform a DFU restore as follows:
    1. Plug the iPhone into your computer
    2. Launch iTunes
    3. Press and hold both the power button and the home button for 10 seconds, then release the power button only and continue to hold the home button until your computer says something about recognizing a DFU device.
    4. In iTunes, click the restore button while holding down the shift key.  
    5. You should see a dialog that allows you to select the IPSW file you downloaded.
    6. Wait for the iPhone to be restored to 3.0.
  4. Run RedSn0w and follow the instructions.  Select your downloaded IPSW and bin files when prompted.  Make sure you check the box to unlock the phone.
  5. Insert your SIM card by pushing the end of a paperclip into the paperclip-sized hole at the top of your iPhone, adjacent to the headphone jack.
Enjoy using your iPhone with a prepaid plan.  I like T-mobile because you can buy 1000 minutes for $100 and they don't expire for a year.  And if you're like me and you don't even use that many minutes in a year then you can add $10 just before they expire and you get another year.  That's $55 per year, or about $4.50 a month, including all taxes and fees.

System.nanoTime() does not always return a value greater than the previous call

 
-----Original Message-----
From: IncidentDaemon@sun.com [mailto:IncidentDaemon@sun.com]
Sent: Wednesday, October 14, 2009 1:52 PM
To: John Amos
Subject: Your Report (Review ID: 1630000) - System.nanoTime() does not always return a value greater than the previous call

************************************************
Dear Java Developer,

Thank you for your interest in improving the quality of Java Technology.

Your report has been assigned an internal review ID of 1630000, which is NOT visible on the Sun Developer Network (SDN).

Please be aware that the large volume of reports we receive sometimes prevents us from responding individually to each message.

If the information is determined to be a new Bug or RFE, or a duplicate of a known Bug or RFE, you will receive a followup email containing a seven digit bug number.  You may search for, view, or vote for this bug in the Bug Database at http://bugs.sun.com/.

If you just reported an issue that could have a major impact on your project and require a timely response, please consider purchasing one of the support offerings described at http://developers.sun.com/services/.

The Sun Developer Network (http://developers.sun.com) is a free service that Sun offers. To join, visit http://developers.sun.com/global/join_sdn.html.

For a limited time, SDN members can obtain fully licensed Java IDEs for web and enterprise development.  More information is at http://developers.sun.com/prodtech/javatools/free/.

Thank you for using our bug submit page.

Regards,
Java Developer Bug Report Review Team



---------------------------------------------------------------


Date Created: Wed Oct 14 14:52:15 MDT 2009
Type:        rfe
Customer Name:   John Amos
Customer Email:  ***@****.***
SDN ID:      
status:      Waiting
Category:    java
Subcategory: classes_lang
Company:     ******
release:     5.0
hardware:    x86
OSversion:   windows_2003
priority:    4
Synopsis:    System.nanoTime() does not always return a value greater than the previous call
Description:
 A DESCRIPTION OF THE REQUEST :
On some systems with VMWare 2.5.x, the difference between two calls to System.nanoTime() is negative (t1 - t0 < 0).  AbstractQueuedSynchronizer assumes this will never happen.



JUSTIFICATION :
While it is valid to claim that this a defect in VMWare and/or Windows and/or the hardware, it is also irrelevant.  System.nanoTime() should be written defensively, so that it can never return a value that is less than the value from the previous call.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
System.nanoTime() should never return a value that is less than the value from the previous call.  If that isn't possible on the host platform, then this method should write an error message to the console.  The current behavior of failing silently is not acceptable.
ACTUAL -
Runnables that are in the queue of a ScheduledThreadPoolExecutor never run because AbstractQueuedSynchronizer.awaitNanos() is in an infinite loop.  I confirmed using a debugger that the expression (now - lastTime) in this method evaluates to a negative number.

---------- BEGIN SOURCE ----------
now - lastTime evaluates to a negative number in the following method from AbstractQueuedSynchronizer, which is used by ScheduledThreadPoolExecutor.

public final long awaitNanos(long nanosTimeout) throws InterruptedException {
            if (Thread.interrupted())
                throw new InterruptedException();
            Node node = addConditionWaiter();
            int savedState = fullyRelease(node);
            long lastTime = System.nanoTime();
            int interruptMode = 0;
            while (!isOnSyncQueue(node)) {
                if (nanosTimeout <= 0L) {
                    transferAfterCancelledWait(node);
                    break;
                }
                LockSupport.parkNanos(nanosTimeout);
                if ((interruptMode = checkInterruptWhileWaiting(node)) != 0)
                    break;
                long now = System.nanoTime();
                nanosTimeout -= now - lastTime;
                lastTime = now;
            }
            if (acquireQueued(node, savedState) && interruptMode != THROW_IE)
                interruptMode = REINTERRUPT;
            if (interruptMode != 0)
                reportInterruptAfterWait(interruptMode);
            return nanosTimeout - (System.nanoTime() - lastTime);
}


---------- END SOURCE ----------
workaround: 
comments: