Gammu:Full reference manual

From Gammu.org wiki

Return to Main page|Gammu main page|Reference manual

You can get a list of command line options from the below categories by issuing the command:

gammu --help <category>

Where <category> is one of the following words: call, sms, memory, filesystem, logo, ringtone, calendar, todo, note, datetime, category, backup, nokia, siemens, network, wap, mms, tests, fm, info, settings, other

Example:

gammu --help nokia

You can enable/disable debug from command line too. Please put

  • nothing - no debug level
  • text - transmission dump in text format
  • textall - all possible info in text format
  • errors - errors in text format
  • binary - transmission dump in binary format

between "gammu" and "real" parameters.

Example:

gammu nothing --identify
  • 1 Calls
  • 2 SMS and EMS
    • 2.1 Introduction to SMS formats
    • 2.2 Encoding chars in SMS text
    • 2.3 Chinese SMS
    • 2.4 SMS folders and locations
    • 2.5 Commands to get messages from phone
    • 2.6 Commands to delete messages from phone
    • 2.7 Commands to send messages/save messages to phone
    • 2.8 Other commands
  • 3 Phonebook memories (phonebook, calls history and others)
    • 3.1 Memory Types
    • 3.2 Commands to get contents of memory
    • 3.3 Other commands
    • 3.4 Support for voice tags (sound saved in phone as a voice recording)
  • 4 Filesystem
    • 4.1 command line options
    • 4.2 Managing playlists in 6230
  • 5 Logos and pictures
    • 5.1 Commands to get logos from phone
    • 5.2 Commands to write logos to phone
    • 5.3 Commands to converting logos from one type to another
    • 5.4 Other commands
  • 6 Ringtones
    • 6.1 User ringtones
    • 6.2 Default and user ringtones
    • 6.3 Ringtone files
  • 7 Calendar notes
  • 8 ToDo lists
  • 9 Notes
  • 10 Date, time and alarms
  • 11 Converting backup files
  • 12 Backing up and restoring phone/SIM data
  • 13 Backing up and restoring SMS
  • 14 Specific to Nokia phones
  • 15 Specific to Siemens phones
  • 16 Network
  • 17 WAP settings and bookmarks
  • 18 MMS and MMS settings
  • 19 FM radio
  • 20 Phone information
  • 21 Phone settings
  • 22 Commands that don't fit anywhere else

Calls

--monitor [times]

--getussd code

--dialvoice number [show|hide]

--maketerminatedcall number length [show|hide]

--getspeeddial start [stop]

--cancelcall [ID]

--answercall [ID]

--unholdcall ID

--holdcall ID

--conferencecall ID

--splitcall ID

--switchcall [ID]

--transfercall [ID]

--divert get|set all|busy|noans|outofreach all|voice|fax|data [number timeout]

Set call diverts

--canceldiverts

--senddtmf sequence

SMS and EMS

Introduction to SMS formats

These commands are provided for SMS. Gammu has got support for many SMS formats like:

  • Nokia Smart Messaging (used for monochromatic picture images, downloadable profiles, monochromatic operator logos, monochromatic caller logos and monophonic ringtones)
  • linked SMS (both with 8 and 16-bit identification numbers in headers)
  • EMS (this is SMS format used for saving monochromatic images, monophonic ringtones, animations, text formatting and others)

Encoding chars in SMS text

