GAMMU(1)
π NAME (GAMMU(1)) π
gammu β does some neat things with your cellular phone or modem. no cap, that's literally the whole NAME section, bestie π
π SYNOPSIS π
gammu [parameters] <command> [options]
Commands actually indicate which operation should Gammu perform. They can be specified with or without a leading --. either way is giving the same energy, so pick your fighter β¨
π DESCRIPTION π
Okay so this program is a tool for mobile phones. Many vendors and phones are supported, for actual listing see Gammu Phones Database <https://wammu.eu/phones/>. it's giving "your phone but make it accessible" π
ποΈ Options ποΈ
Parameters before command configure gammu behaviour:
-c,--config<filename> β name of configuration file (seeGammu Configuration File <#gammurc>)-s,--section<confign> β section of config file to use, eg.42-d,--debug<level> β debug level (seeLogFormat <#option-LogFormat>inGammu Configuration File <#gammurc>for possible values)-f,--debug-file<filename> β file for logging debug messages
π± Phone information commands π±
batteryβ Displays information about battery and power source. πgetdisplaystatusβ no description in the original, bestie, so I'm not gonna invent one πgetsecuritystatusβ Show, if phone wait for security code (like PIN, PUK, etc.) or not πidentifyβ Show the most important phone data. πmonitor [times]β Retrieves phone status and writes it continuously to standard output. Press Ctrl+C to interrupt this command.
If no parameter is given, the program runs until interrupted, otherwise only given number of iterations is performed.
This command outputs almost all information Gammu supports:
- Number of contacts, calendar and todo entries, messages, calls, etc.
- Signal strength.
- Battery state.
- Currently used network.
- Notifications of incoming messages and calls.
π Call commands π
answercall [id]β Answer incoming call. π²cancelcall [id]β Cancel incoming callcanceldivertsβ Cancel all existing call diverts.conferencecall idβ Initiates a conference call.dialvoice number [show|hide]β Make voice call from SIM card line set in phone.
show|hide β optional parameter whether to disable call number indication.
divert get|set all|busy|noans|outofreach all|voice|fax|data [number timeout]β Manage or display call diverts.getorsetβ whether to get divert information or to set it.allorbusyornoansoroutofreachβ condition when apply divertallorvoiceorfaxordataβ call type when apply divertnumberβ number where to diverttimeoutβ timeout when the diversion will happen
getussd codeβ Retrieves USSD information - dials a service number and reads response. βοΈholdcall idβ Holds call.maketerminatedcall number length [show|hide]β Make voice call from SIM card line set in phone which will be terminated afterlengthseconds.senddtmf sequenceβ Plays DTMF sequence. In some phones available only during callssplitcall idβ Splits call.switchcall [id]β Switches call.transfercall [id]β Transfers call.unholdcall idβ Unholds call.
π SMS and EMS commands π
Sending messages might look a bit complicated on first attempt to use. But be patient, the command line has been written in order to allow almost every usage. See EXAMPLE section for some hints on usage. SMS is lowkey the main character energy of this whole manual π
There is also an option to use gammu-smsd <#gammu-smsd> when you want to send or receive more messages and process them automatically. β¨
π§ Introduction to SMS formats π§
Gammu has 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
- MMS notifications β contains links where phone should download MMS
- Alcatel logo messages β proprietary format for logos
The way Gammu handles all these formats? Obsessed. But you need to ensure that the target phone supports message type you want to send. Otherwise the phone will not be able to display it or will even crash, because firmware of phone did not expect this possibility. fr fr, check before you send π
π Encoding chars in SMS text π
Text in SMS can be coded using two ways:
πΈ GSM Default Alphabet πΈ
With GSM Default Alphabet you can fit at most 160 chars into single SMS (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 and large
- all digits
- some Greek
- some other national
- some symbols like
@ ! " # & / ( ) % * + = - , . : ; < > ? - few others
π¦ Unicode π¦
With Unicode single SMS can contain at most 70 chars, but these can be any chars including all national and special ones.
Warning: Please note, that some older phones might have problems displaying such message. so cute but maybe not on a museum phone π
π Conversion π
Gammu tries to do the best to handle non ASCII characters in your message. Everything is internally handled in Unicode (the input is converted depending on your locales configuration) and in case message uses Unicode the text will be given as such to the message.
Should the message be sent in GSM Default Alphabet, Gammu will try to convert all characters to keep message readable. Gammu does support multi byte encoding for some characters in GSM Default Alphabet (it is needed for ^ { } \ [ ] ~ |). The characters which are not present in GSM Default Alphabet are transliterated to closest ASCII equivalent (accents are removed). Remaining not known characters are replaced by question mark. character glow-up, but make it readable β¨
π¨ SMS commands π¨
addsmsfolder nameβ no description in the original, bestie π«Άdeleteallsms folderβ Delete all SMS from specified SMS folder.deletesms folder start [stop]β Delete SMS from phone. See description forgammu getsmsfor info about sms folders naming convention.
Locations are numerated from 1.
displaysms ... (options like in sendsms)β Displays PDU data of encoded SMS messages. It accepts same parameters and behaves same likesendsms.getallsms [-pbk]β Get all SMS from phone. In some phones you will have also SMS templates and info about locations used to save Picture Images. With each sms you will see location. If you want to get such sms from phone alone, usegammu getsms.
The optional -pbk parameter enables phonebook lookup. When specified, Gammu will read phonebook entries from both phone memory and SIM card, then display contact names alongside phone numbers in the SMS output instead of showing only the phone numbers. π
geteachsms [-pbk]β Similarly togammu getallsms. Difference is, that links all concatenated sms.
The optional -pbk parameter works the same as in gammu getallsms, enabling phonebook lookup to display contact names with phone numbers.
getsms folder start [stop]β Get SMS.
Locations are numerated from 1.
Folder 0 means that sms is being read from "flat" memory (all sms from all folders have unique numbers). It's sometimes emulated by Gammu. You can use it with all phones.
Other folders like 1, 2, etc. match folders in phone such as 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 gammu getsmsfolders to get folders list.
getsmsc [start [stop]]β Get SMSC settings from SIM card.
Locations are numerated from 1.
getsmsfoldersβ Get names for SMS folders in phonesavesms TYPE [type parameters] [type options] [-folder id] [-unread] [-read] [-unsent] [-sent] [-sender number] [-smsname name] [-smscset number] [-smscnumber number] [-reply] [-maxsms num]β Saves SMS to phone, see below for TYPE options.-smscset numberβ SMSC number will be taken from phone stored SMSC configuration number.
Default: 1
-smscnumber numberβ SMSC number-replyβ reply SMSC is set-folder numberβ save to specified folder.
Folders are numerated from 1.
The most often folder 1 = "Inbox", 2 = "Outbox",etc. Use gammu getsmsfolders to get folder list.
-unreadβ makes message unread. In some phones (like6210) you won't see unread sms envelope after saving such sms. In some phones with internal SMS memory (like6210) after using it with folder1SIM SMS memory will be used-readβ makes message read. In some phones with internal SMS memory (like6210) after using it with folder1SIM SMS memory will be used-unsentβ makes message unsent-sentβ makes message sent-smsname nameβ set message name-sender numberβ set sender number (default:Gammu)-maxsms numβ Limit maximum number of messages which will be created. If there are more messages, Gammu will terminate with failure.
Types of messages:
ANIMATION frames file1 file2...β Save an animation as a SMS. You need to give number of frames and picture for each frame. Each picture can be in any picture format which Gammu supports (B/W bmp, gif, wbmp, nol, nlm...).BOOKMARK file locationβ Read WAP bookmark from file created bygammu backupcommand and saves in Nokia format as SMS
ποΈ CALENDAR file location
Reads a calendar note from a file created by the gammu backup command and saves it in VCALENDAR 1.0 format as an SMS. The location tells it which calendar item to read out of the backup file β usually 1, but honestly it's useful when your backup has, like, a whole stack of items in it.
π CALLER file
Saves the caller logo as an sms in Nokia (Smart Messaging) format β size 72x14, two colors.
β οΈ Warning: bestie, please note that this isn't designed for colour logos, the kind you get for example in DCT4/TIKU β for those you need to put the bitmap file inside the phone using filesystem commands. No cap.
π¬ USSD
Sends a USSD query instead of an SMS.
Added in version 1.38.5. β¨
π EMS [-unicode] [-16bit] [-format lcrasbiut] [-text text] [-textutf8 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]
Saves an EMS sequence. All the format-specific parameters (like -defsound) can be used a few times, so go off. π
-textβ adds text-textutf8β adds UTF-8 text-unicodefiletextβ adds text from a Unicode file-defanimationβ adds a default animation with an ID specified by you, the user. The ID for different phones is different (iykyk).-animationβ addsframesframes read from file1, file2, etc.-defsoundβ adds a default sound with an ID specified by the user. Again, the ID for different phones is different.-tone10β adds IMelody version 1.0 read from RTTL or another compatible file-tone10longβ IMelody version 1.0 saved in one of a few SMS with UPI. Phones compatible with UPI (like Sony-Ericsson phones) will read such a ringtone as one π΅-tone12β adds IMelody version 1.2 read from RTTL or another compatible file-tone12longβ IMelody version 1.2 saved in one of a few SMS with UPI. Phones compatible with UPI (like Sony-Ericsson phones) will read such a ringtone as one-toneSEβ adds IMelody in "short" form supported by Sony-Ericsson phones-toneSElongβ adds Sony-Ericsson IMelody saved in one or a few SMS with UPI-variablebitmapβ bitmap in any size, saved in one SMS-variablebitmaplongβ bitmap with maximum size96x128, saved in one or a few sms-fixedbitmapβ bitmap16x16or32x32-protectedβ all 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 the phone menu. π-16bitβ Gammu uses SMS headers with 16-bit numbers for saving linking info in the SMS (which means less chars available for the user in each SMS)-format lcrasbiutβ the last text will be formatted. You can use combinations of these chars:lβ left alignedcβ centeredrβ right alignedaβ large fontsβ small fontbβ bold fontiβ italic fontuβ underlined fonttβ strikethrough font
πΌοΈ MMSINDICATOR URL Title Sender
Creates an MMS indication SMS. It contains the URL where the actual MMS payload is stored, and that payload needs to be SMIL encoded. The phone usually downloads the MMS data using a special APN, which does not count toward transmitted data β but there might be limitations on which URLs can be accessed, so heads up. π
βοΈ MMSSETTINGS file location
Saves a message with MMS configuration. The configuration gets read from the Gammu backup file from the given location.
π‘ OPERATOR file [-netcode netcode] [-biglogo]
Saves an operator logo as an sms in Nokia (Smart Messaging) format β size 72x14 in two colors.
-biglogoβ use a78x21formatted logo instead of the standard72x14
π Note: this isn't designed for colour logos, the kind you get for example in newer phones β you need to put the bitmap file inside the phone using filesystem commands. Same energy as before, fr fr.
π¨ PICTURE file [-text text] [-textutf8 text] [-unicode] [-alcatelbmmi]
Reads a bitmap from a 2-colors file (bmp, nlm, nsl, ngg, nol, wbmp, etc.), formats it into a bitmap in Smart Messaging (72x28, 2 colors, often called Picture Image and saved with text) or Alcatel format, and sends/saves it over SMS. Obsessed with how retro this is. π¦
π PROFILE [-name name] [-bitmap bitmap] [-ringtone ringtone]
Reads ringtone (RTTL) format, bitmap (Picture Image size) and name, formats them into a Smart Messaging profile and sends/saves it as an SMS.
β οΈ Warning: please note, this format is abandoned by Nokia and only supported by some (older) devices, like the Nokia 3310. It's giving vintage, ngl.
π RINGTONE file [-long] [-scale]
Reads an RTTL ringtone from a file and saves it as an SMS into SIM/phone memory. The ringtone is saved in Nokia (Smart Messaging) format.
-longβ the ringtone is saved using Profile style. It can be longer (and saved in 2 SMS), but it's decoded only by newer phones (like 33xx)-scaleβ the ringtone will have Scale info for each note. It will allow one to edit it correctly later in the phone composer (for example, in 33xx)
π SMSTEMPLATE [-unicode] [-text text] [-textutf8 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 ...]
Saves a SMS template (for Alcatel phones). π
βοΈ TEXT [-inputunicode] [-16bit] [-flash] [-len len] [-autolen len] [-unicode] [-enablevoice] [-disablevoice] [-enablefax] [-disablefax] [-enableemail] [-disableemail] [-voidsms] [-replacemessages ID] [-replacefile file] [-text msgtext] [-textutf8 msgtext]
Takes text from stdin (or from the commandline if -text is specified) and saves it as a text SMS into SIM/phone memory.
Ordinary text messages longer than one SMS are automatically split into linked parts β no length option required, it just handles it. β¨ Use -maxsms with a value of 1 to reject messages that would require multiple parts. Notification, void, and replacement messages retain their single-message behavior.
The default SMS alphabet is used unless -unicode or -autolen is specified. Input decoding is controlled separately by the locale or by -textutf8.
π Stdin input is limited to 4,999 bytes, including any trailing newline. Larger input is rejected β even when a length option is specified β rather than sending an incomplete message. So don't try to sneak a novel in there, bestie.
-flashβ Class 0 SMS (should be displayed after receiving on recipients' phone display after receiving without entering Inbox)-len lenβ Limit the decoded text to at mostlenUTF-16 code units. The value must be positive. The limit is applied after decoding and trailing-newline handling, for both stdin and command-line text, regardless of option order. Longer text is truncated; shorter text is unchanged.-maxlenis a compatibility alias. If the limit splits a surrogate pair, the entire character is omitted so that the resulting text remains valid Unicode.-autolen lenβ Apply the same length limit as-len, and automatically choose the SMS default alphabet or Unicode according to the resulting text. If length options are repeated, the last one determines the limit and whether coding is selected automatically.-enablevoiceβsmswill set voice mail indicator. Text will be cut to 1 sms.-disablevoiceβsmswill not set voice mail indicator. Text will be cut to 1 sms.-enablefaxβsmswill set fax indicator. Text will be cut to 1 sms.-disablefaxβsmswill not set fax indicator. Text will be cut to 1 sms.-enableemailβsmswill set email indicator. Text will be cut to 1 sms.-disableemailβsmswill not set email indicator. Text will be cut to 1 sms.-voidsmsβ many phones after receiving it won't display anything, only beep, vibrate or turn on light. Text will be cut to 1 sms.-unicodeβ SMS will be saved in Unicode format.
Note: The~char in SMS text and-unicodeoption (Unicode coding required) can cause text of SMS after~char blink in some phones (like Nokia 33xx).
-inputunicodeβ input text is in Unicode.
Note: You can create Unicode file using WordPad in Windows (during saving select "Unicode Text Document" format). In Unix can use for example YUdit or vim.
-textβ get text from command line instead of stdin.-textutf8β get text in UTF-8 from command line instead of stdin.
Note: Gammu detects your locales and uses by default encoding based on this. Use this option only when you know the input will be in UTF-8 in all cases.
-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)-replacemessages IDβIDcan be1..7. When you will use option and send more single SMS to one recipient with the sameID, each another SMS will replace each previous with the sameID-replacefile fileβ File with replacement table in unicode (UCS-2), preferably with byte order mark (BOM). It contains pairs of chars, first one is to replace, second is replacement one. The replacement is done after reading text for the message.
For example replacement 1 (0x0061) with a (0x0031) would be done by file with following content (hex dump, first two bytes is BOM):
ff fe 61 00 31 00
TODO file locationβ Saves a message with a todo entry. The content will be read from any backup format which Gammu supports and from given location.VCARD10|VCARD21 file SM|ME location [-nokia]β Read phonebook entry from file created bygammu backupcommand 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 as SMS. The location identifies position of contact item to be read in backup file (usually 1, but can be useful in case the backup contains more items).WAPINDICATOR URL Titleβ Saves a SMS with a WAP indication for givenURLandtitle.WAPSETTINGS file location DATA|GPRSβ Read WAP settings from file created bygammu backupcommand and saves in Nokia format as SMS
sendsms TYPE destination [type parameters] [type options] [-smscset number] [-smscnumber number] [-reply] [-report] [-validity HOUR|6HOURS|DAY|3DAYS|WEEK|MAX] [-save [-folder number]]
Sends a message to a destination number, most parameters are same as for gammu savesms.
-saveβ will also save message which is being sent-reportβ request delivery report for message-validity HOUR|6HOURS|DAY|3DAYS|WEEK|MAXβ sets how long will the message valid (SMSC will the discard the message after this time if it could not deliver it).
setsmsc location number β Set SMSC settings on SIM card. This keeps all SMSC configuration intact, it just changes the SMSC number.
Locations are numerated from 1.
π Memory (phonebooks and calls) commands π
π Memory types
Gammu recognizes following memory types:
DCβ Dialled callsMCβ Missed callsRCβ Received callsONβ Own numbersVMβ voice mailboxSMβ SIM phonebookMEβ phone internal phonebookFDβ fixed diallingSLβ sent SMS log
π Memory commands
deleteallmemory DC|MC|RC|ON|VM|SM|ME|MT|FD|SLβ Deletes all entries from specified memory type.
For memory types description see Memory types.
deletememory DC|MC|RC|ON|VM|SM|ME|MT|FD|SL start [stop]β Deletes entries in specified range from specified memory type.
For memory types description see Memory types.
getallmemory DC|MC|RC|ON|VM|SM|ME|MT|FD|SLβ Get all memory locations from phone.
For memory types description see Memory types.
getmemory DC|MC|RC|ON|VM|SM|ME|MT|FD|SL start [stop [-nonempty]]β Get memory location from phone.
For memory types description see Memory types.
Locations are numerated from 1.
getspeeddial start [stop]β Gets speed dial choices.searchmemory textβ Scans all memory entries for given text. It performs case insensitive substring lookup. You can interrupt searching by pressing Ctrl+C.
ποΈ Filesystem commands ποΈ
Gammu allows one to access phones using native protocol (Nokias) or OBEX. Your phone can also support usb storage, which is handled on the operating system level and Gammu does not use that.
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 folder ID.-typeβ File type was required for filesystem 1 in Nokia phones (current filesystem 2 doesn't need this).-readonlyβ Sets the read only attribute.-protectedβ Sets the protected attribute (file can't be for example forwarded from phone menu).-systemβ Sets the system attribute.-hiddenβ Sets the hidden attribute (file is hidden from phone menu).-newtimeβ After using it date/time of file modification will be set to moment of uploading.
addfolder parentfolderID nameβ Create a folder in phone with specified name in a folder with specified folder ID.deletefiles fileIDβ Delete files with given IDs.deletefolder nameβ Delete folder with given ID.getfilefolder fileID [fileID ...]β Retrieve files or all files from folder with given IDs from a phone filesystem.getfiles fileID [fileID ...]β Retrieve files with given IDs from a phone filesystem.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β there are displayed full file/folder details like ID (first parameter in line)-flatβ (the page doesn't elaborate here; it just lists the flag.)
Note: 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.
getfilesystemstatusβ Display info filesystem status - number of bytes available, used or used by some specific content.getfolderlisting folderIDβ Display files and folders available in folder with given folder ID. You can get ID's usinggetfilesystem -flatall.
Warning: 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.sendfile nameβ yeets a file over to your phone. Where it actually lands and what the phone does with it? That's the phone's business, not ours π (like, send a vCard or vCalendar and most phones will pop up asking if you wanna import it β cute, right?)setfileattrib folderID [-system] [-readonly] [-hidden] [-protected]β sets the attributes on a file in that folder. Flags do exactly what they say:-system,-readonly,-hidden,-protected.
π¨ Logo and pictures commands π¨
okay so these are mainly (with a few exceptions!!) for the monochromatic logos and images living on older phones. Recognized file formats, listen up: xpm (only saving), 2-colors bmp, nlm, nsl, ngg, nol, wbmp, gif (for Samsung).
On the new models, all bitmaps are saved in the filesystem and should go in the filesystem section. periodt β¨
copybitmap inputfile [outputfile [OPERATOR|PICTURE|STARTUP|CALLER]]β converts logo files from one format to another, slay. Give it ONLYinputfileand the output gets written to stdout as ASCII art (yes, art π). Give it an output file and format, and in some file formats (likeNLM) it'll set an indicator telling the phone what type of logo this is.getbitmap TYPE [type options]β reads a bitmap off the phone. Supported types, bestie:CALLER location [file]β grabs the caller group logo from the phone. Locations1-5.DEALERβ on some models you can save a dealer welcome note, aka the text that shows while the phone is booting, which you literally cannot edit from the phone menu. Here's where you get it π«ΆOPERATOR [file]β gets the operator logo (the picture shown instead of the operator name) from the phone.PICTURE location [file]β gets a Picture Image from the phone.STARTUP [file]β gets the static startup logo from the phone. Lets you save it to a file, iconic.TEXTβ gets the startup text from the phone.
setbitmap TYPE [type options]β puts a bitmap into the phone. Supported types:CALLER location [file]β sets the caller logo.COLOUROPERATOR [fileID [netcode]]β sets a color operator logo in the phone.COLOURSTARTUP [fileID]DEALER textβ sets the welcome message configured by the dealer, which usually can't be changed anywhere in the phone menus.OPERATOR [file [netcode]]β sets the operator logo. Nofileand nonetcode? The operator logo gets removed from the phone ποΈ. Only a filename? Then the logo shows for your current GSM operator. Throw in the network code too and it shows for that operator.PICTURE file location [text]β sets a picture image in the phone.STARTUP file|1|2|3β sets the startup logo. Static means you gotta hand over the file name; or pick one of the predefined animated ones (only some phones like Nokia3310or3330support it β use location1,2or3for those).TEXT textβ sets the startup text in the phone.WALLPAPER fileIDβ sets the wallpaper in the phone.
π Ringtones commands π
Ringtones are mostly a thing only on older phones β for recent ones you usually just upload them into some folder in the phone filesystem. iykyk π
Recognized various file formats via the options 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).
copyringtone source destination [RTTL|BINARY]β copiessourceringtone todestination.getphoneringtone location [file]β gets one of the "default" ringtones and saves it intofile.getringtone location [file]β gets a ringtone from the phone inRTTLorBINARYformat.
Locations are numerated from 1 π
getringtoneslistplayringtone fileβ plays an approximation of the ringtone over the phone buzzer.filecan beRTTLorBINARY(Nokia DCT3) format.playsavedringtone numberβ plays one of the built-in ringtones. This one's available for DCT4 phones. To get the ringtones list, usegammu getringtoneslist.setringtone file [-location location] [-scale] [-name name]β sets a ringtone in the phone. Don't give a location and it gets written "with preview" (on phones supporting that feature, like61xxor6210).-scaleβ Scale information gets added to each note of theRTTLringtone. This avoids the scale problems that show up when you edit the ringtone in the composer from the phone menu (for example, on Nokia33xx).
Note: when you use the~char in the ringtone name, on some phones (like33xx) the name will blink later in the phone menus. not me finding that out the hard way π
π Calendar notes commands π
On the Nokia 3310, 3315 and 3330 these are named "Reminders" and have some limitations (depends on the phone firmware version, fun!).
deletecalendar start [stop]β deletes the selected calendar entries in the phone.getallcalendarβ retrieves all the calendar entries from the phone.getcalendar start [stop]β retrieves the selected calendar entries from the phone.
β To do list commands β
deletetodo start [stop]β deletes the selected todo entries in the phone.getalltodoβ retrieves all todo entries from the phone.gettodo start [stop]β retrieves the selected todo entries from the phone.
π Notes commands π
getallnotesβ reads all notes from the phone.
Note: not all phones support this function β especially most Sony Ericsson phones, even when they literally have notes inside the phone π
β° Date, time and alarm commands β°
getalarm [start]β gets the alarm from the phone. No location specified?1is used.getdatetimeβ gets the date and time from the phone.setalarm hour minuteβ sets a repeating alarm in the phone at the selected time.setdatetime [HH:MM[:SS]] [YYYY/MM/DD]β sets the date and time in the phone to the date and time set on the computer. Please note that this option does not show the clock on the phone screen β it only sets the date and time, no cap.
Note: you can make this kind of synchronization each time you connect your phone and use Gammu. SeeSynchronizeTime <#option-SynchronizeTime>inGammu Configuration File <#gammurc>for the details π«Ά
ποΈ Categories commands ποΈ
Note: categories are supported only on a few phones (Alcatel).
addcategory TODO|PHONEBOOK textgetallcategory TODO|PHONEBOOKgetcategory TODO|PHONEBOOK start [stop]listmemorycategory text|numberlisttodocategory text|number
πΎ Backing up and restoring commands πΎ
addnew file [-yes] [-memory ME|SM|..]β adds data written in afilecreated using thegammu backupcommand. Everything thatgammu backupbacks up can be restored (when the backup was made to a Gammu text file).
Please note that this adds all the content of the backup file to the phone and does not care about the current data in the phone β no duplicates are detected, so it's just gonna pile it all in there π
Use the -yes parameter to answer yes to all the questions (you want to automatically restore all the data).
Use the -memory parameter to force usage of a defined memory type for storing entries, regardless of what the backup format says.
addsms folder file [-yes]β adds SMSes fromfile(format likegammu backupsmsuses) to the selectedfolderin the phone.backup file [-yes]β backs up your phone tofile. It's possible to back up (depends on phone and backup format):- 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
Various backup formats are supported and the backup format is guessed based on the file extension:
.lmbβ Nokia backup, supports contacts, caller logos and startup logo..vcsβ vCalendar, supports calendar and todo..vcfβ vCard, supports contacts..ldifβ LDAP import, supports contacts..icsβ iCalendar, supports calendar and todo.- Any other extension is a Gammu backup file and it supports all the data mentioned above β see
Backup Format <#gammu-backup>for the juicy details.
By default this command is interactive and asks which items you want to back up.
Use -yes for answering yes to all the questions.
backupsms file [-yes|-all]β stores all SMSes from the phone intofile, inSMS Backup Format <#gammu-smsbackup>.
By default this command is interactive and asks which folders you want to back up and whether you want to remove messages from the phone afterwards.
Use -yes for answering yes to all the questions (back up all messages and delete them from the phone), or -all to just back up all folders while keeping the messages in the phone. very mindful of you πΈ
restore file [-yes]
Warning: please note that restoring deletes all the current content in the phone. If you only want to add entries to the phone, use gammu addnew. do not come for me when your phonebook vanishes π
Restores the settings written in file created using the gammu backup command.
In some phones, restoring calendar notes won't show an error but also won't get done β that happens when the phone doesn't have the clock set inside. so it's just silently ghosting you π«
restoresms file [-yes]
Warning: please note that this overwrites existing messages in the phone (if it supports it).
Restores SMSes from file (format like gammu backupsms uses) to the selected folder in the phone.
savefile TYPE [type options]β converts between the various file formats supported by Gammu. Supported types:BOOKMARK target.url file locationβ converts a backup format supported by Gammu into a vBookmark file.CALENDAR target.vcs file locationβ lets you convert between the various backup formats that Gammu supports for calendar events. The file type is guessed (for the input file the guess is based on extension and file content, for the output solely on extension).TODO target.vcs file locationβ lets you convert between the various backup formats that Gammu supports for todo events. The file type is guessed (for the input file the guess is based on extension and file content, for the output solely on extension).
VCARD10|VCARD21target.vcf fileSM|MElocation β bestie this one lets you convert between all the various backup formats Gammu supports for phonebook events π The file type gets guessed β for the input file the guess is based on the extension and the file content, but for the output file it's based solely on the extension. iykyk, so name your files right β¨
See also: gammu convertbackup
convertbackupsource.file output.file β added in version1.28.94π Converts a backup between the formats Gammu supports. Unlikegammu savefile, this gives you zero options on what to convert β it literally just takes everything that can be saved and shoves it into the output file. no thoughts, just vibes π«Ά
See also: gammu savefile
π± Nokia specific commands π
nokiaaddfileTYPE [type options] β uploads a file to your phone, into the specific location for the type you picked:APPLICATION|GAMEfile[-readonly][-overwrite][-overwriteall]β installs the*.jar/*.jadfile pair of a midlet into the application or game menu of the phone. You need to specify the filename without the jar/jad suffix β both get added automatically, she's got it covered π-overwriteβ deletes the application's.jadand.jarfiles before installing, but does not delete the application data.-overwriteallβ deletes the application (same as-overwrite) and all its data. ruthless. iconic.- You can use
jadmakerto generate a.jadfile from a.jarfile β¨
GALLERY|GALLERY2|CAMERA|TONES|TONES2|RECORDS|VIDEO|PLAYLIST|MEMORYCARDfile[-name name][-protected][-readonly][-system][-hidden][-newtime]
nokiaaddplaylistsβ goes through the phone memory and generates a playlist for all music files found π΅ To manually manage playlists:
gammu addfile a:\\predefplaylist filename.m3u
will add playlist filename.m3u π
gammu getfilesystem
will get you the list of all files (including the names of files with playlists) π¦
gammu deletefiles a:\\predefplaylist\\filename.m3u
will delete playlist filename.m3u π
The format of an m3u playlist is genuinely easy (it's the standard mp3 playlist): the first line is #EXTM3U, and the next lines contain the names of files (b:\file1.mp3, b:\folder1\file2.mp3, etc.). The file needs to have \r\n terminated lines. So just run unix2dos on the resulting file before uploading it to your phone, bestie π«Ά
nokiacomposerfile β shows you how to enter an RTTL ringtone in the composer that exists in many Nokia phones (and what it should look like) πΆnokiadebugfilename[[v11-22] [,v33-44]...]nokiadisplayoutputnokiadisplaytestnumbernokiagetadcnokiagetoperatornameβ6110.cphones have a place for a 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 πnokiagetpbkfeaturesmemorytypenokiagett9β this option should display T9 dictionary content from DCT4 phones π€nokiagetvoicerecordlocation β gets a voice record from location and saves it to a WAV file ποΈ The file is coded using the GSM 6.10 codec (available for example in win32). The name of the file is like the name of the voice record in the phone.
Created WAV files require the 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 these 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)
nokiamakecamerashootnokianetmonitortest β takes output or sets netmonitor for Nokia DCT3 phones π‘
See also: for more info about this option, please visit Marcin's page <http://www.mwiacek.com/> and read netmonitor manual there.
Note:test 243enables all tests (after using commandgammu nokianetmonitor 243in some phones like6210or9210have to reboot them to see netmonitor menu)
nokianetmonitor36β reset counters from netmonitor test 36 in Nokia DCT3 phones π
See also: for more info about this option, please visit Marcin's page <http://www.mwiacek.com/> and read netmonitor manual there.
nokiasecuritycodeβ get/reset to"12345"security code πnokiaselftestsβ perform tests for Nokia DCT3 phones π©Ί
Note: EEPROM test can show an error when your phone has an EEPROM in flash (like82xx/7110/62xx/33xx). The clock test will show an error when the phone doesn't have an internal battery for the clock (like3xxx).
nokiasetlightskeypad|display|torchon|offπ‘nokiasetoperatorname[networkcode name]nokiasetphonemenusβ enable all (?) possible menus for DCT3 Nokia phones, bestie, go off π- ALS (Alternative Line Service) option menu
- vibra menu for
3210 3315features in3310 5.45and higher- two additional games (React and Logic) for
3210 5.31and higher - WellMate menu for
6150 - NetMonitor
and for DCT4:
- ALS (Alternative Line Service) option menu
- Bluetooth, WAP bookmarks and settings menu, ... (
6310i) - GPRS Always Online
- and others...
nokiasetvibralevellevel β set vibra power to "level" (given in percent) π³nokiatuneradionokiavibratest
π§‘ Siemens specific commands
siemensnetmonactnetmon_type β enables network monitor in a Siemens phone. Currently known values for type are1for full and2for simple mode πsiemensnetmonitortestsiemenssatnetmon
π Network commands π
getgprspointstart[stop]listnetworks[country]β show names/codes of GSM networks known for Gammu πnetworkinfoβ show information about network status from the phone πΆsetautonetworklogin
π WAP settings and bookmarks commands
deletewapbookmarkstart[stop]β delete WAP bookmarks from the phone. Locations are numerated from1πgetchatsettingsstart[stop]getsyncmlsettingsstart[stop]getwapbookmarkstart[stop]β get WAP bookmarks from the phone. Locations are numerated from1πgetwapsettingsstart[stop]β get WAP settings from the phone. Locations are numerated from1β¨
π MMS and MMS settings commands
getallmms[-save]geteachmms[-save]getmmsfoldersgetmmssettingsstart[stop]readmmsfilefile[-save]
π» FM radio commands π§
getfmstationstart[stop]β show info about FM stations in the phone π‘
βοΈ Phone settings commands
getcalendarsettingsβ displays calendar settings like first day of week or automatic deleting of old entries ποΈgetprofilestart[stop]resetphonesettingsPHONE|DEV|UIF|ALL|FACTORY
Warning: This will delete user data, be careful. π¨
Reset phone settings.
PHONEβ clear phone settings.DEVβ clear device settings.ALLβ clear user settings.- removes or set logos to default
- set default phonebook and other menu settings
- clear T9 words,
- clear call register info
- set default profiles settings
- clear user ringtones
UIFβ clear user settings and disables hidden menus.- changes like after
ALL - disables netmon and PPS (all "hidden" menus)
- changes like after
FACTORYβ reset to factory defaults.- changes like after
UIF - clear date/time
- changes like after
π Dumps decoding commands
Note: These commands are available only if Gammu was compiled with debugging options. π
decodebinarydumpfile[phonemodel]β decodes a dump made by Gammu withLogFormatset to binary π§decodesniffMBUS2|IRDAfile[phonemodel]β allows you to decode sniffs. See Discovering protocol for more details π¦
πΈ Other commands π
entersecuritycodePIN|PUK|PIN2|PUK2|PHONE|NETWORKcode|-[newpin|-]β allows you to enter a security code from the PC π When code is-, it is read from stdin. In case of entering PUK, some phones require you to set a new PIN as well πpresskeysequencemMnNpPuUdD+-123456789*0#gGrR<>[]hHcCjJfFoOmMdD@β presses the specified key sequence on the phone keyboard π²mMβ MenunNβ Names keypPβ PoweruUβ UpdDβ Down+-β+-gGβ GreenrRβ Red123456789*0#β numeric keyboard
resetSOFT|HARDβ make the phone reset πSOFTβ without asking for PINHARDβ with asking for PIN
Note: Some phones will ask for PIN even with SOFT option.
Warning: Some phones will reset user data on HARD reset. π
setpowerON|OFFβ added in version1.33.90β¨ Turns the phone off or on.
Note: This is usually required for built in modules in notebooks π»
screenshotfilename β captures a phone screenshot and saves it as filename πΈ The extension is automatically appended to filename based on what data the phone provides π
ποΈ Batch mode commands
batch[file]β starts Gammu in a batch mode. In this mode you can issue several commands, each on one line. Lines starting with#are treated as comments π«Ά By default, commands are read from standard input, but you can optionally specify a file from where they'd be read (special case-means standard input) π
π§ Configuration commands
searchphone[-debug]β attempts to search for a connected phone π
β οΈ Warning: lowkey this can take forever, but if you literally have zero clue how to configure your phone connection, it's a super convenient way to find a working setup for Gammu. π
install [-minimal]β installs the applet for whatever connection is currently configured to the phone. π
You can configure the search path for installation files with DataPath <#option-DataPath>.
The -minimal parameter forces installation of the applet only, without any possible support libraries β ngl this is useful for updates. β¨
π Gammu information commands π
checkversion [STABLE]β checks whether there's a newer Gammu version available online (only if Gammu was compiled with CURL, iykyk). If you pass the extra parameterSTABLE, only stable versions get checked. πfeaturesβ prints info about compiled-in features. πΈhelp [topic]β prints help. By default you get the general help, but you can also specify a help category to get more detailed help on some topic. π¦versionβ prints version information and license. π
β¨ RETURN VALUES β¨
gammu returns 0 on success. If it fails, you get a non-zero code back.
1β out of memory or other critical error π2β invalid command line parameters3β failed to open file specified on command line4β program was interrupted98β Gammu library version mismatch99β functionality has been moved. For example togammu-smsd<#gammu-smsd>.
Error codes greater than 100 map to the GSM_Error values increased by 100, fr fr:
101β no error.102β error opening device. Unknown, busy or no permissions.103β error opening device, it is locked.104β error opening device, it doesn't exist.105β error opening device, it is already opened by other application.106β error opening device, you don't have permissions.107β error opening device. No required driver in operating system.108β error opening device. Some hardware not connected/wrongly configured.109β error setting device DTR or RTS.110β error setting device speed. Maybe speed not supported.111β error writing to the device.112β error during reading from the device.113β can't set parity on the device.114β no response in specified timeout. Probably phone not connected.115β frame not requested right now. Seehttps://wammu.eu/support/bugs/for information how to report it.116β unknown response from phone. Seehttps://wammu.eu/support/bugs/for information how to report it.117β unknown frame. Seehttps://wammu.eu/support/bugs/for information how to report it.118β unknown connection type string. Check config file.119β unknown model type string. Check config file.120β some functions not available for your system (disabled in config or not implemented).121β function not supported by phone.122β empty entry.123β security error. Maybe no PIN?124β invalid location. Maybe too high?125β functionality not implemented. You are welcome to help authors with it. π«Ά126β memory full.127β unknown error.128β can not open specified file.129β more memory required...130β operation not allowed by phone.131β no SMSC number given. Provide it manually or use the one configured in phone.132β you're inside phone menu (maybe editing?). Leave it and try again.133β phone is not connected.134β function is currently being implemented. If you want to help, please contact authors.135β phone is disabled and connected to charger.136β file format not supported by Gammu.137β nobody is perfect, some bug appeared in protocol implementation. Please contact authors. π138β transfer was canceled by phone, maybe you pressed cancel on phone.139β phone module need to send another answer frame.140β current connection type doesn't support called function.141β CRC error.142β invalid date or time specified.143β phone memory error, maybe it is read only.144β invalid data given to phone.145β file with specified name already exists.146β file with specified name doesn't exist.147β you have to give folder name and not file name.148β you have to give file name and not folder name.149β can not access SIM card.150β wrong GNAPPLET version in phone. Use version from currently used Gammu.151β only part of folder has been listed.152β folder must be empty.153β data were converted.154β Gammu is not configured.155β wrong folder used.156β internal phone error.157β error writing file to disk.158β no such section exists.159β using default values.160β corrupted data returned by phone.161β bad feature string in configuration.162β desired functionality has been disabled on compile time.163β Bluetooth configuration requires channel option.164β service is not running.165β service configuration is missing.166β command rejected because device was busy. Wait and restart.167β could not connect to the server.168β could not resolve the host name.169β failed to get SMSC number from phone.170β operation aborted.171β installation data not found, please consult debug log and/or documentation for more details.172β entry is read only.
π EXAMPLES π
πΈ Configuration πΈ
To check it out, you need to have a configuration file for gammu, see Gammu Configuration File <#gammurc> for more details about it. π
π Sending messages π
Note: all messages below are sent to number 123456, replace it with the proper destination. π
Send a text message up to the standard 160 chars:
echo "All your base are belong to us" | gammu sendsms TEXT 123456
or
gammu sendsms TEXT 123456 -text "All your base are belong to us"
Send a long text message:
echo "All your base are belong to us" | gammu sendsms TEXT 123456 -len 400
or
gammu sendsms TEXT 123456 -len 400 -text "All your base are belong to us"
or
gammu sendsms EMS 123456 -text "All your base are belong to us"
Send some funky message with a predefined sound and animation from 2 bitmaps:
gammu sendsms EMS 123456 -text "Greetings" -defsound 1 -text "from Gammu -tone10 axelf.txt -animation 2 file1.bmp file2.bmp
Send a protected message with ringtone:
gammu sendsms EMS 123456 -protected 2 -variablebitmaplong ala.bmp -toneSElong axelf.txt -toneSE ring.txt
π¦ Retrieving USSD replies π¦
For example for retrieving prepaid card status or retrieving various network info:
gammu getussd '#555#'
π Uploading files to Nokia π
Add Alien to applications in your phone (you need to have files Alien.JAD and Alien.JAR in the current directory):
gammu nokiaaddfile APPLICATION Alien
Add file.mid to the ringtones folder:
gammu nokiaaddfile TONES file.mid
β Setting operator logo β
Set logo for network 230 03 (Vodafone CZ):
gammu setbitmap OPERATOR ala.bmp "230 03"
π§ Converting file formats π§
The formats conversion can be done using gammu savefile or gammu convertbackup commands.
Convert a single entry (at position 260) from Backup Format <#gammu-backup> to vCalendar:
gammu savefile CALENDAR output.vcs myCalendar.backup 260
Convert the first phonebook entry from Backup Format <#gammu-backup> to vCard:
gammu savefile VCARD21 output.vcf phone.backup ME 1
Convert all contacts from backup to vCard:
gammu convertbackup phone.backup output.vcf
π Reporting bugs π
There are definitely many bugs, reporting to the author is welcome. π«Ά Please include some useful information when sending bug reports (especially debug logs, operating system, its version and phone information are needed β like, actually needed, no cap).
To generate a debug log, enable it in Gammu Configuration File <#gammurc>:
[gammu]
YOUR CONNECTION SETTINGS
logfile = /tmp/gammu.log
logformat = textall
Alternatively you can specify logging on the command line:
gammu -d textall -f /tmp/gammu.log ...
With these settings, Gammu generates /tmp/gammu.log on each connection to the phone and stores a dump of the communication there. You can also find some hints for improving support for your phone in this log. β¨
See https://wammu.eu/support/bugs/ for more information on reporting bugs.
Please report bugs to Gammu bug tracker <https://github.com/gammu/gammu/issues>. π
π Author π
Michal ΔihaΕ <michal@cihar.com>
π Copyright π
2009-2015, Michal ΔihaΕ <michal@cihar.com>
okay that's literally the whole page bestie, you ate that π this was GAMMU(1), version 1.45.0, dated Sep 16, 2026 β go forth and slay your phone connection π
β¨π
π¦ where this page comes from
- arch rolling: gammu 1.45.0-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms