HOWTO use an unlocked Android phone in Hong Kong

While there are different pay-as-you-go SIM cards available in Hong Kong, and a multitude of different Android phones, here what I used in my recent trip to Hong Kong, in case others find this helpful:


Disclaimer:

  • In the US, buying a cellphone “out-of-contract” is not the same as buying a cellphone “unlocked”. All of the following only works for an unlocked phone. Make sure your phone is unlocked before you get on the plane.
  • Different cellphone companies have different policies on this. AT&T declared that, despite my being a multi-year customer, with no contract, they would not unlock my phone per policy. T-Mobile said upfront that they would need ~40days from date-of-purchase of “out-of-contact” phone before I could ask to have it unlocked. On the 40th day, when I asked T-Mobile to unlock my phone, they sent me the phone unlock codes within 48hours.
  • Make sure your phone supports GSM. Sounds obvious, but still needs to be said. Also, while in Hong Kong, I could only find pay-as-you-go SIM cards that supported 2G or 3G. The only 4G or faster that I could find were as part of monthly contracted plans; if you know of any that I missed, please let me know.

  • At any 7-11 store in Hong Kong, buy a China Mobile pay-as-you-go SIM card. In my case, I bought the “IDD Talk Card“. It looks like the “Super Talk Card” has better rates but they were sold out.
  • Disassemble your phone to swap out sim card, insert new ChinaMobile sim card and power up the phone.
  • On the phone, enter “*#130#” and press dial (typically, the green handset button). This should send you a text message within a few seconds containing:
    * your mobile number
    * remaining balance on your SIM card
    * expiry date of the credits on your SIM card
    * whether or not you have a data plan set up (the default is “not”).

  • At this point you should be able to make/receive calls, and check your account balance. If you dont get this text message, go back and check your work.
  • Dont bother setting up the voicemail. No-one seems to use them; if you dont answer the phone, callers simply try again later or send you a txt msg.
  • Once you have verified that basic calling works, the next step is to setup “Mobile Data & WiFi Package”, as follows:
    * On the phone, enter “*#130#” and press dial (typically, the green handset button). This should send you a text confirmation prompt asking what duration you want the data plan.
    ** for 1 day, press “1” and hit ok
    ** for 7 days, press “2” and hit ok
    ** for 30 days, press “3” and hit ok
    * to verify data plan status, enter “*#103#” and press dial.
    * to cancel data plan, enter “*103*02#” and press dial.
    * Note: be careful of letting data plan expire, yet continuing to use data, because the usages fees jump significantly.
    * (I found these, along with a full set of commands, on www.hk.chinamobile.com).

  • Next, to make sure that your android phone is correctly configured for 3G data, I had to do the following manually on my Android2.2 phone:
    * on home screen, go into “settings”
    * go into “wireless & network settings”
    * go into “mobile networks”
    * go into “access point names”
    * if there is not already an “cmhk” (peoples.net), then create one as follows:
    ** Name = cmhk
    ** APN == peoples.net
    ** Proxy == Not set
    ** Port == Not set
    ** Username == Not set
    ** Password == Not set
    ** Server == Not set
    ** MMSC == Not set
    ** MMS proxy == Not set
    ** MMS port == Not set
    ** MCC == 454
    ** MNC == 12
    ** Authentication Type == None
    ** APN Type == default

    …hit save, and go back to “access point names”.

  • verify that this new “cmhk” APK is present, and is selected.
  • In my case, I had to reboot my phone one more time, but that was it.
  • When you need additional credits, buy a card at 7-11 (they are everywhere!) or online at http://www.hk.chinamobile.com.

How to fix “Things freezes at start of Sync”

A few days ago, my Things-on-Mac stopped synchronizing with my Things-on-iPhone. I tried everything on the CulturedCode forums and from the CulturedCode support emails without success. It took a while to debug this, so here are details, in case it helps others (or I have to do this again!)

What am I running:

  • MacBookPro running OSX 10.6.4
  • Things-for-Mac v1.4.2 (1420)
  • iPhone 3G running v4.1 (8B117)
  • Things-for-iPhone v1.6.1

Symptoms:

Individually, I could use Things on Mac, and on iPhone, just fine. However, any attempt to synchronize between the two would cause a progress dialog box on Mac saying “Preparing…” which would just hang, until I force-quit it. In case I was being too impatient, I left it running overnight once but it was still just as hung in the morning.

This hang happened 100% of the time. This hang happened regardless of whether I started synchronization on Mac with File->”Sync with … now”, or on iPhone, by starting Things-on-iPhone while on same wifi network as mac. This hang happened on my home wifi network and also on the office wifi network, and even when I had no other applications running on my mac.

This setup has been working without problems for months, and I hadnt installed any new software or updated any existing software, so I’m still baffled what caused this problem.

Here’s some things I tried first, unsuccessfully:

  • rebooting mac, rebooting phone, clicking sync. Hang.
  • rebooting mac, rebooting phone, removing phone from list of devices, adding phone into list of devices, re-pairing iPhone to mac, clicking sync. Hang.
  • removing things from iphone and reinstalling through itunes, rebooting mac, rebooting phone, removing phone from list of devices, adding phone into list of devices, re-pairing iPhone to mac, clicking sync. Hang.
  • Repeat all of the above on home wifi, and then again on work wifi.
  • At home I also tried all of this after rebooting my home wifi access point.
  • All to no success.

At that point, I remembered the idea of taking backups, so backed up the entire Things data directory, which in my case, was in /Users/john/Things:
$ cd /Users/john
$ rsync -av Things Things-2010-10-01

Note: using “rsync” preserved the timestamps, in case that was part of the synchronization logic.

Here’s the steps that fixed it:

  • remove Things from iPhone
  • exit Things on Mac
  • inside the Things directory on Mac, there is a “Backups” directory. This contains daily backups of your Things data. I copied the oldest backup over the current “latest” Things data file, as follows:
    $ cd /Users/john/Things/Backups
    $ cp DatabaseBackup\ 2010-09-29\ \(653\).xml ../Database.xml

  • reinstall Things on iPhone
  • start Things on iPhone
  • start Things on Mac
  • remove phone from list of devices, add phone into list of devices, re-pair iPhone to Mac
  • exit Things on Mac, Things on iPhone
  • start Things on Mac, Things on iPhone, and click sync.
  • It took several minutes of “Pending…”, but this time the progress bar was moving which gave me hope. After a few minutes of this, success! I could now see all the items on my ToDo on both devices!! OK, it was all from almost a week old backup – but still, encouraging progress.

At this point, my theory was that something happened during the week that corrupted the Things data xml file. The files were all still valid xml files, so something more subtle was wrong. To find when the corruption happened, I repeated these steps for each different backup, each time copying up the next newest backup. In theory, once I found the corrupted xml file, sync should not work again. However, following the process above, each restore attempt worked, all the way to the latest backup! I ended up with the latest contents of my Things-on-Mac finally visible again on my Things-on-iPhone.

Final step was to do a quick test update on Mac, along with another test update on iPhone, then syncing to verify that both changes were handled correctly. This worked fine too – so everything is good!

take care
John.

Changing timezones across Zimbra / OSX 10.5 / iCal / iPhone

One of the drawbacks of working when newly arrived in a new, different timezone is how it complicates coordinating meetings with people in other timezones. Being here in Tokyo, this is my first time working while on the other side of the International Date Line and it took me a while to get used to that.

Adding to the confusion, I’ve had trouble keeping all my various electronic calendars in sync with each other; some calendars were in one timezone, some in another timezone, while some ignored timezone and displayed meetings at mixed times. Having finally figured it out, I’m posting here in case others find this useful, and also so I can remember what exactly to undo when I get back to MountainView. 🙂

  1. In Zimbra: click on the “Preferences” tab, and select new timezone from the “Default Timezone” popdown list. Click “save”. Logout. Login. Notice the calendar map existing events to the new local time.
  2. In OSX 10.5 10.6 on my MacBookPro: click on clock/timer on menu bar,  and select “Open Date & Time…”. Select the “TimeZone” tab, pick your new home timezone and then close that dialog box.
  3. In iCal, go to Preferences->Advanced, make sure that “Turn on timezone support” is enabled and close the dialog box. Now, back to the iCal main display of calendar events, in the top right corner, click on whatever timezone is written in gray font above the search box. This will show a popup list which includes all time zones already enabled in iCal, and has “Other…” at the bottom of the list. If your new timezone is not listed, select “Other…”,  add it to the list, and click “ok”. Now back at the iCal main display, make sure your new timezone is selected in the popup list. Notice the calendar now display existing events in the new local time.
  4. In iPhone: go to “Settings->Mail,Contacts,Calendars”. At the bottom of the list, select “Time Zone Support”. Make sure “Time Zone Support” is “on”, and set “TimeZone” to your new local city. Notice the calendar now display existing events in the new local time. UPDATE: With iOS4.1, I noticed that the new timezone did not change as expected. I went into “General->Date&Time”, turned off “Set Automatically”, then turned it back on,a and presto the timezone changed as expected. joduinn 13nov2010
  5. Add one test calendar entry into the iPhone and another into Zimbra. Force a sync, and confirm you can see both test entries in iPhone, iCal, and Zimbra – and all are at the right time.