Text in SMS can be coded using two ways:

  • with GSM Default Alphabet - in single SMS you can have maximally 160 chars (Gammu doesn't support compressing such texts according to GSM standards, but it isn't big limit, because there are no phones supporting them), but they're from limited set:
    • all Latin small (abcdefghjklmnopqrstuvwxyz) and large (ABCDEFGHIJKLMNOPQRSTUVWXYZ)
    • all digits (1234567890)
    • some Greek (Φ Γ Λ Ω Π Ψ Σ Θ Ξ)
    • some other national (æ Æ ß à è É é ù ì ò ç Å å Ä ä Ö ö Ñ ñ Ü ü)
    • § £ ¥ @ ! " # & / ( ) % * + = - , . : ; < > ?
    • few other
  • with Unicode - in single SMS you can save maximally 70 chars, but these can be any chars including all national and special. Please note, that problems with receiving/displaying such SMS can be sometimes connected with limits existing in (recipient's) phone firmware.

Gammu tries to give solution for some issues connected with translating chars between phone and computer. If you copy text into SMS:

  1. all chars are internally converted into Unicode:
    • if they were given using standard input, there are used operating system functions (you need to have correctly set national support for Greek chars to have Greek chars conversion, etc.)
    • if you gave Unicode coded file to Gammu, chars from it are simply copied
  2. if SMS will use:
    • GSM Default Alphabet, Gammu will:
      • check, if some Unicode chars can be saved in GSM Default Alphabet using two chars only and will create such sequences (it's done for ^ { } \ [ ] ~ | € chars)
      • put all chars available in GSM Default Alphabet into SMS
      • try to save into SMS all other national chars (with dashes, dots, double dots, etc.) after replacing them with Latin
      • use "?" for all other chars
    • Unicode, Gammu will copy all chars into SMS

TIP: You can create Unicode file using WordPad in Win32 (during saving select "Unicode Text Document" format). In Unix can use for example YUdit.

TIP: when use ~ char in sms text and Unicode coding, text of sms after ~ char will blink in some DCT3 phones (like Nokia 3310)

Chinese SMS

If I understand correctly, they're saved with Unicode alphabet in SMS. Gammu is prepared for it. For example for sending/saving SMS just create Unicode file and use switch -inputunicode, when use send/savesms

SMS folders and locations

When you use SMS folder 0, SMS location is given from "flat" memory (all sms from all folders have unique numbers). It's sometimes emulated by Gammu. You can use it with all phones.

When give folder 1, 2, etc. SMS are taken from Inbox, Outbox, etc. and each SMS has unique number in his folder. Name of folders can depend on your phone (the most often 1="Inbox", 2="Outbox", etc.). This method is not supported by all phones (for example, not supported by Nokia 3310, 5110, 6110). If work with your phone, use --getsmsfolders to get folders list.

Phone Folder Memory
AT 1="Inbox",2="Outbox" SIM
3="Inbox",4="Outbox" Phone
DCT3 without own SMS memory 1="Inbox", 2="Outbox" SIM
DCT3 with own SMS memory (7110, 6210) 1="Inbox" SIM, when Read, UnRead
1="Inbox" Phone, when Sent, UnSent
2="Outbox" SIM, when Sent, UnSent
2="Outbox" Phone, when Read, UnRead
3="Archive",... Phone
DCT4 and Series 40 1.0/2.0 phones with own SMS memory 1="Inbox",2="Outbox" SIM
3="Inbox",4="Outbox",... Phone

Commands to get messages from phone

--getsmsfolders

Get list of SMS folders in phone and SIM.

--getsms folder start [stop]

Get SMS from specified locations. Option display SMS location like available in folder 0.

--getallsms

Get all possible SMS from phone and SIM. Each SMS is displayed just after getting from device (because of it please don't expect correct displaying linked SMS or EMS sequences). Option display SMS location like available in folder 0.

--geteachsms

Get all possible SMS from phone and SIM. Option get all of them, tries to find sequences (and link them) and display final content (texts, ringtones, bitmaps, etc.) to user. Option display SMS location like available in folder 0.

Commands to delete messages from phone

--deletesms folder start [stop]

--deleteallsms folder

Commands to send messages/save messages to phone

General format for sending messages is easy:

--sendsms SMSFORMAT destination options_specific_for_sms_format [switches_specific_for_sms_format] [switches_specific_for_sending_sms]

where:

  • instead of SMSFORMAT you should put selected by you SMS format (they're descibed later)
  • destination - recipient's phone number
  • options_specific_for_sms_format - some parameters required for used SMSFORMAT
  • switches_specific_for_sms_format - optional switches available for used SMSFORMAT
  • switches_specific_for_sending_sms - optional switches available for --sendsms:
    • -report - add requests for delivery report (it's the most often offered by cellular network operators for free and allows to check, if SMS were received by recipients' phone. Please note, that receiving such report doesn't mean, that SMS was READ on recipients' phone)
    • -validity HOUR|6HOURS|DAY|3DAYS|WEEK|MAX - set SMS validity. Default it's taken from SMSC settings (set 1 on SIM card or other specified by -smscset)
    • -save [-folder number] -
    • -smscset number - SMSC and validity settings will be taken from set number on SIM card. If not specified, there will be used set 1.
    • -smscnumber number - SMSC number. If not specified, SMSC number is taken from set 1 on SIM card or specified by -smscset.
    • -reply - when used, you allow recipient to answer on SMS using your SMSC. The most often you will pay for his SMS then.
    • -maxsms num - Gammu will take such part of SMS text, which can be saved in maximally num SMS

Similiary it's possible to save sms:

--savesms SMSFORMAT options_specific_for_sms_format [switches_specific_for_sms_format] [switches_specific_for_saving_sms]

where switches_specific_for_saving_sms:

  • -folder id - save to specified folder. Numerate folders from 1. The most often folder 1 = "Inbox", 2 = "Outbox",etc. Use --getsmsfolders to get folder list.
  • -unread - makes message unread. In some phones (like 6210) you won't see unread sms envelope after saving such sms. In some phones with internal SMS memory (like 6210) after using it with folder 1 SIM SMS memory will be used.
  • -read - makes message read. In some phones with internal SMS memory (like 6210) after using it with folder 1 SIM SMS memory will be used.
  • -unsent - makes message unsent.
  • -sent - makes message sent.
  • -sender number - set sender number (default: "Gammu")
  • -smscset number - SMSC number will be taken from set number on SIM card. If not specified, there will be used set 1.
  • -smscnumber number - SMSC number. If not specified, SMSC number is taken from set 1 on SIM card or specified by -smscset.
  • -reply - this will set indicator, that SMS sender allowed recipient to answer on SMS using his SMSC.
  • -maxsms num - Gammu will take such part of SMS text, which can be saved in maximally num SMS
  • -smsname name - SMS will be saved with specified name (used instead of name proposed by Gammu)

For each saved SMS there is displayed info about folder. Location is given like in SMS folder "0".

Now we will describe available SMSFORMATs:

format TEXT

Used for single/linked text SMS. Gammu reads SMS text, format according to used command line switches and send/save.

--sendsms TEXT destination [-report] [-validity HOUR|6HOURS|DAY|3DAYS|WEEK|MAX] [-save [-folder number]] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-inputunicode] [-16bit] [-flash] [-len len] [-autolen len] [-unicode] [-enablevoice] [-disablevoice] [-enablefax] [-disablefax] [-enableemail] [-disableemail] [-voidsms] [-replacemessages ID] [-replacefile file]

--savesms TEXT [-folder id] [-unread] [-read] [-unsent] [-sent] [-sender number] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-smsname name] [-inputunicode] [-16bit] [-flash] [-len len] [-autolen len] [-unicode] [-enablevoice] [-disablevoice] [-enablefax] [-disablefax] [-enableemail] [-disableemail] [-voidsms] [-replacemessages ID] [-replacefile file]

Switches specific for this option:

  • -inputunicode - input text is in Unicode.
  • -16bit - Gammu uses SMS headers with 16-bit numbers for saving linking info in SMS (it means less chars available for user in each SMS)
  • -flash - SMS will use Class 0 (should be displayed after receiving on recipients' phone display after receiving without entering Inbox)
  • -len len - specify, how many chars will be read. When use this option and text will be longer than 1 SMS, will be splitted into more linked SMS
  • -autolen len - specify, how many chars will be read. When use this option and text will be longer than 1 SMS, will be splitted into more linked SMS. Coding type (SMS default alphabet/Unicode) is set according to input text.
  • -unicode - SMS will be saved in Unicode format
  • -enablevoice, -disablevoice, -enablefax, -disablefax, -enableemail, -disableemail - SMS for setting voice mail, email or fax on phone display
  • -voidsms - many phones after receiving it won't display anything, only beep, vibrate or turn on light. Text will be cut to 1 sms.
  • -replacemessages ID - ID can be 1..7. When you will use option and send more single SMS to one recipient with the same ID, each another SMS will replace each previous with the same ID
  • -replacefile file - when you want, you can make file in such format: src_unicode_char1,dest_unicode_char1, src_unicode_char2,dest_unicode_char2 (everything in one line). After reading text for SMS from stdin there will be made translation and each src char will be converted to dest char. In docs there is example file (replace.txt), which will change all "a" chars to "1"

Example usages:

echo "I hate mondays" | gammu --savesms TEXT

saves SMS with text "I hate mondays"

gammu --savesms TEXT -maxlen 40 < file.txt

get maximally 40 chars from text file and save them into text sms

TIP: you can use format EMS with -text switch to have the same effect too.

format EMS

Used for EMS sequences. Please note, that currently bitmaps, ringtones, text formatting compatible with this standard it's not supported by Nokia phones and don't expect it there.

--sendsms EMS destination [-report] [-validity HOUR|6HOURS|DAY|3DAYS|WEEK|MAX] [-save [-folder number]] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-unicode] [-16bit] [-format lcrasbiut] [-text text] [-unicodefiletext file] [-defsound ID] [-defanimation ID] [-tone10 file] [-tone10long file] [-tone12 file] [-tone12long file] [-toneSE file] [-toneSElong file] [-fixedbitmap file] [-variablebitmap file] [-variablebitmaplong file] [-animation frames file1 ...] [-protected number]

--savesms EMS [-folder id] [-unread] [-read] [-unsent] [-sent] [-sender number] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-smsname name] [-unicode] [-16bit] [-format lcrasbiut] [-text text] [-unicodefiletext file] [-defsound ID] [-defanimation ID] [-tone10 file] [-tone10long file] [-tone12 file] [-tone12long file] [-toneSE file] [-toneSElong file] [-fixedbitmap file] [-variablebitmap file] [-variablebitmaplong file] [-animation frames file1 ...] [-protected number]

Switches specific for this option:

  • -unicode - all texts will be coded using Unicode
  • -16bit - Gammu uses SMS headers with 16-bit numbers for saving linking info in SMS (it means less chars available for user in each SMS)
  • -format lcrasbiut - last text will be formatted. You can use combinations of chars:
    • l - left aligned
    • c - centered
    • r - right aligned
    • a - large font
    • s - small font
    • b - bold font
    • i - italic font
    • u - underlined font
    • t - strikethrough font
  • -text text - add text as sequence part
  • -unicodefiletext file - read text from Unicode file and add as sequence part
  • -defsound ID - adds default sound with ID specified by user as sequence part. ID for different phones are different.
  • -defanimation ID - adds default animation with ID specified by user as sequence part. ID for different phones are different.
  • -tone10 file - add IMelody version 1.0 read from RTTL or other compatible file
  • -tone10long file - add IMelody version 1.0 saved in one of few SMS with UPI. Phones compatible with UPI (like SonyEricsson phones) will read such ringtone as one
  • -tone12 file - add IMelody version 1.2 read from RTTL or other compatible file
  • -tone12long file - add IMelody version 1.0 saved in one of few SMS with UPI. Phones compatible with UPI (like SonyEricsson phones) will read such ringtone as one
  • -toneSE file - add IMelody in "short" form supported by SonyEricsson phones
  • -toneSElong file - add SonyEricsson IMelody saved in one or few SMS with UPI
  • -fixedbitmap file - add bitmap read from 2 colors bitmap file (BMP, NOL, NGG,...). It's saved in 16x16 or 32x32 size.
  • -variablebitmap file - add bitmap read from 2 colors bitmap file (BMP, NOL, NGG,...). It's saved in original size in one SMS.
  • -variablebitmaplong file - add bitmap read from 2 colors bitmap file (BMP, NOL, NGG,...). It's saved as bitmap with original size (but there is maximal size limit equal 96x128) saved in one or few sms.
  • -animation frames file1 ... - adds "frames" frames read from file1, file2, etc.
  • -protected number - number of ringtones and bitmaps after this parameter (excluding default ringtones and logos) will be "protected" (in phones compatible with ODI like SonyEricsson products it won't be possible to forward them from phone menu). It's kind of DRM.

All switches after "-16bit" (like "-defsound") can be used few times (they're connected with sequence parts).

Example usages:

gammu --savesms EMS -text "I hate mondays"

will save simple SMS with text "I hate mondays"

gammu --savesms EMS -text "Greetings" -defsound 1 -text "from Gammu"
-tone10 axelf.txt -animation 2 file1.bmp file2.bmp

will save EMS sequence with text "Greetings", default sound 1, text "from Gammu", ringtone axelf.txt and 2 frames animation read from (1'st frame) file1.bmp and (2'nd frame) file2.bmp

gammu --savesms EMS -protected 2 -variablebitmaplong ala.bmp
-toneSElong axelf.txt -toneSE ring.txt

ala.bmp and axelf.txt will be "protected"

format RINGTONE

Used for ringtones in Smart Messaging format.

--sendsms RINGTONE destination file [-report] [-validity HOUR|6HOURS|DAY|3DAYS|WEEK|MAX] [-save [-folder number]] [-smscset number] [-smscnumber number] [-reply] [-maxsms num]

--savesms RINGTONE file [-folder id] [-unread] [-read] [-unsent] [-sent] [-sender number] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-smsname name]

Switches specific for this option:

  • -long - ringtone is saved using Profile style. It can be longer (and saved in 2 SMS), but decoded only by newer phones (like Nokia 3310)
  • -scale - ringtone will have Scale info for each note. It will allow to edit it correctly later in phone composer (for example, in Nokia 3310)

format OPERATOR

Read bitmap from 2 colors file (bmp, nlm, nsl, ngg, nol, wbmp, etc.), format into operator logo in Smart Messaging format (72x14 or 78x21, 2 colors) and send/save over SMS.

Please note, that it isn't designed for colour logos available for example in DCT4/TIKU - you need to put bitmap file there inside phone using filesystem commands.

--sendsms OPERATOR destination file [-report] [-validity HOUR|6HOURS|DAY|3DAYS|WEEK|MAX] [-save [-folder number]] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-netcode netcode] [-biglogo]

--savesms OPERATOR file [-folder id] [-unread] [-read] [-unsent] [-sent] [-sender number] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-smsname name] [-netcode netcode] [-biglogo]

