GAMMURC(5)

πŸ’– GAMMURC πŸ’–

okay so bestie, this is the gammurc page from the Gammu manual β€” section 5, we love a system-files moment πŸŽ€ β€” and it's literally your gammu(1) configuration file. everything you need to know about telling Gammu how to talk to your phone lives right here. no cap.


✨ SYNOPSIS ✨

On Linux, MacOS X, BSD and other Unix-like systems, the config file is searched in following order:

  1. $XDG_CONFIG_HOME/gammu/config
  2. ~/.config/gammu/config
  3. ~/.gammurc
  4. /etc/gammurc

On Microsoft Windows:

  1. %PROFILE%\Application Data\gammurc
  2. .\gammurc

πŸ¦‹ DESCRIPTION πŸ¦‹

Gammu requires configuration to be able to properly talk to your phone. fr fr, it can't just vibe with your device with no info. The Gammu Utility <#gammu> reads configuration from a config file. It's location is determined on runtime, see above for search paths. πŸ‘‘

You can use gammu-config <#gammu-config> or gammu-detect <#gammu-detect> to generate configuration file or start from Fully documented example. honestly a slay, let the tools do the heavy lifting.

For hints about configuring your phone, you can check Gammu Phone Database <<https://wammu.eu/phones/>> to see what user users experienced. πŸ’…

This file use ini file syntax, see INI file format <#ini>.

Configuration file for gammu can contain several sections - [gammu], [gammu1], [gammuN], ... Each section configures one connection setup and in default mode gammu tries all of them in numerical order. main character energy honestly, it just works its way down the list. You can also specify which configuration section to use by giving it's number ([gammu] has number 0) as a parameter to Gammu Utility <#gammu> and it will then use only this section. ✨

🌸 [gammu] 🌸

This section is read by default unless you specify other on command line. periodt.


πŸŽ€ Device connection parameters πŸŽ€

  • Connection β€” Protocol which will be used to talk to your phone.

For Nokia cables you want to use one of following:

  • fbus β€” serial FBUS connection
  • dlr3 β€” DLR-3 and compatible cables
  • dku2 β€” DKU-2 and compatible cables
  • dku5 β€” DKU-5 and compatible cables
  • mbus β€” serial MBUS connection

If you use some non original cable, you might need to append -nodtr (eg. for ARK3116 based cables) or -nopower, but Gammu should be able to detect this automatically. 🫢

For non-Nokia phones connected using cable you generally want:

  • at β€” generic AT commands based connection

You can optionally specify speed of the connection, eg. at19200, but it is not needed for modern USB cables. πŸ™‚β€β†”οΈ

For IrDA connections use one of following:

  • irdaphonet β€” Phonet connection for Nokia phones.
  • irdaat β€” AT commands connection for most of phones (this is not supported on Linux).
  • irdaobex β€” OBEX (IrMC or file transfer) connection for most of phones.
  • irdagnapbus β€” GNapplet based connection for Symbian phones, see Gnapplet Protocol <#gnapplet>.

For Bluetooth connection use one of following:

  • bluephonet β€” Phonet connection for Nokia phones.
  • bluefbus β€” FBUS connection for Nokia phones.
  • blueat β€” AT commands connection for most of phones.
  • blueobex β€” OBEX (IrMC or file transfer) connection for most of phones.
  • bluerfgnapbus β€” GNapplet based connection for Symbian phones, see Gnapplet Protocol <#gnapplet>.
  • blues60 β€” Connection to Series60 applet in S60 phones, see Series60 Remote Protocol <#s60>.
Added in version 1.29.90. ⭐

Added in version 1.36.7: Gammu now supports connecting using proxy command. big news bestie πŸ”₯