Finally: Get the FoxClocks addon. Its accurate. It takes up very little screen space. Its a real gem. And it handled all the Daylight Savings changes this week just perfectly in “real world testing” (ie when I watched the US-times change Sunday and then re-asked someone in each timezone what their new time was!). Because of my calendar woes, I missed a few meetings this week, but things would have been much worse without FoxClocks!

How to search Thunderbird emails with Spotlight on a MacBookPro (OSX 10.5)

After upgrading from OSX10.4 -> OSX10.5, I was surprised to discover that Spotlight was no longer indexing Thunderbird emails.

I went back and rechecked all the steps in my earlier blog post, thinking maybe some files were lost in the upgrade, but all appeared ok. Using “/usr/bin/mdimport -L" I verified that the importer was present and still running. I even tried "/usr/bin/mdimportmdutil -E" to do a complete new re-index, in case it was somehow corrupted. Still no success.

Re-reading my earlier instructions, this step caught my eye:

  • Move Thunderbird.mdimporter to either “~/Library/Spotlight/” (which I did) or “/Library/Spotlight/” (as suggested in some other posts)

…so as an experiment, I moved the Thunderbird.mdimporter directory from “~/Library/Spotlight/” to “/Library/Spotlight/”, used "/usr/bin/mdimport -L" to verify that it was running in the new location. Immediately, Spotlight was finding matches within my Thunderbird emails.

The only change I did was to move the Thunderbird.mdimporter – could the location of this really be o.s. version specific? Maybe that explains why some people used one location, and some the other?

(If anyone reading this has done these same steps, I’d be very curious what location are you using for Thunderbird.mdimporter, and what version of OSX you are using!)

UPDATE: At first, Spotlight worked fine, but problems arose soon after the original blog post. Spotlight started giving garbage results pointing to unrelated files, showing confusing icons and filenames for matches, and eventually a system crash. I suspect that Spotlight from 10.5 got confused by the existing indexed data of Spotlight from 10.4, but have no data to back that theory.

To get Spotlight working with Thunderbird properly, I did the following:

  • move the Thunderbird.mdimporter directory from “~/Library/Spotlight/” to “/Library/Spotlight/”
  • use "/usr/bin/mdutil -E" to clean out the existing indices.
  • reboot the computer
  • use "/usr/bin/mdutil -E" to clean out the existing indices again. (maybe unneeded but by now I was being paranoid!)
  • used "/usr/bin/mdimport -L" to verify that it was running in the new “/Library/Spotlight” location.
  • wait a few mins, then try searching your email.
  • smile and celebrate with a cup of coffee.

Hope that helps – John. 04dec2008

How to export Contact info from Palm Pilot/Treo to Apple iPhone 3G/4Gs

The basic technique here is to export all your Contact info from Palm’s format to Microsoft Address format, and then import from there into the Apple iPhone Contacts app. The best instructions I’ve found so far were here, but I’ve added extra gotchas below in case it helps others. Note: this only transfers Contact info, and does not transfer Calendaring, ToDo or anything else.