Switches specific for this option:

  • -netcode netcode -
  • -biglogo - there will be used 78x21 size instead of 72x14 (bigger size is supported by Nokia 6210, 7110 and so on)

format CALLER

Read bitmap from 2 colors file (bmp, nlm, nsl, ngg, nol, wbmp, etc.), format into caller group logo in Smart Messaging format (72x14, 2 colors) and send/save over SMS.

Please note, that it isn't designed for colour logos available for example in DCT4/TIKU - you need to put bitmap file there inside phone using filesystem commands.

--sendsms CALLER destination file [-report] [-validity HOUR|6HOURS|DAY|3DAYS|WEEK|MAX] [-save [-folder number]] [-smscset number] [-smscnumber number] [-reply] [-maxsms num]

--savesms CALLER file [-folder id] [-unread] [-read] [-unsent] [-sent] [-sender number] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-smsname name]

format PROFILE

Read ringtone (RTTL) format, bitmap (Picture Image size) and name, format into Smart Messaging profile and send/save as SMS. Please note, that this format is abandomed by Nokia and supported by some (older) devices only like Nokia 3310.

--sendsms PROFILE destination [-report] [-validity HOUR|6HOURS|DAY|3DAYS|WEEK|MAX] [-save [-folder number]] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-name name] [-bitmap bitmap] [-ringtone ringtone]

