Kim’s New Phone

I have to post about this because I spent more than three hours on it, and for me any non-parenting/husbanding activity that takes more than a few minutes is a significant event. Kim replaced her broken Razor V3 with a Pantech Matrix last week. I’m not that big of a phone geek, BUT I am liking this phone a lot.. mostly because it doesn’t run an MS operating system and it has a real QWERTY keyboard. Its been a while since I’ve looked at any recent phones other than the iphone or G3.. my own phone is approaching old age and the features I thought were cool on it are now pretty much standard. The problem with Kim’s old Razor is that the keypad is busted.. no keys worked on it. The people at Cingular were unable to transfer her contacts or photos to her new phone so I thought that I would give it a try. Here is how I did it.

After compiling USB_ACM into the kernel on my Linux (LFS) machine I was able to use moto4lin to copy her photos off with a usb cable. For anyone else that needs to do this with a Razor, I needed to put it into P2K mode.. the only way I found to do this on this phone was from a terminal do:

AT+MODE=8

From there moto4lin was able to bring up the file list and I copied everything down.

Next step was to get the phone book.. which as it turns out was the most difficult part. Using a terminal again I did a:

AT+MPBR=1,100

to retrieve contacts #1-100. This gave me a list with each row looking something like:

+MPBR: 17,"5855551234",129,"Some Name",3,0,255,0,1,1,255,255,0,"",0,0,"","","","","","","",""

The information I needed was the first few fields: Contact Id, Phone Number, nType, Name, eType. Since she had less than 60 rows, I copied these out and pasted it into a file and wrote a little PHP script to pull out the number, name and eType and put them into the insert format for her new phone. The eTypes are:

0 Work
1 Home
2 Main
3 Mobile
4 Fax
5 Pager
6 Email
7 Mailing list

For her new phone I used Bluetooth to insert the new contacts. To get this working I needed to find the phone ‘s address with:

hcitool scan

And then get a /dev device for it with rfcomm. But first I needed to find the modem channel on this phone. To get this I did a:

sdptool browse

And looked for “Dialup Networking”. In the case of the Matrix this is channel 1 so the rfcomm command line was:

rfcomm <ADDRESS> 0 1

The address was the address we found with hcitool, the 0 is the rfcomm device number i’m giving it (will show up as /dev/rfcomm0) and the 1 is the channel. From here I can use minicom or whatever terminal program and do my AT commands to insert. But first I had to set the phonebook to insert to. I couldn’t figure out where to put the phone’s own phonebook entries, so I used the SIM card, which is set with:

AT+CPBS="SM"

I had the PHP script that I mentioned earlier to pull out the name and number spit them out in the preformated GSM phonebook insert commands. Which look like:

AT+CPBW=1,"5855551234",129,"Some Name"

The 1 is the index number, you’ll need to increment this for each entry and the 129 is the non-international phone number.. for me it was the same for every entry and matches what I pulled off of the Razor. Once the numbers were inserted I needed to power cycle the phone to get them to show up. I also wanted the entries to show up with the extra phonebook features offered on this phone (like picture identification and such) so from the phone’s own interface I copied all the SIM phonebook entries onto the phone and then deleted them from the SIM card to avoid duplicates. Seems like everything worked.. one ugly thing about doing this was that the Razor has a separate entry for each number, so a cell number and a home number for “Joe Smith” would be two separate entries in the Razor’s CPBR list, I had my script use the eType to put a (M) or (H) next to the name to signify the type of number it was.

For anyone else interested in doing something similar, you will find more information on the Razor’s AT commands here. And the standard GSM AT commands here.

This was a fun project that I don’t get to do much of anymore.. and I am really liking the Matrix.. and I’m seriously thinking that when the time comes to replace my own (now ancient) phone I’ll go for this instead of an iPhone or G3.. we’ll see though.

About Dustin

Married 39 year old father of three software developer in Rochester, NY.
This entry was posted in Technology and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *