<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/stylesheet.xsl"?>

<page	name='AT Commands to Access the Motorola V-Series Phonebook'
	author="Hugh Sparks"
	version="1.5"
	date="August 28, 2006"
	xmlns="http://www.csparks.com/XMLWithoutTears"
>

<!-- ********************************************************************* -->
<s name="Introduction">
<!-- ********************************************************************* -->

	<p>
	It turns out that Motorola decided to confound the unwashed
	by renaming a few of the standard GSM commands. Fortunately,
	the changes are very minor. The standard "CPxx" commands on
	this phone are "MPxx" instead. A few extra parameters are
	used as well, so maybe they wanted to avoid conflicts with
	other phone software. (The V60c is not a GSM phone, but it
	probably shares the same AT command set with all the other
	V60 models.)
	</p>

	<p>
	<i>Update:</i> I don&apos;t want to imply that Motorola
	is being <i>ornery</i> about the phone command set: The
	true GSM phones made by Motorola support both the standard
	GSM commands <i>and</i> the enhanced Motorola commands.
	My programs use the enhanced versions of the commands because
	I want to maintain some of the extra phonebook entry features
	such at the entry type: (Home, Work, Email, Mobile, Fax, etc.)
	</p>

	<p>
	The results presented here are far from complete, but
	they are enough to support simple phonebook applications.
	</p>

</s>

<!-- ********************************************************************* -->
<s name="Serial communication">
<!-- ********************************************************************* -->

	<p>
	When using a serial cable, 19200 baud is the proper
	speed setting for all the phones I've tried. 
	</p>

	<p>
	Note: Some serial-cable phones seem to learn the 
	baud rate from the first character sent and then
	get locked into that speed. You may have to 
	cycle the power on the phone when trying different
	speed settings.
	</p>

	<p>
	When using a USB cable, you can explore higher speeds. 
	Try the standard modem speed steps: 19200, 28800, 38400,
	57600, 115200, etc. 
	</p>

	<p>
	All of the Bluetooth phones seem to like 115200.
	Dispite the higher baud rate, the rate at which
	the phones can read and write phonebook entries
	feels very slow to me. Writing phonebook entries
	to the phone is extremely slow on the V551 and 
	V3 RAZR.
	</p>

<sc name="Serial device settings example"><![CDATA[
	19200 baud
	8 bits
	No parity
	1 stop bit
	Hardware flow control]]>
</sc>
</s>

<!-- ********************************************************************* -->
<s name="Phone mode selection">
<!-- ********************************************************************* -->

<sc name="Enable extended commmand mode"><![CDATA[
	at+mode=2 
	
	You must do this to enable the MP and CP commands. ]]></sc>