--savesms PROFILE [-folder id] [-unread] [-read] [-unsent] [-sent] [-sender number] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-smsname name] [-name name] [-bitmap bitmap] [-ringtone ringtone]

Switches specific for this option:

  • -name name -
  • -bitmap bitmap -
  • -ringtone ringtone -

format PICTURE

Read bitmap from 2 colors file (bmp, nlm, nsl, ngg, nol, wbmp, etc.), format into bitmap in Smart Messaging (72x28, 2 colors, called often Picture Image and saved with text) or Alcatel format and send/save over SMS.

--sendsms PICTURE destination file [-report] [-validity HOUR|6HOURS|DAY|3DAYS|WEEK|MAX] [-save [-folder number]] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-text text] [-unicode] [-alcatelbmmi]

--savesms PICTURE file [-folder id] [-unread] [-read] [-unsent] [-sent] [-sender number] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-smsname name] [-text text] [-unicode] [-alcatelbmmi]

Switches specific for this option:

  • -text text -
  • -unicode -
  • -alcatelbmmi -

format ANIMATION

--sendsms ANIMATION destination frames file1 file2... [-report] [-validity HOUR|6HOURS|DAY|3DAYS|WEEK|MAX] [-save [-folder number]] [-smscset number] [-smscnumber number] [-reply] [-maxsms num]

--savesms ANIMATION frames file1 file2... [-folder id] [-unread] [-read] [-unsent] [-sent] [-sender number] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-smsname name]

format SMSTEMPLATE

--sendsms SMSTEMPLATE destination [-report] [-validity HOUR|6HOURS|DAY|3DAYS|WEEK|MAX] [-save [-folder number]] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-unicode] [-text text] [-unicodefiletext file] [-defsound ID] [-defanimation ID] [-tone10 file] [-tone10long file] [-tone12 file] [-tone12long file] [-toneSE file] [-toneSElong file] [-variablebitmap file] [-variablebitmaplong file] [-animation frames file1 ...]

--savesms SMSTEMPLATE [-folder id] [-unread] [-read] [-unsent] [-sent] [-sender number] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-smsname name] [-unicode] [-text text] [-unicodefiletext file] [-defsound ID] [-defanimation ID] [-tone10 file] [-tone10long file] [-tone12 file] [-tone12long file] [-toneSE file] [-toneSElong file] [-variablebitmap file] [-variablebitmaplong file] [-animation frames file1 ...]

format MMSINDICATOR

--sendsms MMSINDICATOR destination URL Title Sender [-report] [-validity HOUR|6HOURS|DAY|3DAYS|WEEK|MAX] [-save [-folder number]] [-smscset number] [-smscnumber number] [-reply] [-maxsms num]

--savesms MMSINDICATOR URL Title Sender [-folder id] [-unread] [-read] [-unsent] [-sent] [-sender number] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-smsname name]

format WAPINDICATOR

--sendsms WAPINDICATOR destination URL Title [-report] [-validity HOUR|6HOURS|DAY|3DAYS|WEEK|MAX] [-save [-folder number]] [-smscset number] [-smscnumber number] [-reply] [-maxsms num]