Before starting, you need to do the following:

  1. On a MS Windows PC, install palm desktop and iTunes. (If you primarily use iTunes on another computer, its ok to just install iTunes on the windows PC, do this one-off data transfer, and then throw away that iTunes installation).
  2. Start Programs->Accessories->AddressBook and make sure that the Microsoft Address book is empty. (Note: this is not to be confused with MS Outlook, which is very different!)
  3. On the Palm Pilot/Treo, look through all the contacts for the following gotchas:
    • If any contact has two entries of the same type (for example, a person with two mobile numbers, or two work phone numbers), you will need to manually remove/rename one of these numbers before you start. I noticed that any contacts with multiple entries of the same type ended up losing all but one.
    • If you have the same person listed multiple times in your Palm Pilot/Treo, this will cause an error later on. I discovered that I accidentally had the same person entered twice, in two different categories. These duplicate names caused errors later on in the export process, so its best to check and fix this before you start. Worst case, if you miss a duplicate, its quick and easy to just throw away all the conversion work and restart from the beginning again….but it sure it annoying!
    • Check for any occurrences of  ‘=  (single-quote followed by equals)  in your contacts, or attached notes. If you find this anywhere, you must change them to something else before you can continue. It seems that ‘= (single-quote followed by equals) is used as a delimiter somewhere in the conversion process, so anything after that gets cut from that specific person’s info, and never transferred.
    • “Custom fields” are not transferred, so you should either migrate that data to one of the “standard” fields, or make a note of them, and come back later to cleanup by manually copying from palm desktop into MS Address book.

OK, thats it. Now we’re ready to begin:

  1. Hotsync your Palm pilot/treo with the Palm Desktop one final time. Remember, backups are your friend!
  2. Start Palm Desktop and view the Address page. Select the contacts you want to bring over (ctrl-A on keyboard if you want them all), then choose File->ExportvCard… to save all your contacts into one single file on your desktop.
  3. Start Programs->Accessories->AddressBook
  4. Drag and drop the newly created file from your desktop into Microsoft AddressBook. You’ll be asked to press “ok” for each entry being imported into AddressBook. Annoying but its very quick.
  5. Unplug your Palm Pilot/Treo, and plug in your iPhone.
  6. Start iTunes. On the iPhone page, Info tab, choose to sync contacts with Microsoft Address Book and click Apply.
  7. Sync your iPhone with iTunes – this will in turn pull the contacts from the Microsoft Address Book.
  8. On iPhone, look in Contacts app, and verify that all your contacts transferred over correctly. Specifically, look for long attached notes to make sure nothing was truncated.
  9. Undo step (6) in iTunes.

Thats it!

Again, this only transfers Contact info; I’m still investigating exporting Calendaring, ToDo and other types of “legacy data” – any hints? 🙂

Big tip-o-the-hat to: http://www.fixya.com/support/t161691-downloading_contacts_from_palm_iphone and also http://www.dba2csv.com. Both were wonderful help!

All this left me wondering why Apple didnt provide an import utility to handle migrating from Palm Pilot to iPhone…or from BlackBerry to iPhone.  That would sure make it easier for business users to migrate over to iPhone. Oh well.

UPDATE: These same instructions worked great tonight when migrating a friend from a Palm Pilot to a new iPhone 4Gs. Added warning about custom fields, which I missed in this first blog. joduinn 04-dec-2011

How to search Thunderbird emails with Spotlight on a MacBookPro (OSX 10.4.11)

Ever since I started using Thunderbird on a mac (over a year ago), its been annoying that Spotlight searches other files on my laptop, but not my emails. I finally had time to put aside an evening to try this, and got it working in just a few minutes.

Here’s what I did:

  • Shutdown Thunderbird. The more cautious should backup their files – I was feeling cavalier so didn’t bother.
  • Go to https://bugzilla.mozilla.org/show_bug.cgi?id=290057#c110 and download the attached Thunderbird.mdimporter.zip zipfile.
  • Open the zipfile on your desktop, and extract the file Thunderbird.mdimporter.
  • Move Thunderbird.mdimporter to either “~/Library/Spotlight/” (which I did) or “/Library/Spotlight/” (as suggested in some other posts)
  • Start Thunderbird, and go to Thunderbird->Preferences. In the Preferences dialog, go to the Advanced tab, and then at the bottom of the General sub-tab, click on the “Config Editor…” button. Search for mail.spotlight.enable, and double-click it in the search results to change the value from “false” to “true”.
  • Close Thunderbird.
  • Open a terminal shell, and run "/usr/bin/mdimport -L" to verify that the new Thunderbird importer is correctly found and now running. If Thunderbird.mdimporter is not here, go back and verify the steps above.
  • Some posts commented that you needed to restart your machine, but I cant remember if I needed to do this.
  • After waiting a few minutes, use Spotlight to search for an email. Try searching for something obvious – like “@” or your email address – the point is to see if any of the indexing has started. If the indexes are still being built, you might find very few results, but should at least get something. Allow time for indexes to get built on all emails.
  • Observe that Spotlight lists email messages in “Mail Messages” section of search results. Observe that clicking on an email message in search results will open a new Thunderbird window of that actual email.
  • Thats it – enjoy! 🙂

