gsmpb(8)

gsmpb8

Gsm mobile phone phonebook manipulation program

Usage

gsmpb [-b baudrate] [--baudrate baudrate] [-c] [--copy] [-d destination device or file] [--destination destination device or file] [-h] [--help] [-i] [--index] [-I init string] [--init init string] [-p phonebook name] [--phonebook phonebook name] [-s source device or file] [--source source device or file] [-t character set] [--charset character set] [-v] [--version] [-V] [--verbose] [-X] [--xonxoff] [-y] [--synchronize]

Overview

gsmpb can store or retrieve phonebook entries residing in a GSM mobile phone's phonebook to or from a file. A synchronization mode is also available.

gsmpb reads entries from the source which can be a mobile phone (if a serial device file is given) or a file (if a file name is given). The source is never modified. gsmpb writes phonebook entries to a destination file or device. Depending on the mode the source is copied to the destination file, thus overwriting the destination, or the destination is synchronized with regard to the source which is the default (details see below).

If "-" is given as the parameter for the --source or --destination options, the phonebook is read from standard input and/or written to standard output, respectively.

Phonebook entries names are encoded using the GSM default alphabet in the mobile phone, whereas they are stored using the Latin-1 encoding in phonebook files. When reading phonebook entries from a mobile phone entry names are converted from the GSM default to Latin-1. Characters that can not be converted to Latin-1 are encoded as character code 172 (Latin-1 boolean "not"). When writing file-based phonebook entries to a mobile phone a conversion to the GSM default alphabet takes place. Characters that can not be converted are encoded as GSM delta (code 16). If the default character set has been changed using the --charset option no conversion takes place.

Error messages are printed to the standard error output. If the program terminates on error the error code 1 is returned.

Options

-b baudrate, --baudrate baudrate

The baud rate to use. The default baudrate is 38400.

-c, --copy

This causes the contents of the source to be copied to the destination. After this operation the destination has exactly the same contents as the source.

-d destination, --destination destination

The destination device or file.

-h, --help

Prints an option summary.

-I init string, --init init string

Initialization string to send to the TA (default: "E0"). Note that the sequence "ATZ" is sent first.

-i, --index

If the index position is given, gsmpb preserves the assignment of entries to memory slots in the mobile phone's phonebook. This can be used to backup phonebook entries with their position into a phonebook file or to change the position of entries by editing a phonebook file and writing them back to the mobile phone. If this option is given the phonebook file used as the source must contain indices for every entry. Additionally, these indices must be unique, ie. it is not allowed to assign one entry twice to a specific position in the mobile phone's phonebook.

-p phonebook, --phonebook phonebook

The name of the phonebook to read from or write to. This is only used for device sources and destinations. Commonly available phonebooks are:

FD

SIM fixdialling-phonebook

LD

SIM last-dialling-phonebook

ME

ME phonebook

MT

combined ME and SIM phonebook

SM

SIM phonebook

TA

TA phonebook

-s source, --source source

The source device or file.

-t character set, --charset character set

Set the character set to use for phonebook operations (default is the GSM default alphabet).

-v, --version

Prints the program version.

-V, --verbose

Prints out a detailed progress report.

-X, --xonxoff

Uses software handshaking (XON/XOFF) for accessing the device.

-y, --synchronize

This causes the contents of the source to be synchronized with the destination (default). Synchronization in this context means:

-

If the source contains an entry with a name that does not exist in the destination this entry is added to the destination.

-

If the source contains an entry with a name that can also be found in the destination, the entry in the destination is overwritten (ie. the telephone number is updated). Exception: More then one entry with the name exists in the destination. In this case the new entry ist just added.

-

Entries in the destination that do not exist in the source are deleted.

Note that synchronization has the following properties that differ from copying: This algorithm does not change the location of unchanged entries in the destination phonebook. The synchronization function is not case-sensitive when comparing names.

Phonebook file format

Phonebook entries are stored in phonebook files that are meant to be human-readable and -editable. There is one phonebook entry per line, and each line has the format:

index|text|phone number

The fields have the following meanings:

index

The index of the entry which must be a positive number. The index may also be empty. Indices can be used in conjunction with the --index option to store the entry into a specific position in the mobile phone.

text

Descriptive text for the entry. The text may contain the special characters '\', '|', carriage return (ASCII code 13), or line feed (ASCII code 10). These must be written "\\", "\|", "\r", "\n", respectively. The text should only contain characters that can be encoded using the GSM default alphabet (see comments above).

phone number

Phone numbers can only contains the digits 0-9 and the '+' sign. A '+' sign denotes an international number.

Examples

The following invocation of gsmpb synchronizes the mobile phone's SIM phonebook with the file $HOME/.phonebook:

gsmpb --synchronize -b 19200 -d /dev/mobilephone \
      -s $HOME/.phonebook -p "SM"

Releases

9 releases since Debian 4.0 (Etch); the text changed 6 times.

  1. 4.0
  2. 5.0–6.0
  3. 7
  4. 8
  5. 9–10
  6. 12
  7. 13

Author

Peter Hofmann <[email protected]>

Bugs

Report bugs to [email protected]. Include a complete, self-contained example that will allow the bug to be reproduced, and say which version of gsmpb you are using.

From gsm-utils 1.10+20120414.gita5e5ae9a-3+b1 in Debian 13 (Trixie). Parsed by carta from the page's man source.