--savesms WAPINDICATOR URL Title [-folder id] [-unread] [-read] [-unsent] [-sent] [-sender number] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-smsname name]

format BOOKMARK

--sendsms BOOKMARK destination file location [-report] [-validity HOUR|6HOURS|DAY|3DAYS|WEEK|MAX] [-save [-folder number]] [-smscset number] [-smscnumber number] [-reply] [-maxsms num]

--savesms BOOKMARK file location [-folder id] [-unread] [-read] [-unsent] [-sent] [-sender number] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-smsname name]

Read WAP bookmark from file created by --backup option and saves in SMS.

format WAPSETTINGS

--sendsms WAPSETTINGS destination file location DATA|GPRS [-report] [-validity HOUR|6HOURS|DAY|3DAYS|WEEK|MAX] [-save [-folder number]] [-smscset number] [-smscnumber number] [-reply] [-maxsms num]

--savesms WAPSETTINGS file location DATA|GPRS [-folder id] [-unread] [-read] [-unsent] [-sent] [-sender number] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-smsname name]

Read WAP settings from file created by --backup option and saves in SMS.

format MMSSETTINGS

--sendsms MMSSETTINGS destination file location [-report] [-validity HOUR|6HOURS|DAY|3DAYS|WEEK|MAX] [-save [-folder number]] [-smscset number] [-smscnumber number] [-reply] [-maxsms num]

--savesms MMSSETTINGS file location [-folder id] [-unread] [-read] [-unsent] [-sent] [-sender number] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-smsname name]

format CALENDAR

--sendsms CALENDAR destination file location [-report] [-validity HOUR|6HOURS|DAY|3DAYS|WEEK|MAX] [-save [-folder number]] [-smscset number] [-smscnumber number] [-reply] [-maxsms num]

--savesms CALENDAR file location [-folder id] [-unread] [-read] [-unsent] [-sent] [-sender number] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-smsname name]

Read calendar note from file created by --backup option and saves in VCALENDAR 1.0 format.

format TODO

Read todo from file created by --backup option and send/save using SMS.

--sendsms TODO destination file location [-report] [-validity HOUR|6HOURS|DAY|3DAYS|WEEK|MAX] [-save [-folder number]] [-smscset number] [-smscnumber number] [-reply] [-maxsms num]

--savesms TODO file location [-folder id] [-unread] [-read] [-unsent] [-sent] [-sender number] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-smsname name]

format VCARD10|VCARD21

Read phonebook entry from file created by --backup option and saves in VCARD 1.0 (only name and default number) or VCARD 2.1 (all entry details with all numbers, text and name) format.

--sendsms VCARD10|VCARD21 destination file SM|ME location [-nokia] [-report] [-validity HOUR|6HOURS|DAY|3DAYS|WEEK|MAX] [-save [-folder number]] [-smscset number] [-smscnumber number] [-reply] [-maxsms num]

--savesms VCARD10|VCARD21 file SM|ME location [-nokia] [-folder id] [-unread] [-read] [-unsent] [-sent] [-sender number] [-smscset number] [-smscnumber number] [-reply] [-maxsms num] [-smsname name]

Other commands

Command line options for SMS daemon (SMSD) are described in SMSD manual. Other are:

--displaysms ... (options like in sendsms)

--addsmsfolder name

--getsmsc start [stop]

Get specified SMS Center(s) info from SIM card (number, name and so on) and phone memory.

--backupsms file

Backup option for SMS.

--restoresms file

Restore option for SMS.

--addsms folder file

Add SMS from backup file into specified SMS folder.

--nokiagett9

This option should display T9 dictionary content from DCT4 phones.

Phonebook memories (phonebook, calls history and others)

Memory Types

  • DC = Dialled calls
  • MC = Missed calls
  • RC = Received calls
  • ON = Own numbers
  • VM = voice mailbox
  • SM = SIM phonebook
  • ME = phone internal phonebook
  • FD = fixed dialling
  • SL = sent SMS log

Commands to get contents of memory

--getmemory DC|MC|RC|ON|VM|SM|ME|FD|SL start [stop [-nonempty]]
Note: Memory locations are numbered from 1

--getallmemory DC|MC|RC|ON|VM|SM|ME|FD|SL

--searchmemory text

--listmemorycategory text|number

--getspeeddial start [stop]

--getcategory TODO|PHONEBOOK start [stop]

--getallcategory TODO|PHONEBOOK

Other commands

Command line options for sending phonebook entries over SMS are described in SMS manual.

Command line options for making backup, restore and adding new entries and described in Backup manual.

Support for voice tags (sound saved in phone as a voice recording)

In old Nokia models (DCT3, first DCT4) you can get/set only assigment of phonebook memory entries to such voice tags.