Tip of the hat to razal.de, dennis.ca, rosshollman.com, macosxhints.com for pointing the way; I ended up doing a subset/combination of parts of each of their instructions, so hope folks find the steps I followed useful.

For the record, I was using the following:

  • MacBookPro running OSX 10.4.11
  • Thunderbird 2.0.0.16

How to use Jawbone headset with Skype/SJPhone on a MacBookPro

I wanted to setup a headset for my work VOIP phone calls from my laptop. I already had a Jawbone headset for my cellphone, why not use that?
Literally all I had to do was:

  • make Jawbone discoverable (when powered off, press the black shiney section with raised lettering, until the LED starts alternating Red/White)
  • on Mac, in Bluetooth menu, “Set up Bluetooth Device”, pick “Headset”and walk through the dialogs to find devices. Enter passcode, which is defaulted to ‘0000’.
  • in Skype, preferences dialog, audio tab, set the “Audio Output”, “Audio Input” and “Ringing” options to each use the “Jawbone” menu item.
  • in SJPhone preferences dialog, audio tab, set the “Output” and “Input” options to each use the “Jawbone” menu item.

That was it.
It all just worked first time, and was literally all up and running in two minutes. It would have been even faster except I had to dig up the instructions on making Jawbone discoverable! It took me much longer to write this blog post, but thought this info might be useful to others.

For the record, I was using the following:

  • MacBookPro running OSX 10.4.11
  • Skype v2.7.0.330
  • SJPhone v1.60.299a
  • Jawbone headset(!)

How to reinstall the Palm desktop and still access pre-existing data

I always organize my applications separately from my data files.

  • All applications go under their default install location (ie: “C:\Program Files”).
  • All data files go under one separate tree (ie: “D:\John”). This allows me to easily migrate from one computer to another, do backups, replace disks, all without worrying if I missed any of my files. So far, so good.

Recently, I had to re-image the C drive on my laptop, and re-install WinXP, which in turn meant reinstalling all the applications. Tedious, but not a worry because all my data was safe on the other D partition, and I had all the original CDs.

For the most part, that worked perfectly. The only gotcha was while re-installing the Palm Desktop (v4.2).

I was concerned that the installer would overwrite my preserved data directory, so I told the installer to use the default user-data directory (ie: put user data under “C:\My Documents and Settings”). Once the installation was complete, I started the Desktop application, went to Tools->Options dialog box, to the “General” tab and tried to change the “Data Directory” to point to my existing “D:\John\PalmPilot” directory. Hitting “OK” failed out saying the directory “cannot be used to store your data because it is being used by another user”. Huh?

Turns out the solution is to:

  1. Shutdown the Palm Desktop application, and close the HotSync task icon in the windows taskbar notification area.
  2. Start “Regedit” (by doing Start->Run, enter “regedit” and click “OK”)
  3. In Regedit, search for the key “HKEY_CURRENT_USER\Software\U.S. Robotics\Pilot Desktop\Core\Path”, and change the data value of this to be the location of your existing data. In my case, I changed the data value to be “D:\John\PalmPilot”.
  4. Save and Exit Regedit
  5. Start Palm Desktop and confirm that it now automatically opens up the data found in D:\John.
  6. Restart hotsync, palm desktop, and verify that you see your data in the Palm Desktop application
  7. Hotsync and verify that changes show up on both your PC and your Palm!
  8. Done!

(Credits: I originally stumbled across this registry hack in a post I can no longer find but I will update this blog if I find it, because they saved my neck. Subsequent searching I also found http://www.palm.crevier.org/faq. Both postings were framed around setting up shared access to Palm Pilot calendars. The same registry hack worked for my problem, so I’m posting them here, in case it helps others in the same situation… and so I can find it easily if I need it again in future!)