
Chapter 11 – Phone Book Commands
Multi-Tech Systems, Inc. CDMA Wireless AT Commands (PN S000294J)
65
Write Phonebook Entry +CPBW
Description:
This command writes a phonebook entry to location <
index
> in the current phonebook selected with the
+CPBS command.
If the “MT” phonebook is selected, <index> is in the range of the combined “ME” and “SM” phonebooks.
When using auto address mode (<index> not specified in the command), the “ME” phonebook is accessed
first for an available location. If a location is not available in the “ME” phonebook, the “SM” phonebook is
accessed.
The +WSPC command must be issued with a valid SPC code value before entries in the “EN” phonebook
can be changed.
Values:
<index>
Integer type value depending on the capacity of the currently selected phonebook.
<phoneNumber>
Phone number is in ASCII format. Valid characters are 0-9 and *, #, -.
<TON/NPI>
Type of address in integer form. The MSB of this will
always
be set high.
<text string>
Text string or Unicode formatted record.
Note:
PIN2 verification is required to do this command on the FDN. If the PIN2 authentication has been performed
during the current session, the +CPBW command with FDN is allowed.
Command
Possible Responses
AT+CPBS=”FD”
Note: Select FDN phonebook
OK
AT+CPBW=5,”8585551212”,145,”test”
Note: Write in FDN at location 5
+CME ERRO: 17
Note: PIN2 is required
AT+CPIN2?
RUIM PIN2
Note: SIM PIN2 is required
AT+CPIN2=1234
Note: Example PIN2 entered
OK
Note: PIN2 successfully entered
AT+CPBW=5,”8585551212”,145,”test”
Note: Write in FDN at location 5
OK
Note: Write in FDN successful
Syntax:
Command syntax:
AT+CPBW=<index>,”<phoneNumber>”,<TON/NPI number>,”<text string>”
Command
Possible Responses
AT+CPBW=1,”6195551212”,145,”test1”
Note: Write location 1. Message cannot begin with the
characters ‘80’, ‘81’, or ‘82’ (Unicode message record
identifiers).
OK
Note: Data stored in location 1.
AT+CPBW=5,”6195551212”,145,”8000410042”
Note: Write location 5 using Unicode format for the <text
string>; character input mode.
OK
Note: Data stored in location 5.
AT+CPBW=5,”6195551212”,145,”<bytes>”
Note: Write location 5 using Unicode format for <bytes>;
binary input mode. Message cannot contain byte values
0x00 (null) or 0x22 (“); message truncation will result.
OK
Note: Data stored in location 5.
AT+CPBW=6,”6195551234”,145,”80xyz”
Note: Write location 6.
OK
Note: Data stored in location 6. The string
“80xyz” is invalid UCS2 format and is
interpreted as a non-Unicode string.
AT+CPBW=2
Note: Erase location 2
OK
AT+CPBW=1,”8585551212”,145,”test1”
Note: Location 1 overwritten
OK
AT+CPBW=80,”8585551212”,145,”test80
Note: Error left off trailing quotes
ERROR
AT+CPBW=,”8585551212”,145,”test”
Note: Write to the first open location
OK
AT+CPBW=,”8585551212”,145,”FullBook”
Note: Phonebook is full
+CME ERROR: 20
Note: Phonebook full
AT+CPBW=,”8585551212”,145,”Text is too long for this ”
Note: Write string to the first open location.
+CME ERROR: 24
Note: Text string exceeds the maximum
character length