In new models (like Series 40 2.0 devices with filesystem) in addition to assigments you can get/set files with them using filesystem commands (it's not done by backup commands):

You might be able to find such recordings in some gallery-folder, just like photos. I definitely know, I've done that in the past with a Nokia 3200. Anyway, "--backup" indeed doesn't retrieve them. You need something like "--getfiles" or "--getfilefolder" (after having used "--getfilesystem" or similar to find out file- or directory- -names or -numbers.) Finally, the recordings might be in some strange format called "amr" (depending on your phone).

Filesystem

command line options

These commands are provided for manupulating phone memory/memory card filesystem. Currently there are supported filesystems in Nokia Series 40 phones (at least versions 1.0 and 2.0 in DCT4/TIKU devices) and OBEX filesystem.

--getfilesystemstatus

--getfilesystem [-flatall|-flat]

Display info about all folders and files in phone memory/memory card. By default there is tree displayed, you can change it:

  • -flatall -
  • -flat -

Please note, that in some phones (like N6230) content of some folders (with more files) can be cut (only part of files will be displayed) for example on infrared connection. This is not Gammu issue, but phone firmware problem.

--getfilefolder ID1, ID2, ...

--addfolder parentfolderID name

--deletefolder name

--getfolderlisting folderID

Display files and folders available in folder with given folderID. You can get ID's using --getfilesystem -flatall.

Please note, that in some phones (like N6230) content of some folders (with more files) can be cut (only part of files will be displayed) for example on infrared connection. This is not Gammu issue, but phone firmware problem.

--getrootfolders

Display info about drives available in phone/memory card.

--setfileattrib folderID [-system] [-readonly] [-hidden] [-protected]

--getfiles ID1, ID2, ...

--addfile folderID name [-type JAR|BMP|PNG|GIF|JPG|MIDI|WBMP|AMR|3GP|NRT] [-readonly] [-protected] [-system] [-hidden] [-newtime]

Add file with specified name to folder with specified folderID.

  • -type - file type was required for filesystem 1 in Nokia phones (current filesystem 2 doesn't need this)
  • -readonly, -protected, -system, -hidden - you can set readonly, protected (file can't be for example forwarded from phone menu), system and hidden (file is hidden from phone menu) file attributes
  • -newtime - after using it date/time of file modification will be set to moment of uploading

--deletefiles fileID

--nokiaaddfile Application|Game file [-readonly] [-overwrite] [-overwriteall]

Install the *.jar/*.jad file pair of a midlet in the application or game menu of the phone. You have to give the name without the jar/jad suffix, otherwise you will get the slightly confusing error message Can't open specified file. Read only ?

The option -overwrite deletes the applications .jad and .jar files bevor installing, but doesn't delete the application data. Option -overwriteall will also delete the data.

--nokiaaddfile Gallery|Gallery2|Camera|Tones|Tones2|Records|Video|Playlist|MemoryCard file [-name name] [-protected] [-readonly] [-system] [-hidden] [-newtime]

Managing playlists in 6230

  1. gammu --addfile a:\predefplaylist filename.m3u
    Will add playlist filename.m3u
  2. gammu --getfilesystem
    Will get list of all files (including names of files with playlists)
  3. gammu --deletefiles a:\predefplaylist\filename.m3u
    Will delete playlist filename.m3u

Format of m3u files is easy:

first line is #EXTM3U
in next you give names of files (b:\file1.mp3, b:\folder1\file2.mp3, etc.)

It also needs to have '\r\n' terminated lines. So just run unix2dos on the resulting file before uploading it your your mobile.

Logos and pictures

These options are mainly (there are few expections) for monochromatic logos and images available in older phones. Recognized file formats: xpm (only saving), 2-colors bmp, nlm, nsl, ngg, nol, wbmp, gif (for Samsung)

In new models all bitmaps are saved in filesystem and should go into filesystem section

Commands to get logos from phone

--getbitmap STARTUP [file]

Get STARTUP (displayed during phone startup) logo from phone.

--getbitmap TEXT

Get STARTUP text (displayed instead of STARTUP logo during phone startup) from phone. It can be changed using phone menu or --setbitmap TEXT

--getbitmap DEALER

Get DEALER text (displayed instead of STARTUP logo during phone startup) from phone. It can be changed using --setbitmap DEALER (it's not possible from phone menu !)

--getbitmap CALLER location [file]

Get CALLER (displayed for contacts assigned to caller group) logo from phone.

--getbitmap OPERATOR [file]

Get OPERATOR (displayed instead of cellular network name) logo from phone.

--getbitmap PICTURE location [file]

Get PICTURE (bitmap like specified in Smart Messaging specification) logo from phone.

Commands to write logos to phone

--setbitmap STARTUP file|1|2|3

Set STARTUP logo. For Nokia 3310 you can use 1 or 2 or 3 instead of filename and there will be set animated logo predefined in phone firmware (need high firmware version in phone). For Nokia 3210 you can use 1 or 2 (need firmware ...)

--setbitmap TEXT text

--setbitmap DEALER text

--setbitmap CALLER location [file]

--setbitmap OPERATOR [file [netcode]]

--setbitmap PICTURE file location [text]

--setbitmap COLOURSTARTUP [fileID]

--setbitmap WALLPAPER fileID

--setbitmap COLOUROPERATOR [fileID [netcode]]

Commands to converting logos from one type to another

--copybitmap inputfile [outputfile [OPERATOR|PICTURE|STARTUP|CALLER]]

Converts one type of logo files to another. When only input-file is given, output will be written to stdout using ASCII art. When output file and format are given, in some file formats (like NLM) an indicator will be set informing you about the logo type which will be output.

Other commands

Command line options for sending logos over SMS are described in SMS section.

Ringtones

These options are for ringtones "built" into (especially older) phones. There are recognized various file formats by options described below: rttl, binary format created for Gammu, mid (saving), re (reading), ott, communicator, ringtones format found in fkn.pl, wav (saving), ime/imy (saving), rng, mmf (for Samsung).

New models the most often have ringtones saved in filesystem and you should go into filesystem commands section.

Command line options for sending ringtones over SMS are described in SMS section.

Command line options for making backup, restore are described in Backup section.

User ringtones

These options are for user changeable ringtones

--getringtone location [file]

Get ringtone from phone in RTTL or BINARY (Nokia DCT3) format. Locations are numbered from 1.

--setringtone file [-location location] [-scale] [-name name]

  • -location location - ringtone location. When you don’t give it, it will be written "with preview" (in phones supporting this feature like61xx or 6210).
  • -scale - when you use RTTL ringtone, give location and use -scale, scale info will be written with each note. It will avoid possible scale problems during editing the ringtone in composer from phone menu (e.g., in Nokia 3310).
  • -name name -

Set ringtone in phone.

Tip: when you use the ~ char in the ringtone name, with some phones (like Nokia 33xx), the name will blink in the phone menus

Default and user ringtones

These options are designed for "default" (not changeable without flasher) and "user" (changeable by user) ringtones

--getphoneringtone location [file]

Get one of "default" ringtones and saves into file

--getringtoneslist

Get list of sounds

--playsavedringtone number

Play one of "built" ringtones. This option is available for DCT4 phones. For getting ringtones list use --getringtoneslist

Ringtone files

--nokiacomposer file

Shows how to enter RTTL ringtone in the composer found in DCT3 Nokia phones (and what it should it look like).

--copyringtone source destination [RTTL|BINARY]

--playringtone file

Play aproximation of ringtone over phone buzzer. File can be in RTTL or BINARY (Nokia DCT3) format

Calendar notes

In Nokia 3310, 3315 and 3330 these are named "Reminders" and have some limitations (depending on phone firmware version).

Command line options for sending calendar notes over SMS are described in SMS section.

Command line options for making backup, restore are described in Backup section.

--getcalendarsettings

--deletecalendar start [stop]

--getallcalendar

--getcalendar start [stop]

--savefile CALENDAR target.vcs file location

The savefile option works on a backup file created with --backup option. The "file" parameter refers to the .ldb file, the location is the number of the calendar entry. I have not found out how to specify more than one entry.

ToDo lists

--getalltodo

--listtodocategory text|number

--gettodo start [stop]

--deletetodo start [stop]

--getcategory TODO|PHONEBOOK start [stop]

--getallcategory TODO|PHONEBOOK

--savefile TODO target.vcs file location

Notes

--getallnotes

Date, time and alarms

--getdatetime

Get the date and time from the phone

--setdatetime

Set the date and time in the phone to the date and time set in the computer.

Note: this option doesn’t show the clock on phone screen. It only sets the date and time.

--getalarm

Get the alarm from the phone

--setalarm hour minute

Converting backup files

--savefile CALENDAR target.vcs file location

--savefile TODO target.vcs file location

--savefile VCARD10|VCARD21 target.vcf file SM|ME location

Read phonebook location from backup file created using --backup and saves it as VCF (VCARD) file

--savefile BOOKMARK target.url file location

Backing up and restoring phone/SIM data

--backup file [-yes]

Backup your phone to file. Depending on the phone, it’s possible to backup other settings.

The items being backed up depend on the extension of the file name you provide. The extensions handled in a special way are as follows:

  • .lmb
  • .vcs - only calendar items are backed up. The result is an VCalendar file
  • .vcf - only contact items are backed up. The result is an VCard file
  • .ldif - only contact items are backed up. The result is in ldif (LDAP import) format
  • .ics - only calendar items are backed up. The result is an iCal file
  • any other extension (Gammu text file):
    • phonebook from SIM and phone memory
    • calendar notes
    • SMSC settings
    • operator logo
    • startup (static) logo or startup text
    • WAP bookmarks
    • WAP settings
    • caller logos and groups
    • user ringtones

Tip: if you backup settings to a Gammu text file, it will be possible to edit it. It’s easy - many things in this file will be written twice, once in Unicode, once in ASCII. When you remove the Unicode version Gammu will use the ASCII one on --restore (you can easily edit the ASCII text) and will convert it according to the locale set in your computer. When the Unicode version of the text is available, it will be used instead of the ASCII version. This is useful with Unicode phones - it isn’t important, what locale is set in the computer and no conversion Unicode -> ASCII and ASCII -> Unicode is done.

Tip: you can use any editor with regular expressions function to edit backup text file. E.g., TextPad 4.2.2 from http://www.textpad.com/ with regular expressions based on POSIX standard P1003.2 is OK for it.

A few examples:

  • to remove info about voice tags:
FROM: ^Entry\([0-9][0-9]\)VoiceTag = \(.*\)\n
TO:
  • to change all numbers starting from +3620, +3630, +3660, +3670 to +3620:
Find:    Type    =   NumberGeneral\nEntry\([0-9][0-9]\)Text = "\+36\(20\|30\|60\|70\)
Repl: Type = NumberMobile\nEntry\1Text = "\+3620
  • to change phone numbers type to mobile for numbers starting from +3620, +3630,... and removing the corresponding TextUnicode line:
F: Type = NumberGeneral\nEntry\([0-9][0-9]\)Text = "\+36\(20\|30\|60\|70\)\([^\"]*\)"\nEntry\([0-9][0-9]\)TextUnicode = \([^\n]*\)\n
R: Type = NumberMobile0ntry1Text = "\+36\2\3"\n

--restore file

Restore settings from a file created using the --backup option. All things backed up by --backup can be restored (when backup is made to Gammu text file). In some phones restoring calendar notes will not show an error, but restoring it won’t be done when phone's clock isn't set.

--addnew file

Backing up and restoring SMS

--backupsms file

--restoresms file

--addsms folder file

Specific to Nokia phones

--getgprspoint start [stop]

--nokiagetoperatorname
6110.c phones have a space for the name for one GSM network (of course, with flashing it’s possible to change all names, but Gammu is not a flasher ;-)). You can get this name using this option.

--nokiasetoperatorname [networkcode name]

--nokiadisplayoutput

--nokianetmonitor test

Takes output or set netmonitor for Nokia DCT3 phones.

Tip: For more info about this option, please visit http://www.mwiacek.com and read netmonitor manual.

Tip: test 243 enables all tests (after using the command gammu --nokianetmonitor 243 in some phones like 6210 or 9210 you have to reboot them to see netmonitor menu)

--nokianetmonitor36 Reset counters from netmonitor test 36 in Nokia DCT3 phones.

Tip: For more information about this option, please visit http://www.mwiacek.com and read the netmonitor manual.

--nokiadebug filename [[v11-22][,v33-44]...]

--nokiasetvibralevel level
Set the vibrator level - given in percent.

--nokiagetvoicerecord location
Get a voice record from the specified location and write it to a WAV file. The file name is taken from the name of the voice record stored in the phone.

Created WAV files require GSM 6.10 codec to be played. In Win XP it's included by Microsoft. If you deleted it by accident in this operating system, make such steps:

  1. Control Panel
  2. Add hardware
  3. click Next
  4. select "Yes. I have already connected the hardware"
  5. select "Add a new hardware device"
  6. select "Install the hardware that I manually select from a list"
  7. select "Sound, video and game controllers"
  8. select "Audio codecs"
  9. select "windows\system32" directory and file "mmdriver.inf"
  10. if You will be asked for file msgsm32.acm, it should unpacked from Windows CD
  11. now You can be asked if want to install unsigned driver (YES), about select codec configuration (select what you want) and rebotting PC (make it)

--nokiasetlights keypad|display|torch on|off

--nokiatuneradio

--nokiamakecamerashoot

--nokiagetscreendump

--nokiavibratest

--nokiagett9

--nokiadisplaytest number

--nokiagetadc

--nokiasecuritycode
Get/reset the security code to "12345"

--nokiaselftests
Perform tests for Nokia DCT3 phones.
Note: EEPROM test can show an error when your phone has an EEPROM in flash (like 82xx/7110/62xx/33xx). The clock test will show an error when the phone doesn’t have an internal battery for the clock (like 3xxx).

--nokiasetphonemenus
Enable all(?) possible menus for DCT3 Nokia phones:

  1. ALS (Alternative Line Service) option menu
  2. vibra menu for 3210
  3. 3315 features in 3310 5.45 and higher
  4. two additional games (React and Logic) for 3210 5.31 and higher
  5. WellMate menu for 6150
  6. NetMonitor

and for DCT4:

  1. ALS (Alternative Line Service) option menu
  2. Bluetooth, WAP bookmarks and settings menu, ... (6310i)
  3. GPRS Always Online

Specific to Siemens phones

--siemenssatnetmon

--siemensnetmonact netmon_type (1-full, 2-simple)

--siemensnetmonitor test

Network

--monitor [times]
Gets the phone status and writes it continuously to standard output.
Press Ctrl+C to exit the monitor.

--setautonetworklogin

--listnetworks [country]
Show names/codes of GSM networks known to Gammu

--getgprspoint start [stop]

--networkinfo

--siemenssatnetmon

--siemensnetmonact netmon_type (1-full, 2-simple)

--siemensnetmonitor test

--nokiagetoperatorname
6110.c phones have a space for the name for one GSM network (of course, with flashing it’s possible to change all names, but Gammu is not a flasher ;-)). You can get this name using this option.

--nokiasetoperatorname [networkcode name]

--nokianetmonitor test
Takes output or set netmonitor for Nokia DCT3 phones.
Tip: For more info about this option, please visit http://www.mwiacek.com and read netmonitor manual.
Tip: test 243 enables all tests (after using the command

gammu --nokianetmonitor 243

in some phones like 6210 or 9210 you have to reboot them to see netmonitor menu)

--nokiadebug filename [[v11-22][,v33-44]...]

WAP settings and bookmarks

--deletewapbookmark start [stop]

Delete WAP bookmark(s) from phone. Locations are numbered from 1.

--getwapbookmark start [stop]

Get WAP bookmark(s) from phone. Locations are numbered from 1.

--getwapsettings start [stop]

Get WAP settings from phone. Locations are numbered from 1.

--getsyncmlsettings start [stop]

--getchatsettings start [stop]

--savefile BOOKMARK target.url file location

--backup file [-yes]

--restore file

--addnew file

--clearall

MMS and MMS settings

--getmmssettings start [stop]

--savemmsfile file [-subject text][-text text]

FM radio

--getfmstation start [stop]
Show info about FM stations in phone

--backup file [-yes]
See Backup commands

--restore file
See Backup commands

--addnew file

--clearall

--nokiatuneradio

Phone information

--identify
Shows the most important phone data.

--getdisplaystatus

--monitor [times]
Gets phone status and writes it continuously to standard output. Press Ctrl+C to quit the monitor.

--getsecuritystatus
Shows whether the phone requires a security code to be entered (like PIN, PUK, etc).

--nokiasecuritycode
Allows you to enter a security code from the computer.

Phone settings

--resetphonesettings PHONE|DEV|UIF|ALL|FACTORY

--savesms PROFILE [-folder id][-unread][-read][-unsent][-sent][-sender number][-smscset number][-smscnumber number][-reply][-maxsms num][-name name][-bitmap bitmap][-ringtone ringtone]

--sendsms PROFILE destination [-report][-validity HOUR|6HOURS|DAY|3DAYS|WEEK|MAX][-save [-folder number][-smscset number][-smscnumber number][-reply][-maxsms num][-name name][-bitmap bitmap][-ringtone ringtone]

--getcalendarsettings

--getprofile start [stop]

Commands that don't fit anywhere else

--version
Output version information and exit.

--smsd FILES configfile
Act as SMS Daemon. More

--sendsmsdsms TEXT|WAPSETTINGS|... destination FILES|MYSQL configfile ...(options like in sendsms)

--reset SOFT|HARD
Make phone reset: soft (without asking for PIN) or hard (with PIN).

--entersecuritycode PIN|PUK|PIN2|PUK2 code
Allow entry of security code from the computer.

--presskeysequence mMnNpPuUdD+-123456789*0#gGrRwW
Press specified key sequence on phone keyboard, where
mM = Menu
nN = Names key
pP = Power
uU = Up
dD = Down
+- = +-
gG = Green
rR = Red
123456789*0# is numeric keyboard

--searchphone [-debug]