You can also proxy the connection using shell command, for example to different host. This can be done using proxy connections:

  • proxyphonet β€” Phonet connection for Nokia phones.
  • proxyfbus β€” FBUS connection for Nokia phones.
  • proxyat β€” AT commands connection for most of phones.
  • proxyobex β€” OBEX (IrMC or file transfer) connection for most of phones.
  • proxygnapbus β€” GNapplet based connection for Symbian phones, see Gnapplet Protocol <#gnapplet>.
  • proxys60 β€” Connection to Series60 applet in S60 phones, see Series60 Remote Protocol <#s60>.

See also: Configuring Gammu FAQ <#faq-config>

  • Device β€” Added in version 1.27.95. πŸ’«

Device node or address of phone. It depends on used connection.

For cables or emulated serial ports, you enter device name (for example /dev/ttyS0, /dev/ttyACM0, /dev/ircomm0, /dev/rfcomm0 on Linux, /dev/cuad0 on FreeBSD or COM1: on Windows). The special exception are DKU-2 and DKU-5 cables on Windows, where the device is automatically detected from driver information and this parameters is ignored.

Note: Some USB modems expose several interfaces, in such cases Gammu works best with "User" one, you can find more information on <<http://www.dd-wrt.com/wiki/index.php/Mobile_Broadband>>. πŸ™ˆ

For USB connections (currently only fbususb and dku2 on Linux), you can specify to which USB device Gammu should connect. You can either provide vendor/product IDs or device address on USB:

Device = 0x1234:0x5678  # Match device by vendor and product id
Device = 0x1234:-1      # Match device by vendor id
Device = 1.10           # Match device by usb bus and device address
Device = 10             # Match device by usb device address
Device = serial:123456  # Match device by serial string
Note: On Linux systems, you might lack permissions for some device nodes. You might need to be member of some group (eg. plugdev or dialout) or or add special udev rules to enable you access these devices as non-root. 😭 For Nokia phones you can put following file (also available in sources as contrib/udev/69-gammu-acl.rules) as /etc/udev/rules.d/69-gammu-acl.rules:
#
# udev rule to give users access to USB device to be used by Gammu
#

ACTION!="add|change", GOTO="gammu_acl_rules_end"

KERNEL!="ttyACM[0-9]*", GOTO="gammu_acl_rules_end"
SUBSYSTEM!="tty", GOTO="gammu_acl_rules_end"

# Nokia devices
ATTRS{manufacturer}=="Nokia", TAG+="uaccess"

# Example for Sony Ericsson J108i Cedar
# ATTRS{idVendor}=="0fce", ATTRS{idProduct}=="d14e", TAG+="uaccess"

LABEL="gammu_acl_rules_end"

In case your USB device appears as the serial port in the system (eg. /dev/ttyACM0 on Linux or COM5: on Windows), just use same setup as with serial port. πŸ’œ

For Bluetooth connection you have to enter Bluetooth address of your phone (you can list Bluetooth devices in range on Linux using hcitool scan command). Optionally you can also force Gammu to use specified channel by including channel number after slash. πŸ¦‹

Before using Gammu, your device should be paired with computer or you should have set up automatic pairing. iykyk, pairing is the whole vibe.

For Proxy connections, you need to specify command which should be executed. It is supposed to pass bidirectional communication from Gammu to the device. This can happen for example over network.

For IrDA connections, this parameters is not used at all.

If IrDA does not work on Linux, you might need to bring up the interface and enable discovery (you need to run these commands as root):

ip l s dev irda0 up          # Enables irda0 device
sysctl net.irda.discovery=1  # Enables device discovery on IrDA
Note: Native IrDA is not supported on Linux, you need to setup virtual serial port for it (eg. /dev/ircomm0) and use it same way as cable. This can be usually achieved by loading modules ircomm-tty and irtty-sir:
modprobe ircomm-tty
modprobe irtty-sir

See also: Configuring Gammu FAQ <#faq-config>

  • Port β€” Deprecated since version 1.27.95: Please use Device instead. πŸ’€

Alias for Device, kept for backward compatibility.

  • Model β€” Do not use this parameter unless really needed! The only use case for this is when Gammu does not know your phone and misdetects it's features. like, genuinely, leave it alone unless you HAVE to 🫢

The only special case for using model is to force special type of OBEX connection instead of letting Gammu try the best suited for selected operation:

  • obexfs β€” force using of file browsing service (file system support)
  • obexirmc β€” force using of IrMC service (contacts, calendar and notes support)
  • obexnone β€” none service chosen, this has only limited use for sending file (gammu sendfile <#cmdoption-gammu-arg-sendfile> command)
  • mobex β€” m-obex service for Samsung phones
  • Use_Locking β€” On Posix systems, you might want to lock serial device when it is being used using UUCP-style lock files. Enabling this option (setting to yes) will make Gammu honor these locks and create it on startup. On most distributions you need additional privileges to use locking (eg. you need to be member of uucp group). πŸ™ˆ

This option has no meaning on Windows.


⭐ Connection options ⭐

  • SynchronizeTime β€” If you want to set time from computer to phone during starting connection. clock syncing slay πŸ•
  • StartInfo β€” This option allows one to set, that you want (setting yes) to see message on the phone screen or phone should enable light for a moment during starting connection. Phone will not beep during starting connection with this option. This works only with some Nokia phones. 🌈

πŸ”₯ Debugging options πŸ”₯

  • LogFile β€” Path to file where information about communication will be stored.
Note: For most debug levels (excluding errors) the log file is overwritten on each execution. 😭 so don't expect it to pile up, bestie.
  • LogFormat β€” Determines what all will be logged to LogFile <#option-LogFile>. Possible values are:
    • nothing β€” no debug level
    • text β€” transmission dump in text format
    • textall β€” all possible info in text format
    • textalldate β€” all possible info in text format, with time stamp
    • errors β€” errors in text format
    • errorsdate β€” errors in text format, with time stamp

  • binary β€” a binary transmission dump, in binary format πŸ’Ύ

For debugging, use either textalldate or textall β€” those two carry literally all the info you need to diagnose problems, no cap. πŸ”

✨ Features ✨

Custom features for your phone, bestie! πŸŽ€ This is your override slot for when the values hardcoded in common/gsmphones.c are bad or just missing entirely. Go consult include/gammu-info.h for the possible values (that's every GSM_Feature value, just without the leading F_ prefix, iykyk). And if you find correct values? Please report them back to the Gammu authors, they'll love you for it. 🫢

🌸 Locales and character set options 🌸

  • GammuCoding β€” forces a specific codepage. Like, 1250 will force CP-1250, or utf8 for UTF-8. Real talk though: you shouldn't need this, Gammu lowkey detects it from your locales automatically. ✨
  • GammuLoc β€” the path to the directory holding your localisation files. That directory should contain LANG/LC_MESSAGES/gammu.mo. If gammu is properly installed it'll find these files on its own, no stress. πŸ¦‹

πŸ’… Advanced options πŸ’…

Ok so these advanced options alter the default logic β€” and the catch is you, the user, are the one responsible for making sure any settings are actually correct for the target device and that they produce the behaviour you wanted. Main character energy comes with main character responsibility, sorry. 😭

  • atgen_setCNMI β€” for configurations using the generic AT command protocol, you can override the default indicators used when a new SMS message arrives. πŸ“¨

The value is a comma-delimited list of single digits, each one corresponding to the values for the AT+CNMI modem command. If you don't provide a digit, or the digit you provided is outside the acceptable range for the device, the default value gets used instead. πŸŽ€

For example, setting atgen_setcnmi = ,,2 would set the third parameter of the CNMI command to the value 2, leaving all the rest of the parameters at default. And atgen_setcnmi = 1,,,1 would set the first and fourth parameters respectively. Slay. πŸ’…

πŸŽ€ Other options πŸŽ€

  • DataPath β€” an additional path where Gammu searches for data files. The default path is configured at build time (and defaults to /usr/share/data/gammu on Unix systems). Right now it's only used for searching files to upload to your phone with gammu install. πŸ“²

✨ EXAMPLES ✨

There's a way more complete example available in the Gammu documentation, see Gammu Utility. πŸ‘‘

πŸ”Œ Connection examples πŸ”Œ

Gammu configuration for a Nokia phone using a DLR-3 cable:

[gammu]
device = /dev/ttyACM0
connection = dlr3

Gammu configuration for a Sony-Ericsson phone (or literally any other AT compatible phone) connected via USB cable:

[gammu]
device = /dev/ttyACM0
connection = at

Gammu configuration for a Sony-Ericsson (or any other AT compatible phone, fr fr) connected over bluetooth:

[gammu]
device = B0:0B:00:00:FA:CE
connection = blueat

Gammu configuration for a phone where you need to manually adjust the Bluetooth channel to use channel 42:

[gammu]
device = B0:0B:00:00:FA:CE/42
connection = blueat

πŸ‘― Working with multiple phones πŸ‘―

Gammu can be configured for multiple phones β€” but heads up, only one connection is used at one time πŸ’€. You pick which one with the gammu -s parameter. Configuration for phones on three serial ports would look like this:

[gammu]
device = /dev/ttyS0
connection = at

[gammmu1]
device = /dev/ttyS1
connection = at

[gammmu2]
device = /dev/ttyS2
connection = at

(Yes, gammmu1 and gammmu2 are spelled with three m's there. That's literally what the original shows, so we're keeping it exactly, don't come for me. πŸ™ˆ)

πŸ›°οΈ Connecting to remote phone πŸ›°οΈ

Added in version 1.36.7. πŸŽ‰

You can use Gammu to connect to a phone running on a totally different host. This works via a proxy connection, which executes a command that forwards bi-directional communication with the phone. Proxy commands are interpreted by /bin/sh, independently of the SHELL environment variable. If you want another shell, invoke it explicitly in the device command. 🐚

[gammu]
device = ssh -T -o BatchMode=yes root@my.router /usr/local/bin/gammu-backend /dev/ttyUSB0
connection = proxyat

Install socat on the remote host and copy contrib/proxy/gammu-backend over there as an executable script. The helper requires a POSIX shell and forwards modem data unchanged. It configures the serial port for raw data, 115200 baud, 8N1, and no flow control. Append an optional baud rate to the device command if you need to, for example /dev/ttyUSB0 19200. πŸ”§

Configure SSH keys and known hosts for the account running Gammu or SMSD. -T disables SSH terminal allocation, and BatchMode=yes prevents interactive authentication prompts. Remote shell startup files must not print to stdout β€” that channel is reserved for modem data. 🚫

Use only one modem reader at a time, bestie. Other services or interactive sessions can consume replies intended for Gammu. The helper does not lock the device. When you upgrade the helper, replace the remote copy β€” updating local Gammu does not update scripts on the remote host. πŸ’€

If the modem already exposes a raw AT-over-TCP endpoint, run socat on the same host as Gammu instead:

[gammu]
device = socat STDIO TCP:192.0.2.1:1234
connection = proxyat

Replace 192.0.2.1 and 1234 with the modem's address and AT service port. This connects directly to the modem without SSH or a script installed on it, so it also works with devices whose filesystem cannot be modified. The endpoint must carry raw AT commands and responses, with no Telnet negotiation. Serial settings, if needed, are configured on the modem rather than by the local proxy. ⭐

πŸ“œ Fully documented example πŸ“œ

You can find this sample file as docs/config/gammurc in the Gammu sources. It's the whole vibe, all in one place: πŸŽ€

; This is a sample ~/.gammurc file.
; In Unix/Linux  copy it into your home directory and name it .gammurc
;                or into /etc and name it gammurc
; In Win32       copy it into directory with Gammu.exe and name gammurc
; More about parameters later
; Anything behind ; or # is comment.
; -----------------------------------------------------------------------------

[gammu]

device = com8:
connection = irdaphonet
; Do not use model configuration unless you really need it
;model = 6110
;synchronizetime = yes
;logfile = gammulog
;logformat = textall
;use_locking = yes
;gammuloc = locfile
;startinfo = yes
;gammucoding = utf8
;usephonedb = yes

[gammu1]

device = com8:
;model = 6110
connection = fbusblue
;synchronizetime = yes
;logfile = gammulog
;logformat = textall
;use_locking = yes
;gammuloc = locfile
;startinfo = yes
;gammucoding = utf8

; Step 1. Please find required Connection parameter and look into assigned
; with it device type. With some Connection you must set concrete model

πŸ”Œ cables

okay bestie, this next chunk is your cheat sheet for which Connection to pick β€” it's literally all about cable types and what to put in the config πŸ’…

  • New Nokia protocol for FBUS/DAU9P β€” Connection "fbus", device type serial.
  • New Nokia protocol for DLR3/DLR3P β€” Connection "fbusdlr3"/"dlr3", device type serial.
  • New Nokia protocol for DKU2 (and phone with USB converter on phone mainboard like 6230) β€” Connection "dku2phonet"/"dku2", device type dku2 on Windows; Connection "fbususb" on Linux.
  • New Nokia protocol for DKU5 (and phone without USB converter on phone mainboard like 5100) β€” Connection "dku5fbus"/"dku5", device type dku5.
  • New Nokia protocol for PL2303 USB cable (and phone without USB converter on phone mainboard like 5100) β€” Connection "fbuspl2303", device type usb.
  • Old Nokia protocol for MBUS/DAU9P β€” Connection "mbus", device type serial.

Variants ✨ you can modify a bit behaviour of connection using additional flags specified just after connection name like connection-variant.

  • If you're using ARK3116 cable (or any other which does not like dtr handling), you might need -nodtr variant of connection, eg. dlr3-nodtr.
  • If cable you use is not powered over DTR/RTS, try using -nopower variant of connection, eg. fbus-nopower.

  • AT commands for DLR3, DKU5 or other AT compatible cable (8 bits, None parity, no flow control, 1 stop bit). Used with Nokia, Alcatel, Siemens, etc. β€” Connection "at19200"/"at115200"/.., device type serial.
  • AT commands for DKU2 cable β€” Connection "dku2at", device type dku2.

🧚 infrared

  • Nokia protocol for infrared with Nokia 6110/6130/6150 β€” Connection "fbusirda"/"infrared", device type serial.
  • Nokia protocol for infrared with other Nokia models β€” Connection "irdaphonet"/"irda", device type irda.
  • AT commands for infrared. Used with Nokia, Alcatel, Siemens, etc. β€” Connection "irdaat", device type irda.
  • OBEX for infrared β€” Connection "irdaobex", device type irda.

πŸ¦‹ Bluetooth

  • Nokia protocol with serial device set in BT stack (WidComm, other) from adequate service and Nokia 6210 β€” Connection "fbusblue", device type serial.
  • Nokia protocol with serial device set in BT stack (WidComm, other) from adequate service and other Nokia models β€” Connection "phonetblue", device type serial.
  • Nokia protocol for Bluetooth stack with Nokia 6210 β€” Connection "bluerffbus", device type BT.
  • Nokia protocol for Bluetooth stack with DCT4 Nokia models, which don't inform about services correctly (6310, 6310i with firmware lower than 5.50, 8910,..) β€” Connection "bluerfphonet", device type BT.
  • Nokia protocol for Bluetooth stack with other DCT4 Nokia models β€” Connection "bluephonet", device type BT.
  • AT commands for Bluetooth stack and 6210 / DCT4 Nokia models, which don't inform about BT services correctly (6310, 6310i with firmware lower than 5.50, 8910,..) β€” Connection "bluerfat", device type BT.
  • AT commands for Bluetooth stack with other phones (Siemens, other Nokia,etc.) β€” Connection "blueat", device type BT.
  • OBEX for Bluetooth stack with DCT4 Nokia models, which don't inform about BT services correctly (6310, 6310i with firmware lower than 5.50, 8910,...) β€” Connection "bluerfobex", device type BT.
  • OBEX for Bluetooth stack with other phones (Siemens, other Nokia, etc.) β€” Connection "blueobex", device type BT.
  • Connection "bluerfgnapbus", device type BT, model "gnap".
  • Connection "irdagnapbus", device type irda, model "gnap".

🫢 Step2 β€” plug in your Port (according to device type from Step1 and your OS)

  • serial
    • Windows/DOS Port: "com*:" (example "com1:")
    • Linux/Unix Port: "/dev/ttyS*" (example "/dev/ttyS1") or "/dev/tts/**" (with DevFS), virtual serial ports like "/dev/ircomm*" or "/dev/rfcomm*"
  • irda
    • Windows/DOS: ignored (can be empty)
    • Linux/Unix: ignored (can be empty)
  • BT
    • Windows/DOS and Linux/Unix both: Bluetooth device address (example "00:11:22:33:44:55"). Optionally you can also include channel after slash (example "00:11:22:33:44:55/12"). Can be also empty.
  • dku2
    • Windows/DOS: ignored (can be empty)
    • Linux/Unix: /dev/ttyUSB* or /dev/ttyACM*
  • dku5
    • Windows/DOS: ignored (can be empty)
    • Linux/Unix: connection with it not possible
  • usb
    • Windows/DOS: connection with it not possible
    • Linux/Unix: "/dev/ttyUSB*"

🌸 Step3 β€” set the other config parameters

  • Model β€” Should not be used unless you have a good reason to do so. If Gammu doesn't recognize your phone model, put it here. Example values: "6110", "6150", "6210", "8210".
  • SynchronizeTime β€” if you want to set time from computer to phone during starting connection. Do not rather use this option when when to reset phone during connection (in some phones need to set time again after restart).
  • GammuLoc β€” name of localisation file.
  • StartInfo β€” this option allows one to set, that you want (setting "yes") to see message on the phone screen or phone should enable light for a moment during starting connection. Phone WON'T beep during starting connection with this option.
  • GammuCoding β€” forces using specified codepage (in win32 β€” for example "1250" will force CP1250) or UTF8 (in Linux β€” "utf8").

  • Logfile β€” Use, when want to have logfile from communication.
  • Logformat β€” What debug info and format should be used:
    • "nothing" β€” no debug level (default)
    • "text" β€” transmission dump in text format
    • "textall" β€” all possible info in text format
    • "errors" β€” errors in text format
    • "binary" β€” transmission dump in binary format

  • Features β€” Custom features for phone. This can be used as override when values coded in common/gsmphones.c are bad or missing. Consult include/gammu-info.h for possible values (all Feature values without leading F_ prefix). Please report correct values to Gammu authors.

  • Use_Locking β€” under Unix/Linux use "yes", if want to lock used device to prevent using it by other applications. In win32 ignored.

And that's the whole file, bestie β€” closing brace of the config, vim modeline and all πŸ’–

; vim: et ts=4 sw=4 sts=4 tw=78 spell spelllang=en_us

πŸ‘‘ Author

Michal ČihaΕ™ <michal@cihar.com>

2009-2015, Michal ČihaΕ™ <michal@cihar.com>


That's a wrap on GAMMURC(5) fr fr 🫢 β€” this one's the 1.45.0 edition, dated Sep 16, 2026, and honestly? iconic. go configure your phone, you've got this πŸ’…βœ¨

πŸ“¦ where this page comes from