<sc name="Disable extended command mode"><![CDATA[
	at+mode=0
	
	I guess you should do this when you're finished. ]]></sc>
</s>

<!-- ********************************************************************* -->
<s name="Working with phonebooks">
<!-- ********************************************************************* -->

<ss name="What's in a phonebook?">

	<p>
	As we will see, the phone has several data storage areas organized
	as phonebooks. The main phonebook holds all the phone numbers and
	email addresses.
	</p>

	<p>
	A phonebook is organized as a simple array of entries. Each entry
	has fields for a person's name, a value string, and a type code.
	The type code tells us what sort of thing is in the value string.
	There are seven possible values for the type code, indicating various
	kinds of phone number or an email address. If the same person has
	several phone numbers, there will be one entry for each with a
	distinct type code. All the entries would have the same name.
	</p>

	<p>
	When an entry is deleted from a phonebook, the fields are simply
	set to empty strings. When a new entry is added, the phone locates
	the first empty entry to hold the values. The index of that entry
	becomes the speed dial number.
	</p>

</ss>

<sc name="Show available phonebooks"><![CDATA[
	at+cpbs=?

		+CPBS: "AD","QD","LD","RC"

	AD: The main combined phonebook (phone, email, all in one)
	RC: Received calls list
	LD: Last-dialed phonebook
	QD: Quick dial numbers
	
	The T730 has these phonebooks:

	ME: Not sure. Seems to select the main phone book.
	MT: Not sure. Seems to select the main phone book.
	ON: Not sure. Contains the phone's own number and one other entry.
	DC: Dialed calls. Same as LD on the V60
	MC: Last dialed number
	RC: Received calls
	AD: Main combined phonebook
	QD: Quick dial numbers ]]></sc>

<sc name="Select a phonebook"><![CDATA[
	at+cpbs="AD" ]]></sc>

<sc name="Describe the current phonebook"><![CDATA[
	at+mpbr=?

		+MPBR: 1-400,32,24,7,0-1,50

	Results for the V60:	
	
		1-400 	Number of possible entries in the phone book.
		32	Maximum length of phone number
		24	Maximum length of the name
		7	Number of entry types
		0-1	Index range for recorded voice patterns 
		50	Maximum size of an email address
			
	Results for the T730:

		1-500	Number of possible entries in the phone book
		32	Maximum length of phone number
		24	Maximum length of name
		7	Number of entry types
		0-21	Index range for recorded voice patterns
		50	Maximum size of email address

		Unknown field descriptors from the T730:
		(0,5-31,36-45,255)
		(0-2)
		(0-1)
		(1)
		(255)
		0
		(255) ]]></sc>

<sc name="List phonebook entries"><![CDATA[
	Show a selected entry:

		at+mpbr=indexValue

	Show a range of entries:

		at+mpbr=firstIndex,lastIndex

	Output format for an entry

		+MPBR: index,"valueString",nType,"name",eType,...

	index:
		Every phonebook entry has a unique integer index. 
		The value corresponds to the speed dial number.

	valueString:
		This field contains the phone number or email address.

	nType:
		128 Email address or mailing list
		    Phone "number" contains an "@" character. 
		129 National number
		145 International
		    Phone number has a leading "+" character.

	name:
		The name of the person. This is name the phone displays
		when you scroll through the entries.

	eType:
		0 Work
		1 Home
		2 Main
		3 Mobile
		4 Fax
		5 Pager
		6 Email
		7 Mailing list

	...
		Most phones will have additional information in
		the phonebook after the "eType". I have not
		figured out all these values. They are not
		used in the current version of MotoBackup.

	Example: Show the first entry. (A work phone number)

		at+mpbr=1

		Output:

		+MPBR: 1,"7529552604",129,"Serge Lang",0

	Example: Show an entry that contains an email address.

		at+mpbr=46

		Output:

		+MPBR: 46,"pickman@miskatonic.edu",128,"Richard Pickman",6 ]]></sc>


<sc name="Find an entry by name"><![CDATA[
	at+mpbf="Search string"

	Several results may be listed.
	Here is an example with Work, Home, Mobile, Fax, and Email.

	at+mpbf="Alfred Whitehead"

		+MPBF: 12,"7529530914",129,"Alfred Whitehead",0

		+MPBF: 13,"7529532800",129,"Alfred Whitehead",1

		+MPBF: 14,"7128102353",129,"Alfred Whitehead",3

		+MPBF: 15,"7529533517",129,"Alfred Whitehead",4

		+MPBF: 16,"al@cam.ac.uk",128,"Alfred Whitehead",6 ]]></sc>

<sc name="Write, modify or delete an entry"><![CDATA[
	General format:
	
		at+mpbw=index,"number or email",etype,"name",type

	Write or modify a phone number entry:

		at+mpbw=10,"4015524025",129,"Joseph Curwin",1

	Write or modify an email entry:

		at+mpbw=9,"euler@bbaw.de",128,"Leonhard Euler",6

	Erase entry number 9:

		at+mpbw=9  ]]></sc>
</s>
	
<!-- ********************************************************************* -->
<s name="Phone information">
<!-- ********************************************************************* -->

<sc name="Show the serial number"><![CDATA[
	at+cgsn

		+CGSN: ESN1753740714 ]]></sc>

<sc name="Show the revision number"><![CDATA[
	at+cgmr

		+CGMR: "2000.08.BC.02" ]]></sc>

<sc name="Show the model description"><![CDATA[
	at+cgmm

		+CGMM: "CDMA800","CDMA1900","AMPS800","MODEL=60c" ]]></sc>

<sc name="Show available character sets"><![CDATA[
	at+cscs=?

		+CSCS: ("8859-1","8859-A","8859-C","8859-H","ASCII","GSM","KSC5601","UCS2","UTF8") ]]></sc>

<sc name="Select a character set"><![CDATA[
	at+cscs="ASCII" ]]></sc>

</s>

<!-- ********************************************************************* -->
<s name="Links and credits">
<!-- ********************************************************************* -->

<links>

<link
	name="Gergely Kiss - AT Commands for GSM devices"
	url="http://gatling.ikk.sztaki.hu/~kissg/gsm/at+c.html#27.07me"/>
<link
	name="Alexander Traud - GSM pages"
	url="http://www.traud.de/gsm"/>
<link
	name="Com One Support - Extended GSM Commands"
	url="http://www.com1-support.com/docs/4in1/gsm/technic/extended.htm"/>

</links>
	
</s>

<!-- ********************************************************************* -->
<s name="Help">
<!-- ********************************************************************* -->

	<p>
	If you figure out more commands for this phone, I'd
	appreciate hearing from you:
	<link name="Email to Hugh" url="mailto:hugh@csparks.com"/>
	</p>

</s>

</page>


