Home

Gammu Manual Release @GAMMUV

image

Contents

1. S 377 00 02 00 0a 00 01 00 location 00 where location 0 1 2 3 pog 02 1d 00 0b 00 01 00 location 08 00 00 00 00 s 2 00 02 00 0a 00 60 00 10 00 11 00 12 100 13 00 14 00 15 00 I R lt 00 47 Da 18 110 0 LES 1007 M 00 XS 097 LE eei Re nae 00 ld 00 le 00 1f 00 20 00 21 00 22 00 23 00 24 eb aS 00 25 00 26 amp 00 27 00 28 100 29 00 2a 00 2b 00 2c amp 00 2d 00 2e 00 2 00 300 00 1211100 322 00 333 00 34 0 1 2 3 4 00 355 00 366 00 377 00 388 00 399 00 3a 100 3b 00 3c 5 6 7 8 9 00 3d 00 3e 00 3f 7 00 40 00 41A 00 42B 00 43C 00 44 gt A B C D 00 45E 00 46F 00 47G 00 48H 00 491 00 4aJ 00 4bK 00 4c E F G H I J K L 00 4dM 00 4eN 00 4f0 00 50P 00 510 00 52R 00 1 538 00 54 M N O P Q R S T 00 55U 00 56V 00 57W 00 58xX 00 59Y 00 5aZ 00 5b 00 5c U V W X Y Z N 00 5d 00 5e 00 5 1 00 60 00 61la 00 62b 00 63c 00 64 a b c d 00 165e 00 66f 00 67g 00 68h 00 691 00 1 6a3100 6bk 00 6c e f g h i j k 1 00 6dm 00 6en 00 6f0 00 m n o re 29 02 1d 00 0b 00 1 607 00 10 04 00 00 11 Oc 06 100 00 rcr 00 00 00 00 00 00 00 12 04 00 00 13 04 00 00 14 08 00 00 00 00 00 00 15 08 00 00 00 100 00 00 16 o oooooooo 08 00 00 00 00 0
2. Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checko
3. gammu sendsms EMS 123456 protected 2 variablebitmaplong ala bmp toneSElong axelf txt 9 4 3 Retrieving USSD replies For example for retrieving prepaid card status or retrieving various network info gammu getussd 555 9 4 4 Uploading files to Nokia Add Alien to applications in your phone you need to have files Alien JAD and Alien JAR in current directory gammu nokiaaddfile APPLICATION Alien Add file mid to ringtones folder gammu nokiaaddfile TONES file mid 9 4 5 Setting operator logo Set logo for network 230 03 Vodafone CZ gammu setbitmap OPERATOR ala bmp 230 03 9 4 6 Converting file formats The formats conversion can done using gammu savefile or gammu convertbackup commands Convert single entry at position 260 from Backup Format to vCalendar gammu savefile CALENDAR output vcs myCalendar backup 260 Convert first phonebook entry from Backup Format to vCard gammu savefile VCARD21 output vcf phone backup ME 1 Convert all contacts from backup to vCard gammu convertbackup phone backup output vcf 9 4 7 Reporting bugs There are definitely many bugs reporting to author is welcome Please include some useful information when sending bug reports especially debug logs operating system it s version and phone information are needed To generate debug log enable it in Gammu Configuration File
4. gammu device dev ttyACMO name Nokia E52 connection at gammu1 device dev ttyACM1 name Nokia E52 connection at gammu2 device dev ttySO name Phone on serial port 0 connection at gammu3 device dev ttyS1 name Phone on serial port 1 connection at gammu4 device dev ttyS2 name Phone on serial port 2 connection at gammu5 device dev ttyS3 name Phone on serial port 3 connection at gammu6 device 5C 57 C8 BB BB BB 232 Chapter 11 Miscellaneous utilities Gammu Manual Release GAMMU E RSION Q name Nokia E52 connection bluephonet 11 2 gammu config 11 2 1 Synopsis gammu config fl force cl config CONFIG 11 2 2 Description Script to help configuring Gammu Utility This program follows the usual GNU command line syntax with long options starting with two dashes A summary of options is included below h help Show summary of options f force Force configuring even if config already exists c config CONFIG Define which configuration file to use 11 3 jadmaker 11 3 1 Synopsis jadmaker f force ul url URL lt filename jar gt 11 3 2 Description Script to generate JAD file from JAR file This program follows the usual GNU command line syntax with long options starting with two dashes A summary of options is included belo
5. MessageReferenc Laer data 84 Chapter 5 libGammu Gammu Manual Release GAMMU ERSION void interrupt int sign signal sign SIG_IGN gshutdown TRUE int main int argc UNUSED char x argv UNUSED GSM_SMSMessage sms GSM_SMSC PhoneSMSC char recipient number 1234567890 char message text Sample Gammu message GSM Debug Info debug info int return value 0 Register signal handler x Signal SIGINT interrupt Signal SIGTERM interrupt x We don t need gettext but need to set locales so that Charset conversion works GSM_InitLocales NULL Enable global debugging to stderr debug info GSM GetGlobalDebug GSM SetDebugFileDescriptor stderr TRUE GSM SetDebugLevel textall debug info debug info Prepare message x Cleanup the structure memset amp sms 0 sizeof sms Encode message text x EncodeUnicode sms Text message text strlen message text Encode recipient number x We want to submit message sms PDU SMS_Submit No UDH just a plain message sms UDH Type UDH_NoUDH We used default coding for text x sms Coding SMS_Coding_Default_No_Compression Class 1 message normal sms Class 1 Allocates state machine S GSM AllocStateMachine if s NULL return 3 x Enable state machine debugging to stderr
6. 2 dbfda ignored can be empty ignored can be empty X T Bluetooth device address exampl MOOS T T Z L Optionally you can also include channel after slash s example 00 11 22 33 44 55 12 Can be also empty Z dku2 ignored can be empty dev ttyUSB or dev ttyACM cce gt Se SSS e eee cerae eser dkub5 ignored can be empty connection with it not possible aa usb connection with it not possible dev ttyUSBx Step3 Set other config parameters Parameter name Description 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 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 SynchronizeTime x Sz as ME EN 144 Chapter 8 Gammu Configuration File Gammu Manual Release GAMMU ERSION GammuLoc 2 Startlintfo GammuCoding name of localisation file this option allows one to set that you want setting yes tos 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 forces using specified codepage in win
7. You can match by various attributes you can figure them using udevadm command udevadm info name dev ttyUSBl attribute walk See also Various documentation on creating persistent device names using udev is available online for example on the Debian wiki or in Writing udev rules document 3 1 5 What are free alternatives to Gammu It depends on your phone For Nokia or AT based phones you can try Gnokii but Gammu should be superior in most cases For Symbian phone you can try using Series60 Remote which works pretty well with S60 phones though Gammu brings various fixes to their applet If you are looking for synchronisation try using something what supports SyncML to retrieve contacts or calendar from your phone for example OpenSync or syncEvolution 3 2 Configuring Gammu FAQ 3 2 1 How to configure 3G UMTS modem or AT capable phone As most modems support AT commands this is pretty easy and you should use at Connection For Device you should use device name as modem appears in your system for example dev ttyACMO or COM7 Some modems expose more serial ports and you need to carefully choose the right one for example only one of them can receive USSD notifications Note On Linux you might have to install usb modeswitch to make your modem acutally behave like a modem and not like a disk containing drivers for Windows See also Device name always changes on Linux how to solve that
8. dprintf Cause Type i n message 5 dprintf Cause ID i n message 6 break case 0x05 dprintf Incoming call n dprintf Call ID i n message 4 dprintf Call Mode i n message 5 dummy malloc message 6 1 DecodeUnicode dummy message 7 message 6 dprintf From s n dummy break case 0x07 dprintf Call answer initiated n dprintf Call ID i n message 4 break case 0x09 dprintf Call released n dprintf Call ID i n message 4 break case Ox0a dprintf Call is being released Wn 260 Chapter 13 Phone Protocols Gammu Manual Release GAMMU ERSION dprintf Call ID i n message 4 break case 0x0b x No idea what this is about x break case 0x0c if message 4 0x01 dprintf Audio enabled Wn else dprintf Audio disabled n break case 0x53 dprintf Outgoing call n dprintf Call ID i n message 4 dprintf Call Mode i n message 5 dummy malloc message 6 1 DecodeUnicode dummy messag 7 message 6 dprintf To s n dummy break 0x02 SMS HANDLING s Send SMS 0x02 0x00 0x00 0x00 0x55 0x55 0x01 1 big block 0x02 submit length big block type reference PID DCS 0x00 4 blocks blocks r Send SMS 0303 Ox00 0x0L 0x0c Ox08 0x00 0x00 Oxdb 0x55 0x55 0x00 4 s Get SMSC 0x14 0x01 0x00 T r Get SMSC 0x15 format 0x01 0x0b 0x28
9. CREATE INDEX outbox date ON outbox SendingDateTime SendingTimeOut CREATE INDEX outbox sender ON outbox SenderID CREATE TRIGGER update outbox time UPDATE ON outbox BEGIN UPDATE outbox SET UpdatedInDB datetime now WHERE ID old ID END CREATE TABLE outbox multipart Text TEXT Coding TEXT NOT NULL DEFAULT Default No Compression UDH TEXT Class INTEGER DEFAULT 1 TextDecoded TEXT DEFAULT NULL ID INTEGER SequencePosition INTEGER NOT NULL DEFAULT 1 CHECK Coding IN Default No Compression Unicode No Compression 8bit Default Compression Unic PRIMARY KEY ID SequencePosition CREATE TABLE pbk ID INTEGER PRIMARY KEY AUTOINCREMENT GroupID INTEGER NOT NULL DEFAULT 1 Name TEXT NOT NULL Number TEXT NOT NULL i CREATE TABLE pbk_groups Name TEXT NOT NULL ID INTEGER PRIMARY KEY AUTOINCREMENT CREATE TABLE phones ID TEXT NOT NULL UpdatedInDB NUMERIC NOT NULL DEFAULT datetime now InsertIntoDB NUMERIC NOT NULL DEFAULT datetime now TimeOut NUMERIC NOT NULL DEFAULT datetime now Send TEXT NOT NULL DEFAULT no Receive TEXT NOT NULL DEFAULT no IMEI TEXT PRIMARY KEY NOT NULL NetCode TEXT DEFAULT ERROR NetName TEXT DEFAULT ERROR Client TEXT NOT NULL Battery INTEGER NOT NULL DEFAULT 1 Signal INTEGER NOT NULL DEFAULT 1
10. 10 6 Backend services 201 Gammu Manual Release GAMMU ERSIONAO 2 part number for multipart sms 3 message state SendingError Error SendingOK SendingOKNoReport 4 message reference TPMR 5 time when inserted in db update_sent Update sent statistics after sending message Default value UPDATE phones SET Sent Sent 1 WHERE IMEI SI refresh_phone_status Update phone status battery signal Default value UPDATE phones SET TimeOut NOW INTERVAL 10 SECOND 0 Battery 1 Signal 2 WHERE IMEI gt T Query specific parameters 1 battery percent 2 signal percent 10 6 3 MySQL Backend Description MYSQL backend stores all data in a MySQL database server which parameters are defined by configuration see SMSD Configuration File for description of configuration options For tables description see MSD Database Structure This backend is based on SQL Service Configuration Before running gammu smsd you need to create necessary tables in the database which is described bellow The configuration file then can look like smsd service sql driver native_mysql host localhost See also SMSD Configuration File Privileges The user accessing the database does not need much privileges the following privileges should be enough 202 Chapter 10 SMS Daemon Gammu Manual Release GAMMU ERSION
11. cmake DINSTALL DOC OFF Debugging build failures If there is some build failure eg some dependencies are not correctly detected please attach CMakeCache txt CMakeFiles CMakeError log and CMakeFiles CMake0utput log files to the report It will help diag nose what was detected on the system and possibly fix these errors To find out what is going on during compilation add DCMAKE VERBOSE MAKEFILE ON to cmake command line or run make with VERBOSE 1 make VERBOSE 1 Debugging crashes To debug program crashes you might want to build Gammu with DENABLE_PROTECTION OFF otherwise de bugging tools are somehow confused with protections GCC makes and produce bogus back traces 1 3 11 Compliling python gammu Currently python gammu is distributed as a separate package which follows Python usual method for building mod ules distutils so use setup py is placed in the top level directory setup py build sudo setup py install You can install it using pip installer pip install python gammu 1 4 Contributing We welcome contribution in any area if you don t have developer skills you can always contribute to Localization or just donate us money In case you are interested in fixing some code please read Gammu internals to understand structure of Gammu code We also maintain list of wanted skills where you can find in which areas we currently
12. 00 08 00 01 00 00 00 00 00 x where x 0x01 0x02 0x04 0x08 0x10 T 08 1f y 102 00 00 00 100 272 Chapter 13 Phone Protocols 00 00 EI 0x00 Gammu Manual Release GAMMU E RSION Q where y 0 0x04 s 777 00 08 05 01 00 00 00 00 00 20 EP 2 08 1f 05 02 00 00 00 00 0x45 PHONEBOOK HANDLING the same to msg 0x03 0x53 s Get simlock info 0x0C 0x55 TODO s Get TODO 0x03 0x00 0x00 0x80 location low location hi r Get TODO 0804 e s Get number of TODO 0x07 r Get number of TODO 0x08 number lo number hij S Delete all TODO 0x11 r Delete all TODO 0x12 s Get TODO locations 0x15 0x01 0x00 0x00 0x00 0x00 0x00 r Get TODO locations LOxlo 2 Ox7a STARTUP s Get startup logo 0x02 OXxOf r Get startup logo 0x03 OxOf 0x00 4 blocks OxcO 0x02 height 2 octets OxcO 0x03 width 2 octets OxcO 0x04 size 2 octets picture S Get startup greeting 0x02 0x01 0x00 r Get startup greeting 0x03 0x01 0x00 greeting unicode 0x00 S Get anykey answer 0x02 0x05 0x00 r Get anykey answer 0x03 0x05 0x00 0x00 0x01 Oxd1 S Get HW amp SW version 0x0003 0x00 Oxd2 r Get HW amp SW version 0x0003 V firmware n firmware date n model n c NMP 13 6 Nokia 7110 Assembled by Balazs Nagy lt js iksz hu gt Marcin Wiacek lt Marcin MWiacek com gt Jens Bennfors
13. Fig 13 1 QR code for download of applet Manual Installation using Gammu If the above mentioned gammu install does not work for you for example when you need to use different applet you can still use Gammu to send files to the phone using gammu sendfile First you need to create gammurc with following content gammu connection blueobex model obexnone device 5C 57 C8 XX XX XX Address of the phone And now you can send files to your phone gammu sendfile Python_2 0 0 sis gammu sendfile contrib s60 gammu s60 remote sis Files should appear in inbox in your phone and you can install them from there 13 14 3 Connecting to Series60 phone The Gammu configuration is simple all you need to specify is correct Connection gammu connection blues60 device 5C 57 C8 XX XX XX Address of the phone Now you need to start the Series60 applet in the phone and Gammu should be able to talk to it 13 14 Series60 Remote Protocol 315 Gammu Manual Release GAMMU ERSIONAO 13 15 Gnapplet Protocol Note The original applet has been created for lt http www gnokii org gt Gammu currently uses slightly extended version which will be hopefully merged back 13 15 1 Installation To communicate with the phone you need to install the applet There are few options how to do it Installation using Gammu Gammu can transmit the applet to your phone automatical
14. T STRE Training Street Games T_SWIM Training Swimming T_TENN Training Tennis T TRAV Training Travels 4 2 API documentation 69 Gammu Manual Release GAMMU ERSIONAO T_WINT Training Winter Games ALARM Alarm DAILY ALARM Alarm repeating each day Entries Actual entries see Calendar Entries Object Example CAL Type MEMO Entries Type START DATETIME Value datetime datetime now Type END DATETIME Value datetime datetime now datetime timedelta qd Type LOCATION Value Home Type TEXT Value Relax for one day l Calendar Entries Object Type Type of entry one of START_DATETIME Date and time of event start END_DATETIME Date and time of event end TONE_ALARM_DATETIME Alarm date and time LH H E3 E ENT ALARM DATETIME Date and time of silent alarm TEXT Text DESCRIPTION Detailed description LOCATION Location PHONE Phone number PRIVATE Whether this entry is private CONTACTID Related contact id I REPEAT DAYOFWEEK Repeat each x th day of week REPEAT DAY Repeat each x th day of month REPEAT DAYOFYEAR Repeat each x th day of year REPEAT WEEKOFMONTH Repeat x th week of m
15. gammu YOUR CONNECTION SETTINGS logfile tmp gammu log logformat textall 172 Chapter 9 Gammu Utility toneSl E ring Gammu Manual Release GAMMU ERSION Alternatively you can specify logging on command line gammu d textall f tmp gammu log With this settings Gammu generates tmp gammu log on each connection to phone and stores dump of communication there You can also find some hints for improving support for your phone in this log See lt http wammu eu support bugs gt for more information on reporting bugs Please report bugs to Gammu bug tracker 9 4 Examples 173 Gammu Manual Release GAMMU ERSIONO 174 Chapter 9 Gammu Utility CHAPTER 10 SMS Daemon 10 1 Overview Gammu SMS Daemon is a program that periodically scans GSM modem for received messages stores them in defined storage and also sends messages enqueued in this storage 10 1 1 Overall schema The interactions of SMS Daemon and related components can be seen on following picture 175 Gammu Manual Release GAMMU ERSIONO gammu smsd inject Service storage 7 GSM modem 10 1 2 SMSD operation The SMSD operation consist of several steps 1 Process command line options 2 Configure backend service 3 Main loop is executed until it is signalled to be terminated a Try to connect to phone if not connected b Check for securi
16. id 0x0018 where block see 0x05 0x0017 0x0019 0x001a where nr 0x001b 2923 0x002 0x012 Memory in use Nokia 3330 Ox00 Phone Ox01 SIM card Network selection 0x00 Automatic Ox li Manual Automatic redial 0x00 0ff Ox01 On Speed dialling 0x00 0ff 0x01 0n Own number sending 0x00 Set by network 0x01 0n 0 Cell info display 0x00 0ff Type of view Ox00 Name list 0x01 Name numbe Language 0x00 English 0x07 Dansk 0x08 Svenska 0x09 Suomi OxOc Turcke OxOe Norsk 0x10 Automatic Reboots ME 3330 Read only 3330 Reply via same centre 0x00 No 0x01 Yes Delivery reports 0x00 No 0x01 Yes Show Hide clock 0x00 Show 0x01 Hide Time format 0x00 24 hour 0x01412 hour Select profile 0x00 2General 0x01 0x05 rest 2 2 Read only N3330 Confirm SIM service actions Ox00 No0t asked 0x Q1 Asked T9 Dictionary Ox00 Off Ox01 English 0x0a Su Messages gt Character support 0x00 Automatic 0x 12GSM alphab Startup logo settings 0x00 Your own uploaded logo 0x0 0x02 Draft HUMAN technology tm 2021 0x002 0x012 227 0x002 0x012 Read only N3330 Auto update of date and time 0x00 Off 0x01 Confirm first 0x0 no of blocks block 1 startup logo y x picture coding 2 welcome not len message 3 operator msg len message no of blocks block gt 0x01 nr see 0x05 0x0013 1 1 3 flen nr len te
17. 304 Chapter 13 Phone Protocols Gammu Manual Release GAMMU ERSION GET lt chunklen gt lt data gt atxget get base64 coded data chunk returned data GET lt chunklen gt lt data gt atxput lt no gt lt len gt lt data gt lt chck gt put base64 coded data chunk no is chunk number starting from 0 len is chunk length last 4 characters is checksum atxend end finish file transfer operation atxsyph lt path gt add downloaded record to phonebook atxsyph 0 1 d s EXAMPLE AT SYPH 0 1 74 app dir tmp dat atxsysm 0 1 d SMS handling Phone has at least two directories from root app and app3 atxlist gives error 13 12 MTK AT Commands 13 12 1 VCard access Read vcard first 1 is READ command second 1 is memory position AT EVCARD 1 1 EVCARD 0043003a005c00520065006300650069007600650064005c007e00760063006100720064005 0 72002e007600 OK HEX UCS2 temporary file name which we must read for VCARD 13 12 2 Filesystem access Change operation mode to obtain access to filesystem operations AT ESUO 3 OK Change directory to root folder AT EFSF 3 OK Read file with name from EVCARD reply AT EFSR 0043003a005c00520065006300650069007600650064005c007e00760063006100720064005f0072002e0076006 EFSR 1 1 168 424547494E3A56434152440D0A56455253494F4E3A322E310D0A4E
18. 9 2 11 Date time and alarm commands getalarm start Get alarm from phone if no location is specified 1 is used getdatetime Get date and time from phone setalarm hour minute Sets repeating alarm in phone on selected time setdatetime HH MM SS YYYY MM DD Set date and time in phone to date and time set in computer Please note that this option doesn t show clock on phone screen It only set date and time Note You can make such synchronization each time when will connect your phone and use Gammu See SynchronizeTime in Gammu Configuration File for details 9 2 12 Categories commands Note Categories are supported only on few phones Alcatel addcategory TODO PHONEBOOK text getallcategory TODO PHONEBOOK getcategory TODO PHONEBOOK start stop listmemorycategory text number listtodocategory text number 9 2 13 Backing up and restoring commands addnew file yes memory ME SM Adds data written in file created using gammu backup command All things backed up gammu backup can be restored when made backup to Gammu text file Please note that this adds all content of backup file to phone and does not care about current data in the phone no duplicates are detected Use yes parameter to answer yes to all questions you want to automatically restore all data Use memory parameter to force usage of defined memory type for storing entries regardless what backu format
19. GRANT USAGE ON TO smsd G localhost IDENTIFIED BY password GRANT SELECT INSERT UPDATE DELETE ON smsd TO smsd localhost CREATE DATABASE smsd Note For creating the SQL tables you need more privileges especially for creating triggers which are used for some functionality Creating tables SQL script for creating tables in MySQL database Database for Gammu SMSD ln case you get errors about not supported charset please replace utf8mb4 with utf8 Table structure for table daemons CREATE TABLE daemons Start text NOT NULL Info text NOT NULL ENGINE MyISAM DEFAULT CHARSET utf8mb4 Dumping data for table daemons Table structure for table gammu CREATE TABLE gammu Version integer NOT NULL default 0 ENGINE MyISAM DEFAULT CHARSET utf8mb4 Dumping data for table gammu INSERT INTO gammu Version VALUES 14 Table structure for table inbox 10 6 Backend services 203 Gammu Manual Release GAMMU ERSIONO CREATE TABLE inbox UpdatedInDB timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP ReceivingDateTime timestamp NOT NULL default 0000 00 00 00 00 00 Text text NOT NULL SenderNumber varchar 20 NOT NULL default Coding enum Default_No_Compression Unicode_No_Compression 8bit Default_Compression Unice UD
20. LOCAL4 LOCAL5 LOCAL6 LOCAI New in version 1 30 91 DebugLevel L7 Debug level for SMSD The integer value should be sum of all flags you want to enable 1 enables basic debugging information 2 enables logging of SQL queries of service backends 4 enables logging of gammu debug information 184 Chapter 10 SMS Daemon Gammu Manual Release GAMMU ERSION Generally to get as much debug information as possible use 255 Default is 0 what should mean no extra information CommTimeout How many seconds should SMSD wait after there is no message in outbox Default is 30 SendTimeout Shows how many seconds SMSD should wait for network answer during sending sms If nothing happen during this time sms will be resent Default is 30 MaxRetries How many times will SMSD try to resend message if sending fails Default is 1 ReceiveFrequency The number of seconds between testing for received SMSes when the phone is busy sending SMSes Normally a test for received SMSes is done every CommTimeout seconds and after each sent SMS Default is O not used StatusFrequency The number of seconds between refreshing phone status battery signal stored in shared memory and possibly in service backends Use 0 to disable Default is 15 LoopSleep The number of seconds how long will SMSD sleep before checking for some activity Please note that setting this to higher value than 1 will have effects to o
21. N6150 0x98 0x00 0x04 S Get bin ringtone 0x9e location where location 0 1 etc r Get bin ringtone 0x9e location error contents where location 0 1 etc error 0x0a ringtone NOT available 0x00 OK S Set bin ringtone L 0xa0 location 0x00 contenst where location 0 1 etc r Set bin ringtone 0xa0 location error where location 0 1 etc error 0x0a ringtone NOT set 0x00 ringtone set OK r Get MSid 0xb5 0x01 Ox2f msid 0x25 S Get info about phone Oxc8 0x01 r Get info about phone Oxc8 0x01 0x00 V firmware 0x0a firmware date 0x0a mode 13 4 Nokia 6110 257 Gammu Manual Release GAMMU ERSIONO B U B U Rm R oUo BRO UBAGO RUROK G h o 0 00R0R00000800580800505 0 Get MCU SW Checksum L 0xc8 Get MCU SW Checksum Oxc8 DPS External SW t 0xc7 DSP External SW i 0xc7 Get HW i1 0xXC89 Get HW Oxc8 Get Made Dat f 0xc8 Get Made Dat f 0xc8 Get DSP Internal SW t 0xc8 Get DSP Internal SW 0xc8 Get PCI version Oxc8 Get PCI version Oxc8 Get system ASIC Oxc8 Get system ASIC t 0xcS Get COBBA 0xc8 Get COBBA f 0xc8 Get PLUSSA f 0xc8 Get PLUSSA f Oxc8 where av Get CCONT Oxc8 Get CCONT Oxc8 where av Get PPM version Oxc8 Get PPM version Oxc8 Get PPM info Oxc8 Get PPM info Oxc8 Set HW version t 0xc9 Get Product Code Oxca Get Product Code Oxca Get Order Number Oxca
22. Wait for network reply while gshutdown 1 GSM ReadDevice s TRUE if sms send status ERR NONE Message sent OK x return value 0 break T if sms_send_status ERR_TIMEOUT Message sending failed return value 100 break 86 Chapter 5 libGammu Gammu Manual Release GAMMU ERSION Terminate connection rror GSM TerminateConnection s error handler Free up used memory GSM FreeStateMachine s return return value Editor configuration vim noexpandtab sw 8 ts 8 sts 8 tw 72 5 2 4 Sending Long SMS message include lt gammu h gt include lt stdlib h gt include lt stdio h gt include lt string h gt include lt signal h gt GSM StateMachine xs INI Section cfg GSM Error error volatile GSM Error sms send status volatile gboolean gshutdown FALSE Handler for SMS send reply x void send sms callback GSM StateMachine sm int status int MessageReference void x Y printf Sent SMS on device Ss n GSM GetConfig sm 1 gt Device if status 0 printf OK sms_send_status ERR_NONE else printf error i status sms_send_status ERR_UNKNOWN printf message reference d n MessageReference Function to handle errors void error_handler void if error ERR_NONE
23. Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_b
24. gammu gammu 32 data 54 gammu smsd 52 gammu exception 56 worker 54 319 Gammu Manual Release GAMMU ERSIONO 320 Python Module Index Index Symbols 16bit gammu command line option 152 154 C csv gammu smsd monitor command line option 182 E uninstall event log gammu smsd command line option 179 G group group gammu smsd command line option 178 L no use log gammu smsd command line option 179 gammu smsd inject command line option 181 gammu smsd monitor command line option 182 S run service gammu smsd command line option 179 U user user gammu smsd command line option 178 X suicide seconds gammu smsd command line option 179 animation gammu command line option 152 autolen len gammu command line option 153 b no bluez gammu detect command line option 232 biglogo gammu command line option 153 c config CONFIG gammu config command line option 233 c onfig filename gammu command line option 147 c config file gammu smsd command line option 178 gammu smsd inject command line option 181 gammu smsd monitor command line option 182 d daemon gammu smsd command line option 178 d debug gammu detect command line option 231 d debug level gammu command line option 147 d delayzseconds gammu smsd monitor command line option 182 defanimation gammu command line option 151 defsound gammu command lin
25. 1F0004 DO 0001 04 02CC Power up from PC 1F0400 DO 0001 05 0DC2 Power up from phone 1F0004 79 0005 0201 0164 00 OCOD Enable carkit mode from PC 1F0400 7F 0C68 Ack from phone 1F0400 78 0004 0128 0B00 OEAB Status OxOB 0x00 from phone 1F0004 79 0012 0201 0206 0056 2030 372E 3030 0A48 4655 3200 0D46 HFU 2 version from PC 1F0400 7F OE6A Ack from phone 1F0400 DA 0004 0028 0000 OFE2 1F0004 79 0005 0201 0164 00 1716 Enable carkit mode from PC 1F0400 7F 1773 Ack from phone 1F0400 78 0004 0128 0B00 1055 Status OxOB 0x00 from phone 1F0004 78 0003 0201 03 1878 Status confirm from PC 1F0400 7F 1A7E Ack from phone An unknown status frame OxOB is sent by the phone 290 Chapter 13 Phone Protocols Gammu Manual Release GAMMU E RSION Q Incoming call 1F0400 78 0004 0128 0701 0D45 Status 0x07 0x01 from phone 1F0400 78 0004 0128 0EO01 OF4E Status OxOE 0x01 from phone 1F0400 78 0004 0128 0A00 1054 Status 0x0A 0x00 from phone 1F0400 78 0004 0128 0901 1157 Status 0x09 0x01 from phone Byte 8 in the status frames is some kind of ID number 0x28 is the ID for 6310 Status Ox0A 0x09 is unknown Connected The phone doesn t send out anything when a call has been set up This might be because the profile handsfree is lost when ack isn t sent Initiation with connected phone 1F0004 79 0012 0201 0206 0056 2030 372E 3030 0A48 4655 3200 1C57 HFU 2 version from PC 1F0400 7F 1C78 Ack from phone 1F0400 78 0004 0128 0E02 1A58 St
26. Explanation of fields lt recipient gt recipient number where to send message lt priority gt an alphabetic character A Z A highest priority lt ext gt txt for normal text SMS smsbackup for SMS Backup Format lt note gt any artibrary text which is ignored For text messages you can additionally append flags to extension d delivery report requested f flash SMS b WAP bookmark as name URL Other fields are same as for received messages For example OUTG20040620 193810 123 4512345678 xpq txtdf is a flash text SMS requesting delivery reports 196 Chapter 10 SMS Daemon Gammu Manual Release GAMMU E RSION Q SMSes will be transmitted sequentially based on the file name The contents of the file is the SMS to be transmitted in Unicode or standard character set The contents of the file is the SMS to be transmitted in Unicode or standard character set for WAP bookmarks it is split on as Name URL for text messages whole file content is used Please note that if file is not in Unicode encoding is detected based on locales which do not have to be configured if SMSD is running from init script If this is your case please add locales definition to init script 10 6 2 SQL Service Description SQL service stores all its data in database It can use one of these SQL backends configuration option Driver in smsd section native mysql for MySQL Backend e native pgsql for PostgreSQL Backend odbc for ODBC
27. NOTE msglen 0x37 where timeout 0x00 not set 0x05 5 second Ox0a 10 second Ox0f 15 second 0x14 20 second 0x19 25 second Oxle 30 second where divtype 0x02 all diverts for all call types Found only when deactivate all diverts for all call types with 0x15 all calls 0x43 when busy Ox3d when not answered Ox3e if not reached calltype 0x00 all calls data voice fax Ox0b voice calls OxO0d fax calla 0x19 data calls S Deactivate calldiverts 0x0001 0x04 0x00 divtype calltype 0x00 where divtype calltype see above r Deactivate calldiverts 0x0002 0x04 0x00 divtype 0x02 calltype data s Get call diverts 0x0001 0x05 0x00 divtype calltype 0x00 where divtype calltype see above r Get call diverts ok 0x0002 0x05 0x00 divtype 0x02 calltype data where divtype calltype see above data 0x01 0x00 isn t active 0x02 0x01 number packed like in SMS 0x00 0x00 timeout r Get prepaid info 0x0005 length message packed like in bit SMS r Call diverts active 0x0006 0x0a Network status S get used network 0x0070 r get used network 0x0071 available length netstatus netsel cellIDH cellIDL lacH lacL MCC MNC 3 Opstr 4 len xlen 78 ylen 21 0 bitmap where Opstr namelen operator name unicode len xlen ylen 0 bitmap 2 bitmap bitmaplen 0 0 OTA bitmap available 0x02 if the logo following is valid 2
28. Returns SIM IMSI as string Return type string Get SMS Folder Location Reads SMS message Parameters Folder int Folder where to read entry 0 is emulated flat memory e Location int Location of entry to read Returns Dictionary with SMS data see SMS Object Return type dict Get SMSC Location Gets SMS Service Center number and SMS settings Parameters Location int Location of entry to read Defaults to 1 Returns Dictionary with SMSC information see MSC Object Return type dict Get SMSFolders Returns SMS folders information Returns List of SMS folders Return type list GetSMSStatus Gets information about SMS memory read unread size of memory for both SIM and phone Returns Dictionary with information about phone memory SIMUnRead SIMUsed SIMSize PhoneUnRead PhoneUsed PhoneSize and TemplatesUsed Return type dict 4 2 API documentation 41 Gammu Manual Release GAMMU ERSIONO GetSecurityStatus Queries whether some security code needs to be entered Returns String indicating which code needs to be entered or None if none is needed Return type string GetSignalQuality Reads signal quality strength and error rate Returns Dictionary containing information about signal state SignalStrength SignalPercent and BitErrorRate Return type dict GetSpeedDial Location Gets speed dial Parameters Location int Location of entry to read Returns Dictionary
29. gammurc do this INI Section cfg Find it x error GSM FindGammuRC amp cfg NULL check error error Read it x error GSM ReadConfig cfg GSM GetConfig state machine 0 0 check error error Free allocated memory INI Free cfg We care onlu about first configuration GSM SetConfigNum s 1 OK now initialise the connection 1 means number of replies you want to wait for in case of failure by GSM InitConnection error GSM InitConnection s 1 check error error Now you are ready to communicate with the phone for example you can read manufacturer name by GSM GetManufacturer error GSM GetManufacturer s buffer check error error When you re finished you need to disconnect and free allocated memory using GSM FreeStateMachine rror GSM TerminateConnection s check error error Free up used memory GSM FreeStateMachine s check error error There are also other Examples 5 1 2 Compling the code To compile program using Gammu library you need to pass include path to the compiler and library name and search path to the linker This can be easiest achieved by using pkg config See following Makefile for example 78 Chapter 5 libGammu Gammu Manual Release GAMMU ERSION Sample Makefile which can be used to build examples shipped with Gammu CFLAGS shell pkg config cflags
30. reply maxsms num gammu command line option 150 SaveSMSBackup in module gammu 52 screenshot filename gammu command line option 168 searchmemory text gammu command line option 156 searchphone debug gammu command line option 168 Send 221 senddtmf sequence gammu command line option 148 SendDTMF gammu StateMachine method 43 sendfile name gammu command line option 157 SendFilePart gammu StateMachine method 43 SendSavedSMS gammu StateMachine method 44 sendsms TYPE destination type parameters type options smscset number smscnumber number reply report validity HOURI6HOURSIDAYI3DAYSIWEEKIMAX save folder number gammu command line option 155 SendSMSQ gammu StateMachine method 43 SentSMSPath 189 Service 20 183 184 setalarm hour minute gammu command line option 160 SetAlarm gammu StateMachine method 44 setautonetworklogin gammu command line option 165 SetAutoNetworkLogin gammu StateMachine method 44 setbitmap TYPE type options gammu command line option 158 SetCalendar gammu StateMachine method 44 SetCallDivert gammu StateMachine method 44 SetConfig gammu StateMachine method 44 setdatetime HH MM SS YYYY MM DD gammu command line option 160 SetDateTime gammu StateMachine method 45 SetDebugFile gammu StateMachine method 45 SetDebugFile in module gammu 48 SetDebugLevel gammu StateMachine method 45 SetDebugLevel in m
31. v version Shows version information and compiled in features c config file Configuration file to use default is etc gammu smsdrc on Windows there is no default and configuration file path has to be always specified n loops count Number of loops by default monitor loops infinitely d delay seconds Delay betwen polling SMSD state default is 20 seconds C csv Print output in comma separated values format client phone ID IMEI sent received failed battery signal 1 use log Use logging as configured in config file L no use log Do not use logging as configured in config file default 182 Chapter 10 SMS Daemon txt toneSE Gammu Manual Release GAMMU E RSION Q 10 4 SMSD Configuration File 10 4 1 Description gammu smsd reads configuration from a config file It s location can be specified on command line otherwise default path etc gammu smsdrc is used This file use ini file syntax see ZNI file format Configuration file of gammu smsd consists of at least two sections gammu and smsd For SQL Service you can also use sql The gammu section is configuration of a phone connection and is same as described in Gammu Configuration File with the only exception that LogF ile is ignored and common logging for gammu library and SMS daemon is used However the LogFormat directive still configures how much messages gammu emits smsd The smsd section configures SMS daemon itself whic
32. x x x x x x x x x x x x x x x x string x x 0 0 0 9 69 CT O C 09 0 0 0 0 0 0 O 0 0 0 0 0 0 0 0 0 C 2 ET 000 0 OG 0 0 checksum 4 bytes 0x00 0x00 ion 4 bytes 0x00 bytes 0x00 1 bytes 0x00 0x00 0x00 0x00 00 available 00 available firmware Ox0a firmware date sion B GC 0x00 etc 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 num4 0x00 x00 x00 x00 x00 x00 x00 x00 x00 00 x00 0x00 Power off for Security data 00 00 00 00 00 00 00 00 x x NR N X KX N KM MK 2 Oo O 0 OO 0000 C3 CO QOO C OO 0 258 Chapter 13 Phone Protocols Ox0a mode Gammu Manual Release GAMMU ERSION HR NH 0 0x00 0x10 0x00 0x00 0x00 0x20 0x00 0x00 0x00 0x40 0x00 0x00 0x00 0x80 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x10 0x00 Result of phone tests Oxcf Result of phone tests Oxcf number of tests results of next tests 227 Oxdl 2 N5110 Oxdl 0x00 Oxld 0x00 0x01 0x08 0x00 LCD Test Oxd3 value where value 0x03 0x02 1 st test 0x03 0x01 2 nd test 0x02 0x03 clears screen S ACD Readings N6150 Oxd4 0x02 0x00 0x02 0x00 0x0e 0x01 r ACD Readings N6150 f 0xd4 0x02 0x00 0x02 0x00 0x
33. 0 or some small number while testing ones have z gt 90 Testing releases usually provide latest features but everything does not have to be stabilized yet 1 9 Project Documentation The documentation for Gammu consists of two major parts The Gammu Manual which you are currently reading and comments in the sources which are partly included in this manual as well 1 9 1 The Gammu Manual This manual is in written in rst format and built using Sphinx with breathe extension To generate the documentation there are various manual targets for make You can build HTML PDF PS HTMLHELP and Latex versions of it Generates HTML version of manual in docs manual html make manual html Generates PS version of manual in docs manual latex gammu ps make manual ps Generates PDF version of manual in docs manual latex gammu pdf make manual pdf Generates HTML version of manual in docs manual htmlhelp make manual htmlhelp Generates HTML version of manual in docs manual latex make manual latex 1 9 2 Man pages The man pages for all commands are generated using Sphinx as well 1 8 Versioning 13 Gammu Manual Release GAMMU ERSIONO Generates HTML version of manual in docs manual man make manual man However man pages are stored in Git as well so you should update generated copy on each change Updates generated man pages in Git make update man 1 9 3 Code comments
34. Chapter 5 libGammu Gammu Manual Release GAMMU ERSION debug info GSM GetDebug s GSM SetDebugGlobal FALSE debug info GSM SetDebugFileDescriptor stderr FALSE debug info GSM SetDebugLevel textall debug info Find configuration file first command line parameter or defaults error GSM FindGammuRC amp cfg argc 2 argv 1 NULL error handler Read it x rror GSM ReadConfig cfg GSM GetConfig s 0 0 error handler Free config file structures INI Free cfg We have one valid configuration GSM SetConfigNum s 1 Connect to phone 1 means number of replies you want to wait for error GSM InitConnection s 1 error handler Here you can do some stuff with phone x x As an example we read some information about phone Manufacturer name rror GSM GetManufacturer s buffer error handler printf Manufacturer sMn buffer Model name rror GSM GetModel s buffer error handler printf Model s s An GSM GetModelInfo s model buffer Terminate connection rror GSM TerminateConnection s error handler Free up used memory GSM FreeStateMachine s return 0 Editor configuration vim noexpandtab sw 8 ts 8 sts 8 tw 72 5 2 Examples 81 Gammu Manual Release GAMMU E HS TO N 0
35. Gammu Manual Release GAMMU ERSION Files service SMSD configuration file for FILES backend could look like smsd Service files PIN 1234 LogFile syslog InboxPath var spool sms inbox OutboPpath var spool sms outbox SentSMSPath var spool sms sent ErrorSMSPath var spool sms error MySQL service If you want to use MYSQL backend you will need something like this smsd Service sql Driver native mysql PIN 1234 LogFile syslog User smsd Password smsd PC localhost Database smsd DBI service using SQLite For DBI Backend backend in this particular case SQLite smsd Service sql Driver sqlite3 DBDir var lib sqlite3 Database smsd db ODBC service using MySQL For ODBC Backend backend in this particular case using DSN smsd server smsd Service sql Driver odbc Host smsd The DSN definition in odbc ini on UNIX for using MySQL server would look like smsd Description MySQL Driver MySQL Server e Ole OSE Database smsd Port Socket Option 10 4 SMSD Configuration File 191 Gammu Manual Release GAMMU ERSIONAO stmt smsdsuse Driver MySQL ODBC 3 51 27r695 Driver DATABASE smsd SERVER 127 0 0 1 Numbers filtering Process only messages from 123456 number include_numbers numberl 123456 Do not
36. Get Order Number Oxca Get Prod Ser Number Oxca Get Prod Ser Number Oxca Get Basic Prod Code Oxca Get Basic Prod Code Oxca Set Product Code 0xcb Set Order Number Oxcb Set Prod Ser Number Oxcb Get original IMEI Oxcc Get original IMEI Oxcc Get Manufacture Month Oxcc Get Manufacture Month Oxcc Get Purchare date Oxee Get Purchare date Oxcc Set Made dat Oxcd Make all phone tests Oxce 0 Make one phone test Oxce 0 Where nu 0x00 0x00 string ies 0x00 HW vers 0x00 date 4 a 0x00 version Ly 0x00 version 0x00 string 2 00 TOTO A06 0 LH LH KH LAL N I9 d e e available Ox lable 0x01 not Of xOf available Ox ailable 0x01 not x10 x10 x12 x125 05 0x00 string GS 070 0 C lt O SE ae 0 0 0 0 0 0 Or OOO O 0 0 e X X X X X X X X X X X X X X X X X X i X C xc 0x00 v 0x00 version L3 1 0x00 zy 2 0x00 3 3 0x00 4 4 0x00 number 1 product code 2 3 1 1 2 2 4 4 PPM ver 0x00 number string number number 0x00 number 0x00 IMEI 0x00 0x00 string x02 string 0x00 xld Oxfe 0x23 0x00 x1d numl num2 num3 m1 num4 0x02 0x00 0x04 0x00 0x08 0x00 0x10 0x00 0x20 0x00 0x40 0x00 0x80 0x00 0x00 0x01 0x00 0x02 0x00 0x04 No test 0x00
37. Type Message type one of Submit message to be send Deliver delivered message Status Report when creating new message this will create submit message with request for delivery report Coding Message encoding one of Unicode No Compression unicode message which can contain any chars but can be only 70 chars long Unicode Compression not supported by Gammu and most phones Default No Compression message with GSM alphabet only up to 160 chars long Default Compression not supported by Gammu and most phones 8bit for binary messages 4 2 API documentation 61 Gammu Manual Release GAMMU ERSIONAO DateTime Timestamp when the message was received or sent Please note that most phones do no record timestamp of sent messages SMSCDateTime Timestamp when the message was at SMSC State Message state one of Sent UnSent Read UnRead Examples Simple message to send using SMSC from phone SMS 1 Number 123465 SMSC Location 1 Text Hello world Class 0 on display message using custom SMSC number SMS 2 Number 123465 SMSC Number 420987654321 Text Hello world Clase gt Gy UDH Object UDH dictionary can consist of following fields ID8bit 8 bit ID of the message not required ID16bit 16 bit ID of the message not required PartNumber Number of current part AllParts Count of
38. Unicode Compressio SMS text coding UDH text User Data Header encoded using hex values which will be used for constructing the message Without this message will be sent as plain text Class integer SMS class or 1 0 is normal SMS 1 is flash one TextDecoded varchar 160 SMS text in human readable form ID integer unsigned SMS SMS sequence ID Please note that this number has to be unique also for sentitems table so reusing message IDs might not be a good idea MultiPart enum false true info whether there are more SMS from this sequence in outbox_multipart RelativeValidity integer SMS relative validity like encoded using GSM specs 220 Chapter 10 SMS Daemon Gammu Manual Release GAMMU E RSION Q SenderID text which SMSD instance should send this one sequence see PhoneID and Multiple modems If blank first SMSD who sees this message will process it SendingTimeOut timestamp used by SMSD instance for own targets DeliveryReport enum default yes no when default is used Delivery Report is used or not according to SMSD instance settings yes forces Delivery Report CreatorID text identification of program created the message outbox multipart Data for outgoing multipart messages Fields description ID integer unsigned the same meaning as values in outbox table Text text the same meaning as values in outbox table Coding enum Default No Compression Unicode
39. hy h 0x00 dito month day 13 5 Nokia 6510 265 FolderID name hi Gammu Manual Release GAMMU ERSIONO s Get IMEI 0x00 0x01 0x01 0x00 A 0x00 0x00 0x00 r Get IMEI 0x01 0x00 0x01 A 0x14 0x00 0x10 s Get IMEI 0x00 0x03 Ox01 0x00 A 0x00 0x00 0x00 r Get IMEI 0x01 0x00 0x01 A 0x14 0x00 0x10 s Get 0x00 0x03 0x00 0x00 D 0x00 0x00 0x00 r Get 0x01 0x02 0x00 s Get HW version 0x00 0x03 0x02 0x07 0x00 Ox02 r Get HW version 0x08 0x00 0x01 I OxOc 0x00 0x05 S get HW amp SW version 0x07 0x00 0x01 r get HW amp SW version 0x08 0x00 0x01 0x58 0x29 0x00 0x22 V firmware n model n c NMP Ox0a 0x43 0x00 0x00 0x00 S Get product code 40x00 0x03 0x04 Ox0b 0x00 0x02 r Get product code OxOc 0x00 0x01 N OxOc 0x00 0x08 So PRO 00 03 05 0b 00 20 ro 03 2b 05 0c 00 01 52R 0c 00 08 00 00 00 00 00 s Get 00 03 06 0b 00 01 r Get 03 2b 06 0c 00 01 4dM 10 00 0a 53S 54T 41A 344 35 Sending frame Oxlb 0x0006 00 08 07 POLANA EEE agi at Received frame 0xlb 0x0072 03 2b 07 0c 00 108 4dM 10 00 0a 53S 54T 41A 344 355 39 M STA459 311 355 377 00 00 00 4eN 0c 00
40. libs gammu smsd Wall LDFLAGS shell pkg config cflags libs gammu ALL phone info sms send smsd PHONY all clean all ALL clean rm f ALL CC lt S CFLAGS LDFLAGS o 56 5 1 3 Unicode Gammu stores all strings internally in UCS 2 BE encoding terminated by two zero bytes This is used mostly for historical reasons and today the obvious choice would be wchar t To work with these strings various functions are provided UnicodeLength DecodeUnicode EncodeUnicode CopyUnicodeString etc For printing on console you should use printf sWMn DecodeUnicodeConsole unicode string For giving string to some GUI toolkit printf sWMn DecodeUnicodeString unicode string Note These functions differ only on platforms where console uses historically different character set than GUI what effectively means only Microsoft Windows 5 1 4 Debugging You can either enabled debug logging globally or per state machine To enable global debugging use debug info GSM GetGlobalDebug GSM SetDebugFileDescriptor stderr FALSE debug info GSM SetDebugLevel textall debug info For per state machine configuration debug info GSM GetDepbug s GSM SetDebugGlobal FALSE debug info GSM SetDebugFileDescriptor stderr FALSE debug info GSM SetDebugLevel textall debug info 5 1 5 Waiting for incoming events
41. printf ERROR s n GSM ErrorString error if GSM_IsConnected s GSM_TerminateConnection s exit error hser_data Interrupt signal handler 5 2 Examples 87 Gammu Manual Release GAMMU ERSIONO void interrupt int sign signal sign SIG_IGN gshutdown TRUE int main int argc UNUSED char x argv UNUSED GSM MultiSMSMessage SMS int i GSM MultiPartSMSInfo SMSInfo GSM SMSC PhoneSMSC char recipient number 1234567890 char message text Very long example Gammu message to show how to construct unsigned char message unicode sizeof message text 1 x 2 GSM Debug Info debug info int return value 0 Register signal handler x Signal SIGINT interrupt Signal SIGTERM interrupt x We don t need gettext but need to set locales so that Charset conversion works GSM InitLocales NULL Enable global debugging to stderr debug info GSM GetGlobalDebug GSM SetDebugFileDescriptor stderr TRUE GSM SetDebugLevel textall debug info debug info x Fill in SMS infor structure which will be used to generat messages GSM ClearMultiPartSMSInfo amp SMSInfo Class 1 message normal SMSInfo Class 1 Message will be consist of one part SMSInfo EntriesNum 1 No unicode x SMSInfo UnicodeCoding FALSE The part has type long t
42. 00 msg center len 00 msg center in flag 00 00 00 00 00 00 00 00 00 00 00 00 00 00 msg center 08 01 80 70 8f dd 00 ef 00 00 00 00 00 00 00 00 unknow 00 00 00 00 00 gate way 00 00 00 unknow More interesting and dangerous is than the 07 10 sequence in place of 07 11 in the request change the command from read to write be care full I almost ruin my 5125 with a 40 0x00 0x00 0x07 0x10 0x00 0x08 0x00 0x01 frame since the frame is ok but the phone the write info from an area of the buffer that I did not send OK so far Still looking for how to handle SMS 13 9 SAMSUNG Organizer AT commands 13 9 1 Get organizer information Invocation AT ORGI Example 13 9 SAMSUNG Organizer AT commands 297 Gammu Manual Release GAMMU ERSIONO AT ORGI 7 ORGI 84 400 30 100 30 OK Return 5 values parl 84 Busy entries 1 to parl of par2 possibles entries par2 400 Max possible entries par3 30 Unknown par4 100 Unknown par5 30 Unknown 13 9 2 Get organizer details Invocation AT ORGR number Get organizer details for index entry number Returns 24 values Example 1 AT ORGR 10 ORGR 161 1 Comprar lagrimas artificiales Farmacia 2 4 2009 9 0 2 4 2009 9 10 Farmacia 1 1 0 OK Example 2 AT ORGR 15 ORGR 67 2 Laura Santiesteban Cabrera 3 11 2009 9 0 rrr1 3 0 4 OK Example 3 AT ORGR 19
43. 0x00 0x00 no of where code 0x0f y location z generic block size block id 0 0 blocksize block no contents 0x00 x04 pointer to another memory location Oxff yH x07 name len unicode L x08 email x09 postal x0a note len unicode L x0b number type 0x00 3 len unicode x0c ringtone ringtone no 0 0 id OO OOO wG 0 Oxlc caller group graphic on 1 yes 0 no 0 0 Oxle caller group number number 0 0 type 0Ox0a General 0x03 Mobile office 0x06 Work 0x04 Fax 0x02 Home mobile 13 6 Nokia 7110 275 blocks b yL xL 0x00 Gammu Manual Release GAMMU ERSIONO s Set mem location 0x010b 0x00 0x01 0x01 0x00 0x00 z xH xL yH yL 0x00 0x00 0x00 no of blocks 4 block no of blocks r Set mem location f Ox lO0c 09 17 code 07 07 ze 02 0 yH yL xL where code 0x3d wrong entry type 0x3e too much entries S Delete mem location 0x010f 0x00 Ox01 0x04 0x00 0x00 Ox0c Ox0O1 Oxff xH xL yH yL 0x00 0x00 where x location y memory type r Delete mem location 0x0110 0x00 0x00 0x06 Calling line restriction Call forwarding etc r Get call divert 0x0001 0x02 x 0x00 divtype 0x02 calltype y z 0x0b number Ox s Set call divert 0x0001 0x03 0x00 divtype calltype 0x01 number packed like in SMS length of number byte 29 0x00 0x00 timeou byte 52
44. 0x01 0x00 where id 0x27 0x2a 0x32 0x28 0x40 Oxlb s Get IMEI 0x0001 r Get IMEI 0x0002 IMEI ASCII 0x00 s get HW amp SW version 0x0003 0x01 0x32 r get HW amp SW version 0x0004 V firmware n firmware date n model n c NMP 0x00 Oxff 14 Ox1f S 272 0x0010 0x02 0x00 Oxff Oxff Y PP 0x0011 length 0x00 block length where block unicode letter 2 0x0000 0x00 0x55 S Set ringtone OxO11f 0x00 location 0x00 name Unicode ringtone format the same to 0x40 0x019e and 0x40 0x01a0 entry2numl name2 OxO t min second hour min seco 13 6 Nokia 7110 279 Gammu Manual Release GAMMU ERSIONO where location 0x87 to 0x8b on N6210 0x74 to on N7110 S Get ringtone 0x0122 0x00 location r Get ringtone 0x0123 0x00 location name Unicode 0x00 0x00 Ox02 0xFC 0x09 r r Get ringtone error io0x0124 2 0x39 S get profile feature 0x0101 0x01 0x01 0x01 numberl number2 where numberl from 0x00 to 0x07 for each profile number2 0x00 0x09 Ox0A 0x16 0x19 Oxla Ox1f 0x20 0x29 where 0x09 keypad tones 0x04 ringing volume 0x05 message alert ton Oxff name r get profile feature 0x0102 0x01 0x02 number2 block for number2 0xff Profile Name block 0x01 length name Unicode 0x00 0x00 for number2 0x00 Keypad Tones block 0x01 0x01 0x01 Type 0x01 where Type 0x00 Off 0x01 to
45. 0x01 value 0x02 s Set Profile 0x03 0x01 blocks 0x03 length type profile f value 0x00 0x00 0x01 value 0x03 r Set Profile 0x04 0x01 blocks length OxXX type OxXX value where value 0x00 success Ox3E FM Radio S Get FM Station 0x00 0x01 0x00 0x05 location 0x00 0x01 r Get FM Station 0x06 Ox00 Ox01 0x00 Oxlc name length 0x14 0x09 0x00 location 0x00 0x00 0x01 FreqHI FreqLO name in unicode 0x55 0x55 if name length is odd where frequency Oxffff FregHi 0x100 FreqLo kHz r Get FM Station 0x16 0x05 0x06 if entry is empty 0x42 s 2 00 07 00 01 00 02 paint carats 07 2d 00 02 06 02 00 02 00 01 02 08 00 0Oc 07 dl 0x42 S Get 0x00 0x07 0x02 0x01 OxOO 0x01 r Get 02 1 06 02 00 02 00 101 02 08 00 0c 107 d1 00 00 S Get original IMEI 0x00 0x07 0x02 0x01 0x00 0x01 r Get original IMEI 0x02 0x06 0x01 0x01 0x00 0x01 0x01 0x18 0x01 0x00 IM s Get 0x00 0x07 0x03 0x01 0x00 0x02 r Get 02 1 06 02 00 02 00 01 02 08 00 0c 107 Jar 00 00 s Get 40x00 0x07 0x04 0x01 0x00 0x10 r Get 02 06 10 00 10 00 01 05 08 00 00 00 00 00 100 s Get 40x00 0x07 0x05 0x01 0x00 0x08 r Get 02 06 08 00 08 00 01 04 08 00 00 00 00 00 100 s Get 27 0x00 0x07 0x06 0x01 0x00 0x20 r Get 02 06 20 00 20 00 01 06 04 03 00 0x43 S
46. 10 01 02 00 at Sending frame Oxlb 0x0006 900 OB TL jOb OO O2 eee ag Received frame Oxlb 0x0012 03 2b 11 0c 00 01 4eN 0c 00 08 300 355 300 377 355 32 N 050752 300 00 0 Sending frame Oxlb 0x0006 OO IOS JIZ Ob BA 550 75 0 0 000 L RC Received frame Oxlb 0x0012 03 2b 12 0c 00 01 52R 0c 00 08 00 00 00 00 100 00 BASE uos 00 00 Sending frame Oxlb 0x0006 00 03 1138 J0b 100 J O1 2 2 2p 00 1122213 Received frame Oxlb 0x0016 03 2b 13 0c 00 01 4dMJ10 00 0a 538 54T 41A 344 355 39 M STA459 311 355 377 00 00 00 157 Sending frame Oxlb 0x0006 00 03 114 107 00 02 o Received frame Oxlb 0x0012 03 2b 14 08 00 01 491 0c 00 05 300 388 300 322 00 00 SL sys OBO ATEN 00 00 s Get IMEI 0x00 0x41 r Get IMEI 0x01 0x00 0x01 0x41 0x14 0x00 0x10 IMEI ASCII Sending frame Oxlb 0x0008 00 03 16 00 44D 00 00 00 D Received frame Oxlb 0x0006 03 2b 16 01 02 00 ot Sending frame Oxlb 0x0006 OO 03 PLE ROR OO Be ss Received frame Oxlb 0x002e 03 2b 17 08 00 01 48H 28 00 20 56V 20 300 344 2e 30 H V 04 0 344 0a 322 399 2d 311 300 2d 300 311 0a 4eN 48H 4dM 2d 37 4 29 10 01 NHM 7 0a 28 63c 29 20 4eN 4dM 50P 2e 00 00 00 00 00 eC NMP 5 S vss 0x00 13 5 Nokia 6510 267 Gammu Manual Release GAMMU ERSIONO Sending fram
47. 5 2 2 Reading SMS message include lt gammu h gt include lt stdlib h gt include lt stdio h gt include lt string h gt include lt signal h gt GSM StateMachine xs INI Section cfg GSM Error error volatile GSM Error sms send status volatile gboolean gshutdown FALSE Function to handle errors void error handler void if error ERR_NONE printf ERROR s n GSM ErrorString error if GSM_IsConnected s GSM_TerminateConnection s exit error Interrupt signal handler void interrupt int sign signal sign SIG IGN gshutdown TRUE int main int argc UNUSED char x xargwv UNUSI S iw GSM Debug Info debug_info gboolean start GSM MultiSMSMessage sms int i Register signal handler Signal SIGINT interrupt Signal SIGTERM interrupt x We don t need gettext but need to set locales so that charset conversion works GSM_InitLocales NULL Enable global debugging to stderr x debug info GSM GetGlobalDebug GSM SetDebugFileDescriptor stderr TRUE debug info GSM SetDebugLevel textall debug info Allocates state machine S GSM AllocStateMachine if s NULL return 3 82 Chapter 5 libGammu Gammu Manual Release GAMMU ERSION x Enable state machine debugging to stderr Same could be achieved by just using global debug conf
48. 6310i with firmware lower than 5 50 8910 5 Connection bluerfphonet device type BT Nokia protocol for Bluetooth stack with other DCT4 Nokia models E 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 2 Ehan 5 450 8970 1 A 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 A Connection bluerfobex device type BT OBEX for Bluetooth stack with other phones Siemens other Nokia etc E Connection blueobex device type BT E m EA TES L EN gt Connection bluerfgnapbus device type BT model gnap A Connection irdagnapbus device type irda model gnap Step2 According to device type from Stepl and used OS set Port parameter Port type Port parameter in Windows DOS Port parameter in Linux Unix dev ttyS example dev ttyS1 l toom or dev tts with DevFS l l example coml serial virtual serial ports like dev ircomm or dev rfcommx l l oil x
49. Create Request 82 00 CC Obex put CB 00 00 00 00 Session 42 00 1A 6D 2D 6F 62 65 78 2F 63 61 6C 65 6E 64 61 72 2F 63 72 65 61 74 65 00 m obex calendar create 4C 00 04 01 C3 00 00 00 9E Length of vcalendar 49 00 A1 42 45 47 49 4E 3A 56 43 41 4C 45 Answer A0 00 12 Obex ok C3 00 00 00 02 Length 4C 00 05 00 00 Error code 49 00 05 00 06 Id of the created item Update Request 82 00 F7 Obex put CB 00 00 00 00 Session vcalendar 42 00 19 6D 2D 6F 62 65 78 2F 63 61 6C 65 6E 64 61 72 2F 77 72 69 74 65 00 m obex calendar write 4C 00 06 01 00 05 First byte Second and third byte Id of the item C3 00 00 00 C8 Length of vcalendar 49 00 CB 42 45 47 49 4E 3A 56 vcalendar item Answer A0 00 08 Obex ok 4C 00 05 00 00 Error code 13 13 m obex protocol used by some Samsung mobiles 311 Gammu Manual Release GAMMU ERSIONAO Read Request 83 00 26 Obex get CB 00 00 00 00 Session 42 00 18 6D 2D 6F 62 65 78 2F 63 61 6C 65 6E 64 61 72 2F 72 65 61 64 00 m obex calendar read 4C 00 06 01 00 06 Id of calendar item Answer A0 00 CO Obex ok C3 00 00 00 BO Length 4C 00 05 00 00 Error code 49 00 B3 42 45 47 49 4E 3A 56 43 41 4C 45 4E 44 41 52 0D OA 56 45 52 53 49 AF 4E 3A 31 2E 3 vcalendar item TODO Where is the id Delete Request 82 00 28 Obex put CB 00 00 00 00 Session 42 00 1A 6D 2D 6F 62 65 78 2F 63 61 6C 65 6E 64 61 72 2F 64 65 6C 65 74 65 00 m obex calendar delete 4C 00 06 01 00 06
50. GAMMU ERSIONO Get SMS message Initiate connection Initiate ACK SMS message received Set CellBroadcast Q hR KH YN r Set CellBroadcast OK r Read CellBroadcast S Set SMS center Set Set Get SMS SMS center OK SMS center error SMS center center received KOR H r SMS center error recv 0x03 Phonebook functions S Get mem location r mem location recvd r mem loc error recvd 0x0007 0x02 location 0x01 0x64 0x000d 0x00 0x00 0x02 0x000e 0x01 i OxOUT ou X Ta whole message L 0x0020 0x01 Ox01 0x00 0x00 Ox01 0x01 for enable cell broadcast 0x00 0x00 0x00 0x00 0x00 0x00 for disable cell broadcast 0x0021 0x01 0x0023 channel message 0x0030 0x64 priority checksum 0 format validity DefaultRecipient no 12 SMScenter no 12 SMSC name 0x00 where tel no 12 len type number BCD L L type 0x81 normal 0x91 international Oxd0 alphanumeric format 0x00 0x22 0x24 0x25 0x26 text fax voice ERMES paging 0x31 X 400 0x32 email validity 0x0b 1 0x47 6 Oxa7 24 0xa9 72 hours Oxad 1 week Oxff max time hour hours hours 0x0031 0x0032 0x0033 0x0034 reason 0x64 priority priority checksum format 0x00 validity DefaultRecipient no 12 SMScenter no 12 SMSC name 0x00 tel no 12 len type number BCD where prior
51. IS NULL AND SenderID SP AND TPMR SMSCNumber FROM sentitems St AND DestinationNumbe save inbox sms update delivered Update message delivery status if message was delivered Default value UPDATE sentitems SET DeliveryDateTim SC Status 1 StatusError se WHERE ID Query specific parameters 1 delivery status returned by GSM network 2 ID of message save inbox sms update Update message if there is an delivery error Default value UPDATE sentitems SET Status 51 StatusError se WHERE ID 2 AND TPMR Query specific parameters 1 delivery status returned by GSM network 2 ID of message save_inbox_sms_insert Insert received message Default value INSERT INTO inbox ReceivingDateTime T xt Class TextDecoded RecipientID VALUES sd SenderNumber am a 9 sE oR C Coding SF SU SMSCNumber Sx T SP UDH update_received Update statistics after receiving message 10 6 Backend services 199 Signal 2 AND TPMR Gammu Manual Release QGAMMU ERSIONAO Default value UPDATE phones SET Received Received 1 WHERE IMEI I refresh_send_status Update messages in outbox Default value UPDATE outbox SET SendingTimeOut WHERE ID 1 AND NOW SendingTimeOut lt NOW INTERVAL 60 SECOND 0 OR SendingTimeOut IS NULL
52. MYSQL and PGSQL backends see MySQL Backend ODBC Backend PostgreSQL Backend DBI Backend for their documentation supports same options for configuring connection to a database User User name used for connection to a database Password Password used for connection to a database Host Database server address It can also contain port or socket path after semicolon for example localhost path to socket or 192 168 1 1 8000 For ODBC this is used as Data source name Note Some database servers differentiate usage of localhost to use local socket and 127 0 0 1 to use locat TCP IP connection Please make sure your SMSD settings match the database server ones New in version 1 28 92 PC Deprecated since version 1 28 92 Please use Host instead Synonym for Host kept for backwards compatibility Database Name of database or schema to use and where SMSD can find it s tables Please note that you should create tables in this database before using gammu smsd SQL files for creating needed tables are included in documentation for individual database backends MySQL Backend ODBC Back end PostgreSQL Backend DBI Backend SkipSMSCNumber When you send sms from some SMS centere you can have delivery reports from other SMSC number You can set here number of this SMSC used by you and Gammu will not check it s number during assigning reports to sent SMS Driver SQL driver to use Gammu supports several native drivers an
53. ORGR 205 3 Cemento 13 3 2009 10 35 13 3 2009 1 3 0 0 1 0 OK Example 4 AT ORGR 23 ORGR 235 4 Curso Averiguar 13 3 2009 9 50 13 3 2009 9 59 1 1 0 OK ORGR AT ORGR answer header par01 Pointer to real memory position par02 Organizer entry type 1 appointments 2 aniversaries 3 tasks 4 miscellany If par02 1 appointment entry type par03 Organizer entry short name par04 Organizer entry detailed description 298 Chapter 13 Phone Protocols Gammu Manual Release GAMMU E RSION Q par05 par06 par07 par08 par09 par10 par11 par12 par13 parl4 par15 parl6 par17 par18 par19 par20 par21 par22 par23 par24 Start day Start month Start year Start hour Start minute End day End month End year End hour End minute Location Alarm flag 02no 1 yes Alarm time unit 12minutes 2 hours days 4 weeks Alarm items quantity Alarm repeat flag 0 or empty no 2 yes Empty Empty Repeat until day Repeat until month Repeat until year If par02 2 aniversary entry type par03 par04 par05 par06 par07 par08 par09 par10 par11 par12 par13 parl4 par15 par ln par17 Empty Ocassion name Alarm day Alarm month Alarm year Alarm hour Alarm minutes Empty Empty Empty Empty Empty Empty Alarm flag 02no 1 yes Alarm time unit 12minutes 2 hours days 42weeks 13 9 SAMSUNG Organizer AT commands 299 Gammu Manual Release GAMM
54. Only part of folder 4 2 API documentation 57 Gammu Manual Release GAMMU ERSIONO has been listed exception gammu ERR_FRAMENOTREQUESTED Exception corresponding to gammu error ERR FRAMENOTREQUESTED Verbose error description Frame not requested right now See lt http wammu eu support bugs gt for information how to report it exception gammu ERR FULL Exception corresponding to gammu error ERR FULL Verbose error description Memory full exception gammu ERR GETTING SMSC Exception corresponding to gammu error ERR GETTING SMSC Verbose error description Failed to get SMSC number from phone exception gammu ERR GNAPPLETWRONG Exception corresponding to gammu error ERR GNAPPLETWRONG Verbose error description Wrong GNAPPLET version in phone Use version from currently used Gammu exception gammu ERR INSIDEPHONEMENU Exception corresponding to gammu error ERR INSIDEPHONEMENU Verbose error description You re in side phone menu maybe editing Leave it and try again exception gammu ERR INSTALL NOT FOUND Exception corresponding to gammu error ERR INSTALL NOT FOUND Verbose error description Installa tion data not found please consult debug log and or documentation for more details exception gammu ERR INVALIDDATA Exception corresponding to gammu error ERR INVALIDDATA Verbose error description Invalid data given to phone exception gammu ERR INVALIDDATETIME Exception corresponding to gammu error E
55. The code comments in C code should be parseable by Doxygen what is more or less standard way to document C code 1 10 Directory structure 1 10 1 libgammu directory This directory contains sources of Gammu library You can find all phone communication and data encoding function ality here There are following subdirectories device drivers for devices such serial ports or irda device serial drivers for serial ports device irda drivers for infrared over sockets protocol protocol drivers protocol nokia Nokia specific protocols phone phone modules phone nokia modules for different Nokia phones misc different services They can be used for any project service different gsm services for logos ringtones etc 1 10 2 gammu directory Sources of Gammu command line utility It contains interface to libGammu and some additional functionality as well 1 10 3 smsd directory Sources of SMS Daemon as well as all it s service backends The services subdirectory contains source code for Backend services 1 10 4 python directory Sources of python gammu module and some examples 14 Chapter 1 Gammu project Gammu Manual Release GAMMU E RSION Q 1 10 5 helper directory These are some helper functions used either as replacement for functionality missing on some platforms eg strptime or used in more places message command line processing which is shared between SMSD and Gammu utility 1 10 6 docs directory Docume
56. The default query calculates sending timeout based on LoopSleep value Query specific parameters 1 ID of message find_outbox_sms_id Find sms messages for sending Default value SELECT ID InsertIntoDB SendingDateTime SenderID FROM outbox WHERE SendingDateTime lt NOW AND SendingTimeOut lt NOW AND SendBefore gt CURTIME AND SendAfter lt AND CURTIME SenderID is NULL OR SenderID OR SenderID SP ORDER BY InsertIntoDB ASC LI MIT Query specific parameters 1 limit of sms messages sended in one walk in loop find outbox body Select body of message Default value SELECT Text Coding RelativeValidity UDH Class DeliveryReport TextDecoded ID DestinationNumber CreatorID FROM outbox WHERE ID 1 MultiPart Query specific parameters 1 ID of message find outbox multipart Select remaining parts of sms message Default value SELECT Text Coding UDH Class TextDecoded ID SequencePosition FROM outbox multipart WHERE ID 1 AND SequencePosition 2 Query specific parameters 1 ID of message 2 Number of multipart message delete outbox Remove messages from outbox after threir successful send Default value DELETE FROM outbox WHERE ID 1 Query specific parameters 200 Chapter 10 SMS Daemon 1 Gammu Manual Release GAMMU E RSION Q 1 ID of message delete outbox multipart Remove messages f
57. 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 amp 3 lt gt 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 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 9 2 Description 149 Gammu Manual Release GAMMU ERSIONAO SMS commands addsmsfolder name deleteallsms folder Delete all SMS f
58. dict SMSC information see MSC Object Returns None Return type None SetSpeedDial Value Sets speed dial Parameters Value dict Speed dial data see Get SpeedDial for listing Returns None Return type None SetToDo Value Sets ToDo in phone Parameters Value dict ToDo data see Todo Object Returns Location of created entry Return type int SplitCall JD Splits call Parameters ID int ID of call Returns None Return type None SwitchCall ID Next Switches call Parameters ID int ID of call Returns None Return type None Terminate Terminates the connection with phone Returns None Return type None Abort Aborts current operation Returns None Return type None 4 2 API documentation 47 Gammu Manual Release GAMMU E RSION TransferCall JD Next Transfers call Parameters ID int ID of call Returns None Return type None UnholdCall D Unholds call Parameters ID int ID of call Returns None Return type None Generic functions gammu Version Get version information Returns Tuple of version information Gammu runtime version python gammu version build time Gammu version Return type tuple Debugging configuration gammu SetDebugFile File Sets global debug file Parameters File mixed stuff as configured by SetDebugLevel Can be either None for no file Python file object or filename Returns No
59. gammu StateMachine method 40 GetNextToDo gammu StateMachine method 40 GetOriginalIMEI gammu StateMachine method 41 getphoneringtone location file gammu command line option 159 GetPPM gammu StateMachine method 41 GetProductCode gammu StateMachine method 41 getprofile start stop gammu command line option 166 getringtone location file gammu command line option 159 getringtoneslist gammu command line option 159 getrootfolders gammu command line option 157 getsecuritystatus gammu command line option 166 GetSecurityStatus gammu StateMachine method 41 GetSignalQuality gammu StateMachine method 42 GetSIMIMSIO gammu StateMachine method 41 330 Index Gammu Manual Release GAMMU E RSION Q getsms folder start stop gammu command line option 150 GetSMS gammu StateMachine method 41 getsmsc start stop gammu command line option 150 GetSMSC gammu StateMachine method 41 getsmsfolders gammu command line option 150 GetSMSFolders gammu StateMachine method 41 GetSMSStatus gammu StateMachine method 41 getspeeddial start stop gammu command line option 156 GetSpeedDial gammu StateMachine method 42 GetStatus gammu smsd SMSD method 53 getsyncmlsettings start stop gammu command line option 165 gettodo start stop gammu command line option 159 GetToDo gammu StateMachine method 42 GetToDoStatus gammu StateMachine method 42 getussd code g
60. getalarm start gammu command line option 160 GetAlarm gammu StateMachine method 36 getallcalendar gammu command line option 159 getallcategory TODOIPHONEBOOK gammu command line option 160 getallmemory DCIMCIRCIONIVMISMIMEIMTIFDISL gammu command line option 156 getallmms save gammu command line option 165 getallnotes gammu command line option 160 getallsms pbk gammu command line option 150 getalltodo gammu command line option 159 GetBatteryCharge gammu StateMachine method 37 getbitmap TYPE type options gammu command line option 157 getcalendar start stop gammu command line option 159 GetCalendar gammu StateMachine method 37 getcalendarsettings gammu command line option 166 GetCalendarStatus gammu StateMachine method 37 GetCallDivert gammu StateMachine method 37 getcategory TODOIPHONEBOOK start stop gammu command line option 160 GetCategory gammu StateMachine method 37 GetCategoryStatus gammu StateMachine method 37 getchatsettings start stop gammu command line option 165 GetConfig gammu StateMachine method 37 getdatetime gammu command line option 160 GetDateTime gammu StateMachine method 38 getdisplaystatus gammu command line option 166 GetDisplayStatus gammu StateMachine method 38 geteachmms save gammu command line option 165 geteachsms pbk gammu command line option 150 getfilefolder fileID fileID gammu command line option
61. numlen number namelen name O4 0 04 e o VN oon o oJ f BBBRBBRR s Send SMS message 0x0001 0x02 0x00 SEND REQUEST r Message sent 0x0002 r Send failed 0x0003 error like in netmon in 65 S Incoming SMS info on 0x000d 0x00 0x00 0x02 note no info about Delivery Reports r Incoming SMS info onOK 0x000e note no info about Delivery Reports r Incoming SMS infoonerr 0x000f error where error 0x0c no PIN r SMS message received 0x0011 whole message S Set CellBroadcast 0x0020 0x01 0x01 0x00 0x00 0x01 0x01 for enable cell broadcast 0x00 0x00 0x00 0x00 0x00 0x00 for disable cell broadcast r Set CellBroadcast OK 0x0021 0x01 r Read CellBroadcast 0x0023 channel message s Set SMS center 0x0030 0x64 priority checksum format validity 2 DefaultRecipient no 12 SMScenter no 12 SMSC name 0x00 where tel no 12 len type number BCD type 0x81 normal 0x91 international Oxd0 alphanumeric format 0x00 text 0x22 fax 0x24 voice 0x25 ERMES 0x26 paging 0x31 X 400 0x32 email validity 0x000b 1 hour 0x0047 6 hours 0x00a7 24 hours 0x00a9 72 hours Ox00ad 1 week Ox00ff max time r Set SMS center OK 0x0031 r Set SMS center error 0x0032 reason T S Get SMS center 0x0033 0x64 priority r SMS center received 0x0034 priority checksum ty
62. used 4 2 6 Objects For various mostly historical reasons all objects you get from Gammu are not real objects but rather a dictionaries This has quite a big impact of usability and will most likely change in the future All the objects basically map to C structures so you might also refer to l bGammu chapter SMS Object Object describing single SMS message in a way GSM network handles is 140 bytes of data You can construct it from SMS Info Object using gammu EncodesSMS Message dictionary can consist of following fields SMSC SMSC information see MSC Object 60 Chapter 4 python gammu Gammu Manual Release GAMMU ERSION Number Recipient number needs to be set for sending Name Name of the message does not make any effect on sending some phones might store it UDH User defined headers for SMS see UDH Object Text Message text Folder Folder where the message is stored Location Location where the message is stored InboxFolder Indication whether folder is an inbox DeliveryStatus Message delivery status used only for received messages ReplyViaSameSMSC Flag indicating whether reply using same SMSC is requested Class Message class MessageReference Message reference number used mostly to identify delivery reports ReplaceMessage Id of message which this message is supposed to replace RejectDuplicates Whether to reject duplicates Memory Memory where the message is stored
63. varchar 255 SendingTimeOut timestamp 0 WITHOUT time zone NOT NULL DEFAULT LOCALTIM DeliveryReport varchar 10 DEFAULT default CreatorID text NOT NULL CHECK Coding IN Default_No_Compression Unicode_No_Compression 8bit Default_Compression Unicd CHECK DeliveryReport IN default yes no CREATE INDEX outbox date ON outbox SendingDateTime CREATE INDEX outbox sender ON outbox SenderID Dumping data for table outbox ESTAMP 0 SendingTimeOut Create trigger for table outbox E PROCEDURE y CREATE TRIGGER update timestamp BEFORE UPDATE ON outbox FOR EACH ROW EXECUT Table structure for table outbox multipart CREATE TABLE outbox multipart Text text Coding varchar 255 NOT NULL DEFAULT Default No Compression UDH text Class integer DEFAULT 1 TextDecoded text DEFAULT NULL ID serial SequencePosition integer NOT NULL DEFAULT 1 PRIMARY KEY ID SequencePosition CHECK Coding IN Default No Compression Unicode No Compression 8bit Default Compression Unicq Dumping data for table outbox multipart 10 6 Backend services 211 de Compressi pdate_timest de Compressi Gammu Manual Release GAMMU ERSI
64. 00 00 00 62b 08 00 00 00 64d 08 00 00 00 66 08 00 00 00 68h 08 00 00 00 1 6a3108 00 00 00 1 6c1 08 00 00 00 6en 08 00 00 Sending frame 0x38 00 02 00 0a 00 00 75u 00 76v 00 00 7d 00 7e 00 00 1850100 1966100 00 8dZ 00 8eA 00 00 95L 00 961 0 00 9dA 00 9ex 00 00 a5a 00 a6Z 00 00 Jads 00 ae 00 00 b5A 00 b6A 00 00 bdZ 00 bez 00 00 c5 00 c6 00 00 cd 1 00 ce 00 Received frame 0x38 02 1d 00 0b 00 08 00 00 00 00 08 00 00 00 00 08 00 00 00 00 08 00 00 00 00 08 00 00 00 00 08 04 00 7b 00 08 04 00 7d 1 00 08 04 00 7 00 08 04 00 81 00 08 04 00 83 00 08 04 00 1950100 08 04 00 1876 00 08 04 00 898 00 08 04 00 1 856 00 08 04 00 8dZ 00 08 04 00 8f 00 08 04 00 91 00 08 04 00 1926100 08 04 00 95L 00 08 04 00 97S 00 08 04 00 990 00 08 04 00 9bT 00 08 04 00 9d 00 08 04 00 9f 00 08 04 00 jJa1 00 08 04 00 a3468 00 08 04 00 Ja5al00 08 04 00 a7z 00 08 04 00 a9e 00 08 04 00 abz 00 08 04 00 ads 00 08 04 00 af 00 00 100 00 00 00 100 00 100 00 100 00 100 00 100 04 00 00 100 0x00c7 60 00 77w 00 7 00 87 00 8 E 00 0 97S 00 9 E 00 a7z 00 af 00 b7E 00 bf 00 c7 00 cfO 00 0x0306 60 00 00 100 00 00 00 100 00 100 00 100 00 00 00 100 00 100 00 100 00 100 00 100 00 100 00 100
65. 00 03 09 00 41A 00 00 00 AS Received frame Oxlb 0x001a 03 2b 09 01 00 01 41A 14 00 10 333 355 300 377 300 30 A 350700 311 300 355 388 300 311 333 300 333 00 105801303 Sending frame Oxlb 0x0008 00 03 0a 00 42B 00 00 00 B Received frame 0xlb 0x0012 03 2b 0a 01 00 01 42B 0c 00 08 3a 105 1 07 10 50P 08 R CUR P 311 00 Ts Sending frame Oxlb 0x0008 00 03 0b 00 43C 00 00 00 2 266 Chapter 13 Phone Protocols IMEI ASCII IMEI ASCII HW 4 bytes firmware code 7 byte 100 00 10 5 399 311 35 Gammu Manual Release GAMMU ERSION Received frame Oxlb 0x0016 03 2b 0b 01 00 LOE 43C 10 00 09 3331 05 07 10 50P 08 MG NUES NOI E 311 00 6 00 00 00 Lin Sending frame Oxlb 0x0008 00 03 lOc 00 44D 00 00 00 Ds Received frame Oxlb 0x0006 03 2b 0c 01 02 00 at Sending frame Oxlb 0x0008 00 03 O0d 00 45E 00 00 00 E Received frame Oxlb 0x0006 03 2b 0d 01 02 00 ots Sending frame Oxlb 0x0008 00 03 0e 00 46F 00 00 00 RES Received frame Oxlb 0x0012 03 2b 0e 01 00 01 46F 0c 00 08 4eN 54T 54T 4aJ 50P 12 F NTTJP 344 56V 4V Sending frame Oxlb 0x0008 00 03 JOf 00 56V 00 00 00 O Received frame Oxlb 0x0006 03 2b 0f TOL 02 00 ot Sending frame Oxlb 0x0008 00 03 10 00 5aZ 00 00 00 zs Received frame Oxlb 0x0006 03 2b
66. 00 100 00 100 00 100 00 100 00 100 100 00 00 100 00 100 00 00 00 100 00 100 00 100 00 100 00 100 00 100 00 100 00 100 00 100 00 100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 70p 00 78x 00 80c 00 881 00 90 00 1988 00 a0a 00 a8E 100 bO 00 b8S 00 GU 00 c8 00 70p 08 72r 08 74t 08 76v 08 78x 08 7az 08 04 08 04 08 04 08 04 08 04 08 04 08 04 08 04 08 04 08 04 08 04 08 04 08 04 08 104 08 04 08 04 08 04 08 04 08 04 08 04 08 04 08 04 08 04 08 04 08 04 08 04 08 04 08 OOGO TOO 0 C 0 O O O OOOO GOG OLO 71q 79y 8l 898 911 1990 00 al ade b1 b9 cl c9 B QE AB GB GB GB BB BD BB BA GB CO GB GB KR ds BB DB ds BB ds 4 py OOOOOO COO Ov OO 0 00 00 0 0 0 0 0 0 0 0 0 62 809 ET L 702 C9 ET C9 3 T E e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 100 00 00 00 00 00 00 00 00 00 00 00 00 00 5f 61a 63c 65e 67g 69i 6bk 6dm 6fo 72r 7az 82 8a0 921 9al a26 aan b2 ba EZ ca 00 00 00 00 00 00 Te 7e 80 82 84 866 881 8a0 8c1 8eA 921 946 1961 98s 9aU 9ct 9ex ada a2 a4A a6 a8E aa acc ae DU 08 08 08 08 08 08 08 08 08 OO 0 0 0 SO OOOO A OO OD
67. 00 Error code 49 00 07 07 DO 00 18 First two data bytes maximal number of contacts 0x07DO 2000 Last two data bytes Current number of contacts 13 13 m obex protocol used by some Samsung mobiles 307 Gammu Manual Release GAMMU E RSION 0 List all Request 83 00 26 Obex Get package CB 00 00 00 00 Session Id 42 00 18 6D 2D 6F 62 65 78 2F 63 6F 6E 74 61 63 74 73 2F 6C 6F 61 64 00 m obex Command m obex contacts load 4C 00 06 01 00 00 First Byte unknown Last two bytes increment until all contacts recieved Answer A0 08 C1 Obex Ok C3 00 00 08 B1 Length of sent data 4C 00 05 00 02 Indicates if these are the last contacts 49 07 41 01 10 01 8D The first byte is unknown but all answers have this byte then byte 2 and 3 contains the length of the answer bytes 4 and 5 are the ID of the first entry bytes 6 and 7 are the length of this entry In one response more than 1 vcard can be returned in this case entries are separated by 4 bytes with the following meaning bytes 1 and 2 ID of the entry bytes 3 and 4 length of the entry To get all contacts the request have to be sent several times The last two bytes must be incremented by every call The end of the contacts list is reached if the header Ox4C is 0 The header will be 4C 00 05 00 00 Create a contact Beware This is a put operation and is performed in some obex implementations in several packages for example 0x02 0x02 0x82 But I didn t get the m
68. 0x00 0x00 Oxla size width height logo size 2 octets logo size 2 octets logo 0x10 SUBSCRIBE s Subscribe Channel 0x10 channels message types 0x13 CALENDAR S Add meeting note 0x01 body like in subtype Oxla r Add meeting note 0x02 location 2 bytes status 2 bytes S Add call note 0x03 body like in subtype Oxla r Add call note 0x04 location 2 bytes status 2 bytes S Add birthday note 0x05 body like in subtype Oxla r Add birthday note 0x06 location 2 bytes status 2 bytes S Add reminder note 0x07 body like in subtype Oxla r Add reminder note 0x08 location 2 bytes status 2 bytes S Delete calendar note 0x0b location 2 bytes r Delete calendar note 0x0c location 2 bytes S Get calendar note 0x19 location 2 bytes r Calendar note recvd Oxla location 2 bytes entry type 0x00 year 2 bytes Month Day where entry typ 0x01 Meeting 0x02 Call 0x04 Birthday 0x08 block for Meeting hour minute alarm two bytes re urrenc two where alarm Number of minutes before the time of the meetii that the alarm should be triggered For meetings with No alarm OxFFFF 11 For On time 0x0000 half an hour 0x001E and so on Recurrance in hours between future occurances of th If there is no repeat this value is x0000 The si means 1 Year for Call Hour Minute Alarm as above Recurrance as above name unicode number unicode fo
69. 0x09 can be assigned 0x00 0x05 but rest are common to all profile 6110 Feature Descr ach profile S iption Value 13 4 Nokia 6110 249 lenHI lenHI HW roupID len len 0 pager I TL ne Gammu Manual Release GAMMU ERSIONO 0x00 keypad notes 0x01 lights only in car profile 0x02 incoming call alert 0x03 ringing tone ID 0x04 ringing volume 0x05 message alert ton 0x06 vibration 0x07 warning and game tones 0x08 incoming caller groups 0x09 automatic answer 0x16 Anykey answer 0x17 0x18 Memory in use 0x19 Network selection Oxla Automatic redial Oxlb 22 Oxlc 22 Oxld Speed dialling Oxle Own number sending 0x1f Cell info display 0x21 Language 0x26 Reply via same centre 0x27 Delivery reports 0x28 Hide clock 0x29 Time format 0x2a Selected profile 33x0 Feature Description 0x00 keypad notes 0x01 incoming call alert 0x02 ringing tone ID 0x03 ringing volume 0x04 message alert ton 0x05 vibration 0x06 warning tones 0x07 Screen saver 0x08 Screen saver Timeout 0x09 Screen saver gt Screen saver 0x0a P ops UE 27d 0x15 7 Read only Oxff off 0x00 1evel 1 Ox0l 1le 0x00 off 0x on maybe 0x01 l ringing 2 beep once 3 unknoi 6 ascending for original 6110 level 1 0x06 lg O no tone 1l standa O off 1 on Oxff off 0x04 on l family 2 VI
70. 10 00 00 00 00 00 100 Pi date MN E 00 00 00 00 00 00 00 100 00 00 1 00 3c 1 08 00 00 1 00 Se 00 00 00 3d 08 00 00 00 00 00 00 3e gt 08 100 00 100 A 00 00 00 3 08 00 00 00 00 00 00 40 08 100 00 8e 2 A 00 00 00 41A 04 00 00 42B 04 00 00 43C 08 00 00 00 LD 00 00 00 44D 08 00 00 00 00 00 00 45E 08 00 00 00 Dio 00 00 00 46r 08 00 00 00 00 00 00 47G 08 00 00 100 Ene sti Moos G 00 00 00 48H 08 00 00 00 00 00 00 49T 08 00 00 00 VES eee Td Tes 00 00 00 4aJ 08 00 00 00 00 00 00 4bK 08 00 00 00 RI RE K 00 00 00 4cL 08 00 00 00 00 00 00 4dM 08 00 00 100 Mest eels M 00 00 00 4eN 08 00 00 00 00 00 00 4 01 108 00 00 00 Na O 00 00 00 50P 08 00 00 00 00 00 00 1519 108 00 00 100 NC Qu 00 00 00 52RJ08 00 00 00 00 00 00 5381 08 00 00 00 RS Us Ss 00 00 00 54T 08 00 00 00 00 00 00 55U 08 00 00 00 lt E ashe res Us 00 00 00 56v 08 00 00 00 00 00 00 57W 08 00 00 00 a VRS aonb gs a W 00 00 00 58x 08 00 00 00 00 00 00 59Y 08 00 00 100 A Mastek lasts Ws 00 00 00 5az 08 00 00 00 100 00 00 5b 08 100 100 100 sue tats 00 00 00 5c 08 00 00 00 i00 100 00 5d 08 00 00 00 ae Nahe eta 13 5 Nokia 6510 269 00 Gammu Manual Release GAMMU ERSIONO 00 00 00 5e 08 00 00 00 1607 08
71. 12 all locations for user start from 0 in Gnokii some from 0 some from 1 13 some things like SMS can be accessed few ways 14 when possible there are used constant locations I will explain on the example a save two calendar notes in any Nokia 61xx phone Call them reminder and call notes Reminder will be returned by phone of l st location Call on 2 nd b Now Reminder will be deleted for example from phone keypad Call will be moved from 2 nd to 1 st c When will read calendar notes again have to read all notes again because of changed locations let s say we won t read Call note again It will have location 2 in PC Now you will write new note into phone for keypad and it will save in under location 2 When will try to save Call not with location 2 it will overwrite new saved note This is not good When for example delete one entry from phonebook other locations stays on their places These are constant locations With constans locations when delete one location from PC don t have to read full memory from phone etc etc Of course some of these things can be in the future in gnokii too 1 3 Installing Gammu 1 3 1 Prebuilt Binaries for Linux Many distributions come with prebuilt Gammu binaries if you can use them it is definitely the easiest thing There are also binary packages of latest release built for many distributions available on Gammu home page lt http wammu e
72. 157 GetFilePart gammu StateMachine method 38 getfiles fileID fileID gammu command line option 157 getfilesystem flatalll flat gammu command line option 157 getfilesystemstatus gammu worker GammuCommand gammu command line option 157 GetFileSystemStatus gammu StateMachine method 38 GetFirmware gammu StateMachine method 38 getfmstation start stop gammu command line option 166 getfolderlisting folderID gammu command line option 157 GetFolderListing gammu StateMachine method 38 getgprspoint start stop gammu command line option 165 GetHardware gammu StateMachine method 39 GetIMEI gammu StateMachine method 39 GetLocale gammu StateMachine method 39 getlocation gammu command line option 166 GetManufactureMonth gammu StateMachine method 39 GetManufacturer gammu StateMachine method 39 getmemory DCIMCIRCIONIVMISMIMEIMTIFDISL start stop nonempty gammu command line option 156 GetMemory gammu StateMachine method 39 GetMemoryStatus gammu StateMachine method 39 getmmsfolders gammu command line option 165 getmmssettings start stop gammu command line option 165 GetModel gammu StateMachine method 39 GetNetworkInfo gammu StateMachine method 39 GetNextCalendar gammu StateMachine method 40 GetNextFileFolder gammu StateMachine method 40 GetNextMemory gammu StateMachine method 40 GetNextRootFolder gammu StateMachine method 40 GetNextSMS
73. 2 2010 6 3 0 0 0 0 0 0 0 0 2010 5 30 SSHR 1 9 event1234 0 0 2010 6 7 2010 6 7 7 0 8 59 0 0 0 0 2010 5 30 SSHR 4 7 test123 0 0 2010 6 14 2010 6 14 21 37 22 37 0 0 0 0 2010 5 30 SSHR 2 7 Meeting 0 0 2010 6 15 2010 6 15 8 0 8 59 0 0 0 0 2010 5 30 OK Or just read a single item AT SSHR 1 SSHR 1 9 Event 123 0 0 2010 6 7 2010 6 7 7 0 8 59 0 0 0 0 2010 5 30 OK Getting status the last number appears to be number of notes AT SSHR SSHR 100 15 100 15 1000000 2008 2024 5 OK You can also add or modify an item AT SSHW 7 event01 16 details of event 5 where 2010 06 03 2010 06 04 12 31 13 42 0 0 0 0 2010 0 It seems that the last number in the above record specifies whether it is addition of a new record 0 or modification of the old record then the number is the position of the item as the first number listed after AT SSHR 0 e g AT SSHW 13 event1234 new 0 0 2010 06 07 2010 06 07 07 00 08 59 0 0 0 0 2010 05 30 1 Please note that the format for writing is somehow different than for reading hour and minuts must be in two digit form The text fields as shown above are formatted in the following way number of characters in string string In all items above the first string is the name of event the second string details of event the third one place of event The numeric fields encode start dat
74. 2 SMS but decoded only by newer phones like 33xx scale ringtone will have Scale info for each note It will allow one to edit it correctly later in phone composer for example in 33xx SMSTEMPLATE unicode text text unicodefiletext file defsound ID Saves a SMS template for Alcatel phones TEXT inputunicode 16bit flash len len autolen len unicode Take text from stdin or commandline if text specified and save as text SMS into SIM phone memory flash Class 0 SMS should be displayed after receiving on recipients phone display after receiv ing 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 split into more linked SMS 9 2 Description 153 defar enak Gammu Manual Release GAMMU ERSIONO autolen len specify how many chars will be read When use this option and text will be longer than 1 SMS will be split into more linked SMS Coding type SMS default alphabet Unicode is set according to input text enablevoice sms will set voice mail indicator Text will be cut to 1 sms disablevoice sms will not set voice mail indicator Text will be cut to 1 sms enablefax sms will set fax indicator Text will be cut to 1 sms disablefax sms will not set fax indicator Text will be cut to 1 sms enableemail sms will set email indicator Text will be cut to 1 sms disablee
75. 29 10 01 NHM 7 0a 28 63c 29 20 4eN 4dM 50P 2e 00 00 00 00 00 c NME 1 as Sending frame Oxlb 0x0006 00 03 la 107 00 JO1 2p 2 pp 00 f n t n Received frame Oxlb 0x002e 03 2b 1d 08 00 01 48H 28 00 20 56V 20 300 344 2e 30 H V 04 0 344 0a 322 399 2d 311 300 2d 300 311 0a 4eN 48H 4dM 2d 37 4 29 10 01 NHM 7 0a 28 63c 29 20 4eN 4dM 50P 2e 00 00 00 00 00 e NMPs e Sending frame Oxlb 0x0006 00 03 lle O7 100 J O1 25 2 2 2 DI fm nm n Received frame Oxlb 0x002e 03 2b le 08 00 01 48H 28 00 20 56V 20 300 344 2e 30 H V 04 0 344 0a 322 399 2d 311 300 2d 300 311 0a 4eN 48H 4dM 2d 37 4 29 10 01 NHM 7 0a 28 63c 29 20 4eN 4dM 50P 2e 00 00 00 00 00 oe BEY UMP 1s Oxlf RINGTONE s Get Ringtones 0x07 0x00 0x00 OxFE 0x00 Ox7D r Get Ringtones 0x08 0x00 0x23 0x00 ringtones 0x00 ringtone number 0x01 0x01 0x00 name length chars name unicode 0x2b S Get IMEI 0x00 0x41 r Get IMEI 0x01 0x00 0x01 0x41 0x14 0x00 0x10 IMEI ASCII 0x00 s get HW amp SW version 0x07 0x00 0X01 r get HW amp SW version 0x08 0x00 0x01 0x58 0x29 0x00 0x22 V firmware n firmware model n c NMP Ox0a 0x43 0x00 0x00 0x00 0x38 268 Chapter 13 Phone Protocols Gammu Manual Release GAMMU ERSION
76. 3 4 SMSD FAQ 3 4 1 Which databases does SMSD support SMSD natively supports MySQL and PostgreSQL However it has also support for libdbi which provides access to wide range of database engines eg SQLite MS SQL Server Sybase Firebird Unfortunately libdbi currently does not work natively on Microsoft Windows so you can use it only on Unix platforms Since version 1 29 92 SMSD can also connect to any ODBC data source so you should be able to connect to virtually any database engine using this standard See also SQL Service 3 4 2 Is there some user interface for SMSD Yes You can use some of example interfaces distributed with gammu in cont rib directory Or there is full featured separate interface written in PHP called Kalkun 3 4 3 Which phone is best for SMSD gateway Standard phones usually do not perform good when used long term as a modem So it s always better to choose some GSM GPRS EDGE UMTS terminals modems which are designed to be used long for term in connection with computer The best option seem to be Siemens modems eg ES75 MC351 MC551 Slightly cheaper while still good are modems made by Huawei eg E160 E220 E1750 We have heard also positive experiences with cheap modems from various Chinese resellers like DealExtreme or Alibaba See also You can check other user experiences in Gammu Phones Database 3 5 Python gammu FAQ 3 5 1 Where can download python gammu The python gammu
77. 78 0004 0102 0E00 066C Status OxOE 0x00 1F 0004 7F 0662 Ack from HFU 2 1F0004 78 0003 0201 03 0565 Status confirm from HFU 2 1F0400 7F 0561 Ack from phone Incoming call 1F0400 78 0004 0102 0701 1173 Status 0x07 0x01 1F 0004 7F 1175 Ack from HFU 2 1F0400 78 0004 0102 0E03 127B Status OxOE 0x03 1F0004 7F 1276 Ack from HFU 2 1F 0004 78 0003 0201 03 0868 Status confirm from HFU 2 1F0400 7F 086C Ack from phone Connected The phone doesn t send out anything when a call has been set up Initiation with connected phone 1F0004 DO 0001 04 00CE Power up from HFU 2 1F0400 DO 0001 05 1AD5 Power up from phone 1F0004 79 0005 0201 0164 00 0100 Enable carkit mode from HFU 2 1F0400 7F 0165 Ack from phone 288 Chapter 13 Phone Protocols Gammu Manual Release GAMMU ERSION 1F0400 78 0004 0102 0E03 1B72 Status OxOE 0x03 1F0004 79 0012 0201 0206 0056 2030 372E 3030 0A48 4655 3200 0249 HFU 2 Version 1F0400 7F 0266 Ack from phone 1F0004 79 0005 0201 0164 00 0302 Enable carkit mode from HFU 2 1F0400 7F 0367 Ack from phone 1F0400 78 0004 0102 0E03 1B72 Status OxOE 0x03 1F0004 7F 1B7F Ack from HFU 2 1F0400 78 0004 0102 0801 1C71 Status 0x08 0x01 1F0004 78 0003 0201 03 0464 Status confirm from HFU 2 1F0400 7F 0460 Ack from phone 1F0400 78 0004 0102 0801 1C71 Status 0x08 0x01 1F0004 7F 1C78 Ack from HFU 2 1F0400 78 0004 0102 0E03 1D74 Status OxOE 0x03 1F0004 7F 1D79 Ack from HFU 2 1F0400 78 0004 0102 0701 1E7C S
78. AlcatelSMSTemplateNam e SiemensFile Siemens OTA Left Text formatting Right Text formatting Center Text formatting Large Text formatting Small Text formatting Bold Text formatting Italic Text formatting Underlined Text formatting Strikethrough Text formatting Protected Whether message part should be protected DRM Number Number to encode in message Ringtone Ringtone to encode in message Bitmap Bitmap to encode in message Bookmark Bookmark to encode in message Settings Settings to encode in message 66 Chapter 4 python gammu Gammu Manual Release GAMMU ERSION MMSIndicator MMS indication to encode in message Phonebook Phonebook entry to encode in message see Phonebook Object Calendar Calendar entry to encode in message see Calendar Object ToDo Todo entry to encode in message see Jodo Object File File to encode in message see File Object Buffer String to encode in message Todo Object Todo entry is a dictionary consisting of following fields Location Location where the entry is stored Type Type of entry one of REMINDER Reminder or Date e CALL Call MEETING Meeting BIRTHDAY Birthday or Anniversary or Special Occasion MEMO Memo or Miscellaneous TRAVEL Travel VACATION Vacation T ATHL Training Athletism e T BALL Training Ball Games e T CYCL
79. B0 0B 00 00 FA CE connection blueat Gammu configuration for phone which needs to manually adjust Bluetooth channel to use channel 42 8 3 Examples 141 Gammu Manual Release GAMMU ERSIONO gammu device B0 0B 00 00 FA CE 42 connection blueat 8 3 2 Working with multiple phones Gammu can be configured for multiple phones however only one connection is used at one time you can choose which one to use with gammu s parameter Configuration for phones on three serial ports would look like following gammu device dev ttySO connection at gammmu1 device dev ttyS1 connection at gammmu2 device dev ttyS2 connection at 8 3 3 Fully documented example You can find this sample file as docs config gammurc in Gammu sources This is a sample gammurc file In Unix Linux copy it into your home directory and name it gammurc E or into etc and name it gammurc Z In Wins2 copy it into directory with Gammu exe and name gammurc More about parameters later Anything behind or is comment gammu device coms 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 coms model 6110 connection fbusb
80. Backend 10 7 Developer documentation 225 tvyjuh qaxur pye giuuwbib Gammu Manual Release GAMMU ERSIONAO Backend interface Each backend service needs to support several operations which are exported in GSM_SMSDService structure GSM Error GSM_SMSDService Init GSM_SMSDConfig Config Initializes internal state connect to backend storage Parameters Config Pointer to SMSD configuration data Returns Error code GSM Error GSM_SMSDService Free GSM_SMSDConfig Config Freeing internal data disconnect from backend storage Parameters e Config Pointer to SMSD configuration data Returns Error code GSM Error GSM_SMSDService InitAfterConnect GSM_SMSDConfig Config Optional hook called after SMSD is connected to phone can be used for storing infromation about phone in backend Parameters e Config Pointer to SMSD configuration data Returns Error code GSM Error GSM_SMSDService SaveInboxSMS GSM MultiSMSMessage sms GSM SMSDConfig Config char Locations Saves message into inbox Parameters sms Message data to save e Config Pointer to SMSD configuration data Locations Newly allocation pointer to string with IDs identifying saved messages Returns Error code GSM Error GSM_SMSDService FindOutboxSMS GSM MultiSMSMessage sms GSM_SMSDConfig Config char ID Finds message in outbox suitable for sending Parameters sms Found outbox message will be stored he
81. CAT E Whether entry is private Number EGORY Category of entry Number CONTACTID Related contact ID Number PHO E Number to call Text E When should silent alarm be fired Date 68 Chapter 4 python gammu ays 1 Gammu Manual Release OGAMMUyERSIONO s LUID IrMC LUID which can be used for synchronisation Text LAST MODIFIED Date and time of last modification Date START DATETIME Start date Date Value Actual value corresponding type to Type field Calendar Object Calendar entry is a dictionary consisting of following fields Location Location where the entry is stored Type Type of entry one of REMINDER Reminder or Date CALL Call MEETING Meeting BIRTHDAY Birthday or Anniversary or Special Occasion s MEMO TRAVE Memo or Miscellaneous Travel VACATION Vacation T ATH T BAL L Training Athletism Training Ball Games e T CYCL Training Cycling T BUDO Training Budo _DANC Training Dance EXTR Training Extreme Sports T FOOT Training Football T GOLF Training Golf T GYM Training Gym T HORS Training Horse Race T HOCK Training Hockey T RAC E Training Races T RUGB Training Rugby T SAI L Training Sailing
82. E ER SURE eed d e RR 9 3 JRet rn values x R hom eo ee A Ss amp R RO RRR E Bow E 94 Examples 254 444444258 x 9s RD EU OR ALS R x RR RU X EE ALAS SMS Daemon JO Overview 4 26454 AXRSESES SS xd SESE HS So dob eade xia SS IAE CDI rrr 10 3 Program Manuals e tros EU Eee qe esc t eee eme ya eR 10 4 SMSD Configuration File yp iua 6 gabe da bbs eee baw Ree RPG UR e Bee EG 10 5 RunOnReceive Directive g c noo bea o ERR EEA OR RO Ro eee 9 S X RO EEE Ros 10 67 Backend Services uus om evo es Re dp E ag A cmm up ee RR Gee le eee A GOS im pe NOR m 10 7 Developer dOCUMENTAION s s w eraci ee aa Ree orm eek Re ve p R eR eS e Miscellaneous utilities LE Bammusdetect rodar eO eRe SEES 2a eae eb e doe T A 11 2 gammu confe oora ogg m R R RR GR ex RA Slee aw S Rp sche NE S E CROP RUE Eos eu espere 11 3 gadmaket genra ore dep ser du ee xem qo dud ue Nep de UI dit qub teu She eerie e ens Testing Gammu 12 1 Gammu Testsulte uus uet we R R R Re eI e RP GS ense Bee cms 122 Dummy Driver 5 emo OS m Rem NR CR A eee eroe eR a e heo A RU E Phone Protocols 13 1 Discovering protocols 2 5 ane i o eR e duh Sb SEGUE SUR Eee 13 2 Nokia protocols si ew EE Se Eom vu E A EUR ee 13 3 Nokia S40 filesystem SMS format d rewa deae e i e a e 134 INOKIaGY UO e uu eoe Rue Y ER e Bae a Ba REE ER R A 13 5 Nokia 6510 i i oko RR home Rott Roh Oe bo doe tah ewe a M E E ee EE 13 6 Nokia TIO p inae ee RBS med Ro Bowe PK R She a
83. ER Received frame 0x38 0x0306 02 1ld 00 0b 00 60 00 04 08 04 00 Jd0djJOO 00 00 04 ds 08 04 00 d1b 00 00 00 04 08 04 00 d2D 00 00 00 04 EI A D 08 04 00 d3E 00 00 00 04 108 04 00 d4d 00 00 00 04 R eee d 08 04 00 d5N 00 00 00 04 08 04 00 a6 00 00 00 04 Ka T 08 04 00 a71 00 00 00 04 08 04 00 d8 00 00 00 04 1 Chains 08 04 00 d9 00 00 00 04 08 04 00 ela 00 00 100 1 lt e eroe 08 00 00 00 00 00 00 de 08 00 00 00 00 00 00 dd T 08 00 100 00 00 100 100 IdeO 08 00 00 1 00 00 100 100 df Ui acters cds 08 00 00 00 00 00 00 Je06 08 100 00 00 00 100 100 jel Dang reine B 08 00 00 00 00 00 00 e26 08 00 00 00 100 00 100 leB3 fo TIE N 08 00 00 00 00 00 00 Je4K4 O08 00 00 00 00 00 00 Je5 Di 08 00 00 00 00 00 00 JO4 08 04 00 Je6S 00 00 00 le7 Sitters 08 00 00 00 00 00 00 e8R 08 00 00 00 100 100 100 104 E 08 04 00 e9U 00 00 00 04 08 04 00 Jeaf 00 00 00 04 be Eas 08 04 00 ebU 00 00 00 04 08 04 00 Jecy 00 00 00 04 Ut Sf ats 08 04 00 JedY 00 00 00 04 08 04 00 Jee 00 00 00 04 is Don 08 04 00 Jef 00 00 00 04 08 04 00 0 00 00 00 04 Es 08 04 00 f1 00 00 00 04 08 04 007 TEZ 100 100 1007 POT Sau es 08 04 00 3 00 00 00 04 08 04 00 I e KOO TOO LODO TES eu ope E
84. GAMMU ERSIONAO ATGEN_GenericReply AT XXXX 0x00 0x00 ID_GetProtocol Alternatively if detection is not possible you can use features and phones database see libgammu gsmphones c or vendor based decision to use some commands Invoking AT command The AT commands are invoked using GSM_WaitFor or a wrapper ATGEN WaitForAutoLen where you don t have to specify length for text commands and automatically sets error variable Generally you need to construct buffer and then invoke it For some simple functions it is pretty straight forward GSM Error ATGEN_GetBatteryCharge GSM_StateMachine xs GSM BatteryCharge xbat GSM_Error error GSM_ClearBatteryCharge bat S Phone Data BatteryCharge bat smprintf s Getting battery charge n ATGEN WaitForAutoLen s AT CBC r 0x00 4 ID GetBatteryCharge return error As you can see it is often required to store pointer to data store somewhere for most data types s gt Phone Data does contain the pointer to do that Parsing reply For parsing reply you should use ATGEN_ParseRepl y which should be able to handle all encoding and parsing magic You can grab lines from the reply using GetLineString The reply function needs to be hooked to the reply functions array so that it is invoked when reply is received from the phone Continuing in above example for getting battery status the simplified function
85. If you expect some incoming events you need to maintain communication with the phone The best way it can be GSM ReadDevice For example you can use following busy loop 5 1 Hints for libGammu Novices 79 Gammu Manual Release GAMMU ERSIONO while gshutdown GSM_ReadDevice s TRUE 5 2 Examples All these examples are also available in docs examples directory in Gammu sources 5 2 1 Getting phone information include gammu h include lt stdlib h gt include lt stdio h gt GSM StateMachine xs INI Section cfg GSM Error error char buffer 100 Function to handle errors x void error handler void if error ERR NONE printf ERROR s n GSM ErrorString error if GSM IsConnected s GSM TerminateConnection s exit error E c int main int argc UNUSED char x xargw UNUSI GSM Debug Info debug_info x We don t need gettext but need to set locales so that Charset conversion works GSM_InitLocales NULL Enable global debugging to stderr debug info GSM GetGlobalDebug GSM SetDebugFileDescriptor stderr FALSE debug info GSM SetDebugLevel textall debug info Allocates state machine x S GSM AllocStateMachine if s NULL return 3 Enable state machine debugging to stderr Same could be achieved by just using global debug config 80
86. LEN i CRC frame i 13 2 3 Frame format for FBUS version 2 Direct IRDA All frames FrameID DestDEV SrcDEV MsgType 0x00 FrameLength block FramesToGo SeqNo PaddingByte ChkSuml ChkSum2 where FrameID DestDev SrcDev MsgType FrameLength FramesToGo SeqNo PaddingByte ChkSuml ChkSum2 Oxlc IR FBUS Oxle Serial FBUS 0x00 mobile phone 0x0c TE FBUS eg PC see List block 2 1 if PaddingByte exists 0x01 means the last frame OxXY X 4 first block 0 continuing block Y sequence number 0x00 if FrameLength would be an odd number anyways it doesn t exists XOR on frame s odd numbers XOR on frame s even numbers 13 2 4 Frame format for MBUS version 2 Cable FrameID DestDEV SrcDEV MsgType FrameLengthLO FrameLengthHI block SeqNo ChkSum where FrameID Oxlf Serial M2BUS DestDev SrcDev 0x00 mobile phone Oxld TE M2BUS 0x10 TE M2BUS Service Software 0x04 Carkit 0x48 DLR3 cable OxF8 unknown target OxFF global target MsgType see List FrameLength block SeqNo sequence number ChkSum XOR on frame s all numbers 242 Chapter 13 Phone Protocols 0x08 Gammu Manual Release GAMMU ERSION Please note that M2BUS has only one checksum XOR on frame FrameID SeqNo Ack FrameID DestDEV SrcDEV 0x7f Id SeqNo ChkSum where Id SeqNo Is the sequence number tha
87. No Compression 8bit Default Compression Unicode Compressio the same meaning as values in outbox table UDH text the same meaning as values in outbox table Class integer the same meaning as values in outbox table TextDecoded varchar 160 the same meaning as values in outbox table ID integer unsigned the same meaning as values in outbox table SequencePosition integer info what is SMS number in SMS sequence start at 2 first part is in outbox table phones Information about connected phones This table is periodically refreshed and you can get information such as battery or signal level from here Fields description ID text PhoneID value UpdatedInDB timestamp when this record has been updated InsertIntoDB timestamp when this record has been created when phone has been connected TimeOut timestamp when this record expires Send boolean indicates whether SMSD is sending messages depends on configuration directive Send Receive boolean indicates whether SMSD is receiving messages depends on configuration directive Receive IMEI text IMEI of phone Client text client name usually string Gammu with version Battery integer battery level in percent or 1 if unknown Signal integer signal level in percent or 1 if unknown Sent integer Number of sent SMS messages SMSD does not reset this counter so it might overflow Received integer Number of received SMS messages SMSD does not reset this c
88. Nokia 72x14 caller logo 1 SMS e NokiaWAPBookmarkLong Nokia WAP bookmark in 1 or 2 SMS e NokiaWAPSettingsLong Nokia WAP settings in 2 SMS e NokiaMMSSettingsLong Nokia MMS settings in 2 SMS NokiaVCAR NokiaVCAR D101 D211 Long Nokia VCARD 1 0 only name and default number Long Nokia VCARD 2 1 all numbers text e NokiaVCALENDAR10OLong Nokia VCALENDAR 1 0 can be in few sms NokiaVTODOLong VCARD10Lo VCARD21Lo DisableVo ng ng ice DisableFax DisableEmail EnableVoice EnableFax EnableEma d VoidSMS EMSSound10 IMelody 1 0 Ej Ej e E SSoundl Ej E EMSPredef EMSPredef SSound12 SSound12 IMelody 1 2 SSonyEricssonSound IMelody without header SonyEricsson extension OLong IMelody 1 0 with UPI Long IMelody 1 2 with UPI SSonyEricssonSoundLong IMelody without header with UPI inedSound inedAnimation 4 2 API documentation 65 Gammu Manual Release GAMMU ERSIONO e EMSAnimation EMSFixedBitmap Fixed bitmap of size 16x16 or 32x32 EMSVariableBitmap EMSVariableBitmapLong SIndicatorLong MMS message indicator WAPIndicatorLong e AlcatelMonoBitmapLong Variable bitmap with black and white colors e AlcatelMonoAnimationLong Variable animation with black and white colors e
89. O OO OOO Orie SO C9 O O Ol C3 9 H 40 OO ONG 0 00 0 GO CO CA XO OVO OO 100 070 0 1C OOO OO OVS LCD CY O9 X27 Cv OG O 0 00 OOo cococococoocooco ooco 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 00 00 73s 00 701100 834 00 8b6 00 935 00 96T 00 a3 00 ab 00 b3 100 bb 100 c3 00 cb 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 100 100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C E ONO OO Ore C CeOoococoooocooco 74 LE 84 8c 94 a4 ac b4 bc c4 cc af JJ J orn Ln LO gt DO C C C BS BD AB DB DB GPS DB BBB BB WB C C OO E Oi 3 O O O O O O Kp BD DB ds B DB ds B WB Ow a oOoo0o0o0 Ie dw a INE c UGS edes e Eure e dud gs SB eee d TN Ks B TTT m MA O STAR m o PA U V W X Y Z beak ow EET 0 6 c 1 86 0 6 1 2 A C L 1 0 6 9c 1 1 8 85 0 0 T t L x C6 6 0 A a 2 2 E e 7 2 aS Xu Y aic a vA AURA ino vs M AZ PERDE T JASE aE L RN n rg Es Bide ele oti POETE Ree ES FAA E ol S sre s Mee W Sa Ki aaa Y T Z ode anise a 9 e tenes Matias C a OIE testy Shs Cay ea A US neus Mom fu FD Oa Mor du ERES A Eo MEM Mn de thes ds MOORE OEY QA pe RII e s eps Iepa
90. Sent INTEGER NOT NULL DEFAULT 0 Received INTEGER NOT NULL DEFAULT 0 TI E CREATE TRIGGER update_phones_time UPDATE ON phones BEGIN UPDATE phones SET UpdatedInDB datetime now WHERE IM END LH I old IMEI CREATE TABLE sentitems 216 Chapter 10 SMS Daemon de_Compressi Gammu Manual Release GAMMU ERSION UpdatedInDB NUMERIC NOT NULL DEFAULT datetime now InsertIntoDB NUMERIC NOT NULL DEFAULT datetime now SendingDateTime NUMERIC NOT NULL DEFAULT datetime now DeliveryDateTime NUMERIC NULL Text TEXT NOT NULL DestinationNumber TEXT NOT NULL DEFAULT Coding TEXT NOT NULL DEFAULT Default No Compression UDH TEXT NOT NULL SMSCNumber TEXT NOT NULL DEFAULT Class INTEGER NOT NULL DEFAULT 1 TextDecoded TEXT NOT NULL DEFAULT RI S S S I D INTEGER enderID TEXT NOT NULL equencePosition INTEGER NOT NULL DEFAULT 1 tatus TEXT NOT NULL DEFAULT SendingOK StatusError INTEGER NOT NULL DEFAULT 1 TPMR INTEGER NOT NULL DEFAULT 1 RelativeValidity INTEGER NOT NULL DEFAULT 1 CreatorID TEXT NOT NULL CHECK Status IN SendingOK SendingOKNoReport SendingError DeliveryOK DeliveryFailed DeliveryPending DeliveryUnknown Error CHECK Coding IN Default No Compression Unicode
91. TA 5 e E EE E GL B TT X GET e Toon E N Ow erste e ave A MAE CURIE Zu EL UN H B d eiu us WE abis Cs a 270 Chapter 13 Phone Protocols Gammu Manual Release GAMMU ERSION 08 04 00 b1 00 00 00 104 08 04 00 52 1005 LOQ 1 00 POS Less sS EE wale canes 08 04 00 b3 00 00 00 04 08 04 00 b4 00 00 00 04 08 04 00 b5 JOO 00 00 04 08 04 00 b6A 00 00 00 04 Poets E A 08 04 00 b7 00 00 00 04 08 04 00 b8S 00 00 00 04 BAD Saks 08 04 00 b9 00 00 00 104 08 04 00 ba eS 00 Rat OE caras 08 04 00 bb 00 00 00 04 08 04 QUO 3e OO 0 97 O0 QW T 08 04 00 bdz 00 00 00 04 108 04 00 bez 00 00 00 04 ARIS ea aah Z 08 04 100 bf 00 00 00 104 08 04 000 leor es T TOO 00 OAM e e a tias 08 04 00 cl 00 00 00 04 08 04 00 EZ 00 FOO 00 TOA tegan 9 eere 08 04 00 c3 00 100 00 04 08 04 O e IOO MEO O0 DA T a see salts 08 04 00 c5 100 00 00 104 08 04 00 c6A 00 00 100 04 A 08 04 00 c7 00 00 00 04 08 04 00 c8 00 00 00 04 PA See e e e eos 08 04 00 c9 00 00 00 04 1 08 04 00 pea 09 OO POD TOW uere eec rac ne 08 04 00 cb 00 00 00 04 08 04 QQ tiis OO OO T0 P0 S o Ll o el a da 08 04 00 cd 00 00 00 04 1 08 04 00 es OO FOO OO Td siue teo hates 08 04 00 cfrj0O0 00 MN
92. TO N 0 Create object for talking with phone state machine gammu StateMachine Optionally load config file as defined by first parameter if len sys argv 2 Read the configuration from given file state machine ReadConfig Filename sys argv 1 Remove file name from args list del sys argv 1 else Read the configuration gammurc state machine ReadConfig Check parameters if len sys argv 2 print Usage sendsms py configfile RECIPIENT NUMBER sys exit 1 Connect to the phone state_machine Init Prepare message data We tell that we want to use first SMSC number stored in phone message Text python gammu testing message SMSC 1 Loecation 1 Number sys argv 1 Actually send the message state machine SendSMS message Sending a long message usr bin env python Sample script to show how to send long multipart SMS from _ future J import print function import gammu import sys Create object for talking with phone State machine gammu StateMachine Optionally load config file as defined by first parameter if len sys argv 2 Read the configuration from given file state machine ReadConfig Filename sys argv 1 Remove file name from args list del sys argv 1 else Read the configuration gammurc state machine ReadConfig Check parameters if len sys argv 2 print Usage sendlongsms py
93. Wireless Village user ID Text NamePrefix Name prefix Text NameSuf fix Name suffix Text Location Location for the field Unknown not define 72 Chapier 4 python gammu Gammu Manual Release OGAMMUyERSIONO Home home eWork work Value Actual value corresponding type to Type field PictureType Type of picture which is stored in Value field only for Picture fields File Object File is a dictionary consisting of following fields Used Number of bytes used by this file Name File name Folder Boolean value indicating whether this is a folder Level Depth of file on the filesystem Type File type one of Other Java JAR Image JPG Image BMP Image GIF Image PNG Image WBMP Video 3GP Sound AMR Sound NRT DCTA binary format Sound MIDI MMS ID FullName Full file name including path Buffer Content of the file Modified Timestamp of last change Protected Boolean value indicating whether file is protected DRM 4 2 API documentation 73 Gammu Manual Release GAMMU ERSIONAO ReadOnly Boolean value indicating whether file is read only Hidden Boolean value indicating whether file is hidden System Boolean value indicating whether file is system Pos Current poosition of file upload Finished Boolean value indicating completed file transfer Example FILE ID FullName PATH Name os path
94. all message parts Type UDH type one of predefined strings NOUDH ConcatenatedMessages e ConcatenatedMessages16bit DisableVoice 62 Chapter 4 python gammu Gammu Manual Release GAMMU ERSION DisableFax DisableEmail EnableVoice EnableFax EnableEmail e VoidSMS okiaRingtone okiaRingtoneLong okiaOperatorLogoLong okiaCallerLogo OkiaWAP okiaWAPLong okiaCalendarLong okiaProfileLong e Z 42 2 42 42 2 2 2 B okiaPhonebookLong USerUDH Text UDH content Example UDH IDSbat i Oxed PartNumber 1 AllParts t 2 Type ConcatenatedMessages SMSC Object SMSC dictionary can consist of following fields Location Location where the SMSC is stored Number SMSC number Name Name of the SMSC configuration DefaultNumber Default recipient number ignored on most phones Format Default message format one of Text Pager 4 2 API documentation 63 Gammu Manual Release GAMMU ERSIONAO Fax Email Validity Default message validity as a string NA validity not available Max maximal validity allowed by network nM nH nD nW period defined in minutes hours days or weeks eg 3W Example SMSC Lhocataon s 1 Number s 420987654321 Format Text Validity Max SMS Info Object Message info dictionary can
95. and sender to external program bin sh PROGRAM bin echo for i in seq SMS_MESSAGES eval SPROGRAM S SMS_ i _NUMBER S SMS_S i _TEXT done Passing MMS indication parameters to external program Following script if used as RunOnRecei ve handler will write information about each received MMS indication to the log file Just replace echo command with your own program to do custom processing bin sh if SDECODED PARTS eq 0 then No decoded parts nothing to process exit fi if SDECODED 1 MMS ADDRESS then echo SDECODED 1 MMS ADDRESS SDECODED 1 MMS SENDER DECODED 1 MMS TITLE gt gt tm fi Processing message text in Python Following script if used as RunOnReceive handler written in Python will concatenate all text from received mes sage usr bin env python from _ future import print function import os import sys numparts int os environ DECODED PARTS Are there any decoded parts if numparts print No decoded parts sys exit 1 Get all text parts text for i in range 1 numparts 1 varname DECODED 2d TEXT i if varname in os environ text text os environ varname Do something with the text print Number s have sent text s os environ SMS 1 NUMBER text 10 6 Backend services The backend service is used to store messages bo
96. belong to us gammu smsd inject TEXT 123456 or gammu smsd inject TEXT 123456 text All your base are belong to us Inject unicode text message gammu smsd inject TEXT 123456 unicode text ZkouSka sir n Inject long text message echo All your base are belong to us gammu smsd inject TEXT 123456 len 400 or 10 3 Program Manuals 181 Gammu Manual Release GAMMU ERSIONAO gammu smsd inject TEXT 123456 len 400 text All your base are belong to us or gammu smsd inject EMS 123456 text All your base are belong to us Inject some funky message with predefined sound and animation from 2 bitmaps gammu smsd inject EMS 123456 text Greetings defsound 1 text from Gammu tonelO0 axelf txt anir Inject protected message with ringtone gammu smsd inject EMS 123456 protected 2 variablebitmaplong ala bmp toneSElong axelf 10 3 3 gammu smsd monitor Synopsis gammu smsd monitor OPTION Description This manual page documents briefly the gammu smsd monitor command gammu smsd monitor is a program that monitors state of Gammu SMS Daemon It periodically displays infor mation about phone and number of processed messages Program accepts following options please note that long options might be not accepted on some platforms h help Shows help
97. configfile RECIPIENT NUMBER 30 Chapter 4 python gammu Gammu Manual Release GAMMU ERSION sys exit 1 Connect to the phone state machine Init Create SMS info structure smsinfo Class I Unicode False Entries L ID ConcatenatedTextLong Buffer Very long python gammu testing message sent from example python script Very long python gammu testing message sent from example python script Very long python gammu testing message sent from example python script 1 Encode messages encoded gammu EncodeSMS smsinfo Send messages for message in encoded Fill in numbers message SMSC Location 1 message Number sys argv 1 Actually send the message state_machine SendSMS message Initiating a voice call usr bin env python from _ future import print function import gammu import sys Create object for talking with phone State machine gammu StateMachine Read the configuration gammurc or from command line if len sys argv 2 state machine ReadConfig Filename sys argv 1 del sys argv 1 else state machine ReadConfig Connect to the phone state machine Init Check whether we have a number to dial 4 1 A taste of python gammu 31 Gammu Manual Release GAMMU ERSIONO if len sys argv 2 print Usage dialvoice py
98. corresponding to gammu error ERR SECURITYERROR Verbose error description Security error Maybe no PIN exception gammu ERR_SHOULDBEFILE Exception corresponding to gammu error ERR SHOULDBEFILE Verbose error description You have to give file name and not folder name exception gammu ERR SHOULDBEFOLDER Exception corresponding to gammu error ERR SHOULDBEFOLDER Verbose error description You have to give folder name and not file name exception gammu ERR SOURCENOTAVAILABLE Exception corresponding to gammu error ERR_SOURCENOTAVAILABLE Verbose error description Some functions not available for your system disabled in config or not implemented exception gammu ERR_SPECIFYCHANNEL Exception corresponding to gammu error ERR_SPECIFYCHANNEL Verbose error description Bluetooth configuration requires channel option exception gammu ERR TIMEOUT Exception corresponding to gammu error ERR TIMEOUT Verbose error description No response in specified timeout Probably phone not connected 4 2 API documentation 59 Gammu Manual Release GAMMU ERSIONAO exception gammu ERR UNCONFIGURED Exception corresponding to gammu error ERR_UNCONFIGURED Verbose error description Gammu is not configured exception gammu ERR_UNKNOWN Exception corresponding to gammu error ERR_UNKNOWN Verbose error description Unknown error exception gammu ERR UNKNOWNCONNECTIONTYPESTRING Exception corresponding to gammu error ERR_UNKNOWNCONNECTION
99. do compile and test Gammu every night If you want to tak part of this just ensure that your machine executes test suite every night preferably after 3 00 CET You can select either make Nightly to do regullar testing or make NightlyMemoryCheck to test with valgrind Also you can enable coverage tests as described above Running single test You can run single test by directly calling ctest ctest R test nam Adding V runs it in verbose mode with all test output 235 Gammu Manual Release GAMMU ERSIONO ctest V R test nam 12 1 2 Collecting results The tests are ran daily on several platforms and you can find the results on Travis The coverage reports are at Coveralls 12 1 3 Testing of SMSD SMSD tests are performed using Dummy Driver and uses file backend and sqlite database by default For this you nee Gammu compiled with libdbi have installed sqlite driver for libdbi and have sqlite3 binary available on the syste Testing of additional database backends must be enabled separately MYSQL TESTING you need to have setup MySQL server with database where SMSD can play PSQL TESTING you need to have setup PostgreSQL server with database where SMSD can play 12 1 4 Testing of command line utility Gammu command line tests are performed using Dummy Driver where required It covers most of command line interface but some parts need to be explicitly enabled ONLINE TESTING enable t
100. docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual 5 3 libGammu C API 101 Gammu Manual Release GAMMU ERSIONO Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual 5 3 8 Debug Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user
101. events on the device Parameters Wait bool Whether to wait default is not to wait Returns Number of bytes read Return type int Reset Hard Performs phone reset Parameters Hard bool Whether to make hard reset Returns None Return type None ResetPhoneSettings Type Resets phone settings Parameters Type string What to reset one of PHONE UIF ALL DEV FACTORY Returns None Return type None SendDTMF Number Sends DTMF Dual Tone Multi Frequency tone Parameters Number string Number to dial Returns None Return type None SendFilePart File Sends file part to phone Parameters File dict File data see File Object Returns File data for subsequent calls Finished indicates transfer has been completed see File Object Return type dict SendSMS Value Sends SMS 4 2 API documentation 43 Gammu Manual Release GAMMU ERSIONAO Parameters Value dict SMS data see SMS Object Returns Message reference as int Return type int SendSavedSMS Folder Location Sends SMS saved in phone Parameters Folder int Folder where to read entry 0 is emulated flat memory Location int Location of entry to send Returns Message reference as int Return type int SetAlarm DateTime Location Repeating Text Sets alarm in phone Parameters DateTime datetime datetime When should alarm happen Location int Location of alarm to set Defau
102. find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual vak vk N Chapter 5 libGammu Gammu Manual Release GAMMU E RSION Q Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual 5 3 17 Miscellaneous Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu che
103. folder start stop gammu command line option 150 DeleteSMS gammu StateMachine method 35 DeleteSMSFolder gammu StateMachine method 36 deletetodo start stop gammu command line option 159 DeleteToDo gammu StateMachine method 36 deletewapbookmark start stop gammu command line option 165 DeliveryStatus 61 Device 23 25 140 237 DialService gammu StateMachine method 36 dialvoice number showlhide gammu command line option 148 DialVoice gammu StateMachine method 36 displaysms options like in sendsms gammu command line option 150 divert getlset alllbusylnoansloutofreach alllvoicelfaxldata number timeout gammu command line option 148 DivertType 74 Driver 183 184 197 DriversPath 197 E EMS unicode 16bit format lcrasbiut text text unicodefiletext file defsound ID defanimation ID tonel0 file tone1Olong file tone12 file tone12long file toneSE file toneSElong file fixedbitmap file variablebitmap file variablebitmaplong file animation frames filel protected num ber gammu command line option 151 EncodeICALENDAR in module gammu 50 EncodeITODO in module gammu 51 EncodePDU in module gammu 49 EncodeSMS in module gammu 49 EncodeVCALENDAR in module gammu 50 Encode VCARDQO in module gammu 50 EncodeVTODOY in module gammu 51 enqueue gammu worker GammuWorker method 55 enqueue command gamm
104. have to enable each event type by calling SetIncoming functions The callback function needs to accept three parameters StateMachine object event type and it s data in dictionary Parameters Callback function callback function or None for disabling Returns None Return type None SetIncomingSMS Enable Enable disable notification on incoming SMS Parameters Enable bool Whether to enable notifications default is True Returns None Return type None SetIncomingUSSD Enable Activates deactivates noticing about incoming USSDs UnStructured Supplementary Services Parameters Enable bool Whether to enable notifications default is True Returns None Return type None SetLocale DateSeparator DateFormat AMPMTime Sets locale of phone Parameters DateSeparator string Date separator DateFormat string Date format one of DDMMYYYY MMDDYYYY YYYYMMDD AMPMTime bool Whether to use AM PM time Returns None Return type None SetMemory Value Sets memory phonebooks or calls entry Parameters Value dict Memory entry see Phonebook Object Returns Location of created entry Return type int 46 Chapter 4 python gammu Gammu Manual Release GAMMU ERSION Set SMS Value Sets SMS Parameters Value dict SMS data see SMS Object Returns Tuple for location and folder Return type tuple SetSMSC Value Sets SMS Service Center number and SMS settings Parameters Value
105. include it in the message on reply 180 Chapter 10 SMS Daemon Gammu Manual Release GAMMU E RSION Q 10 3 2 gammu smsd inject Synopsis gammu smsd inject OPTION MESSAGETYPE RECIPIENT MESSAGE PARAMETER Description This manual page documents briefly the gammu smsd inject command gammu smsd in ject is a program that enqueues message in Gammu SMS Daemon which will be later sent by the daemon using connected GSM modem Support for this program depends on features available in currently used SMSD service backend however currently it is supported by all of them Program accepts following options please note that long options might be not accepted on some platforms h help Shows help v version Shows version information and compiled in features c config file Configuration file to use default is etc gammu smsdrc on Windows there is no default and configuration file path has to be always specified 1 use log Use logging as configured in config file L no use log Do not use logging as configured in config file default For description of message types and their parameters please check documentation for gammu savesms Examples To check it out you need to have configuration file for SMSD see SMSD Configuration File for more details about it Inject text message up to standard 160 chars echo All your base are
106. is performed 6 1 4 Requests This is how GSM Reply Function is filled Now how to make phone requests Example static GSM Error N6110_GetMemory GSM StateMachine S GSM PhonebookEntry xentry unsigned char req N6110 FRAME HEADER 0x01 0x00 memory type 0x00 location 0x00 req 4 NOKIA GetMemoryType entry MemoryType N6110 MEMORY TYPES if req 4 20xff return GE NOTSUPPORTED req 5 entry gt Location s gt Phone Data Memory entry dprintf Getting phonebook entryMn return GSM WaitFor s reg 7 0x03 4 ID GetMemory First we fill req according to values in entry Later set pointer in s gt Phone Data it s available for reply functions and they set responses exactly to it and use GSM_WaitFor It uses s statemachine sends req frame with length 7 msg type is 0x03 we wait for answer during 4 seconds request id is ID_GetMemory GSM_WaitFor inter nally checks incoming bytes from phone and redirect them to protocol functions If they found full frame there is checked GSM_Reply_Function where is called ReplyFunction or showed debug info that frame is unknown If there is ReplyFunction it has access to s gt Phone Data and decodes answer Returns error or not and this is value for GSM WaitFor If there is no requested answer during time GSM_WaitFor returns GE_TIMEOUT 6 2 State Machine The state machine is core of libGammu oper
107. last call Date Caller_Group Caller group Number Text_Name Name Text Text_LastName Last name Text Text_FirstName First name Text Text Company Company Text 4 2 API documentation 71 Gammu Manual Release GAMMU E RSION 0 Text JobTitle Job title Text Category Category Number if 1 then text Private Whether entry is private Number Text StreetAddress Street address Text Text City City Text Text State State Text Text Zip Zip code Text Text Country Country Text Text_Customl Custom information 1 Text Text Custom2 Custom information 2 Text Text Custom3 Custom information 3 Text Text Custom4 Custom information 4 Text RingtonelD Ringtone ID Number PictureID Picture ID Number Text UserID User ID Text CallLength Length of call Number Text LUID LUID Unique Identifier used for synchronisation Text LastModified Date of last modification Date Text NickName Nick name Text Text FormalName Formal name Text Text PictureName Picture name on phone filesystem Text PushToTalkID Push to talk ID Text Number Messaging Favorite messaging number Text Photo Photo Picture SecondName Second name Text VOIP VOIP address Text SIP SIP address Text DTMF DTMF Text Video Video number Text SWIS See What I See address Text WVID
108. line option 152 toneSE gammu command line option 152 toneSElong gammu command line option 152 type gammu command line option 156 u no udev gammu detect command line option 231 u uninstall service gammu smsd command line option 178 u url URL jadmaker command line option 233 unicode gammu command line option 154 unicodefiletext gammu command line option 151 unread gammu command line option 151 unsent gammu command line option 151 V version gammu detect command line option 231 gammu smsd command line option 178 gammu smsd inject command line option 181 gammu smsd monitor command line option 182 validity HOURI6HOURSIDAYI3DAYSIWEEKIMAX 322 Index Gammu Manual Release GAMMU E RSION Q gammu command line option 155 variablebitmap gammu command line option 152 variablebitmaplong gammu command line option 152 voidsms gammu command line option 154 w no win32 serial gammu detect command line option 232 exclude numbers 190 exclude smsc 190 gammu 137 180 183 190 include numbers 190 include smsc 190 sql 183 198 A Abort gammu StateMachine method 47 abort gammu worker Gammu Worker method 55 AddCalendar gammu StateMachine method 33 addcategory TODOIPHONEBOOK text gammu command line option 160 AddCategory gammu StateMachine method 33 addfile folderID name type B backup file yes gammu comma
109. log Do not use logging as configured in config file e install event log Installs Windows EventLog description to registry New in version 1 31 90 E uninstall event log Uninstalls Windows EventLog description to registry New in version 1 31 90 Signals SMSD can be controlled using following POSIX signals if your platform supports this SIGHUP Reload configuration and reconnect to phone SIGINT SIGTERM Gracefully shutdown the daemon SIGALRM Used internally for gammu smsd X SIGUSR1 Suspends SMSD operartion closing connection to phone and database SIGUSR2 Resumes SMSD operattion after previous suspend Changed in version 1 22 91 Added support for SIGHUP Changed in version 1 22 95 Added support for SIGALRM Changed in version 1 31 90 Added support for SIGUSRI and SIGUSR2 Examples Linux Unix Examples Start SMSD as a daemon on Linux gammu smsd config etc gammu smsdrc pid var run gammu smsd pid daemon Start SMSD as a daemon on Linux with reduced privileges 10 3 Program Manuals 179 Gammu Manual Release GAMMU ERSIONAO gammu smsd config etc gammu smsdrc pid var run gammu smsd pid daemon user gammu group gar SMSD as a system wide daemon To use SMSD as a daemon you might want to use init script which is shipped with Gammu in contrib init directory It is not installed by default either install it manually or check INSTALL file for instruction
110. logo will be displayed for your current GSM operator When you give additionally network code it will be displayed for this operator PICTURE file location text Sets picture image in phone STARTUP file 11 213 Set startup logo in phone It can be static then you will have to give file name or one of predefined animated only some phones like Nokia 3310 or 3330 supports it use location 1 2 or 3 for these TEXT text Sets startup text in phone WALLPAPER fileID Sets wallpaper in phone 9 2 7 Ringtones commands Ringtones are mostly supported only for older phones For recent phones you usually just upload them to some folder in phone filesystem 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 158 Chapter 9 Gammu Utility Gammu Manual Release GAMMU E RSION Q copyringtone source destination RTTL BINARY Copy source ringtone to destination getphoneringtone location file Get one of default ringtones and saves into file getringtone location file Get ringtone from phone in RTTL or BINARY format Locations are numerated from 1 getringtoneslist playringtone file Play aproximation of ringtone over phone buzzer File can be in RTTL or BINARY Nokia DCT3 format playsavedringtone number Play one of bu
111. one tonel2 adds IMelody version 1 2 read from RTTL or other compatible file tonel2long IMelody version 1 2 saved in one of few SMS with UPI Phones compatible with UPI like Sony Ericsson phones will read such ringtone as one toneSE adds IMelody in short form supported by Sony Ericsson phones toneSElong add Sony Ericsson IMelody saved in one or few SMS with UPI variablebitmap bitmap in any size saved in one SMS variablebitmaplong bitmap with maximal size 96x128 saved in one or few sms fixedbitmap bitmap 16x16 or 32x32 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 phone menu 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 Character Formating left aligned centered right aligned large font small font bold font italic font underlined font strikethrough font EEI PT U A HALF 152 Chapter 9 Gammu Utility Gammu Manual Release GAMMU ERSION MMSINDICATOR URL Title Sender Creates a MMS indication SMS It contains URL where the actual MMS payload is stored which needs to be SMIL encoded The phone usually do
112. phone driver GSM Error Function GSM Protocol Message xmsg GSM StateMachine xs Callback on reply match const unsigned char msgtype String match on the message const size t subtypechar Position for char match inside reply If 0 message type is checked const int subtype Match for char message type check see above const GSM Phone RequestID requestID Match for request ID this is filled in when calling GSM WaitFor There are three types of answer matching 6 1 1 Binary Example N6110_ReplySaveSMSMessage x14 0x03 0x05 ID_SaveSMSMessage ID_SaveSMSMessage request function reply Frame is type x14 0x03 char of frame must be 0x05 If yes we go to N6110_ReplySaveSMSMessage Of course things like frame type are found in protocol here FBUS MBUS etc funcitons If don t need anything more than frame type 0x03 0x05 should be 0x00 0x00 it means then that we check only frame type 125 Gammu Manual Release GAMMU ERSIONAO 6 1 2 Text Example ATGEN ReplyIncomingCallInfo CLIP 0x00 0x00 1ID IncomingFrame All incoming not requested in the moment sent by phone who likes us ID IncomingFrame responses starting from CLIP will go to the ATGEN ReplyIncomingCallInfo 6 1 3 Numeric Example S60 Reply Generic 0x00 NUM QUIT ID Terminate When match string is empty and match char position is zero matching on message type
113. pretty same as on Linux see Linux section for more details about compile time options If you get some errors while linking with iconv it is caused by two incompatible iconv libraries available on the system You can override the library name cmake D ICONV LIBRARIES opt local lib libiconv dylib Or completely disable iconv support cmake DWITH Iconv OFF To build backward compatible binaries you need CMake 2 8 or newer The command line then would look like cmake DCMAKE OSX ARCHITECTURES ppc i386 x86 64 DCMAKE OSX DEPLOYMENT TARGET 10 4 1 3 8 Cross compilation for Windows on Linux First install all Dependencies and Optional Dependencies into your mingw build environment Only cross compilation using CMake has been tested You need to install MinGW cross tool chain and run time On Debian you can do it by apt get install mingw32 Build is then quite simple mkdir build win32 cd build win32 cmake DCMAKE TOOLCHAIN FILE cmake Toolchain mingw32 cmake make There is also toolchain configuration for Win64 available mkdir build win64 cd build win64 cmake DCMAKE TOOLCHAIN FILE cmake Toolchain mingw64 cmake make If your MinGW cross compiler binaries are not found automatically you can specify their different names in cmake Toolchain mingw32 cmake To build just bare static library without any dependencies use
114. printf 8 bit message can not display n else printf Text Ss n DecodeUnicodeConsole sms SMS i Text printf Wn 5 2 Examples 83 Gammu Manual Release GAMMU ERSIONO Terminate connection rror GSM TerminateConnection s error handler Free up used memory GSM FreeStateMachine s return 0 Editor configuration noexpandtab sw 8 ts 8 sts 8 tw 72 vim 5 2 3 Sending SMS message lt gammu h gt lt stdlib h gt lt stdio h gt lt string h gt lt signal h gt include include include include include GSM StateMachine xs INI Section cfg GSM Error error volatile GSM Error sms send status volatile gboolean gshutdown FALSE Handler for SMS send reply void send sms callback printf Sent SMS on device Ss n GSM GetConfig sm 1 gt Device if status 0 printf OK sms send status ERR NONE else printf error i status sms_send_status ERR_UNKNOWN print iB nce d n message r at Function to handle errors void error_handler void if error ERR_NONE printf ERROR s n GSM if GSM_IsConnected s GSM_TerminateConnection s exit error Interrupt signal handler GSM StateMachine sm ErrorString error int status int MessageReference void Y
115. project has been merged into Gammu so you just need to grab Gammu and it includes python gammu Binaries for Windows are distributed separately 3 5 2 How can use python gammu There are lot of examples shipped with Gammu you can find them in the examples subdirectory See also 3 4 SMSD FAQ 27 Gammu Manual Release GAMMU ERSIONO python gammu More python gammu Examples 28 Chapter 3 Frequently Asked Questions CHAPTER 4 python gammu 4 1 A taste of python gammu Python gammu allows you to easily access the phone Following code will connect to phone based on your Gammu configuration usually stored in gammurc and gets network information from it import gammu import sys Create state machine object sm gammu StateMachine Read gammurc sm ReadConfig Connect to phone sm Init Reads network information from phone netinfo sm GetNetworkInfo Print information print Network name s netinfo NetworkName print Network code s netinfo NetworkCode print LAC s netinfo LAC print CID s netinfo CID 4 1 1 More python gammu Examples Many examples are available in examples directory in the python gammu sources Sending a message usr bin env python Sample script to show how to send SMS from _ future import print function import gammu import sys 29 Gammu Manual Release GAMMU E HS
116. protocol details or unknown commands One of the best free tools available currently is UsbSnoop In directory cont rib usbsnoop in Gammu sources you can find some tools to decode the output 13 1 2 Serial port Download Portmon which allows one to capture bytes sent and received by ready binary software If you have log saved by PortMon and protocol is the same to old Nokia protocols can use Gammu to decode it It s simple gammu decodesniff MBUS2 file 6210 gt log saves in log decoded MBUS2 dump session There is used phone module for 6210 and have you have debug info about 6210 specific frames you don t have to add model Dump file for decodesniff and MBUS should be specific 1 without bytes sent to phone in Portmon you set it here Edit Filter Highlight 2 in Hex format Options Show Hex 3 without Date amp Time Options Show Time amp Clock Time 13 1 3 Infrared First of all you need two computers with IrDA One running linux that will sniff and one running windows which will communicate with the phone and whatever software you want Nokia Logomanager Oxygen Phone Manager Then you have to get the software from http www dev thomynet de nokworld noktrace You have to disable IrDA services on the linux machine and eventually you have to change the default port the irda_intercept program is sniffing from default ttyS1 On the windows machine you should dec
117. r Get folder status Ox0d 0x00 length number of entries 2 bytes entrylnumber 2 bytes entry2number 2 bytes 0Ox55 s Get message info Ox0e memory folderID location location 0x55 0x55 r Get message info Ox0f 0x00 0x01 0x00 0x50 memory type 0x00 locatioy wher type 0x00 MT 0x01 delivery report 0x02 MO 0x80 picture message where status 0x01 reveived read 0x03 received unread 0x05 stored sent 0x07 stored not sent S Get folder names 0x12 0x00 0x00 r Get folder names 0x13 0x00 number of strings 0x01 0x28 folderID leng 0x55 40 length namel1 01 28 folderID length 0x00 name2 0x00 0x51 wher folderID 0x02 Inbox 0x03 Outbox 0x04 Archive 0x05 Templates 0x06 first My folders 0x07 second My folders 0x08 third and so on 0x15 s 0x00 0x06 0x00 0x01 0x01 0x00 r 2 0x06 0x00 d 0x00 0x00 s 2 0x00 0x06 0x00 0x02 0x00 0x00 PRO 0 06 Ter Qx00 tel Ro 2 F 0x17 BATTERY s Get battery level Ox0a 0x02 0x00 r Get battery level Ox0b 0x01 Ox01 0x16 level 0x07 0x05 wher level 1 7 as in phone display 0x19 CLOCK S Get LUS DT ol r Get TUXOZ il s Get date Ox0a 0x00 0x00 r Get date Ox0b 0x00 0x02 blocks 0x01 type 0x0c length 0x01 0x03 year 2 octets 0x04 0x04 0x01 0x00 s Get 0x0c 0x00 0x00 r Get 0x0d s Get TOV r Get PORT yp x Oxlb IDENTIFY
118. see MSD Database Structure This backend is based on SQL Service Configuration Before running gammu smsd you need to create necessary tables in the database which is described below The configuration file then can look like smsd service sql driver native_pgsql host localhost See also SMSD Configuration File Creating tables SQL script for creating tables in PostgreSQL database Database smsd CREATE USER smsd WITH NOCREATEDB NOCREATEUSER CREATE DATABASE smsd WITH OWNER smsd ENCODING UTF8 connect smsd smsd COMMENT ON DATABASE smsd IS Gammu SMSD Database Function declaration for updating timestamps CREATE LANGUAGE plpgsal 208 Chapter 10 SMS Daemon Gammu Manual Release GAMMU ERSION CREATE OR REPLACE FUNCTION update timestamp RETURNS trigger AS Supdate_timestamp NEW UpdatedInDB LOCALTIMESTAMP 0 RETURN NEW D I Supdate_timestamp LANGUAGE plpgsql Sequence declarations for tables primary keys CREATE SEQUENCE inbox ID seq CREATE SEQUENCE outbox ID seg CREATE SEQUENCE outbox multipart ID seg CREATE SEQUENCE pbk groups ID seq CREATE SEQUENCE sentitems ID seq Ind
119. some phones available only during calls splitcall id Splits call switchcall id Switches call transfercall id Transfers call unholdcall id Unholds call 9 2 3 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 There is also an option to use 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 148 Chapter 9 Gammu Utility Gammu Manual Release GAMMU E RSION Q 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 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 Encoding chars in SMS text Text in SMS can be coded using two ways GSM Default Alphabet
120. tests default smsd PSQL PASSWORD Password to use for PostgreSQL tests default smsd MYSQL HOST Host to use for MySQL tests default 127 0 0 1 MYSQL DATABASE Database to use for MySQL tests default sms a MYSQL USER User to use for MySQL tests default smsd MYSQL PASSWORD Password to use for MySQL tests default smsd ODBC_DSN ODBC DSN to use for ODBC tests default smsd Currently needs to point to MySQL database 12 2 Dummy Driver New in version 1 22 93 The dummy driver in Gammu emulates all operations on filesystem It is used by Gammu Testsuite but it is also very helpful for application developers because they can test the functionality without using real phone and avoiding risk of corrupting data in the phone 12 2 1 Filesystem structure The dummy driver emulates all phone functionality on filesystem The Device configuration directive sets top level directory where all data are stored This directory contains file operations log where are logged operations which do not modify any data in the dummy phone eg sending message 12 2 Dummy Driver 237 Gammu Manual Release GAMMU ERSIONAO Messages Messages are stored in sms FOLDER directories lt FOLDER gt is in range 1 5 in Gammu native smsbackup format Phonebook Phonebook and calls registers are stored in pbk lt MEMORY gt lt MEMORY gt is type of memory like ME or SM direc tories in vCard format Notes
121. the logo not in a hi value to me now 13 8 2 got key press working As stated in http www flosys com tdma n5160 html with frame key press D1 00 01 50 00 01 KY this seems to press the key for a while No release needed key release D1 00 01 50 00 00 KY keep the key press gt got speedee dial D1 00 01 50 00 02 00 KY 13 8 3 get memory the getmemory 40 00 00 07 11 00 10 00 mem get phonebook with the phone in bcd but it seems to be a way to read chunks of memory with diferent numbers in the 6 place in particular get configuration pins 40 40x00 0x00 0x07 0x11 0x00 OxOf 0x00 0x00 get security code 40 40x00 0x00 0x07 0x11 0x00 0x09 0x00 0x00 get NAM data 40 40x00 0x00 0x07 0x11 0x00 0x08 0x00 nam that last answers with 296 Chapter 13 Phone Protocols Gammu Manual Release OGAMMUyERSIONO dd 401 00 11 00 08 00 00 03 04 home sys id 01 4d primary paggin channel 02 c4 seconda paggin channel 88 88 88 88 88 own 09 63 c2 09 03 00 0b unknow 0a group id 01 Access method 01 local option Of overload class 20 41 43 41 45 00 00 00 00 00 00 00 00 00 00 00 alpha tag b3 4d unknow 01 NAM status 11 11 11 11 11 00 00 00 00 00 00 00 00 unknow 00 00 00 00 00 00 01 00 00 00 01 36 unknow 01 4d dedicate ch 01 4e dedicate B ch 14 dedicate ch 14 dedicate B ch
122. us via e mail Thank you Document describing frames used in GSM PCN Nokia 6110 and derivatives Nokia 6130 6150 6190 5110 5130 5150 5190 3210 3310 Correct format is FBUS version 2 Direct IRDA MBUS version 2 see nokia txt for protocol details List 0x00 Monitoring values r monitoring value 0x01 0x01 block where block 0x5e 0x05 0x7a 0xd0 0x85 0x02 percentHI percentLO Battery percent level 0x5e 0x0c 0x52 0x4b Ox6f 0x02 voltageHI voltageLO Battery standby voltage 246 Chapter 13 Phone Protocols Gammu Manual Release GAMMU ERSION 0x01 Call Information S Make call 0x0001 number where type 0x01 data call 0x05 voice call type block block data call non digital lines 0x02 0x01 0x05 0x81 0x01 0x00 0x00 0x01 0x02 0x0a 0x07 0xa2 0x88 0x81 0x21 0x15 0x63 0xa8 0x00 0x00 data call digital lines 0x02 0x01 0x05 0x81 0x01 0x00 0x00 0x01 0x02 0x0a 0x07 0xa1 0x88 0x89 0x21 0x15 0x63 0xa0 0x00 0x06 0x88 0x90 0x21 0x48 0x40 0xbb voice call 0x01 0x01 0x05 0x81 0x00 sendnum 0x00 0x00 0x01 where sendnum own number sending 0x01 preset depends on network 0x03 on 0x02 off r Call going msg 0x0002 r Call in progress 0x0003 seqnr r Remote end hang up 0x0004 seqnr error like in netmon in 39 r incoming call alert 0x0005 seqnr numlen number namelen
123. use gammu smsd monitor to monitor status of SMSD It uses shared memory segment to get current status of running SMSD Alternatively you can get the same functionality from libGammu using SMSD_Get Status or python gammu using gammu smsd SMSD Get Status 10 2 5 Reporting Bugs Please report bugs to lt https github com gammu gammu issues gt Before reporting a bug please enable verbose logging in SMSD configuration smsd debuglevel 255 logfile smsd log and include this verbose log within bug report 10 2 Usage 177 Gammu Manual Release GAMMU ERSIONAO 10 3 Program Manuals 10 3 1 gammu smsd Synopsis gammu smsd OPTION Description This manual page documents briefly the gammu smsd command gammu smsd is a program that periodically scans GSM modem for received messages stores them in defined storage and also sends messages enqueued in this storage The daemon can reload configuration file after sending hangup signal SIGHUP and properly terminates itself on SIGINT and SIGTERM Program accepts following options please note that long options might be not accepted on some platforms h v C P i u S k help Shows help version Shows version information and compiled in features config file Configuration file to use default is etc gammu smsdrc on Windows there is no default and configuration file path has to be a
124. 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 1 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 8 2 Description 139 Gammu Manual Release GAMMU ERSIONAO Configuring Gammu FAQ 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 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 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 s
125. user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani 5 3 libGammu C API 99 Gammu Manual Release GAMMU ERSIONO Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file nome docs checkouts readthedocs org user_builds gammu checkoutp stable docs man Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_
126. user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam 5 3 24 Types Warning doxygentypedef Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manu 5 3 25 Unicode Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file nome docs checkouts readthedocs org user_builds gammu checkoutp stable docs man Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam 120 Chapter 5 libGammu Gammu Manual Release GAMMU ERSION Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxy
127. will definitely need to define callbacks for newly introduced commands but the interface for desired functionality might already exist Detecting whether command is supported As Gammu is trying to support as much phones as possible you should try to make it automatically detect whether connected phone supports the command This can be done on first invocation of affected operation or on connecting to phone As we want to avoid lenghty connecting to phone in most cases you should probe for support on first attempt to use given functionality The code might look like following GSM Error ATGEN GetFoo GSM StateMachine xs GSM Phone ATGENData Priv amp s Phone Data Priv ATGEN if Priv gt Foo_XXXX 0 ATGEN CheckXXXX s if Priv Foo XXXX AT AVAILABLE Perform reading x a Fail with error or fallback to other methods x return ERR NOTSUPPORTED GSM Error ATGEN CheckXXXX GSM StateMachine xs GSM Error error GSM Phone ATGENData Priv amp s Phone Data Priv ATGEN smprintf s Checking availability of XXXXWMn ATGEN WaitForAutoLen s AT XXXX r 0x00 4 ID GetProtocol if error ERR NONE Priv Foo XXXX AT AVAILABLE else Priv Foo XXXX AT NOTAVAILABLE return error GSM_Reply_Function ATGENReplyFunctions 6 3 Adding support for new phone 129 Gammu Manual Release
128. with speed dial Location MemoryLocation MemoryNumberID Memory Type Return type dict Get ToDo Location Reads ToDo from phone Parameters Location int Location of entry to read Returns Dictionary with ToDo values see Todo Object Return type dict GetToDoStatus Gets status of ToDos count of used entries Returns Dictionary of status Used Return type dict HoldCall JD Holds call Parameters ID int ID of call Returns None Return type None Init Replies Initialises the connection with phone Parameters Replies inf Number of replies to wait for on each request Defaults to 1 Higher value makes sense only on unreliable links Returns None Return type None PressKey Key Press Emulates key press Parameters Key string What key to press Press bool Whether to emulate press or release 42 Chapter 4 python gammu Gammu Manual Release GAMMU E RSION Q Returns None Return type None ReadConfig Section Configuration Filename Reads specified section of gammurc Parameters e Section int Index of config section to read Defaults to 0 e Configuration int Index where config section will be stored Defaults to Section s Filename string Path to configuration file otherwise it is autodetected Returns None Return type None ReadDevice Wait Reads data from device This should be used in busy wait loop in case you are waiting for incoming
129. worker GammuThread queue config callback Thread for phone communication join timeout None Terminates thread and waits for it 54 Chapter 4 python gammu Gammu Manual Release GAMMU E RSION Q kill Forces thread end without emptying queue run Thread body which handles phone communication This should not be used from outside class gammu worker GammuWorker callback Wrapper class for asynchronous communication with Gammu It spaws own thread and then passes all com mands to this thread When task is done caller is notified via callback abort Aborts any remaining operations configure config Configures gammu instance according to config Parameters config hash Gammu configuration same as gammu StateMachine SetConfig accepts enqueue command params None commands None Enqueues command or task Parameters command tuple of list of tuples Command s to execute Each command is tuple containing function name and it s parameters params tuple or string Parameters to command commands list of tuples or strings List of commands to execute When this is not none params are ignored and command is taken as task name enqueue command command params Enqueues command Parameters command tuple of list of tuples Command s to execute Each command is tuple containing function name and it s parameters params tuple or string Parameters
130. would look like GSM Error ATGEN ReplyGetBatteryCharge GSM Protocol Message msg GSM StateMachine s GSM Error error GSM Phone ATGENData Priv amp s Phone Data Priv ATGEN GSM BatteryCharge BatteryCharge s Phone Data BatteryCharge int bcs 0 bcl 0 switch s gt Phone Data Priv ATGEN ReplyState case AT Reply OK smprintf s Battery level receivedWMn error ATGEN ParseReply s GetLineString msg Buffer amp Priv Lines 2 FEBOS Bi dx amp bcs amp bcl BatteryCharge gt BatteryPercent bcl switch bcs case 0 130 Chapter 6 Gammu internals Gammu Manual Release GAMMU E RSION Q BatteryCharge gt ChargeState GSM BatteryPowered break case 1 BatteryCharge gt ChargeState GSM BatteryConnected break case 2 BatteryCharge gt ChargeState GSM BatteryCharging break default BatteryCharge gt ChargeState 0 smprin break return ERR NONE case AT_Reply Error smprintf s Can t get battery level n return ERR NOTSUPPORTED case AT Reply CMSError smprintf s default return ERR return ATGE case AT Reply CMEError return ATGE Can t get battery level n N HandleCMSError s N HandleCMEError s UNKNOWNRESPONSE GSM Reply Function ATGENReplyFunctions ATGEN ReplyGetBatter
131. you can connect to the phone 19 Gammu Manual Release GAMMU ERSIONO gammu identify Device dev ttyUSBO Manufacturer Wavecom Model MULTIBAND 900E 1800 MULTIBAND 900E 1800 Firmware 641b09gg 02403A 1320676 061804 14 38 IMEI 123456789012345 SIM IMSI 987654321098765 2 4 Starting with Gammu on Windows First you need to find out device name where your phone modem is connected The easiest way is to look into Device manager under Ports COM amp LPT and lookup correct COM port there Generally for most current modems you will end up with something like COM12 The next step is to create configuration file in SPROFILE Application Data gammurc see Gammu Config uration File gammu device COM12 connection at And you can connect to the phone C Program Files Gammu 1 33 0 bin gt gammu identify Device COM12 Manufacturer Wavecom Model MULTIBAND 900E 1800 MULTIBAND 900E 1800 Firmware 641b09gg 02403A 1320676 061804 14 38 IMEI 123456789012345 SIM IMSI 987654321098765 2 5 Starting with SMSD Note Before starting with SMSD make sure you can connect to your phone using Gammu see chapters above for guide how to do that Once you have configured Gammu running gammu smsd is pretty easy You need to decide where you want to store messages see Service For this example we will stick with MySQL database but the instructions are qui
132. 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 Z Connection at19200 at115200 device type serial AT commands for DKU2 cable E Connection dku2at device type dku2 y infrared Nokia protocol for infrared with Nokia 6110 6130 6150 Z Connection fbusirda infrared device type serial Nokia protocol for infrared with other Nokia models 7 Connection irdaphonet irda device type irda AT commands for infrared Used with Nokia Alcatel Siemens etc A Connection irdaat device type irda OBEX for infrared E Connection irdaobex device type irda Bluetooth Nokia protocol with serial device set in BT stack WidComm other from adequate service and Nokia 6210 z Connection fbusblue device type serial Nokia protocol with serial device set in BT stack WidComm other from adequate service and other Nokia models A Connection phonetblue device type serial Nokia protocol for Bluetooth stack with Nokia 6210 8 3 Examples 143 Gammu Manual Release GAMMU ERSIONO Connection bluerffbus device type BT Nokia protocol for Bluetooth stack with DCT4 Nokia models which don t inform about services correctly 6310
133. 0 00 17 08 00 00 00 00 00 00 118 08 00 00 00 00 00 00 19 08 00 00 00 100 00 00 la eee eee eee 08 00 00 00 00 00 00 1lb 08 00 00 00 00 00 00 1lc oooooooo 04 00 00 1d 08 04 00 00 00 00 00 le 3c lt 355 ff Iff lt 5 EE ff TEE fl IEE ff ff EE EE EE ff LE ff ff ff ff tt Ef ff TEL oe ae EL LEES Ef EE AE FER EE EE EE EE tf IEE EE EE VEE IER EE ER DEBE BE EE ET TEEI EDO ER E ff ff ff 00 TOO 00 00 1 08 00 00 00 100 100 00 120 04 00 00 21 04 00 00 22 04 00 00 234104 00 00 24 1 4 89 04 00 00 25 04 00 00 26 04 00 00 27 08 00 00 00 amp 00 00 00 28 08 00 00 00 00 00 00 29 08 00 00 00 Gor o6 00 00 00 2ax 04 00 00 2b 0c 08 00 00 100 00 00 00 00 00 00 2c 04 00 00 2da 08 00 00 00 1 00 00 00 2e d E ate tas 08 00 00 00 00 00 00 2 08 00 00 100 00 00 00 130 ora asi ie 0 08 00 00 00 00 00 1 00 311 08 00 00 00 00 00 00 132 Lai 2 08 00 00 00 00 00 1 00 333 08 00 00 00 00 00 00 134 NI 4 08 00 00 00 00 00 1 00 355 08 00 00 00 00 00 00 136 CE 6 08 00 00 00 00 100 1 00 377 08 00 00 00 00 1 00 00 138 S QOEM 8 08 04 00 00 00 100 1 00 1299108 04 00 00 00 1 00 00 13a Lou eere 08 04 00 00 00 100 1 00 3b 14
134. 004 0128 0E00 6727 Status OxOE 0x00 1F0004 7F 6703 Ack from HFU 2 1F0004 78 0003 2801 03 074D Status confirm from HFU 2 1F0400 7F 0763 Ack from phone Button pushed 1F0400 78 0004 0128 0E01 0948 Status OxOE 0x01 1F0004 7F 096D Ack from HFU 2 1F0004 78 0003 2801 03 064C Status confirm from HFU 2 1F0400 7F 0662 Ack from phone 1F0400 78 0004 0128 0E00 0A4A Status OxOE 0x00 1F0004 7F OAGE Ack from HFU 2 1F0004 78 0003 2801 03 074D Status confirm from HFU 2 1F0400 7F 0763 Ack from phone 13 7 5 Result Important things to consider when designing a program for Com n sense that is to work with 6310 6310 sends out status OxOE 0x01 when speaker should be enabled HFU 2 version has to be sent in order for 6310 to switch to profile Handsfree e Status OxOA might say weather the phone is ringing or connected Only 6310 send this status Status confirm should be sent when status OxOE is received 13 7 Nokia 6210 6310 CARC91 PC Experiment 295 Gammu Manual Release GAMMU ERSIONAO 13 8 TDMA 5120 Eduardo Spremolla at gnokii usersOmail freesoftware fsf org After playing a while with my 51201 y find some use full frames 13 8 1 got from sneefing in Logomanger the get startup logo request 40 0x07 0x07 0x08 section section goes from 1 to 6 answer dd 40x01 0x00 0x07 0x08 84 bytes gt 84 cols x 8 bits bit0 first row Cant figure out how to modify 6110 code to get amp put
135. 01 r ACD Readings N6150 0xd4 0x02 0x00 0x02 0x00 0x06 0x01 7 284 Chapter 13 Phone Protocols Ox0a mode Gammu Manual Release GAMMU E RSION Q r Function of Oxff Ox8c 0x40 msgtype not supported 0x78 s Status confirm 0x0201 0x03 r Incoming call seql 0x0102 0x0e 0x03 r Incoming call seq2 0x0102 Ox7e 0x01 0x79 s CarKit enable 0x0201 0x01 0x62 0x00 r CarKit enabled 0x0201 0x02 0x06 0x00 V version nHFU 0x00 Ox7a settings r Set setting OxOleb number 0x00 S Set setting OxOlec number contents where for number 0x02 startup text 0x00 text Unicode 0x15 startup logo 0x00 0x00 0x00 0x04 OxcO 0x02 0x00 height 0xc0 0x03 0x00 wid 0xcO 0x04 0x03 0x00 bitmap where width height bitmap see 0x7a 0x01ed 0x15 S Get setting OxOlee number where number 0x01 Oxle 0x02 startup text 0x15 startup logo Oxlc security code r Get setting OxOled number 0x00 contents where for number 0x02 startup text 0x00 text Unicode 0x15 startup logo 0x00 0x00 0x00 0x04 OxcO 0x02 0x00 height 0xc0 0x03 0x00 wid 0xcO 0x04 0x03 0x00 bitmap where height 60 0x3c or 65 width 96 0x60 bitmap like other bitmaps but pixels placed vertically Oxlc security code code ascii 0x00 0x7f Acknowledge FBUS IRDA type seq Acknowledge MBUS 0xd0 S Power on message seql 04 r Powe
136. 03 release call r Call commands Ox7c command s Netmonitor Ox7e field where field 00 next FO reset Ele off F2 field test menus F3 developer menus s Open simlock 2 0x81 0x01 locknumber 0x10 0x10 0x10 0x10 0x10 Note sets simlock type to factory where locknumber 1 2 4 8 s Open simlock 2 0x81 0x01 locknumber where locknumber 1 2 4 8 s Close simlock 0x82 0x01 locknumber 0x00 0x00 locksinfo lock1 4 2 3 0x00 where locknumber 1 2 4 8 r Close simlock 0x82 the rest like in 0x40 0x8a S Get simlock info 0x8a 0x00 r Get simlock info 0x8a 0x00 0x01 lockstype locksclosed 0x00 0x00 locksinfo lockl where lockstype biel brie Bits bita if set selected lock is user locksclosed bit1 bit2 bit3 bit4 if set selected lock is close counterl counter4 counters for locks S Set downloaded OpName 0x8b 0x00 MCC1 MCC2 MNC Name 0x00 r SetdownloadedOpNameOK 0x8b 0x00 0x01 S Get downloaded OpName 0x8c 0x00 r Get downloaded OpName 0x8c 0x00 0x01 MCC1 MCC2 MNC Name 0x00 S Buzzer pitch Ox8f volume hzLO hzHI if volume and hz is 0 it s off r Buzzer pitch 0x8f s ACD Readings 0x91 parameter 0x02 0x03 0x04 0x05 0x07 r ACD Readings 0x91 parameter value S Sleep mode test 0x92 0x00 0x00 howlong 2 bytes enable wher nabl 0x01 nable after test 0x00 don t enable after test howlong ms 0x07 0xd0 2000 s N6150 0x98 0x00 r
137. 04 08 04 OL TE 0 0 000 O08 TO ui hao Lane 08 04 01 1d 00 00 00 04 1 08 04 0i ie 10 0 POO aT O4 Xx eae ted al eee 08 04 01 1 00 00 00 04 08 04 OL ZO 199 90 FIO LOA Ls ates 13 5 Nokia 6510 271 Gammu Manual Release GAMMU ERSIONO 08 04 01 21 00 00 00 04 108 04 01 22 00 00 00 04 1 We 08 04 01 234 00 00 00 04 08 04 01 1245100 00 00 04 E See was 08 04 01 25 00 00 00 04 08 04 01 26 amp 00 00 00 JOf amp 08 04 01 27 00 00 00 04 108 04 01 28 100 00 00 JOf Case 08 04 01 29 00 00 00 04 108 04 01 2a 100 00 00 JOf 08 04 01 2b 00 00 00 04 08 04 01 2c 00 00 00 04 B iterated 08 04 01 2d 00 00 00 04 08 04 01 2e 100 00 00 JOf 08 04 01 2 00 00 l4 ts Sending frame 0x38 0x000e 00 02 100 0c 00 01 00 01 08 02 05 08 00 00 Received frame 0x38 0x0006 02 1d 00 ma 00 100 2 ee 0x39 PROFILES S Get Profile 0x01 0x01 Ox0c 0x01 0x04 length profile feature 0x01 r Get Profile L 0x02 0x00 Ox0c 0x02 0x09 length type 0x01 0x02 0x00 0x00
138. 06 30 60823 11 25 60823 11 26 0 60823 11 26 0 0 0 0 0 OK AT SSHD 1 OK AT SSHR 0 SSHR 2 9 New task1 10 2010 06 30 60823 11 25 60823 11 26 0 0 0 0 0 0 0 0 0 OK 13 10 SAMSUNG GT calendar AT commands 303 Gammu Manual Release GAMMU ERSIONAO 13 10 3 Memo Notes The memo notes are accessible via AT OMM commands AT OMMI OMMI 4 100 100 We found that we have 4 memos You can add a note AT OMMW 0 This is a note OMMW 6 OK You can read it AT OMMR 6 OMMR This is a note OK You can modify it AT OMMW 6 This is a new modified note OMMW 6 OK AT OMMR 6 OMMR This is a new modified note OK To delete entries AT OMMR 3 OMMR Note number 3 OK AT OMMD 3 OK AT OMMW 3 New note number 3 CME ERROR 29 ERROR 13 11 Sonim AT Commands Filesystem access at list path list directory content O file atxmkdir path make directory at rmdir path remove directory at remove path remove file atxmove lt srcpath gt lt dstpath gt copy move at startul srcpath prepare file to upload returned STARTUL at startdl dstpath filesize prepare fil atxget get base64 coded data chunk returned 1 subdirectory files from phone data lt filesize_in_bytes gt to download to phone data
139. 08 1 300 355 300 377 355 32 157 N 050752 300 00 50P 0c 00 08 00 1007 00 00 00 00 00 00 4f0 0c O P Os 00 08 300 355 300 333 366 366 366 00 51Q 0c 00 106 00 00 0503666 0 00 00 100 00 00 00 52R 0c 00 08 00 00 00 00 1 00 00 A ritus 00 00 53S 0c 00 5b 00 00 00 0d 00 00 00 00 59Y 14 S Ys 00 10 00 00 00 00 00 00 00 00 00 00 00 00 100 100 00 00 Sending frame Oxlb 0x0006 00 03 108 07 OL Iff 2p p 0 emm Received frame Oxlb 0x00ae 03 2b 08 08 00 09 48HI28 100 20 56V 20 300 344 2e 30 H V 04 0 344 0a 322 399 2d 311 300 2d 300 311 0a 4eN 48H 4dM 2d 37 4 29 10 01 NHM 7 0a 28 63c 29 20 4eN 4dM 50P 2e 00 00 00 00 00 49T 0c c NMP Ez 00 05 300 388 300 322 00 00 100 00 1 aT pe 00 05 00 00 0802 J 00 00 00 00 00 00 4bK 08 00 03 333 366 00 00 4cL 0c Ketas babs 00 04 1222128681288100 00 00 100 00 54T O0Oc 00 105 1200121 288 Tars OL 300 355 00 00 00 00 55U 10 00 0a 47G 344 2e 300 2d 34 05 U G4 0 4 2e 311 322 00 00 00 57W 10 00 08 53S 45E 49I 4bK 4f0 20 12 W SEIKO 300 00 00 00 00 00 58X 29 00 22 56V 20 300 344 2e 30 0 X V 04 0 344 0a 322 399 2d 311 300 2d 300 311 0a 4eN 48H 4dM 2d 37 4 29 10 01 NHM 7 0a 28 63c 29 20 4eN 4dM 50P 2e 0a 44D 00 00 00 LE NMP noD T Sending frame Oxlb 0x0008
140. 0e 0x01 71 s Get EEPROM Oxd4 0x02 0x00 0xa0 locationLo locationHi numofbytes where numofbytes how many bytes to read Note Works ONLY in MBUS r Get EEPROM Oxd4 0x02 0x00 0xa0 locationLo locationHi numofbytes contest where numofbytes how many bytes available contest bytes with contests if numofbytes 0 0x41 Snake game 0x47 S Get Picture Image 0x0001 location r Get Picture Image when contains sender number 0x0002 location number like in SMS 0x00 len text 0x00 width h NOTE Supports only 0x81 and 0x91 coding NOT alphanumeric numbers in sender without sender number 0x0002 location 0x00 0x00 0x00 len text 0x00 width height Ox S Set Picture Image 0x0003 frame where frame s 0x47 0x0002 r Get Set PictureImageOK 0x0004 r Set Picture Image err 0x0005 error wher rror 0x74 wrong location 0x64 S Phone ID request 0x0010 r Phone ID recvd 0x0011 NOKIA imei 0 model 0 prod code 0 HW 0 firm S Accessory connection 0x0012 16x0x00 NOKIA amp NOKIA accessory 3x0x00 45 bytes 0x7f Acknowledge FBUS IRDA type seq Acknowledge MBUS 0xdO0 S Power on message seql 04 r Power on message seql 05 Oxdl S Get HW amp SW version 0x0003 0x00 0xd2 r Get HW amp SW version 0x0003 V firmware n firmware daten model n c NMP Oxda during playing 2 player snake Oxf0 S Send RLP frame 0K00 U xd9 c f O
141. 0x03 Levell Level3 for number2 0x02 Incoming Call Alert block 0x01 0x01 0x01 Type 0x01 where Type 0x00 Ringing 0x01 Ascending 0x02 Ring Once 0x03 Beep Once 0x05 Off for number2 0x03 Ringtone Number block 0x01 0x01 0x01 Number 0x01 where Number 0x40 to 0x62 gives number of factory ri gtone The m obtained by doing Number 0x3f where Number 0x89 to 0x8d gives number of uploaded ringtone The obtained by doing Numb obtained by doing Numb for number2 0x04 Ringing volume block 0x01 0x 0x Volume 0x01 where Volume 0 Levell to 4 Le for number2 0x05 Message Alert Tone block 0x01 0x01 0x Type 0x01 where Type 0x00 Off 0x01 Standard 0x02 Special 0x03 Beep Once 0x04 Ascending for number2 0x06 Vibration blocks 0x01 Ox 7 0x77 Switch 0x01 where Switch 0 Off 1 On for number2 0x07 Warning Tones block 0x01 0x 0x Switch 0x01 where Switch 0 Off 1 On for number2 0x08 Caller groups Alert f block 0x01 0x 0x Callers 0x01 where Caller Oxff All calls alert 0x01 Family 0x02 VIP 0x04 Friends 0x08 Colleagues 0x10 Others 0x65 while t 0x88 er QE gt vel5 or Read below x he uploaded r 280 Chapter 13 Phone Protocols Gammu Manual Release OGAMMUyERSIONO All logical OR among groups are valid so if you se alert for Friends and Collegues a 0x0c will
142. 128 0701 3179 Status 0x07 0x01 1F0004 7F 3155 Ack from HFU 2 1F0400 78 0004 0128 0E01 3273 Status OxOE 0x01 1F0004 7F 3256 Ack from HFU 2 1F0400 78 0004 0128 0A00 3377 Status OxOA 0x00 1F0004 78 0003 2801 03 054F Status confirm from HFU 2 1F0400 7F 0561 Ack from phone 1F0400 78 0004 0128 0A00 3377 Status OxOA 0x00 1F0004 7F 33 57 Ack from HFU 2 1F0400 78 0004 0128 0901 3472 Status 0x09 0x01 1F0004 7F 3450 Ack from HFU 2 Connected 1F0400 78 0004 0128 0E01 3574 Status OxOE 0x01 1F0004 7F 3551 Ack from HFU 2 1F0400 78 0004 0128 0A01 3673 Status Ox0A 0x01 1F0004 78 0003 2801 03 064C Status confirm from HFU 2 1F0400 7F 0662 Ack from phone 1F0400 78 0004 0128 0A01 3673 Status Ox0A 0x01 1F0004 7F 3652 Ack from HFU 2 1F0400 78 0004 0128 0A00 3773 Status OxOA 0x00 1F0004 7F 3753 Ack from HFU 2 1F0400 78 0004 0128 0900 387F Status 0x09 0x00 13 7 Nokia 6210 6310 CARC91 PC Experiment 293 Gammu Manual Release GAMMU E HS TO N 0 1F0004 7F 385C Ack from HFU 2 1F 0400 78 0004 0128 0A01 397C Status Ox0A 0x01 1F 0004 7F 395D Ack from HFU 2 1F 0400 78 0004 0128 0901 3A7C Status 0x09 0x01 1F 0004 7F 3A5E Ack from HFU 2 Initiation with connected phone 1F0004 DO 0001 04 00CE Power up from HFU 2 1F0400 DO 0001 05 5996 Power up from phone 1F0004 79 0005 0201 0164 00 0100 Enable carkit mode from HFU 2 1F0400 7F 0165 Ack from phone 1F0004 79 0012 0201 0206 0056 2030 372E 3030 0448 4655 3200 0249 HFU 2 Version 1F0400
143. 141 GammuLoc 141 HangupCalls 185 HardResetFrequency 186 Host 188 197 218 InboxFormat 189 196 InboxPath 189 IncludeNumbersFile 187 190 IncludeSMSCFile 187 190 insert phone 199 LogFacility 184 LogFile 140 183 184 LogFormat 140 147 167 183 LoopSleep 176 185 200 MaxRetries 185 Model 140 MultipartTimeout 185 NetworkCode 184 OutboxFormat 190 OutboxPath 189 Password 188 197 PC 188 PhoneCode 184 PhoneID 186 192 221 222 PIN 184 Port 140 Receive 187 221 ReceiveFrequency 176 185 refresh_phone_status 202 refresh_send_status 200 ResetFrequency 176 186 RunOnFailure 187 RunOnReceive 186 187 193 195 218 RunOnSent 187 save_inbox_sms_insert 199 save inbox sms select 199 save inbox sms update 199 save inbox sms update delivered 199 Send 187 221 SendTimeout 185 SentSMSPath 189 Service 20 183 184 SkipSMSCNumber 188 SMSC 186 SQL 189 197 218 StartInfo 140 StatusFrequency 176 185 SynchronizeTime 140 160 TransmitFormat 190 update_received 199 update_sent 202 Use_Locking 140 User 188 197 configuration section exclude numbers 183 190 exclude smsc 183 190 gammu 137 180 183 190 include numbers 183 190 include smsc 183 190 smsd 183 sql 183 198 configure gammu worker GammuWorker method 55 Connection 24 25 315 Connections in module gammu data 54 convertbackup source file output file gammu command line opti
144. 163 nokiagetpbkfeatures memorytype gammu command line option 163 nokiagett9 gammu command line option 163 nokiagetvoicerecord location gammu command line option 163 nokiamakecamerashoot gammu command line option 163 nokianetmonitor test gammu command line option 163 nokianetmonitor36 gammu command line option 164 nokiasecuritycode gammu command line option 164 nokiaselftests gammu command line option 164 nokiasetlights keypadldisplayltorch onloff gammu command line option 164 nokiasetoperatorname networkcode name gammu command line option 164 nokiasetphonemenus gammu command line option 164 nokiasetvibralevel level gammu command line option 164 nokiatuneradio gammu command line option 164 nokiavibratest gammu command line option 164 Number 60 63 66 75 O OPERATOR file netcode netcode biglogo gammu command line option 153 OPERATOR file netcode gammu command line option 158 OPERATOR file gammu command line option 158 OutboxFormat 190 OutboxPath 189 P PartNumber 62 Password 197 Phonebook 67 PhoneID 192 221 222 PICTURE file text text unicode alcatelbmmi gammu command line option 153 PICTURE file location text gammu command line option 158 PICTURE location file gammu command line option 158 PictureType 73 playringtone file gammu command line option 159 playsavedringtone number gammu command line option 159 Pos 74 PressKey gammu StateMachi
145. 23 0 0 0 5 7 ORGW 253 253 OK parl to par24 has the same significance than in the AT ORGR command 13 9 4 Delete organizer entry Invocation AT ORGD number Delete organizer entry of index number Example AT ORGD 21 OK 13 9 SAMSUNG Organizer AT commands 301 Gammu Manual Release GAMMU ERSIONAO 13 9 5 Notes Read command use index reference Write command uses index and direct memory reference with special 65535 value to locate empty memory position Delete command use direct memory reference index are automatically reorganized Hint After create or delete an organizer entry reread full information to update index table 13 10 SAMSUNG GT calendar AT commands 13 10 1 Calendar Entries AT SSHT 1 selects the Organizer gt Calendar gt Appointment entries Spotkania in Polish version AT SSHT 2 selects the Organizer gt Calendar gt Anniversary entries Rocznice in Polish version AT SSHT 5 selects the Organizer gt Calendar gt Holiday entries Swieta in Polish version AT SSHT 6 selects the Organizer gt Calendar gt Important entries Wazne in Polish version AT SSHT 7 selects the Organizer gt Calendar gt Private entries Prywatne in Polish version After selection of type we can read all items AT SSHR 0 SSHR 5 5 testi 0 0 2010 5 12 2010 5 12 21 49 22 49 0 0 0 0 2010 5 30 SSHR 3 1 x 0 0 2010 6
146. 255 NOT NULL SequencePosition integer NOT NULL default 1 Pssion Unic Status enum SendingOK SendingOKNoReport SendingError DeliveryOK DeliveryFajled Delive StatusError integer NOT NULL default 1 TPMR integer NOT NULL default 1 RelativeValidity integer NOT NULL default 1 CreatorID text NOT NULL PRIMARY KEY ID SequencePosition ENGINE MyISAM DEFAULT CHARSET utf8mb4 CREATE INDEX sentitems date ON sentitems DeliveryDateTime CREATE INDEX sentitems tpmr ON sentitems TPMR CREATE INDEX sentitems dest ON sentitems DestinationNumber 206 Chapter 10 SMS Daemon Gammu Manual Release GAMMU ERSION CREATE INDEX sentit ms sender ON sentitems SenderID pumping data for table sentitems Triggers for setting default timestamps DELIMITER CREATE TRIGGER inbox timestamp BEFORE INSERT ON inbox FOR EACH ROW BEGIN IF NEW ReceivingDateTime END IF END SET NEW ReceivingDateTime 0000 00 00 00 00 00 THEN CURRENT TIMESTAMP CREATE TRIGGER outbox timestamp BEFORE INSERT ON outbox FOR EACH ROW BEGIN IF NEW InsertIntoDB SET NEW InsertIntoDB END IF IF NEW SendingDateTime END IF IF NEW SendingTimeOut END IF END 0000 00 00 00 00 00 SET NEW SendingDateTime 0000 00 00 00 00 00 SET NEW SendingTimeOut THEN CURRENT TIM
147. 32 for example 1250 will force CP1250 or UIFS in Linux utf8 Logfile Logformat P m Use when want to have logfile from communication 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 E prefix Please report correct values to Gammu authors l Use Locking I a di Ez I under Unix Linux use yes if want to lock used device to prevent using it by other applications In win32 ignored vim et ts 4 sw 4 sts 4 tw 78 spell spelllang en us 8 3 Examples 145 Gammu Manual Release GAMMU ERSIONO 146 Chapter 8 Gammu Configuration File CHAPTER 9 Gammu Utility 9 1 Synopsis gammu parameters lt command gt options Commands actually indicate which operation should Gammu perform They can be specified with or without leading 9 2 Description This program is a tool for mobile phones Many vendors and phones are supported for actual listing see Gammu Phones Database 9 2 1 Opti
148. 3B434841525345543D5554462D383B454E434F44494E4 OK 1 1 168 lt MEM POSITION gt lt EOF FLAG gt lt HEXLIFIED VCARD LEN gt Change operation mode to compatible 13 12 MTK AT Commands 305 Gammu Manual Release GAMMU ERSIONAO AT ESUO 4 OK 13 13 m obex protocol used by some Samsung mobiles This document is copied from lt http code google com p samsyncro wiki mobex gt and extended 13 13 1 Introduction This is an attempt to document the m obex protocol It is a obex variation by Samsung used to exchange PIM data and files over bluetooth This documentation is by no means complete but is only a reference for the samsyncro implementation As I don t know the obex protocol I can t say in which parts it differs from the standard obex The only thing I found strange is the fact that you will always get OxAO as a response Wich means Ok sucess in obex If there was an error you will find it s error code in the 0x42 header If this is a normal behavior Why are there so many response codes defined The information about the protocol was gained by listening to the transfered data from Samsungs New PC Studio to a SGH F480i and B2100 mobile 13 13 2 Requirements Established bluetooth connection to the serial channel of the mobile Some way to access this serial port For example minicom 13 13 3 Starting the obex server To start the obex server
149. 4 len len 153 long 153 maxsms num 151 newtime 156 overwrite 162 overwriteall 162 protected 152 156 read 151 readonly 156 replacefile file 154 replacemessages ID 154 reply 150 report 155 s section lt confign gt 147 save 155 scale 153 159 sender number 151 sent 151 smscnumber number 150 smscset number 150 smsname name 151 system 156 text 151 154 textutf8 154 tone10 152 tonelOlong 152 tone12 152 tone12long 152 toneSE 152 toneSElong 152 type 156 unicode 154 unicodefiletext 151 unread 151 unsent 151 validity HOURIGHOURSIDAYI3DAYSIWEEKIMAX 155 variablebitmap 152 variablebitmaplong 152 voidsms 154 addcategory TODOIPHONEBOOK text 160 addfile folderID name type JARIBMPIPNGIGIFIJPGIMIDIIWBMPIAMRI3GPINRT readonly protected system hidden newtime 156 addfolder parentfolderID name 156 addnew file yes memory MEISMI 160 addsms folder file yes 160 addsmsfolder name 150 ANIMATION frames filel file2 151 answercall 1d 147 APPLICATIONIGAME file readonly overwrite overwriteall 162 backup file yes 161 backupsms file yesl all 161 batch file 168 battery 166 BOOKMARK file location 151 BOOKMARK target url file location 162 CALENDAR file location 151 CALENDAR target ves file location 162 CALLER file 151 CALLER location file 158 cancelcall id 147 can
150. 5 TP Status Text text SMS text encoded using hex values DestinationNumber varchar 20 decoded destination number for SMS Coding enum Default No Compression Unicode No Compression 8bit Default Compression Unicode Compressio SMS text coding UDH text User Data Header encoded using hex values SMSCNumber varchar 20 decoded number of SMSC which sent SMS Class integer SMS class or 1 0 is normal SMS 1 is flash one TextDecoded varchar 160 SMS text in human readable form ID integer unsigned SMS ID SenderID text which SMSD instance sent this one sequence see PhoneID SequencePosition integer SMS number in SMS sequence TPMR integer Message Reference like in GSM specs RelativeValidity integer SMS relative validity like encoded using GSM specs CreatorID text copied from CreatorID from outbox table 222 Chapter 10 SMS Daemon Gammu Manual Release GAMMU ERSION pbk Not used by SMSD currently included only for application usage pbk groups Not used by SMSD currently included only for application usage History of database structure Note Testing versions see Versioning do not have to keep same table structure as final releases Bellow mentioned versions are for informational purposes only you should always use stable versions in production environment History of schema versions 14 Added Net Code and Net Name fields Changed in version 1 34 0 13 Add
151. 5 getphoneringtone location file 159 getprofile start stop 166 getringtone location file 159 getringtoneslist 159 getrootfolders 157 getsecuritystatus 166 getsms folder start stop 150 getsmsc start stop 150 getsmsfolders 150 getspeeddial start stop 156 getsyncmlsettings start stop 165 gettodo start stop 159 getussd code 148 getwapbookmark start stop 165 getwapsettings start stop 165 help topic 168 holdcall id 148 entersecuritycode PINIPUKIPIN2IPUK2IPHONEINETWORiSentify 166 codel newpinl 167 features 168 install minimal 168 listmemorycategory textInumber 160 GALLERYIGALLERY2 CAMERAITONESITONES2 RECORDSWIDECPNIAYLISEAMEMORYCARD file name name protected readonly system hidden newtime 162 getalarm start 160 getallcalendar 159 getallcategory TODOIPHONEBOOK 160 getallmemory DCIMCIRCIONIVMISMIMEIMTIFDISL 156 getallmms save 165 getallnotes 160 getallsms pbk 150 getalltodo 159 getbitmap TYPE type options 157 getcalendar start stop 159 getcalendarsettings 166 getcategory TODOIPHONEBOOK start stop 160 getchatsettings start stop 165 getdatetime 160 getdisplaystatus 166 geteachmms save 165 geteachsms pbk 150 getfilefolder fileID fileID 157 getfiles fileID fileID 157 getfilesystem flatalll flat 157 getfilesystemstatus 157 getfmstation start stop 166 getfolderlisting folderID 157 getgprspoint sta
152. 66 restore file yes 161 restoresms file yes 161 RINGTONE file long scale 153 savefile TYPE type options 161 savesms TYPE type parameters type options folder id unread read unsent sent sender number smsname name smscset number smscnumber number reply maxsms num 150 screenshot filename 168 searchmemory text 156 searchphone debug 168 senddtmf sequence 148 sendfile name 157 sendsms TYPE destination type parameters type options smscset number smscnumber number reply report validity HOURIGHOURSIDAYI3DAYSIWEEKIMAX save folder number 155 setalarm hour minute 160 setautonetworklogin 165 setbitmap TYPE type options 158 setdatetime HH MM SS YYYY MM DD 160 setfileattrib folderID system readonly hidden protected 157 setpower ONIOFF 168 setringtone file location location scale name name 159 setsmsc location number 155 siemensnetmonact netmon type 165 siemensnetmonitor test 165 siemenssatnetmon 165 SMSTEMPLATE unicode text text unicodefiletext file defsound ID defanimation ID tonelO file tone10long file tone12 file tonel2long file toneSE file toneSElong file variablebitmap file variablebitmaplong file animation frames filel 153 splitcall id 148 STARTUP filel11213 158 STARTUP file 158 switchcall id 148 TEXT 158 TEXT inputunico
153. 76 Chapter 13 Phone Protocols L L Gammu Manual Release GAMMU ERSION 0x01 for no operator logo following s get network status 0x0081 T r get network status 0x0082 network Ox14 s set operator logo 0x01a3 0x01 oplogo MCC MNC 3 0 4 len xlen 78 ylen 21 O frames bitmap 0x00 padding where len bitmap see 0x0a 0x0071 r set operator logo OK 0x01a4 s clear operator logo 0x00af x where x 0 to 4 r clear operator logo Ox00bf 0x13 Calendar notes S Add meeting note 0x0001 body like in subtype 0x00la r Add meeting note 0x0002 location 2 bytes status 2 bytes S Add call note 0x0003 body like in subtype 0x00la r Add call note 0x0004 location 2 bytes status 2 bytes S Add birthday note 0x0005 location 2 bytes entry type 0x00 year of birth 2 bytes Month Day 0x00 0x00 alarm 4 bytes alarm type length t r Add birthday note 0x0006 location 2 bytes status 2 bytes S Add reminder note 0x0007 body like in subtype 0x00la r Add reminder note 0x0008 location 2 bytes status 2 bytes S Delete calendar note 0x000b location 2 bytes r Delete calendar note 0x000c location 2 bytes S Get calendar note 0x0019 location 2 bytes r Calendar note recvd 0x001a location 2 bytes entry type 0x00 year 2 bytes Month D where entry typ 0x01 Me
154. 7F 0266 Ack from phone 1F0400 78 0004 0128 0E01 5A1B Status OxOE 0x01 1F0004 79 0005 0201 0164 00 0302 Enable carkit mode from HFU 2 1F0400 7F 0367 Ack from phone 1F0400 78 0004 0128 0E01 5A1B Status OxOE 0x01 1F0004 7F 5A3E Ack from HFU 2 1F0400 78 0004 0128 0A01 5B1E Status Ox0A 0x01 1F0004 7F 5B3F Ack from HFU 2 1F0400 78 0004 0128 0901 5C1A Status 0x09 0x01 1F0004 7F 5C38 Ack from HFU 2 1F0400 78 0004 0128 0701 5D15 Status 0x07 0x01 1F0004 7F 5D39 Ack from HFU 2 1F0004 78 0003 2801 0305 4F Status confirm from HFU 2 1F0400 7F 0561 Ack from phone 1F0400 DA 0004 0028 0000 5EB3 1F0004 7F 5E3A Ack from HFU 2 Disconnected 1F0400 78 0004 0128 0E01 3B7A Status OxOE 0x01 1F0004 7F 3B5F Ack from HFU 2 1F0400 78 0004 0128 0A00 3C78 Status OxOA 0x00 1F0004 78 0003 2801 03 074D Status confirm from HFU 2 1F0400 7F 0763 Ack from phone 1F0400 78 0004 0128 0A00 3C78 Status OxOA 0x00 294 Chapter 13 Phone Protocols Gammu Manual Release GAMMU ERSION 1F0004 7F 3C58 Ack from HFU 2 1F0400 78 0004 0128 0700 3D74 Status 0x07 0x00 1F0004 7F 3D59 Ack from HFU 2 1F0400 78 0004 0128 0E00 3E7E Status OxOE 0x00 1F0004 7F 3ESA Ack from HFU 2 1F0004 78 0003 2801 0308 42 Status confirm from HFU 2 1F0400 7F 086C Ack from phone Incoming SMS 1F0400 78 0004 0128 0E01 6627 Status OxOE 0x01 1F0004 7F 6602 Ack from HFU 2 1F0004 78 0003 2801 03 064C Status confirm from HFU 2 1F0400 7F 0662 Ack from phone 1F0400 78 0
155. 8 0004 0102 0E03 1F76 Status OxOE 0x03 from phone 1F0400 78 0004 0102 0701 2042 Status 0x07 0x01 from phone 1F0004 78 0003 0201 03 0464 Status confirm from PC 1F0400 7F 0460 Ack from phone Disconnected 1F04 0078 0004 0102 0700 2142 Status 0x07 0x00 Incoming SMS FCF0 FO0F0 FOFO FOFO FOFO FOFO FOFO FOFO FOFO FOFO FOFO FOFO FOFO FOFO FOFO FOFO FOFO FOFO FOFO FOFO FOFO FOF Initiation of bit length from phone 1F0400 78 0004 0102 0E03 254C Status OxOE 0x03 from phone FOFOFOFO Initiation of bit length from phone Phone connected to CARC91 Initiation 1F0004 DO 0001 04 00CE Power up from HFU 2 1F0400 DO 0001 05 02CD Power up from phone 1F0004 79 0005 0201 0164 00 0100 Enable carkit mode from HFU 2 13 7 Nokia 6210 6310 CARC91 PC Experiment 287 Gammu Manual Release GAMMU E HS TO N 0 1F0400 7F 0165 Ack from phone 1F 0004 79 0012 0201 0206 0056 2030 372E 3030 0A48 4655 3200 0249 HFU 2 Version 1F 0400 7F 0266 Ack from phone 1F 0400 78 0004 0102 0801 036E Status 0x08 0x01 1F0004 79 0005 0201 0164 00 0302 Enable carkit mode from HFU 2 1F0400 7F 0367 Ack from phone 1F 0400 78 0004 0102 0801 036E Status 0x08 0x01 1F 0004 7F 0367 Ack from HFU 2 1F0400 DA 0002 0002 04C5 Status type gt OxDA data gt 0x00 0x02 1F 0004 7F 0460 Ack from HFU 2 1F 0400 78 0004 0102 0E03 056C Status OxOE 0x03 1F 0004 7F 0561 Ack from HFU 2 1F 0004 78 0003 0201 03 0464 Status confirm from HFU 2 1F0400 7F 0460 Ack from phone 1F 0400
156. APbookmark err 0x02 29 0x000F 23 0x0010 0x00 Get WAP settings 1 0x0015 where loca Get WAP settings 1 OK 0x0016 where con_type location tion 0x00 0x05 title length title Unicode 0x00 temporary 0x01 continuous location when use Get WAP settings 2 frame must give it Plect from one l because Ox h in this ca files only URL length URL Unicode con Lv 13 6 Nokia 7110 281 Gammu Manual Release GAMMU ERSIONO security 0x00 no 0x01 yes r Get WAP settings 1 erri 0x0017 error where error 0x01 user inside Settings menu Must leave it 0x02 invalid too high empty location S Get WAP settings 2 0x001b location where location 0x00 Oxld you get it in Get WAP settings r Get WAP settings 2 OK 0x001c 0x01 type frame where type 0x00 SMS bearer frame Service num len service num Unicode ser 0x01 data bearer frame auth call type call speed IP len IP user len user Unicode password len pag where auth 0x00 normal 0x01 secure call type 0x00 analogue 0x01 I call speed 0x00 9600 0x01 14400 0x02 USSD bearer fram type service number len IP len service num Unicode IP Service code Unicode where type 0x01 Service number 0x00 IP r Get WAP settings 2 err 0x001d error where error 0x0 0x40 Security commands s N6150 0x08 0x00 r N6150 0x08 s Enable exten
157. BI driver is currently not supported on Windows because libdbi library does not support this platform Configuration Before running gammu smsd you need to create necessary tables in the database You can use examples given in database specific backends parts of this manual to do that The configuration file then can look like smsd service sql driver DBI_DRIVER host localhost See also SMSD Configuration File Supported drivers For complete list of drivers for libdbi see libdbi drivers project The drivers for example include e sqlite3 for SQLite 3 mysql for MySQL e pgsql for PostgeSQL freetds for MS SQL Server or Sybase 214 Chapter 10 SMS Daemon Gammu Manual Release GAMMU ERSION Creating tables SQL script for creating tables in SQLite database CREATE TABLE daemons Start TEXT NOT NULL Info TEXT NOT NULL CREATE TABLE gammu Version INTEGER NOT NULL DEFAULT 0 i INSERT INTO gammu Version VALUES 14 CREATE TABLE inbox UpdatedInDB NUMERIC NOT NULL DEFAULT datetime now ReceivingDateTime NUMERIC NOT NULL DEFAULT datetime now Text TEXT NOT NULL SenderNumber TEXT NOT NULL DEFAULT Coding TEXT NOT NULL DEFAULT Default_No_Compression UDH TEXT NOT NULL SMSCNumber TEXT NOT NULL DEFAULT Class INTEGER NOT NULL DEFAULT 1 TextDecoded TEXT NOT NULL DEFAULT ID INTEGER PRIMARY KEY AUTOINCREMENT Recipie
158. Backend drivers supported by DBI for DBI Backend which include sqlite3 for SQLite 3 mysql for MySQL pgsql for PostgeSQL freetds for MS SQL Server or Sybase SQL connection parameters Common for all backends User user connecting to database Password password for connecting to database Host database host or data source name Database database name Driver native mysql native pgsql odbc or DBI one SQL SQL dialect to use Specific for DBI e DriversPath path to DBI drivers e DBDir sqlite sqlite3 directory with database See also The variables are fully described in Gammu Configuration File documentation 10 6 Backend services 197 Gammu Manual Release GAMMU ERSIONAO SQL Queries Almost all queries are configurable You can edit them in sq1 section There are several variables used in SQL queries We can separate them into three groups phone specific which can be used in every query see Phone Specific Parameters SMS specific which can be used in queries which works with SMS messages see SMS Specific Parameters query specific which are numeric and are specific only for given query or set of queries see Configurable queries Phone Specific Parameters 1 IMEI of phone P PHONE ID hostname SN client name eg Gammu 1 12 3 O network code M network name SMS Specific Parameters SR remote number C delivery datetime e delivery status on
159. C on other platforms unixODBC can be used Limitations Due to limits of the ODBC interface you might have to tweak SQL queries to work in used SQL server see SOL Queries for more details Partially this can be configured using SOL Configuration Before running gammu smsd you need to create necessary tables in the database You can use examples given in database specific backends parts of this manual to do that You specify data source name DSN as Host in SMSD Configuration File The data source is configured depending on your platform On Microsoft Windows you can find instructions on Microsoft website http support microsoft com kb 305599 For unixODBC this is documented in the user manual http www unixodbc org doc UserManual Example Example configuration smsd service sql driver odbc host dsn_of_your_database sql sql_variant_to_use user username password password See also SMSD Configuration File 10 6 7 Null Backend Description NULL backend does not store data at all It could be useful in case you don t want to store messages at all and you want to process then in RunOnRece ive handler 218 Chapter 10 SMS Daemon Gammu Manual Release OGAMMUyERSIONO Configuration The configuration file then can look like smsd Service null RunOnReceive usr local bin process sms See also SMSD Configuration File 10 6 8 SMSD Database Structure The ba
160. Carkits to switch the phone audio path to XMiC and XEAR turn the phone on off according to the car ignition and control the PA loudspeaker amplifier in the carkit and the car radio mute output which silences the car radio during a call mute status tone 1F 04 00 78 00 04 01 02 OE 00 SQ CS status indication disable carkit audio amplifier no audio no tone mute status tone 1F 04 00 78 00 04 01 02 OE 03 SQ CS status indication enable carkit audio amplifier audio tone present mute status call 1F 04 00 78 00 04 01 02 07 00 SQ CS status indication disable radio mute output no call mute status call 1F 04 00 78 00 04 01 02 07 01 SQ CS status indication enable radio mute output call active enable 1F 04 00 78 00 04 01 02 08 01 SQ CS status indication enable sent to HFU 2 on power on byte 9 07 08 0E seems to be a pointer to a memory location byte 10 is the data at this memeory location response from HFU 1F 00 04 78 00 03 02 01 03 SQ CS response message from HFU 2 use unknown go HF and IGN on 1F 00 04 79 00 05 02 01 01 63 00 SQ CS enables carkit mode turns phone on req mute status go HF and IGN off 1F 00 04 79 00 05 02 01 01 61 00 SQ CS enables carkit mode powers phone off 1 min delay req mute status ext HS Offhk 1F 00 04 79 00 05 02 01 01 23 00 SQ CS enables carkit mode external handset lifted OFF Hook ext HS Onhk 1F 00 04 79 00 05 02 01 01 63 00 SQ CS enables carkit mode externa
161. Coding IN Default No Compression Unicode No Compression 8bit Default Compression Unic de Compressi PRIMARY KEY ID SequencePosition CREATE INDEX sentitems date ON sentitems DeliveryDateTime CREATE INDEX sentitems tpmr ON sentitems TPMR CREATE INDEX sentitems dest ON sentitems DestinationNumber CREATE INDEX sentitems sender ON sentitems SenderID Dumping data for table sentitems Create trigger for table sentitems 10 6 Backend services 213 Gammu Manual Release GAMMU E RSION CREATE TRIGGER update timestamp BEFORE UPDATE ON sentitems FOR EACH ROW EXECUTE PROCEDURE update_time Note You can find the script in docs sql pgsql sql as well Upgrading tables The easiest way to upgrade database structure is to backup old one and start with creating new one based on example above For upgrading existing database you can use changes described in History of database structure and then manually update Version field in gammu table 10 6 5 DBI Backend Description DBI backend stores all data in any database supported by libdbi which parameters are defined by configuration see SMSD Configuration File for description of configuration options For tables description see MSD Database Structure This backend is based on SQL Service Note The D
162. D text NOT NULL UpdatedInDB timestamp NOT NULL default CURRENT TIMESTAMP on update CURRENT TIMESTAMB InsertIntoDB timestamp NOT NULL default 0000 00 00 00 00 00 TimeOut timestamp NOT NULL default 0000 00 00 00 00 00 Send enum yes no NOT NULL default no Receive enum yes no NOT NULL default no IMEI varchar 35 NOT NULL Net Code varchar 10 default ERROR NetName varchar 35 default ERROR Client text NOT NULL Battery integer NOT NULL DEFAULT 1 Signal integer NOT NULL DEFAULT 1 Sent int NOT NULL DEFAULT 0 Received int NOT NULL DEFAULT 0 PRIMARY KEY IMEI ENGINE MyISAM DEFAULT CHARSET utf8mb4 Dumping data for table phones Table structure for table sentitems CREATE TABLE sentitems UpdatedInDB timestamp NOT NULL default CURRENT TIMESTAMP on update CURRENT TIMESTAMB InsertIntoDB timestamp NOT NULL default 0000 00 00 00 00 00 SendingDateTime timestamp NOT NULL default 0000 00 00 00 00 00 DeliveryDateTime timestamp NULL Text text NOT NULL DestinationNumber varchar 20 NOT NULL default Coding enum Default No Compression Unicode No Compression 8bit Default Comprd UDH text NOT NULL SMSCNumber varchar 20 NOT NULL default Class integer NOT NULL default 1 TextDecoded text NOT NULL default ID integer unsigned NOT NULL default 0 SenderID varchar
163. Down gG Green rR Red 123456789x04 numeric keyboard reset SOFT HARD Make phone reset SOFT without asking for PIN HARD with asking for PIN 9 2 Description 167 Gammu Manual Release GAMMU ERSIONAO Note Some phones will ask for PIN even with SOFT option Warning Some phones will reset user data on HARD reset setpower ON OFF New in version 1 33 90 Turns off or on the phone Note This is usually required for built in modules in notebooks screenshot filename Captures phone screenshot and saves it as filename The extension is automatically appended to filename based on what data phone provides 9 2 24 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 a comments By default commands are read from standard input but you can optionally specify a file from where they would be read special case means standard input 9 2 25 Configuration commands searchphone debug Attempts to search for a connected phone Warning Please note that this can take a very long time but in case you have no clue how to configure phone connection this is a convenient way to find working setup for Gammu install minimal Installs applet for currently configured connection to the phone You can configure search path for instllation files by DataPath The minimal parameter forces ins
164. EDTRRTSERROR Verbose error description Error setting device DTR or RTS exception gammu ERR DEVICELOCKED Exception corresponding to gammu error ERR DEVICELOCKED Verbose error description Error opening device it is locked 56 Chapter 4 python gammu Gammu Manual Release GAMMU ERSION exception gammu ERR DEVICENODRIVER Exception corresponding to gammu error ERR DEVICENODRIVER Verbose error description Error opening device No required driver in operating system exception gammu ERR DEVICENOPERMISSION Exception corresponding to gammu error ERR DEVICENOPERMISSION Verbose error description Error opening device you don t have permissions exception gammu ERR DEVICENOTEXIST Exception corresponding to gammu error ERR DEVICENOTEXIST Verbose error description Error opening device it doesn t exist exception gammu ERR DEVICENOTWORK Exception corresponding to gammu error ERR DEVICENOTWORK Verbose error description Error opening device Some hardware not connected wrongly configured exception gammu ERR DEVICEOPENERROR Exception corresponding to gammu error ERR DEVICEOPENERROR Verbose error description Error open ing device Unknown busy or no permissions exception gammu ERR DEVICEPARITYERROR Exception corresponding to gammu error ERR DEVICEPARITYERROR Verbose error description Can t set parity on the device exception gammu ERR DEVICEREADERROR Exception corresponding to gammu error ERR DEVICEREADER
165. ESTAMP 0000 00 00 00 00 00 THEN CURRENT TIMESTAMP THEN CURRENT TIMESTAMP CREATE TRIGGER phones timestamp BEFORE INSERT ON phones FOR EACH ROW BEGIN IF NEW InsertIntoDB SET NEW InsertIntoDB END IF IF NEW TimeOut SET NEW TimeOut END IF END 0000 00 00 00 00 00 O000 00 00 00300700 CURRENT_TIMESTAMP THEN CURRENT_TIMESTAMP THEN CREATE TRIGGER sentitems_timestamp BEFORE INSERT ON sentitems FOR EACH ROW BEGIN IF NEW InsertIntoDB SET NEW InsertIntoDB END IF IF NEW SendingDateTime END IF E ND ITER 0000 00 00 00 00 00 SET NEW SendingDateTime THEN CURRENT TIMESTAMP 0000 00 00 00 00 00 THEN CURRENT TIMESTAMP 10 6 Backend services 207 Gammu Manual Release GAMMU E HS TO N 0 Note You can find the script in docs sq1 mysql sql as well Upgrading tables The easiest way to upgrade database structure is to backup old one and start with creating new one based on example above For upgrading existing database you can use changes described in History of database structure and then manually update Version field in gammu table 10 6 4 PostgreSQL Backend Description PGSQL backend stores all data in a PostgreSQL database server which parameters are defined by configuration see SMSD Configuration File for description of configuration options For tables description
166. F0400 7F 0561 Ack from phone 1F0400 78 0004 0128 0A00 7C38 Status OxOA 0x00 1F0004 7F 7C18 Ack from HFU 2 1F0400 78 0004 0128 0700 7D34 Status 0x07 0x00 1F0004 7F 7D19 Ack from HFU 2 1F0400 78 0004 0128 0E00 7E3E Status OxOE 0x00 1F0004 7F 7E1A Ack from HFU 2 1F0004 78 0003 2801 03 064C Status confirm from HFU 2 1F0400 7F 0662 Ack from phone Disconnected No response Probably because phone has lost the profile handsfree Incoming SMS 1F0400 78 0004 0128 0E01 0849 Status OxOE 0x01 1F0400 78 0004 0128 0A00 094D Status OxOA 0x00 1F0400 78 0004 0128 0901 0A4C Status 0x09 0x01 Phone connected to CARC91 Initiation 1F0004 DO 0001 04 00CE Power up from HFU 2 1F0400 DO 0001 05 2DE2 Power up from phone 1F0004 79 0005 0201 0164 00 0100 Enable carkit mode from HFU 2 1F0400 7F 0165 Ack from phone 1F0004 79 0012 0201 0206 0056 2030 372E 3030 0A48 4655 3200 0249 HFU version from HFU 2 292 Chapter 13 Phone Protocols Gammu Manual Release GAMMU ERSION 1F0400 7F 0266 Ack from phone 1F0004 79 0005 0201 0164 00 0302 Enable carkit mode from HFU 2 1F0400 7F 0367 Ack from phone 1F0400 78 0004 0128 0E00 2EGE Status OxOE 0x00 1F0004 7F 2E4A Ack from HFU 2 1F0004 78 0003 2801 03 044E Status confirm from HFU 2 1F0400 7F 0460 Ack from phone 1F0400 DA 0004 0028 0000 2FC2 1F0004 7F 2F4B Ack from HFU 2 Incoming call 1F0400 78 0004 0128 0701 3078 Status 0x07 0x01 1F0004 7F 3054 Ack from HFU 2 1F0400 78 0004 0
167. FAQ uoc ok Room bebo t kom Ve bea eee eee 26 ES MUI oo cc a bb daa god de as de a bird de le ie id oo as A a 27 35 Python sammu FAQ sece a 2 la a Bee a e a RA Y 27 python gammu 29 4 Atasteof python gamm iuo x e R deve E R o dede vor eo os SEEPS eo 29 42 JAPLdocument4ton xem x xo oes v EUR nud Boe dete ew OS UPS Gaya a oe BUR ees 32 libGammu 77 3 1 Hints for hbGammu NOVICES 2 deo n Rok A Roe wa eee Rom m o 9 RE 77 3 2 Examples 52 504 4 et a Ne e A A p d s x des ue ede RC a ee pe 80 3 9 JAhbGammuC APL 24 om ono oe a ox Oo os Voce A n e we e e s Y 93 54 Porting from libGammuoldertban 1 12 0 5 v 2s 6G eae rd REY PEERS 122 Gammu internals 125 6 1 Reply functionS oos a E oe eee aa SIN UNDE Sx Oe So ERE EU Se 125 10 11 12 13 14 6 2 state Machine s eea mor ado e Shee BS ect ow a ks He go RE ms Rs aes di URL Base 6 3 Adding support for new phone oss ok ae ohm m wo kon RR hoy d RR oS PR s File formats used by Gammu T INLfleformat 42 08 3 9 A ee Re Bye o da SR SOS EAT EU de ly e RA IR Is 7 2 SMS Backup Format os aa RR Re A a a ae UE Pe pus 72 Backup Format 405 024 064 208 ok Romo Peek Baa we RAY EG pon DOE a ee Gammu Configuration File Sol SYNOPSIS sates Sak e Ne a ek E A ae a BoE ao TT 8 2 lDesenptol uec ei Ea S wehbe bab des e eek ee Sete bbe d 8 3 JBxampl s 4 4 bie eh SAAR mU RN ES ENE REED SESS SAS ER eA ERAS Gammu Utility LANE VU NOME 9 2 lDescnptionm oo Rogo ho Rm Rok Roo A eae ERR
168. Gammu Configuration File Example configuration on Linux gammu device dev ttyACM3 connection at Example configuration on Windows gammu device COM12 connection at 3 2 2 How to configure Symbian based phone The only support for Symbian phones is using applet installed to phone and Bluetooth connection You should use blues60 Connection and Bluetooth address of phone as Device On older Symbian phones you will have to use gnapplet and bluerfgnapbus connection 24 Chapter 3 Frequently Asked Questions Gammu Manual Release GAMMU ERSION See also Series60 Remote Protocol Gammu Configuration File Note Do not forget to start the applet before trying to connect to the phone Example configuration gammu device 11 22 33 44 55 66 Bluetooth address of your phone connection blues60 3 2 3 How to configure Nokia phone If you have Series 40 S40 phone it should work using either Bluetooth or USB cable For Bluetooth connection bluephonet Connection is always the right choice with Bluetooth address of phone as Device For USB cable choosing the right connection type is more tricky and depends on generation of your phone Newest phones usually work with dku2 and the older ones with d1r3 as Connection Should you have old phone with serial cable and USB to serial converter fous Connect ionis the right one See also Gammu Configuration File Examp
169. Gammu Manual Release GAMMU ERSIONA Michal Cihaf lt michal cihar com gt October 12 2015 Contents Gammu project 1 IE About Gamm 2 0 6 24 dd a Ro e edd 4 ee SD Mos E ded 1 1 2 Motivationte fork Gnokii ses ecse ex 3 ke e ADS ROE AE RE OE A AR pus 1 132 Installing GAMMA ADA ge hAc ba eh ee ke ek ee 4 ES 2 14 Contnbubilip ios n Salk lee eG Bae RE RRR Re SRDS BAe SE De 10 15 Localization 2 32 ieee eb ox eA hee bc 3 A X eee ee Pewee 11 I NDA iy ap Be IA Be iy Be Bead Peele Gib tb edhe te cae ow 12 17 Coding Style uxo oe a al eee Ee xS a ee ew SS Y 12 8 WersiOBIDB uuum R ROT ox Boek ee wha ac on AGS Ra BA Bae a A 13 1 9 Project Documentation s s Pado ee ea XU RUE VRRP AE deum ow op ced d Re Ee eee 13 1 10 DuectoryStructute i ue 2 3 x e Z endete a dte eee us 14 1 11 Roadmap fot Gamm armes m e a ROS RUND ee GE REOR SR ER Re E X ED eS 17 Quick starter guide 19 2 Gammudfamily se es logon 584262445 Oe dae PRA DE wae eee oe a RE dene 19 22 Instalhng Ganmumu i uc eg ae eoe Ro A A RR Ge SO OS Heus Bow i 19 2 3 Starting with Gammu on Linux ss so Te E Rom v Rr m9 ORT ae RO S 19 2 4 Starting with Gammu on Windows s s es ce saoe ees 20 2 5 Stattme with SMSD o oe paseka Eon bee bob bbe a wor E wa Eon es ee bee eo 20 Frequently Asked Questions 23 34 General Gammu FAQ e aox 6 2244 Sexe mme 9m eee Xo RU eee a be eta Wo wae eS 23 3 2 Configuring Gammu FAQ uum RR eR ERR Dae RE AG Sake REA EUR Re 24 3 3 Phone Support
170. H text NOT NULL SMSCNumber varchar 20 NOT NULL default Class integer NOT NULL default 1 TextDecoded text NOT NULL default ID integer unsigned NOT NULL auto increment RecipientID text NOT NULL Processed enum false true NOT NULL default false PRIMARY KEY ID ID ENGINE MyISAM DEFAULT CHARSET utf8mb4 AUTO INCREMENT Dumping data for table inbox Table structure for table outbox CREATE TABLE outbox UpdatedInDB timestamp NOT NULL default CURRENT TIMESTAMP on update CURRENT TIMESTAMPB InsertIntoDB timestamp NOT NULL default 0000 00 00 00 00 00 SendingDateTime timestamp NOT NULL default 0000 00 00 00 00 00 SendBefore time NOT NULL DEFAULT 23 59 59 SendAfter time NOT NULL DEFAULT 00 00 00 Text text DestinationNumber varchar 20 NOT NULL default Coding enum Default No Compression Unicode No Compression 8bit Default Compre ssion Unic UDH text Class integer default 1 TextDecoded text NOT NULL default ID integer unsigned NOT NULL auto increment MultiPart enum false true default false RelativeValidity integer default 1 SenderID varchar 255 SendingTimeOut timestamp NULL default 0000 00 00 00 00 00 DeliveryReport enum default yes no default default CreatorID text NOT NULL PRIMARY KEY ID 1D ENGINE MyISAM DEFAULT CHARSET utf8mb4 CREATE INDEX outbox date ON outb
171. If you need want to tweak build a bit more than configure wrapper provides you have to use CMake directly For now only out of source build is supported so you have to create separate directory for build mkdir build cd build Then just configure project 1 3 Installing Gammu 5 Gammu Manual Release GAMMU ERSIONAO cmake Build it make Test that everything is okay make test And finally install it sudo make install You can configure build parameters either by command line see parameters bellow or using TUI ccmake Useful cmake parameters I DBUILD SHARED LIBS ON enables shared library DCMAKE BUILD TYPE Debug enables debug build DCMAKE INSTALL PREFIX usr change installation prefix I e DENABLE PROTECTION OFF disables various compile time protections against buffer overflows and simi lar attacks You can also disable support for whole set of phones e g e DWITH NOKIA SUPPORT OFF disables Nokia phones support e DWITH BLUETOOTH OFF disables Bluetooth support e DWITH IRDA OFF disables IrDA support Library search paths By installing Gammu to non default system paths you might need to add path where libGammu and other Gammu liraries are installed to ldconfig search path You can do this by editing etc 1d so conf or adding new file to etc 1d so conf d directory containing path wh
172. M StateMachine s GSM Error error char buffer 100 Function to handle errors x void error handler void if error ERR_NONE printf ERROR s n GSM ErrorString error if GSM_IsConnected s GSM_TerminateConnection s exit error int main int argc char xargv GSM Debug Info debug info 5 2 Examples 91 Gammu Manual Release GAMMU ERSIONO GSM Config x cfg if argc 4 printf Usage custom config DEVICE CONNECTION MODEL n We don t need gettext but need to set locales so that Charset conversion works GSM_InitLocales NULL Enable global debugging to stderr x debug info GSM GetGlobalDebug GSM SetDebugFileDescriptor stderr FALSE debug info GSM SetDebugLevel textall debug info Allocates state machine x S GSM AllocStateMachine if s NULL return 3 x Enable state machine debugging to same config as global one debug info GSM GetDebug s GSM SetDebugGlobal TRUE debug info x Get pointer to config structure cfg GSM GetConfig s 0 x Set configuration first freeing old values free cfg gt Device cfg gt Device strdup argv 1 free cfg gt Connection cfg gt Connection strdup argv 2 For historical reasons this is not a pointer strcpy cfg gt Model argv 3 We have one valid configuration GSM_SetConfigNu
173. MEMORY 58 gammu ERR_NEEDANOTHERANSWER 58 gammu ERR_NETWORK_ERROR 58 gammu ERR_NONE 58 gammu ERR_NONE_SECTION 58 gammu ERR_NOSERVICE 58 gammu ERR_NOSIM 58 gammu ERR_NOTCONNECTED 59 gammu ERR_NOTIMPLEMENTED 59 gammu ERR_NOTRUNNING 59 gammu ERR_NOTSUPPORTED 59 gammu ERR_OTHERCONNECTIONREQUIRED 59 gammu ERR_PERMISSION 59 gammu ERR_PHONE_INTERNAL 59 gammu ERR_PHONEOFF 59 gammu ERR_READ_ONLY 59 gammu ERR_SECURITYERROR 59 gammu ERR_SHOULDBEFILE 59 gammu ERR_SHOULDBEFOLDER 59 gammu ERR_SOURCENOTAVAILABLE 59 gammu ERR_SPECIFYCHANNEL 59 gammu ERR_TIMEOUT 59 gammu ERR_UNCONFIGURED 59 gammu ERR_UNKNOWN 60 gammu ERR_UNKNOWNCONNECTIONTYPESTRING 60 gammu ERR_UNKNOWNFRAME 60 gammu ERR UNKNOWNMODELSTRING 60 gammu ERR_UNKNOWNRESPONSE 60 gammu ERR USING DEFAULTS 60 gammu ERR_WORKINPROGRESS 60 gammu ERR WRITING FILE 60 gammu ERR WRONGCRC 60 gammu ERR WRONGFOLDER 60 gammu exception module 56 gammu GSMError 56 gammu smsd module 52 gammu worker module 54 GammuCommand class in gammu worker 54 GammuTask class in gammu worker 54 GammuThread class in gammu worker 54 GammuWorker class in gammu worker 55 get_command gammu worker GammuCommand method 54 get_name gammu worker GammuTask method 54 get_next gammu worker GammuTask method 54 get_params gammu worker GammuCommand method 54 Index 329 Gammu Manual Release GAMMU ERSIONAO get_percentage method 54
174. Must leave it 0x02 invalid too high empty location S Set WAP bookmark 0x0009 Oxff Oxff name len name unicode url len url unicode 0x01 0x80 0x00 7 Note bookmark is added to the first free location r Set WAP bookmark OK 40x01 0x36 Ox0a block where block OxO0a location of just written bookmark 0x00 next free location r Set WAP bookmark err 0x01 0x36 0x0b error where error 0x04 memory is full 0x01 we are in the bookmark menu 0x00 unknown reason for now S Delete WAP bookmark 0x000c 0x00 location where location 0 14 r Delete WAR bookmark OK 0x000d r Delete WAPbookmark err 0x000e 0x02 s 77 0x000F r 0x0010 0x00 s Get WAP settings 1 0x0015 location where location 0x00 0x05 r Get WAP settings 1 OK 0x0016 title length title Unicode URL length URL Uni where con type 0x00 temporary 0x01 continuous location when use Get WAP settings 2 frame must give 1 security 0x00 no 0x01 yes r Get WAP settings 1 erri 0x0017 error where error 0x01 user inside Settings menu Must leave it 0x02 invalid too high empty location S Get WAP settings 2 0x001b location where location 0x00 Oxld you get it in Get WAP settingg r Get WAP settings 2 OK 0x001c 0x01 type frame where type 0x00 SMS bearer frame Service num len service num Unicode sert 0x01 data bearer frame auth call type call speed IP len IP user len user Unicod
175. N gammu getfilesystem Will get list of all files including names of files with playlists gammu deletefiles a predefplaylist filename m3u Will delete playlist filename m3u Format of m3u playlist is easy standard mp3 playlist First line is EXTM3U next lines contain names of files D filel mp3 b folder1 file2 mp3 etc File needs t have r n terminated lines So just run unix2dos on the resulting file before uploading it your your phone nokiacomposer file Show how to enter RTTL ringtone in composer existing in many Nokia phones and how should it look like nokiadebug filename v11 22 v33 44 nokiadisplayoutput nokiadisplaytest number nokiagetadc nokiagetoperatorname 6110 c phones have place for name for one GSM network of course with flashing it s possible to change all names but Gammu is not flasher You can get this name using this option nokiagetpbkfeatures memorytype nokiagett9 This option should display T9 dictionary content from DCT4 phones nokiagetvoicerecord location Get voice record from location and save to WAV file File is coded using GSM 6 10 codec available for example in win32 Name of file is like name of voice record in 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
176. N2 PUK2 Phone e Code string Code value s NewPIN string New PIN value in case entering PUK Returns None Return type None GetAlarm Location Reads alarm set in phone Parameters Location int Which alarm to read Many phone support only one alarm Default is 1 36 Chapter 4 python gammu Gammu Manual Release OGAMMUyERSIONO Returns Alarm dict Return type dict GetBatteryCharge Gets information about battery charge and phone charging state Returns Dictionary containing information about battery state BatteryPercent and ChargeState Return type dict GetCalendar Location Retrieves calendar entry Parameters Location int Calendar entry to read Returns Dictionary with calendar values see Calendar Object Return type dict GetCalendarStatus Retrieves calendar status number of used entries Returns Dictionary with calendar status Used Return type dict GetCallDivert Divert AllTypes Type All New in version 1 31 90 Gets call diverts Parameters Divert Divert Type When to do the divert Type Call Type What call types to divert Returns List of call diverts Return type Call Divert Objects GetCategory Type Location Reads category from phone Parameters Type string Type of category to read one of ToDo Phonebook e Location int Location of category to read Returns Category name as string Return type string GetCategoryStatu
177. NOT NULL DEFAULT ID serial PRIMARY KEY RecipientID text NOT NULL Processed boolean NOT NULL DEFAULT false CHECK Coding IN Default No Compression Unicode No Compression 8bit Default Compression Unicqdq Dumping data for table inbox Create trigger for table inbox CREATE TRIGGER update timestamp BEFORE UPDATE ON inbox FOR EACH ROW EXECUTE PROCEDURE u Table structure for table outbox CREATE TABLE outbox UpdatedInDB timestamp 0 WITHOUT time zone NOT NULL DEFAULT LOCALTIMESTAMP 0 InsertIntoDB timestamp 0 WITHOUT time zone NOT NULL DEFAULT LOCALTIMESTAMP 0 SendingDateTime timestamp NOT NULL DEFAULT LOCALTIMESTAMP 0 SendBefore time NOT NULL DEFAULT 23 59 59 210 Chapter 10 SMS Daemon de Compressi date timestar Gammu Manual Release GAMMU ERSION SendAfter time NOT NULL DEFAULT 00 00 00 Text text DestinationNumber varchar 20 NOT NULL DEFAULT Coding varchar 255 NOT NULL DEFAULT Default No Compression UDH text Class integer DEFAULT 1 TextDecoded text NOT NULL DEFAULT ID serial PRIMARY KEY MultiPart boolean NOT NULL DEFAULT false RelativeValidity integer DEFAULT 1 SenderID
178. NUMBER sys exit 1 Dial a number state machine DialVoice sys argv 1 Reading calendar from phone usr bin env python Example for reading calendar from phone from _ future _ import print function import gammu Create object for talking with phone State machine gammu StateMachine Read the configuration gammurc state machine ReadConfig Connect to the phone state machine Init Get number of calendar entries status state machine GetCalendarStatus remain status Used start True while remain gt 0 Read the entry if start entry state_machine GetNextCalendar Start True start False else entry state_machine GetNextCalendar Location entry Location remain remain 1 Display it print print 35 20s d Location entry Location print 5 20s s os Type entry Type for v in entry Entries print 5 20s s v Type str v Value 4 2 API documentation 4 2 1 gammu Mobile phone access This module wraps all python gammu functionality 32 Chapter 4 python gammu Gammu Manual Release OGAMMUyERSIONO gammu StateMachine class gammu StateMachine Locale StateMachine object that is used for communication with phone Parameters Locale string What locales to use for gammu error messages default is auto which does autodetection according to user locales AddCalendar Val
179. No Compression 8bit Default Compression Unic de Compressi PRIMARY KEY ID SequencePosition CREATE INDEX sentitems date ON sentitems DeliveryDateTime CREATE INDEX sentitems tpmr ON sentitems TPMR CREATE INDEX sentitems dest ON sentitems DestinationNumber CREATE INDEX sentitems sender ON sentitems SenderID CREATE TRIGGER update sentitems time UPDATE ON sentitems BEGIN UPDATE sentitems SET UpdatedInDB datetime now WHERE ID old ID END Note You can find the script in docs sql sqlite sql as well There are also scripts for other databases in same folder Upgrading tables The easiest way to upgrade database structure is to backup old one and start with creating new one based on example above For upgrading existing database you can use changes described in History of database structure and then manually update Version field in gammu table 10 6 6 ODBC Backend Description New in version 1 29 92 10 6 Backend services 217 Gammu Manual Release GAMMU ERSIONO ODBC backend stores all data in any database supported by ODBC which parameters are defined by configuration see SMSD Configuration File for description of configuration options For tables description see MSD Database Structure This backend is based on SQL Service Supported drivers On Microsoft Windows Gammu uses native ODB
180. Notes are stored in note directory in vNote format Calendar Calendar entries are stored in calendar directory in vCalendar format Todo Todo entries are stored in todo directory in vCalendar format Filesystem Filesystem is stored in s directory You can create another subdirectories there 12 2 2 Other features By specifying Features you can configure some specific behavior DISABLE_GETNEXT Makes the dummy driver fail all GetNext calls as not supported with exception of Get NextSMS and GetNextFile DISABLE_GETNEXTSMS Makes the dummy driver fail all GetNextSMS calls as not supported 12 2 3 Examples To use dummy driver you need something like following in gammurc gammu model dummy connection none device path to directory For disabling GetNext functions within dummy driver you need something like following in gammurc gammu model dummy connection none features DISABLE_GETNEXT device path to directory 238 Chapter 12 Testing Gammu CHAPTER 13 Phone Protocols 13 1 Discovering protocol You need to get a communication dump to be able to understand protocol or discover new commands As most vendors provide some software for Windows all following sections assume you do the sniffing on Windows 13 1 1 USB For USB there exist various tools to dump USB communication The dumps can be later analyzed and used to discover
181. ONO Table structure for table pbk CREATE TABLE pbk TD serial PRIMARY KEY GroupID integer NOT NULL DEFAULT 1 Name text NOT NULL Number text NOT NULL Dumping data for table pbk Table structure for table pbk groups CREATE TABLE pbk groups Name text NOT NULL ID serial PRIMARY KEY i Dumping data for table pbk groups Table structure for table phones CREATE TABLE phones ID text NOT NULL UpdatedInDB timestamp 0 WITHOUT time zone NOT NULL DEFAULT LOCALTIMESTAMP 0 InsertIntoDB timestamp 0 WITHOUT time zone NOT NULL DEFAULT LOCALTIMESTAMP 0 TimeOut timestamp 0 WITHOUT time zone NOT NULL DEFAULT LOCALTIMESTAMP 0 Send boolean NOT NULL DEFAULT no Receive boolean NOT NULL DEFAULT no IMEI varchar 35 PRIMARY KEY NOT NULL NetCode varchar 10 DEFAULT ERROR NetName varchar 35 DEFAULT ERROR Client text NOT NULL Battery integer NOT NULL DEFAULT 1 Signal integer NOT NULL DEFAULT 1 Sent integer NOT NULL DEFAULT 0 Received integer NOT NULL DEFAULT 0 212 Chapter 10 SMS Daemon Gammu Manual Release GAMMU ERSION Dumping data for table phones Create trigger for table phones C
182. Ox6a r Get Product Profile Settings Ox6a 4bytes with Product Profile Settings s Set Product Profile Settings Ox6b 4bytes with Product Profile Settings r Set Product Profile Settings OK Ox6b s Get code 0x6e code where code see 0x08 0x0004 only sec code is allowed r Get code 0x6e code allowed allowed sec cod text where code see 0x08 0x0004 allowed 0 no 1 yes s Set code Ox6f code sec code text where code see 0x08 0x0004 S Start monitoring 0x70 block where block N6150 Ox7 Oxff Oxff Oxff Oxff Ox Oxff 0xff O0xff Oxff Oxftf O0x 0x00 ff 0xff 0xff 0xff 0xff 9 0x76 0x65 0x20 0x00 0x00 0x00 0x00 0x00 0x18 0x26 0x15 0x7d 0x0a 0x00 0xf5 0x82 0x7f 0xff O0xff 0x Oxff Oxff Oxff Oxff Oxff 0x ff 0xff 0xff 0xff 0xff ff 0xff 0xf0 0x77 0x80 0x77 0x80 0xf2 0x82 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 This block enables probably all possible monitorred paramete After it phone sends 0x00 message type values s Break monitoring 0x71 r Break monitoring 0x71 256 Chapter 13 Phone Protocols Unicode ser rs Gammu Manual Release GAMMU ERSION 2 Ss 79217 0x74 0x01 0x01 Ox0e 2 LE RRA 0x74 s Call commands Ox7c block where where command values command 0x01 values number ASCII 0x00 makes voice call command 0x02 answer call command 0x
183. Oxle caller group number number 0 0 type 0Ox0a General 0x03 Mobile office 0x06 Work 0x04 Fax 0x02 Home mobile s Set mem location Ox0b 0x00 OxO1 0x01 0x00 0x00 z 0x02 memory type yH yL 0x00 7 no of blocks block j no of blocks r Set mem location 0x c 07 17 code 07 027 z UT 07 yH yL xL where code 0x3d wrong entry type 0x08 SECURITY S Get status 0x11 0x00 r Get status 0x12 status where status 0x01 waiting for Security Code 0x07 0x02 waiting for PIN 0x03 waiting for PUK 0x05 PIN ok SIM ok 0x06 No input status 0x16 No SIM Ox1A SIM rejected s Enter PIN 0x07 0x02 code 0x00 r Enter PIN return code reason T where return code 0x08 success 0x09 failure reason 0x06 PIN wrong US Da NETSTATUS s Get Info 0x00 0x00 r Get Info 0x01 0x00 blocks 0x00 length 0x00 0x02 status length operator name unicode 0x09 length LAC LAC 0x00 0x00 CellID CellID NetworkCode 3 oct 262 Chapter 13 Phone Protocols Gammu Manual Release GAMMU ERSION S Get RF Level L O0x b 0x00 0x02 0x00 0X00 0x00 GET RF Level 0x0c 0x00 0x01 0x04 0x04 level Ox5f s Get operator logo 0x23 0x00 0x00 Ux55 0x55 0X55 3 r Get operator logo 0x24 0x00 0x01 0x00 0x00 0x00 0x02 0x0c 0x08 netcode 3 octets 0x02
184. P 44 7 caller groups s 0x12 ring rii Kvel 5 0x0a rd 2 specia r riends 8 c Ox00 off 0x01 on Ox00 0ff 0x01 0n 0x00 0x01 0x00 Phone Ox00 Automatic Ox00 0ff 0x01 0n 0x00 0x01 0x00 0x18 Ox00 0ff 0x01 0n Ox00 Preset 0x01 Ox00 0ff 0x01 0n 0x00 English 0x01 Deutsch 0x02 Francais 0x03 Italiano 0x06 Nederlands 0x07 Dansk 0x08 Svenska 0x09 Suomi OxOe Norsk 0x10 Automatic Ox00 N0O 0x01 Yes 0x00 No 0x01 Yes 0x00 Show clock Ox01 SIM card Ox 1 Manual n 0x02 Off Ox01 Hide cloc 0x00 24 hour 0x01412 hour Ox00 General 0x01 the rest Value Oxff off Ox00 level 1 Ox01 1le l ringing 2 beep once 3 unknoi 6 ascending level 1 0x06 l vel 5 0x0a 0 no tone 1 standard 2 specia O off l on 2 vibrate first Oxff off 0x04 on l on O off 0x00 5 sec 0Ox01 20 sec 0x00 0xOd Number of pictu 250 Chapter 13 Phone Protocols Gammu Manual Release GAMMU ERSION s Get welcome messag H Get welcome messag S Set welcome messag r Set welcome OK S Get profile name r Profile name 2727 2727 Set oplogo Set oplogo OK Set oplogo error KH OKO s Get oplogo r Get oplogo 0x16 0x171 0x18 0x19 Oxla Ox1b Oxic Oxld Oxle 0x32 Ox1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b Ox2c 0x2d 0x0016 T 0x0017 where block id blockspecific
185. PICTURE STARTUP CALLER Allow one to convert logos files to another When give ONLY inputfile output will be written to stdout using ASCII art When give output file and format in some file formats like NLM will be set indicator informing about logo type to given 9 2 Description 157 Gammu Manual Release GAMMU ERSIONAO getbitmap TYPE type options Reads bitmap from phone following types are supported CALLER location file Get caller group logo from phone Locations 1 5 DEALER In some models it s possible to save dealer welcome note text displayed during enabling phone which can t be edited from phone menu Here you can get it OPERATOR file Get operator logo picture displayed instead of operator name from phone PICTURE location file Get Picture Image from phone STARTUP file Get static startup logo from phone Allow one to save it in file TEXT Get startup text from phone setbitmap TYPE type options Sets bitmap in phone following types are supported CALLER location file Set caller logo COLOUROPERATOR fileID netcode Sets color operator logo in phone COLOURSTARTUP fileID DEALER text Sets welcome message configured by dealer which usually can not be changed in phone menus OPERATOR file netcode Set operator logo in phone When won t give file and netcode operator logo will be removed from phone When will give only filename operator
186. REATE TRIGGER update timestamp BEFORE UPDATE ON phones FOR EACH ROW Table structure for table sentitems CREATE TABLE sentitems EXECUTE PROCEDURE update timest UpdatedInDB timestamp 0 WITHOUT time zone NOT NULL DEFAULT LOCA TIMESTAMP 0 InsertIntoDB timestamp 0 WITHOUT time zone NOT NULL DEFAULT OCALTIMESTAMP 0 SendingDateTime timestamp 0 WITHOUT time zone NOT NULL DEFAU iT OCALTIMESTAMP 0 DeliveryDateTime timestamp 0 WITHOUT time zone NULL Text text NOT NULL DestinationNumber varchar 20 NOT NULL DEFAULT Coding varchar 255 NOT NULL DEFAULT Default_No_Compression UDH text NOT NULL SMSCNumber varchar 20 NOT NULL DEFAULT Class integer NOT NULL DEFAULT 1 TextDecoded text NOT NULL DEFAULT ID serial SenderID varchar 255 NOT NULL SequencePosition integer NOT NULL DEFAULT 1 Status varchar 255 NOT NULL DEFAULT SendingOK StatusError integer NOT NULL DEFAULT 1 TPMR integer NOT NULL DEFAULT 1 RelativeValidity integer NOT NULL DEFAULT 1 CreatorID text NOT NULL CHECK Status IN SendingOK SendingOKNoReport SendingError DeliveryOK DeliveryFailed DeliveryPending DeliveryUnknown Error CHECK
187. ROR Verbose error description Error during reading from the device exception gammu ERR DEVICEWRITEERROR Exception corresponding to gammu error ERR DEVICEWRITEERROR Verbose error description Error writ ing to the device exception gammu ERR DISABLED Exception corresponding to gammu error ERR DISABLED Verbose error description Desired functionality has been disabled on compile time exception gammu ERR EMPTY Exception corresponding to gammu error ERR EMPTY Verbose error description Entry is empty exception gammu ERR EMPTYSMSC Exception corresponding to gammu error ERR EMPTYSMSC Verbose error description No SMSC number given Provide it manually or use the one configured in phone exception gammu ERR FILEALREADYEXIST Exception corresponding to gammu error ERR FILEALREADY EXIST Verbose error description File with specified name already exists exception gammu ERR FILENOTEXIST Exception corresponding to gammu error ERR FILENOTEXIST Verbose error description File with specified name doesn t exist exception gammu ERR FILENOTSUPPORTED Exception corresponding to gammu error ERR FILENOTSUPPORTED Verbose error description File format not supported by Gammu exception gammu ERR FOLDERNOTEMPTY Exception corresponding to gammu error ERR FOLDERNOTEMPTY Verbose error description Folder must be empty exception gammu ERR FOLDERPART Exception corresponding to gammu error ERR FOLDERPART Verbose error description
188. RR INVALIDDATETIME Verbose error description Invalid date or time specified exception gammu ERR INVALIDLOCATION Exception corresponding to gammu error ERR INVALIDLOCATION Verbose error description Invalid loca tion Maybe too high exception gammu ERR MEMORY Exception corresponding to gammu error ERR MEMORY Verbose error description Phone memory error maybe it is read only exception gammu ERR MOREMEMORY Exception corresponding to gammu error ERR MOREMEMORY Verbose error description More memory required exception gammu ERR NEEDANOTHERANSWER Exception corresponding to gammu error ERR NEEDANOTHERANSWER Verbose error description Phone module need to send another answer frame exception gammu ERR NETWORK ERROR Exception corresponding to gammu error ERR NETWORK ERROR Verbose error description Network error exception gammu ERR NONE Exception corresponding to gammu error ERR_NONE Verbose error description No error exception gammu ERR NONE SECTION Exception corresponding to gammu error ERR NONE SECTION Verbose error description No such section exists exception gammu ERR_NOSERVICE Exception corresponding to gammu error ERR_NOSERVICE Verbose error description Service configuration is missing 58 Chapter 4 python gammu Gammu Manual Release OGAMMUyERSIONO exception gammu ERR_NOSIM Exception corresponding to gammu error ERR_NOSIM Verbose error description Can not access SIM card exce
189. Return type dict GetNextRootFolder Folder Gets next root folder from filesystem Start with empty folder name Parameters Folder string Previous read fodlder Start with empty folder name Returns Structure with folder information GetNextSMS Folder Start Location Reads next or first if start set SMS message This might befaster for some phones than using Get SMS for each message Parameters e Folder int Folder where to read entry 0 is emulated flat memory Start bool Whether to start This can not be used together with Location Location int Location last read entry This can not be used together with Start Returns Dictionary with SMS data see MS Object Return type dict GetNextToDo Start Location Reads ToDo from phone Parameters Start bool Whether to start This can not be used together with Location 40 Chapter 4 python gammu Gammu Manual Release GAMMU ERSION e Location int Last read location This can not be used together with Start Returns Dictionary with ToDo values see Todo Object Return type dict GetOriginalIMEI Gets original IMEI from phone Returns Original IMEI of phone as string Return type string GetPPM Gets PPM Post Programmable Memory from phone Returns PPM as string Return type string GetProductCode Gets product code of device return Product code as string rtype string GetSIMIMSI Gets SIM IMSI from phone
190. S 08 00 00 00 00 00 00 6 08 00 00 00 00 00 00 7 TE 08 00 00 00 00 00 100 8 08 00 00 00 00 00 1 00 04 B alin dal a 08 04 00 9 00 00 00 04 08 04 00 fa 00 00 00 04 P E E 08 04 00 fb OO 00 00 104 108 04 00 fcR 00 00 100 04 Vete ues R 08 04 00 fdf 00 00 00 04 08 04 00 fe 00 00 00 04 a 08 04 00 ff 00 00 00 04 08 04 QT poo TOO LOO OO ON ars esse et er 08 04 01 01 00 00 00 04 1 08 04 Q3 OZ 10 0 TOO OO TOW eu reed eere 08 04 01 03 00 00 00 04 08 04 OAs WO4 FO 00 007 OZ Luci crum pe aioe 08 04 01 05 00 00 00 04 08 04 Ol poo OO MOOD Ker ea leen etse 08 04 01 07 00 00 00 04 08 04 Qi a lt 9 909 pOO Q0 OZ enanas 08 04 01 09 00 00 00 04 08 04 QI TOSNO FOO 00 TOA cuocere xw 08 04 01 0b 00 00 00 04 08 04 OL Tes 99 00 O08 OAS queer es my eis 08 04 01 0d 00 00 00 04 08 04 01 10e 00 00 OO TO yee ee ies 08 04 01 JOf 00 00 00 04 08 04 Od PLO VOG FOO FOO TODA Su on eese 08 04 01 11 00 00 00 04 08 04 01 1 72 O7 00 HOO QA uccisi ese ia 08 04 01 13 00 00 00 04 08 04 QI PTA pO OO OO Dd russa as Sires 08 04 01 15 00 00 00 04 1 08 04 OL 16 99 OO 100 7 OE Saca oem es 08 04 01 17 00 00 00 04 08 04 OL ESOO OO 100 OW oi 08 04 01 19 00 00 00 04 08 04 OL Tra 10 0 OO TOO 04 o uerum mene 08 04 01 1b 00 00 00
191. SC False RejectDuplicates ReplaceMessage True I o I MessageReference 7 3 Backup Format The backup format is text file encoded in either ASCII or UCS 2 BE encodings This file use ini file syntax see ZNI file format 7 3 1 Examples If you will backup settings to Gammu text file it will be possible to edit it It s easy many things in this file will be written double once in Unicode once in ASCII When you will remove Unicode version Gammu will use ASCII on fBrestorefR and you can easy edit ASCII text and will convert it according to your OS locale When will be available Unicode version of text it will be used instead of ASCII useful with Unicode phones it isn t important what locale is set in computer and no conversion Unicode gt ASCII and ASCII gt Unicode is done 7 3 Backup Format 135 400550056005 Gammu Manual Release GAMMU ERSIONO You can use any editor with regular expressions function to edit backup text file Examples of such editors can be vim or TextPad which both do support regular expressions Remove info about voice tags Find EntryN 0 9 0 9 VoiceTag n Replace lt blank gt 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 n Replace Type NumberMobile nEntry lText 3620 Cha
192. Same could be achieved by just using global debug config debug info GSM GetDebug s GSM SetDebugGlobal FALSE debug info GSM SetDebugFileDescriptor stderr TRUE debug info EncodeUnicode sms Number recipient number strlen recipient number 5 2 Examples 85 Gammu Manual Release GAMMU ERSIONO GSM_SetDebugLevel textall debug_info x Find configuration file first command line parameter or defaults error GSM FindGammuRC amp cfg argc 2 argv 1 NULL error handler Read it rror GSM ReadConfig cfg GSM GetConfig s 0 0 error handler Free config file structures INI Free cfg We have one valid configuration GSM SetConfigNum s 1 Connect to phone 1 means number of replies you want to wait for x error GSM InitConnection s 1 error handler Set callback for message sending This needs to be done after initiating connection GSM SetSendSMSStatusCallback s send sms callback NULL We need to know SMSC number PhoneSMSC Location 1 rror GSM GetSMSC s amp PhoneSMSC error handler Set SMSC number in message CopyUnicodeString sms SMSC Number PhoneSMSC Number x Set flag before callind SendSMS some phones might give instant response sms send status ERR TIMEOUT Send message rror GSM SendSMS s amp sms error handler
193. Sender unicode 0x05 Recipient unicode 0x06 Unknown x00x00x00x00 0x07 Unknown x00 13 3 Nokia S40 filesystem SMS format 245 Gammu Manual Release GAMMU ERSIONAO 0x08 Unknown x02 x00 0x09 Unknown x00x00x00x00 0x0a Unknown x00 0x0b Unknown x00 0x0c Unknown several values maybe message reference per number 0x0d Unknown x00x00 0x0e Unknown x00x00 0x0f Unknown x00x00 0x22 Unknown x00 0x23 Unknown x00x00x00x00 0x24 Unknown x00 0x26 Unknown x00 0x27 Unknown x00 0x2a Unknown x00 0x2b some text Sender unicode To test multiple recipients sms 13 4 Nokia 6110 Assembled by Balazs Nagy lt js iksz hu gt Harri Yli Torkko lt hyt surfeu fi gt Alfred R Nurnberger arnuGflosys com Hugh Blemings lt Hugh Blemings vsb com au gt Mike Bradley mike trumpington st gt Odinokov Serge serge takas lt gt Pavel Janik Pavel Janik cz gt BORBELY Zoltan lt bozo andrews hu gt Pawel Kot lt pkot linuxnews pl gt Marcin Wiacek Marcin MWiacek com Walek walek 9 pa98 opole sdi tpnet pl and other members of gnokii mailing list and authors of some WWW pages The data provided is for information purposes only Some of the frames might be hazardous to your phone Be careful We do not take any responsibility or liability for damages etc Note this information isn t and can t be complete If you know anything about features not listed here or you noticed a bug in this list please notify
194. TYPESTRING Verbose error de scription Unknown connection type string Check config file exception gammu ERR_UNKNOWNF RAME Exception corresponding to gammu error ERR_UNKNOWNFRAME Verbose error description Unknown frame See lt http wammu eu support bugs gt for information how to report it exception gammu ERR_UNKNOWNMODELSTRING Exception corresponding to gammu error ERR_UNKNOWNMODELSTRING Verbose error description Un known model type string Check config file exception gammu ERR_UNKNOWNRESPONSE Exception corresponding to gammu error ERR_UNKNOWNRESPONSE Verbose error description Unknown response from phone See lt http wammu eu support bugs gt for information how to report it exception gammu ERR USING DEFAULTS Exception corresponding to gammu error ERR USING DEFAULTS Verbose error description Using default values exception gammu ERR WORKINPROGRESS Exception corresponding to gammu error ERR WORKINPROGRESS Verbose error description Function is currently being implemented If you want to help please contact authors exception gammu ERR WRITING FILE Exception corresponding to gammu error ERR WRITING FILE Verbose error description Error writing file to disk exception gammu ERR WRONGCRC Exception corresponding to gammu error ERR WRONGCRC Verbose error description CRC error exception gammu ERR WRONGFOLDER Exception corresponding to gammu error ERR WRONGFOLDER Verbose error description Wrong folder
195. Training Cycling T BUDO Training Budo _DANC Training Dance EXTR Training Extreme Sports T FOOT Training Football T GOLF Training Golf _GYM Training Gym lr HORS Training Horse Race T HOCK Training Hockey T RACE Training Races e T RUGB Training Rugby 4 2 API documentation 67 Gammu Manual Release QGAMMU ERSIONAO T SAII e ES ALA DAI RM Alarm Priority Entry priority one of High Medium Low None Entries L Training Sailing ENN Training Tennis RAV Training Travels TRE Training Street Games T SWIM Training Swimming l WINT Training Winter Games LY ALARM Alarm repeating each day Actual entries see Todo Entries Object Example TODO Type MEMC Entries Type END DATETIME Value datetime datetime now datetime timedelta qd Type TEXT Value Buy some milk r Todo Entries Object Type Type of entry one of Ej OM LA e A SILI T D RM DATETIM ND DATETIME Due date Date PLETED Whether is completed Number E When should alarm be fired Date ENT ALARM DATETIM EXT Text of to do Text PTION Description of to do Text LOCATION Location of to do Text PRIVATI
196. Type Location Deletes memory phonebooks or calls entry Parameters Type string Memory type one of ME SM ON DC RC MC MT FD VM e Location int Location of entry to delete Returns None Return type None DeleteSMS Folder Location Deletes SMS Parameters s Folder int Folder where to read entry 0 is emulated flat memory e Location int Location of entry to delete Returns None 4 2 API documentation 35 Gammu Manual Release GAMMU ERSIONO Return type None Note In most cases you want to use Folder 0 as in this mode it will accept locations as GetNextSMS returns them DeleteSMSFolder ID Deletes SMS folder Parameters ID int Index of folder to delete Returns None Return type None DeleteToDo Location Deletes ToDo entry in phone Parameters Location int Location of entry to delete Returns None Return type None DialService Number Dials number and starts voice call Parameters Number string Number to dial Returns None Return type None DialVoice Number ShowNumber Dials number and starts voice call Parameters Number string Number to dial s ShowNumber bool or None Identifies whether to enable CLIR None keep default phone settings Default is None Returns None Return type None EnterSecurityCode Type Code NewPIN Entres security code Parameters Type string What code to enter one of PIN PUK PI
197. U ERSIONO par18 Alarm items quantity par19 Repeat each year O no 4 yes par20 Empty par21 Empty par22 Empty par23 Empty par24 Empty If par02 3 task entry type par03 Empty par04 Task name par05 Start day par06 Start month par07 Start year par08 Alarm hour par09 Alarm minute par10 Due day par11 Due month par12 Due year par13 Empty par14 Empty par15 Empty parl6 Alarm flag O no 1 yes parl7 Alarm time unit 12minutes 2 hours days 4 weeks par18 Alarm items quantity par19 Empty par20 Task priority 1 high 2 normal 3 low par21 Task status O undone 1 done par22 Empty par23 Empty par24 Empty If par02 4 miscellany entry type par03 Entry name par04 Details par05 Start day par06 Start month par07 Start year 300 Chapter 13 Phone Protocols Gammu Manual Release GAMMU E RSION Q par08 Start hour par09 Start minutes par10 End day par11 End month par12 End year par13 End hour par14 End minutes par15 Empty parl6 Alarm flag O no 1 yes par17 Alarm time unit 1 minutes 2 hours days 4 weeks par18 Alarm items quantity par19 Empty par20 Empty par21 Empty par22 Empty par23 Empty par24 Empty 13 9 3 Write organizer entry Invocation AT ORGW par0 parl par2 par24 Write organizer entry in memory location par0 If par0 65535 then locate next empty entry on memory Example AT ORGW 65535 0 4 p2 p2 14 3 2009 2 23 14 3 2009 3
198. V 0x00 FrameLength MsgType block id ChkSum where DestDEV taken from original request packet FrameLength 0x7f when DestDEV Oxe4 Ox7e when DestDEV Oxf8 MsgType see List Present only when DestDEV Oxf8 block main frame Present only when DestDEV Oxf8 rd request identity number 1 corresponding to the original request packet id the request is accepted ChkSum XOR on frame s all numbers Update description above according to the http www gadgets demon co uk nokia2 1xx protocol html Pavel Machek pavel ucw cz wrote Ox7e is actually registration acknowledge Both have nothing to do with DestDEV except that special device needs to be used for registration Ack from Computer 0x00 SrcDEV Ox7f id ChkSum where SrcDEV taken from response packet id request identity number 1 corresponding to the response packet id the request is accepted ChkSum XOR on frame s all numbers Port settings Speed 9600 bps Bits 8 ParityOdd Stop Bits 1 DTR and RTS logic 0 In the MBUS bus the phone has only one connector for transmition and reception Because of this characteristics of the phone connector every time that the PC writes into the phone it is writing as well into its own Rx So every time the PC sends info into the phone it finds that same information in its own Rx buffers like a mirror copy This should be discarded The communications is made like an
199. 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 nokiamakecamerashoot 9 2 Description 163 Gammu Manual Release GAMMU ERSIONO nokianetmonitor test Takes output or set netmonitor for Nokia DCT3 phones See also For more info about this option please visit Marcin s page and read netmonitor manual there Note test 243 enables all tests after using command gammu nokianetmonitor 243 in some phones like 6210 or 9210 have 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 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 like 82xx 7 1 10 62xx 33xx The clock test will show an error when the phone doesn t have an internal battery for the clock
200. _builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs man Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygentypedef Cannot find file bome docs checkouts readthedocs org user builds gammu checkouts stable docs manu 102 Chapter 5 libGammu Gammu Manual Release GAMMU E RSION Q 5 3 9 Error handling Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual 5 3 10 File Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Can
201. acement 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 by gammu backup command 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 given URL and title WAPSETTINGS file location DATA GPRS Read WAP settings from file created by gammu backup command and saves in Nokia format as SMS sendsms TYPE destination type parameters type options smscset number smscnumber ni 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 be the message valid SMSC will the discard the message after this time if it could not deliver it setsmsc l
202. age see MS Info Object Returns List of dictionaries with raw message see MS Object Return type dict gammu DecodePDU Data SMSC False Parses PDU packet Parameters Data string PDU data need to be binary not hex encoded SMSC bool Whether PDU includes SMSC Returns Message data see SMS Object Return type dict gammu EncodePDU SMS Layout Submit Creates PDU packet 4 2 API documentation 49 Gammu Manual Release GAMMU ERSIONAO Parameters SMS dict SMS dictionary see SMS Object e Layout string Layout one of Submit Deliver StatusReport Submit is default Returns Message data Return type string New in version 1 27 93 Encoding and decoding entries gammu DecodeVCARD Text Decodes memory entry v from a string Parameters Text string String to decode Returns Memory entry see Phonebook Object Return type dict gammu EncodeVCARD Entry Encodes memory entry to a vCard Parameters Entry dict Memory entry see Phonebook Object Returns String with vCard Return type string gammu DecodeVCS Text Decodes todo calendar entry v from a string Parameters Text string String to decode Returns Calendar or todo entry whatever one was included in string see Calendar Object Todo Object Return type dict gammu DecodeICs Text Decodes todo calendar entry v from a string Parameters Text string String to decode Returns Calendar or todo e
203. ammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual 5 4 Porting from libGammu older than 1 12 0 5 4 1 Rationale for API change This document describes what you have to change in your code if you used Gammu older than 1 12 0 This release came with huge changes to API which has to be done for various reasons e ABI stability Till now almost every change in internals of any driver lead to ABI change If we would correctly increase soname on each ABI change we would be somewhere near 200 what is not something we could be proud of Centralisation of variables cleanup Currently all phone drivers have to do some common things in each function New API allows one to centralize those operations in one place 122 Chapter 5 libGammu Gammu Manual Release GAMMU E RSION Q Exposing of internals Old API exposed too much of Gammu internals what could be misused by programmers and could lead to unexpected behaviour when some internals are changed 5 4 2 Changes you have to do in your code Bellow examples expect sm to be state machine structure in your current code change it to appropriate variable name if it differs 1 Use pointer to GSM StateMachine instead of it API now do not expos
204. ammu command line option 148 getwapbookmark start stop gammu command line option 165 getwapsettings start stop gammu command line option 165 GSM Reply Function C type 125 OSM SMSDsService AddSentSMSInfo C function 227 GSM_SMSDService CreateOutboxSMS C function 223 OSM SMSDsService FindOutboxS MS C function 226 GSM_SMSDService Free C function 226 GSM_SMSDService Init C function 226 OSM SMSDsService InitAfterConnect C function 226 OSM SMSDsService MoveSMS C function 226 GSM_SMSDService ReadConfiguration C function 227 GSM_SMSDService RefreshPhoneStatus C function 227 GSM_SMSDService RefreshSendStatus C function 227 GSM_SMSDService SavelnboxSMS C function 226 GSMCountries in module gammu 52 GSMNetworks in module gammu 52 H help topic gammu command line option 168 Hidden 74 holdcall id gammu command line option 148 HoldCall gammu StateMachine method 42 Host 188 197 218 ID 64 ID16bit 62 ID8bit 62 ID_FullName 73 identify gammu command line option 166 InboxFolder 61 InboxFormat 196 IncludeNumbersFile 190 IncludeSMSCFile 190 Init gammu StateMachine method 42 initiate gammu worker Gammu Worker method 55 InjectSMSQ gammu smsd SMSD method 53 install minimal gammu command line option 168 InternationalPrefixes in module gammu data 54 InvalidCommand 55 Italic 66 J jadmaker command line option f force 233 h
205. answer call command 0x03 release call r Call commands 0x7c command s Netmonitor 0x7e field where field 00 next F0 reset Fli off F2 field test menus F3 developer menus s Get simlock info 0x8a 0x00 r Get simlock info 0x8a 0x00 0x01 lockstype locksclosed 0x00 0x00 where lockstype bitl bit2 bit3 bat4 if set locksclosed bit1 bit2 bit3 bit4 if set counterl counter4 counters for locks s Buzzer pitch Ox8f volume hzLO hzHI if volume and hz is 0 it s off r Buzzer pitch 0x8f S ACD Readings 0x91 parameter 0x02 0x03 0x04 0x05 0x07 r ACD Readings 0x91 parameter value s N6150 0x98 0x00 r N6150 0x98 0x00 0x04 s Get bin ringtone 0x9e location where location 0 1 etc r Get bin ringtone 0x9e location error contents where location 0 1 etc error 0x0a ringtone NOT available 0x00 OK s Set bin ringtone 0xa0 location 0x00 contenst where location 0 1 etc r Set bin ringtone 0xa0 location error where location 0 1 etc error 0x0a ringtone NOT set 0x00 ringtone set OK r Get MSid Oxb5 0x01 Ox2f msid 0x25 S Get info about phone Oxc8 0x01 r Get info about phone Oxc8 0x01 0x00 V firmware Ox0a firmware date S Get MCU SW Checksum Oxc8 0x02 r Get MCU SW Checksum Oxc8 0x02 0x00 checksum 4 bytes 0x00 s DPS External SW Oxe7 0x05 r DSP External SW Oxc7 0x03 0x00 string 0x00 s Get HW i VECES 0
206. are ignored The file is read at startup and is reread only when configuration is being reread See Message filtering for details ExcludeNumbersFile File with list of numbers which are not accepted by SMSD The file contains one number per line blank lines are ignored The file is read at startup and is reread only when configuration is being reread See Message filtering for details IncludeSMSCFile File with list of SMSC numbers which are accepted by SMSD The file contains one number per line blank lines are ignored The file is read at startup and is reread only when configuration is being reread See Message filtering for details ExcludeSMSCFile File with list of SMSC numbers which are not accepted by SMSD The file contains one number per line blank lines are ignored The file is read at startup and is reread only when configuration is being reread See Message filtering for details BackendRetries How many times will SMSD backend retry operation The implementation on different backends is different for database backends it generally means how many times it will try to reconnect to the server Default is 10 Send New in version 1 28 91 Whether to enable sending of messages Default is True 10 4 SMSD Configuration File 187 Gammu Manual Release GAMMU ERSIONAO Receive New in version 1 28 91 Whether to enable receiving of messages Default is True 10 4 3 Database backends options All DBI ODBC
207. ased on extension and file content for output solely on extension See also gammu convertbackup convertbackup source file output file New in version 1 28 94 Converts backup between formats supported by Gammu Unlike gammu savefile this does not give you any options what to convert it simply takes converts all what can be saved into output file See also gammu savefile 9 2 14 Nokia specific commands nokiaaddfile TYPE type options Uploads file to phone to specific location for the type mmi APPLICATION GAME file readonly overwrite overwriteall Install the x jar x jad file pair of a midlet in the application or game menu of the phone You need to specify filename without the jar jad suffix both will be added automatically overwrite Delete the application s jad and jar files before installing but doesn t delete the application data overwriteall Delete the application same as overwrite and all it s data You can use jadmaker to generate a jad file from a jar file GALLERY GALLERY2 CAMERA TONES TONES2 RECORDS VIDEO PLAYLIST MEMORYCARD file nokiaaddplaylists Goes through phone memory and generated playlist for all music files found To manually manage playlists gammu addfile a predefplaylist filename m3u Will add playlist filename m3u 162 Chapter 9 Gammu Utility name nam Gammu Manual Release GAMMU ERSIO
208. at The SMS backup format is text file encoded in current encoding of platform where Gammu is running This file use ini file syntax see ZNI file format 7 2 1 Sections The file consists of sections whose name starts with SMSBackup When creating the backup file three digits are appended to this text defining order While reading the backup any part after SMSBackup text is ignored and 133 Gammu Manual Release GAMMU ERSIONAO everything which begins with this is processed So you can as well give the section name SMSBackupFoo and it will be processed The number of messages in backup file is currently limited by GSM_BACKUP_MAX_SMS 100000 at time of writing this document SMSBackup section Each section interprets one physical SMS message eg one message part in case of multipart messages Decoded text For SMS backups created by Gammu there is a decoded text as a comment just after the section name SMSBackup001 This is message text The text can be split to more lines if it is too long or of original message included new lines Note This is easiest way to get message text however also the least reliable one because it is stored in the comments in the file Variables The following variables can be defined for each SMS SMSC Text representation of SMSC number not used by Gammu if SMSCUnicode exists SMSCUnicode Hex encoded UCS 2 string with SMSC number Class Message class Sen
209. ating connection GSM SetSendSMSStatusCallback s send sms callback NULL We need to know SMSC number x PhoneSMSC Location 1 rror GSM GetSMSC s amp PhoneSMSC error handler Send message parts x for i 0 i SMS Number i Set SMSC number in message CopyUnicodeString SMS SMS i SMSC Number PhoneSMSC Number Prepare message Encode recipient number EncodeUnicode SMS SMS i Number recipient number strlen recipient_num We want to submit message SMS SMS i PDU SMS Submit x Set flag before callind SendSMS some phones might give instant response 5 2 Examples 89 er Gammu Manual Release GAMMU ERSIONO sms_send_status ERR_TIMEOUT Send message rror GSM_SendSMS s amp SMS SMS i error handler Wait for network reply while gshutdown 1 GSM ReadDevice s TRUE if sms send status ERR NONE Message sent OK x return value 0 break if sms_send_status ERR_TIMEOUT Message sending failed return value 100 break Terminate connection rror GSM TerminateConnection s error handler Free up used memory x GSM FreeStateMachine s return return value Editor configuration vim noexpandtab sw 8 ts 8 sts 8 tw 72 5 2 5 SMSD example Simple C program to start SMSD wit
210. ation namelen Name numlen number gy pe Ox Has pe name is too long free used 0x0008 memty 0x0009 errty where errtype 0x001 0x0011 group 0x0012 reaso where reason 0 0x0013 group 0x0014 0x0015 reaso where reason 0 0x0016 index 0x0017 mem t where mem type 0 group location 0x0018 pe pe Ox6f Ox7d 0x8d ID ID n xd ID mem status error invalid memory type waiting for pin Size Name ringtoneID graphic on 1 0 invalid location Size Name ringtoneID graphic on 1 0 D x7d invalid location CISS ype location 0x02 ME 0x03 SIM memory location O if not stored 0 if not stored 0x0019 index Ox001a lb 0x001 0x0001 0x0002 mode 1 9 mem type location signal str batt level pwr where mode 1 25 EE 4 pwr 1 A zt b 0x0003 0x0004 0x01 0x0010 1 where nr see 0 feature a see Ox 0x0011 1 0x0013 1 where nr is pro feature 0x0014 1 nr nr nr Note Settings separately to registered within the network call in progress waiting for pin powered off C DC attery NOKIA imei 0 model 0 prod code 0 feature a 1 x05 0x0013 see 0x05 0x0014 05 0x0014 feature 1 file number general 0 see 0x05 0x0014 fea Ay silent outd meeting oor ture ey ibo sayy ls num 0x00
211. ations It gets the data from the phone and dispatches them through protocol layer to phone drivers 126 Chapter 6 Gammu internals Gammu Manual Release GAMMU ERSION To see how it operates following figure shows example of what happens when GSM GetModel is called from the program 6 2 State Machine 127 Gammu Manual Release GAMMU ERSIONO GSM_GetModel Phone Functions GetModel Protocol Functions WriteMessage GSM WaitForOnce air for complete request GSM ReadDevice V wai for data Device Functions ReadDevice Protocol Functions StateMachine Phone Functions DispatchMessage GSM_DispatchMessage Chapter 6 Gammu internals Phone Functions ReplyFunctions 128 Gammu Manual Release GAMMU ERSION 6 3 Adding support for new phone This document covers basic information on adding support for new phone into Gammu It will never cover all details but will give you basic instructions 6 3 1 Adding support for new AT commands The easiest situation is when all you need to support new device is to add support for new AT commands All the protocol infrastructure is there you only need to hook new code into right places The main code for AT driver is in 1ibgammu phone at atgen c At the bottom of the file you can find two arrays one defining driver interface GSM Phone Functions and second one defining callbacks see Reply functions for more detailed description You
212. atus OxOE 0x02 1F0400 78 0004 0128 0A00 1B5F Status Ox0A 0x00 1F0400 78 0004 0128 0900 1C5B Status 0x09 0x00 1F0400 78 0004 0128 0701 1D55 Status 0x07 0x01 1F0004 DO 0001 04 00CE Power up from HFU 2 1F0400 DO 0001 05 74BB Power up from phone 1F0004 79 0005 0201 0164 00 0100 Enable carkit mode from HFU 2 1F0400 7F 0165 Ack from phone 1F0004 79 0012 0201 0206 0056 2030 372E 3030 0448 4655 3200 0249 HFU 2 Version 1F0400 7F 0266 Ack from phone 1F0400 78 0004 0128 0E01 7534 Status OxOE 0x01 1F0004 79 0005 0201 0164 00 0302 Enable carkit mode from HFU 2 1F0400 7F 0367 Ack from phone 1F0400 78 0004 0128 0E01 7534 Status OxOE 0x01 1F0004 7F 7511 Ack from HFU 2 1F0400 78 0004 0128 0A01 7633 Status OxOA 0x01 1F0004 7F 7612 Ack from HFU 2 1F0400 78 0004 0128 0901 7731 Status 0x09 0x01 1F0004 7F 7713 Ack from HFU 2 1F0400 78 0004 0128 0701 7830 Status 0x07 0x01 1F0004 7F 781C Ack from HFU 2 13 7 Nokia 6210 6310 CARC91 PC Experiment 291 Gammu Manual Release GAMMU ERSIONO 1F0400 78 0004 0128 0E01 7938 Status OxOE 0x01 1F0004 7F 791D Ack from HFU 2 1F0004 78 0003 2801 03 044E Status confirm from HFU 2 1F0400 7F 0460 Ack from phone 1F0400 DA 0004 0028 0000 7A97 Type gt OxDA data gt 0x0028 0x0000 1F0004 7F 7A1E Ack from HFU 2 1F0400 78 0004 0128 0E01 7B3A Status OxOE 0x01 1F0004 7F 7B1F Ack from HFU 2 1F0400 78 0004 0128 0A00 7C38 Status OxOA 0x00 1F0004 78 0003 2801 03 054F Status confirm from HFU 2 1
213. basename PATH Buffer data Protected 0 ReadOnly O0 Hidden O0 System 0 Folder 0 Level O0 Type Other Finished 0 Pos 0 Divert Type Thel divert type can have one of folowing values Busy Divert when busy NoAnswer Divert when not answered e OutOfReach Divert when phone off or no coverage AllTypes Divert all calls without ringing Call Type The call type for diverts can have one of folowing values e Voice Voice calls Fax Fax calls Data Data calls A11 All calls Call Divert Objects DivertType When to do the divert see Divert Type 74 Chapter 4 python gammu Gammu Manual Release GAMMU ERSION CallType What call types to divert see Call Type Number Phone number where to divert Timeout Timeout after which the divert will happen 4 2 API documentation 75 Gammu Manual Release GAMMU ERSIONO 76 Chapter 4 python gammu CHAPTER 5 libGammu The libGammu library exposes all Gammu functionality for various phones in standard API It can be used to do anything with your phone however for easier tasks you might prefer to use Python and python gammu If you intend to use libGammu in your application all you should need is to include lt gammu h gt and then use Gammu functions You can check docs examples for some small example applications You don t need real phon
214. ble with Gammu gammu data Connections gam gam gam gam gam gam gam gam 4 2 Mos Provides list of connection strings known to Gammu They can be used for example when giving user a choice of connection string mu data MemoryValueTypes Provides list of types of memory entry values mu data CalendarTypes Provides list of calendar envet types mu data CalendarValueTypes Provides list of types of calendar entry values mu data TodoPriorities Provides list of todo priorities mu data TodoValueTypes Provides list of types of todo entry values mu data InternationalPrefixes List of known internaltional prefixes mu data Errors Mapping of text representation of errors to gammu error codes Reverse to ErrorNumbers mu data ErrorNumbers Mapping of gammu error codes to text representation Reverse to Errors 4 gammu worker Asynchronous communication to phone tly you should use only GammuWorker class others are only helpers which are used by this class class gammu worker GammuCommand command params None percentage 100 Storage of single command for gammu get command Returns command name get params Returns command params get percentage Returns percentage of current task class gammu worker GammuTask name commands Storage of taks for gammu get_name Returns task name get_next Returns next command to be executed as GammuCommand class gammu
215. builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual 5 3 6 Category Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file nome docs checkouts readthedocs org user_builds gammu checkoutp stable docs man Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual 100 Chapter 5 libGammu Gammu Manual Release GAMMU E RSION Q Warning doxygenstruct Cannot find file home docs checkou
216. c Last update 23 06 2003 Assembled by Balazs Nagy lt js iksz hu gt Alfred R Nurnberger lt arnu flosys com gt Hugh Blemings Hugh Blemings vsb com au Mike Bradley lt mike trumpington st gt Odinokov Serge lt sergeOtakas lt gt Pavel Janik lt Pavel Janik cz Pawel Kot lt pkot linuxnews pl gt Marcin Wiacek Marcin MWiacek com Jens Benn fors lt jens bennfors ing hj se gt Michael Hund michael drhund de Jay Bertrand lt jay bertrand libertysurf fr gt arnu venia net gt Andrew Kozin Pavel Machek lt pavel ucw cz gt Diego Betancor lt dbetancor duocom net gt and other members of gnokii mailing list and authors of some WWW pages Note this information isn t and can t be complete If you know anything about features not listed here or you noticed a bug in this list please notify us via e mail Thank you 13 2 1 Frame format for MBUS version 1 Request from Computer Answer from Phone DestDEV SrcDEV FrameLength MsgType block id ChkSum where DestDEV SrcDEV 0x00 phone Oxf8 PC wakeup msg Oxe4 PC normal msg FrameLength length of data frame Maximal 0x78 Longer frames are divided into smaller MsgType see List block main frame Las request identity number 1 n incremented after the request is accepted ChkSum XOR on frame s all numbers Ack from Phone 240 Chapter 13 Phone Protocols Gammu Manual Release GAMMU ERSION DestDE
217. ca 0x03 0x00 number 0x00 Get Basic Prod Code Oxca 0x04 Get Basic Prod Code Oxca 0x04 0x00 number 0x00 Set Product Code Oxcb 0x01 product code 0x00 Set Order Number Oxcb 0x02 number 0x00 Set Prod Ser Number Oxcb 0x03 number 0x00 Get original IMEI Oxcc 0x01 Get original IMEI Oxcc 0x01 IMEI 0x00 Get Manufacture Month Oxcc 0x02 Get Manufacture Month Oxcc 0x02 0x00 string 0x00 Get Purchare date t Oxcc 0x04 Get Purchare date Oxcc 0x04 0x00 string 0x00 Set Made dat Oxcd 0x02 string 0x00 Make all phone tests Oxce 0xld 0xfe 0x23 0x00 0x00 Make one phone test Oxce 0x1d numl num2 num3 num4 Where numl1 num4 0x02 0x00 0x00 0x00 0x04 0x00 0x00 0x00 0x08 0x00 0x00 0x00 0x10 0x00 0x00 0x00 0x20 0x00 0x00 0x00 0x40 0x00 0x00 0x00 0x80 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x02 0x00 0x00 0x00 0x04 0x00 0x00 Power off No test for Security data 0x00 0x10 0x00 0x00 0x00 0x20 0x00 0x00 0x00 0x40 0x00 0x00 0x00 0x80 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x10 0x00 Result of phone tests Oxcf Result of phone tests Oxcf number of tests results of next tests Oxdl 2 N5110 Oxd1 0x00 Oxld 0x00 0x01 0x08 0x00 LCD Test Oxd3 value where value 0x03 0x02 1 st test 0x03 0x01 2 nd test 0x02 0x03 clears screen ACD Readings N6150 Oxd4 0x02 0x00 0x02 0x00 0x0e 0x
218. celdiverts 147 checkversion STABLE 168 COLOUROPERATOR fileID netcode 158 COLOURSTARTUP fileID 158 conferencecall id 147 convertbackup source file output file 162 copybitmap inputfile outputfile OPERA TORIPICTUREISTARTUPICALLER 157 copyringtone source destination RTTLIBINARY 158 DEALER 158 DEALER text 158 decodebinarydump file phonemodel 167 decodesniff MBUS2IIRDA file phonemodel 167 deleteallmemory DCIMCIRCIONIVMISMIMEIMTIFDISL 156 326 Index Gammu Manual Release OGAMMUyERSIONO deleteallsms folder 150 deletecalendar start stop 159 deletefiles fileID 157 deletefolder name 157 deletememory DCIMCIRCIONIVMISMIMEIMTIFDISL start stop 156 deletesms folder start stop 150 deletetodo start stop 159 deletewapbookmark start stop 165 dialvoice number showlhide 148 displaysms options like in sendsms 150 divert getlset allibusylnoansloutofreach alllvoicelfaxldata number timeout 148 EMS unicode 16bit format Icrasbiut text text unicodefiletext file defsound ID defanimation ID tonelO file tone10long file tone12 file tone12long file toneSE file toneSElong file fixedbitmap file variablebitmap file variablebitmaplong file animation frames filel protected num ber 151 getmemory DCIMCIRCIONIVMISMIMEIMTIFDISL start stop nonempty 156 getmmsfolders 165 getmmssettings start stop 16
219. channel option Service is not running Service configuration is missing Command rejected because device was busy Wait and restart Could not connect to the server Could not resolve the host name Failed to get SMSC number from phone Operation aborted Installation data not found please consult debug log and or documentation for more details Entry is read only 9 4 Examples 9 4 1 Configuration To check it out you need to have configuration file for gammu see Gammu Configuration File for more details about 1t 9 4 2 Sending messages Note All messages bellow are sent to number 123456 replace it with proper destination Send text message up to 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 long text message EXT 123456 len 400 echo All your base are belong to us gammu sendsms TI 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 predefined sound and animation from 2 bitmaps gammu sendsms EMS 123456 text Greetings defsound 1 text from Gammu tonel0 axelf 9 4 Examples xt animatio Gammu Manual Release GAMMU ERSIONAO Send protected message with ringtone
220. cial libraries at all to build but you might miss some features Optional libraries include Bluez libs Required for Bluetooth support on Linux See also http www bluez org libusb 1 0 Required for fbususb dku2 connection support on Linux See also http libusb sourceforge net libCURL Required for new versions notification see gammu checkversion and OpenCellID access see gammu getlocation See also http curl haxx se libcurl libiconv Used to support more character sets in AT engine See also http www gnu org software libiconv 1 3 Installing Gammu 3 Gammu Manual Release GAMMU E HS TO N 0 Gettext Localization of strings See also http www gnu org software gettext MySQL Required for MySQL Backend in SMS Daemon See also http mysql com PostgreSQL Required for PostgreSQL Backend in SMS Daemon See also http www postgresql org unixODBC Required for ODBC Backend in SMS Daemon Note Not needed on platforms having native ODBC support such as Microsoft Windows See also http www unixodbc org libdbi Required for DBI Backend in SMS Daemon Note Required at least version 0 8 2 See also http libdbi sourceforge net Python Gammu has a Python bindings see python gammu See also http www python org 4 Chapter 1 Gammu project Gammu Manual Release OGAMMUyERSIONO SQLite libdbi drivers with SQLite Nee
221. ckends themselves are described in their sections this document describes general database structure and re quired tables More SMS daemons can share single database If you do not specify PhonelD in their configuration all are treated equally and you have no guarantee which one sends outgoing message If you configure PhoneID and use it when inserting message to the outbox table gammu smsd inject does this each SMS daemon will have separate outbox queue See also Multiple modems Receiving of messages Received messages are stored in inbox table Transmitting of messages Transmitted messages are read from table outbox and possible subsequent parts of the same message from out box multipart Description of tables daemons Information about running daemons gammu Table holding single field Version version of a database schema See History of database structure for details what has changed inbox Table where received messages will be stored Fields description UpdatedInDB timestamp when somebody daemon user etc updated it ReceivingDateTime timestamp when SMS was received Text text encoded SMS text for all SMS 10 6 Backend services 219 Gammu Manual Release GAMMU ERSIONO SenderNumber varchar 20 decoded SMS sender number Coding enum Default_No_Compression Unicode_No_Compression 8bit Default_Compression Unicode_Compressio SMS text coding UDH text
222. ckoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani 5 3 libGammu C API 113 Gammu Manual Release GAMMU ERSIONO 5 3 18 Nokia Warning doxygenfunction Cannot find file nome docs checkouts readthedocs org user_builds gammu checkoutp stable docs man Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam 5 3 19 Ringtone Warning doxygenfunction Cannot find file nome docs checkouts readthedocs org user_builds gammu checkoutp stable docs man Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file ho
223. ckouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual 5 3 libGammu C API 9 N Gammu Manual Release GAMMU ERSIONO Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkou
224. cmake DCMAKE TOOLCHAIN FILE cmake Toolchain mingw32 cmake DBUILD SHARED LIBS OFF V DWITH MySQL OFF DWITH Postgres OFF DWITH GettextLibs OFF DWITH Iconv OFF DWITH CURL OFF 8 Chapter 1 Gammu project Gammu Manual Release GAMMU E RSION Q To be compatible with current Python on Windows we need to build against matching Microsoft C Runtime library For Python 2 4 and 2 5 MSVCR71 was used for Python 2 6 the right one is MSVCR90 To achieve building against different MSVCRT you need to adjust compiler specifications example is shown in cmake mingw spec which is used by CMakeLists txt You might need to tune it for your environment Third party libraries The easies way to link with third party libraries is to add path to their installation to cmake Toolchain mingw32 cmake or to list these paths in CMAKE FIND ROOT PATH when invoking cmake MySQL You can download MySQL binaries from http dev mysql com but then need some tweaks cd mysql lib opt reimp exe d libmysql lib i586 mingw32msvc dlltool kill at input def libmysql def dllname libmysql dll output lib libmysql a reimp exe is part of mingw utils and can be run through wine I didn t try to compile native binary from it PostgreSQL You can download PostgreSQL binaries from lt http www postgresql org gt but then you need to add wldap32 dll library to bin Gettext For Gettext internationali
225. consist of following fields Unicode Whether to use Unicode for the message ReplaceMessage Id of message which this message is supposed to replace Unknown Boolean flag indicating there was some part which Gammu could not decode Class Message class Entries Actual message data see SMS Info Part Object Example SMSINFO class ts i Entries ID e Text Butter This is a L ID Text Buffer message Italic True ID Test Buffer from ID Text Buffer Gammu Bold True l SMS Info Part Object Message component can consist of following fields ID Identification of the part type Text 64 Chapter 4 python gammu Gammu Manual Release GAMMU ERSION ConcatenatedText Long Contacenated SMS when longer than 1 SMS ConcatenatedAutoTextLong Contacenated SMS auto Default Unicode coding e ConcatenatedTextLongl6bit ConcatenatedAutoTextLongl6bit e NokiaProfileLong Nokia profile Name Ringtone ScreenSaver e NokiaPictureImageLong Nokia Picture Image text NokiaScreenSaverLong Nokia screen saver text e NokiaRingtone Nokia ringtone old SM2 0 format 1 SMS e NokiaRingtoneLong Nokia ringtone contacenated when very long NokiaOperatorLogo Nokia 72x14 operator logo 1 SMS e NokiaOperatorLogoLong Nokia 72x14 op logo or 78x21 in 2 SMS NokiaCallerLogo
226. cs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning dox
227. d generic interface using ODBC and DBI Avail ability of the backends depdens on compile time options Available drivers odbc Connects to the database using ODBC see ODBC Backend native_mysql Stores messages in MySQL database see MySQL Backend for details native_pgsql 188 Chapter 10 SMS Daemon Gammu Manual Release GAMMU ERSION Stores messages in PostgreSQL database see PostgreSQL Backend for details db2 firebird freetds ingres msql mysql oracle pgsql sqlite sqlite3 Stores messages using DBI library in given backend You need to have installed appropriate DBI driver to make it work See DBI Backend for details SOL SQL dialect to use This is specially useful with ODBC Backend where SMSD does not know which server it is actually talking to Possible values emysql MySQL ogsql PostgreSQL sqlite SQLite emssql Microsoft SQL Server esybase Sybase access Microsoft Access odbc Generic ODBC New in version 1 28 93 See also You can also completely customize SQL queries used as described in SOL Queries DriversPath Path where DBI drivers are stored this usually does not have to be set if you have properly installed drivers DBDir Database directory for some currently only sqlite DBI drivers Set here path where sqlite database files are stored Files backend options The FILES backend accepts following configuration options See Files backend for more detailed s
228. de 16bit flash len len autolen len unicode enablevoice disablevoice enablefax disablefax enableemail disableemail voidsms replacemessages ID replacefile file text msgtext textutf8 msgtext 153 TEXT text 158 TODO file location 155 TODO target vcs file location 162 transfercall id 148 unholdcall id 148 VCARDIOIVCARD21 file nokia 155 VCARDIOIVCARD2I target vcf file SMIME loca tion 162 version 168 WALLPAPER fileID 158 WAPINDICATOR URL Title 155 WAPSETTINGS file location DATAIGPRS 155 SMIME location gammu config command line option c config CONFIG 233 f force 233 h help 233 gammu detect command line option b no bluez 232 d debug 231 h help 231 u no udev 231 v version 231 w no win32 serial 232 gammu smsd command line option E uninstall event log 179 G group group 178 L no use log 179 S run service 179 U user user 178 X suicide seconds 179 c config file 178 d daemon 178 e install event log 179 f max failures count 178 h help 178 i install service 178 k stop service 178 use log 179 n service name name 179 p pid file 178 328 Index Gammu Manual Release OGAMMUyERSIONO s Start service 178 u uninstall service 178 v version 178 gammu smsd inject command line option L no us
229. ded cmds 0x64 cmd where cmd 0x00 0x01 0x03 0x04 0x06 S Reset phone settings 0x65 value 0 where value 0x0 0x38 reset UI 0x4 r Reset phone settings 0x65 0x00 s Get IMEI 0x66 r Get IMEI 0x66 0x01 IM S ACD Readings N6150 0x68 r ACD Readings N6150 0x68 S Get Product Profile Settings 0x6a r Get Product Profile Settings 0x6a 4bytes w s Set Product Profile Settings Ox6b 4bytes w r Set Product Profile Settings OK Ox6b s Get code 0x6e code where code see r Get code 0x6e code al where code see allowed S 2782 0x74 Ox01 Ox 0 T 5 off on reset doesn t ask for PIN again reset PIN is requested In 5110 makes reset without PIN CONTACT SERVICE Don t try it x00 8 reset UI User Interface settings SCM and call counters 0 reset test 36 in netmonitor EI 0x00 ith Product Profile Settings ith Product Profile Settings 0x08 0x0004 no allowed code lowed allowed sec cod text 0x08 0x0004 no yes 01 0x0e 282 Chapter 13 Phone Protocols 1 frame ver num len Unicode d sword Unico DN Unicode seri Gammu Manual Release GAMMU ERSION locksinfo lockl selected lock is user 2922 0x74 s Call commands Ox7c block where where command values command 0x01 values number ASCII 0x00 makes voice call command 0x02
230. ded for testing of SMSD using libdbi driver libdbd sqlite3 see Testing Gammu See also http www sqlite org glib Currently needed only for gammu detect See also http www gtk org gudev Currently needed only for gammu detect See also http gudev sourceforge net 1 3 5 Compiling on Linux Unix Systems First install all Dependencies and Optional Dependencies Do not forget to install corresponding devel packages as well they are usually named with dev or devel suffix depending on your distribution For example on Debian or Ubuntu you can install all optional packages by following command apt get install cmake python dev pkg config libmysqlclient dev libpq dev libcurl4 gnutls dev libusb 1 0 0 dev libdbi0 dev libbluetooth dev libgudev 1 0 dev libglib2 0 dev unixodbc dev For openSUSE the installation all optional packages could look like zypper install libusb 1 0 devel libdbi devel bluez devel postgresql devel mysql devel python devel libcurl devel cmake pkgconfig unixODBC devel glib2 devel libgudev 1_0 devel For compatibility reasons configure like wrapper is provided if you don t need much specific tuning you can use usual set of commands configure make sudo make install The configure wrapper will create directory build configure and build all binaries there nothing is changed in source tree for example gammu binary is in build configure gammu directory
231. 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 See lt http wammu eu support bugs gt for information how to report it 116 Unknown response from phone See lt http wammu eu support bugs gt for information how to report it 117 Unknown frame See lt http wammu eu support bugs gt 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 Entry is empty 123 Security error Maybe no PIN 124 Invalid location Maybe too high 9 3 Return values 169 Gammu Manual Release GAMMU ERSIONO 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 c
232. docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani 118 Chapter 5 libGammu Gammu Manual Release GAMMU E RSION Q Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygentypedef Cannot find file home docs checkouts readthedocs org user builds gammu checkouts stable docs manu 5 3 23 State machine Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygentypedef Cannot find file home docs checkouts readthedocs org user buil
233. ds gammu checkouts stable docs manu Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygentypedef Cannot find file home docs checkouts readthedocs org user builds gammu checkouts stable docs manu Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani 5 3 libGammu C API 119 Gammu Manual Release GAMMU ERSIONO Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file nome docs checkouts readthedocs org user_builds gammu checkoutp stable docs man Warning doxygenfunction Cannot find file home docs checkouts readthedocs org
234. e ither received messages or saved into Outbox Inbox Note that you can tx save message into this memory using Move option Picture messages are not her e Number of unread messages in SIM memory 0x0050 0x07 location number 2 bytes 0x07 38 width height lenH lenL bitmap 0x00 0x00 ta std size 72x28 0x0051 location number 2 bytes 0x07 0x0083 folder location 2bytes name Unicode 0x00 0x00 0x0084 folder 0x00 0x00 name Unicode 0x00 0x00 0x0096 location OxOf 0x07 where location nA e o LM tries with 0x09 0x11 0x19 0x21 0x29 0x31 0x39 0x41 0x49 Returned value with 0x21 0x0097 number of pictures 2 bytes numberl 2 bytes number2 2 bytes Images folder folder folder folder folder 0x03 0x0104 status folder ID location 2 bytes 0x02 0x01 0x0105 folder ID location 2 bytes 0x00 0x0106 0x02 write failed errorcode 0x0107 folderID location 2 bytes 0x01 0x65 0x01 where folderID S 0x14 0x017B ytes with lo ext len text Kat len text SMS stuff 0x0108 status folderID 0x00 location type sender number where status 0x01 reveived read received unread 0x05 stored sent 0x07 stored not sent re folderID S 0x14 0x017B 278 Chapter 13 Phone Protocols Gammu Manual Release GAMMU ERSION wher received SMS type 0x00 0x01 delivery rep
235. e e Global bool Whether to use global debug structure overrides File Returns None Return type None SetDebugLevel Level Sets state machine debug level accorting to passed string You need to configure output file using SetDebugFile to activate it Parameters Level string name of debug level to use currently one of nothing text textall binary errors textdate textalldate errorsdate Returns None Return type None SetFileAttributes Filename ReadOnly Protected System Hidden Sets file attributes Parameters Filename string File to modify e ReadOnly bool Whether file is read only Default to False Protected bool Whether file is protected Default to False System bool Whether file is system Default to False Hidden bool Whether file is hidden Default to False Returns None Return type None SetIncomingCB Enable Gets network information from phone 4 2 API documentation 45 Gammu Manual Release GAMMU ERSIONAO Parameters Enable bool Whether to enable notifications default is True Returns None Return type None SetIncomingCall Enable Activates deactivates noticing about incoming calls Parameters Enable bool Whether to enable notifications default is True Returns None Return type None SetIncomingCallback Callback Sets callback function which is called whenever any enabled incoming event appears Please note that you
236. e toneSElong unholdcall id file variablebitmap file variablebitmaplong gammu command line option 148 file animation frames file UnholdCall gammu StateMachine method 48 gammu command line option 153 Unicode 64 splitcall id Unknown 64 gammu command line option 148 Used 73 SplitCall gammu StateMachine method 47 User 197 SQL 197 218 STARTUP filel11213 V gammu command line option 158 Validity 64 STARTUP file Value 69 71 73 gammu command line option 158 VCARDIOIVCARD21 file SMIME location nokia State 62 l l gammu command line option 155 StateMachine class in gammu 33 VCARDIOIVCARD21 target vcf file SMIME location StatusFrequency 176 gammu command line option 162 Strikethrough 66 version switchcall id gammu command line option 148 SwitchCall gammu StateMachine method 47 gammu command line option 168 Version in module gammu 48 SynchronizeTime 160 W ea A WALLPAPER fileID T gammu command line option 158 WAPINDICATOR URL Title Terminate gammu StateMachine method 47 gammu command line option 155 terminate gammu worker GammuWorker method 55 WAPSETTINGS file location DATAIGPRS TEXT gammu command line option 158 Text 61 63 TEXT inputunicode 16bit flash len len autolen len unicode enablevoice disablevoice enablefax disablefax enableemail disableemail voidsms replacemessages ID replacefile file text msgtext textut
237. e password len pag where auth 0x00 normal 0x01 secure call type 0x00 analogue 0x01 I call speed 0x00 9600 0x01 14400 0x02 USSD bearer 13 4 Nokia 6110 255 code con_ty t 1 frame ver_num_len Unicode d sword Unico DN Gammu Manual Release GAMMU ERSIONO len service num Unicode IP frame type service number len IP service code Unicode where type 0x01 service number 0x00 IP r Get WAP settings 2 err 0x001d error where error 0x05 0x40 Security commands 4 02 Meaning unknown S 0x00 0x00 0x07 0x11 0x00 0x10 0x00 0x00 This frame hangs phone N3310 S Open simlock 1 f 0x02 0x03 0x1f 0x11 0x01 0x01 0x10 0x00 r Open simlock 1 0x02 s N6150 0x08 0x00 T r N6150 0x08 s Enable extended cmds 0x64 cmd where cmd 0x00 off 0x01 on 0x02 enter service mode 0x03 reset doesn t ask for PIN again 0x04 reset PIN is requested In 5110 makes reset without PIN 0x06 CONTACT SERVICE Don t try it S Reset phone settings 0x65 value 0x00 where value 0x08 reset UI User Interface settings 0x38 reset UI SCM and call counters 0x40 reset test 36 in netmonitor r Reset phone settings 0x65 0x00 S Get IMEI 0x66 r Get IMEI 0x66 0x01 IMEI 0x00 S ACD Readings N6150 0x68 r ACD Readings N6150 0x68 S Get Product Profile Settings
238. e for testing use Dummy Driver instead 5 1 Hints for libGammu Novices This is very short overview of libGammu usage You will probably need to study libGammu C API to find out what functions you want to use 5 1 1 Basic library usage You need to include main header file include lt gammu h gt To compile you need to pass flags from pkg config pkg config cflags gammu To link you need to pass from pkg config pkg config libs gammu Gammu stores all its data in a GSM_StateMachine This structure is not public so all you can define is a pointer to it GSM StateMachine state_machine You ll want to check for errors from time to time Do it using a function something like this with help of GSM ErrorString void check error GSM Error err if err ERR NONE return fprintf stderr Gammu failure s n GSM_ErrorString error 77 Gammu Manual Release GAMMU ERSIONAO exit 1 As libGammu does interact with strings in your local encoding it is good idea to initialize locales subsystem first otherwise you would get broken non ASCII characters by calling GSM_InitLocales GSM InitLocales NULL You first need to allocate a state machine structure using GSM AllocStateMachine State machine GSM AllocStateMachine Now think about the configuration file To use the default
239. e year month day end date year month day start time hour minutes end time 302 Chapter 13 Phone Protocols Gammu Manual Release GAMMU E RSION Q hour minutes four unknown to me yet values date of creation year month day the meaning of this date is not sure for me yet To delete entries AT SSHD 1 OK 13 10 2 Task Entries There is yet another type that can be selected by AT SSHT 3 This is Organizer gt Task AT SSHT 3 OK AT SSHR 0 SSHR 1 10 Test event 10 2010 06 05 60823 11 25 60823 11 26 0 0 0 0 0 0 0 0 0 OK Please note that the format of output is different when you read the specific task AT SSHR 1 SSHR 1 10 Test event 12 Some details 2010 6 3 2010 6 5 1 2010 6 4 10 11 0 2 0 You can similarly add a new task AT SSHW 9 New task1 10 0123456789 2010 06 21 2010 06 30 1 2010 06 27 08 07 0 2 0 0 SSHW 2 OK Read it back AT SSHR 2 SSHR 2 9 New task1 10 0123456789 2010 6 21 2010 6 30 1 2010 6 27 8 7 0 2 0 OK And modify AT SSHW 9 New task1 11 New details 2010 06 21 2010 06 30 1 2010 06 27 08 07 0 2 0 2 SSHW 2 OK AT SSHR 2 SSHR 2 9 New task1 11 New details 2010 6 21 2010 6 30 1 2010 6 27 8 7 0 2 0 OK To delete entries AT SSHT 3 OK AT SSHR 0 SSHR 1 10 Test event 10 2010 06 05 60823 11 25 60823 11 26 0 60823 11 26 0 0 0 0 0 SSHR 2 9 New task1 10 2010
240. e Oxlb 0x0006 00 03 118 107 100 J O1 o Received frame Oxlb 0x002e 03 2b 18 08 00 01 48H 28 00 20 56V 20 300 344 2e 30 H V 04 0 344 0a 322 399 2d 311 300 2d 300 311 0a 4eN 48H 4dM 2d 37 4 29 10 01 NHM 7 0a 28 63c 29 20 4eN 4dM 50P 2e 00 00 00 00 00 se NMP e aie ane Sending frame Oxlb 0x0006 00 03s LOO OO SEQ aa Received frame Oxlb 0x002e 03 2b 19 08 00 01 48H 28 00 20 56V 20 300 344 2e 30 H V 04 0 344 0a 322 399 2d 311 300 2d 300 311 0a 4eN 48H 4dM 2d 37 4 29 10 01 NHM 7 0a 28 63c 29 20 4eN 4dM 50P 2e 00 00 00 00 00 vic NMP ear Sending frame Oxlb 0x0006 00 FOS La 07 00 pOT as Received frame Oxlb 0x002e 03 2b 1la 08 00 01 48H 28 00 20 56V 20 300 344 2e 30 H V 04 0 344 0a 322 399 2d 311 300 2d 300 311 0a 4eN 48H 4dM 2d 37 4 29 10 01 NHM 7 0a 28 63c 29 20 4eN 4dM 50P 2e 00 00 00 00 00 eG INMP caine Sending frame Oxlb 0x0006 9Q OS Lb OP OO Bs ry aia Received frame Oxlb 0x002e 03 2b 1b 08 00 01 48H 28 00 20 56V 20 300 344 2e 30 H V 04 0 344 0a 322 399 2d 311 300 2d 300 311 0a 4eN 48H 4dM 2d 37 4 29 10 01 NHM 7 0a 28 63c 29 20 4eN 4dM 50P 2e 00 00 00 00 00 LG NINE oe Sending frame Oxlb 0x0006 oo iOS A qd 52 ere US Received frame Oxlb 0x002e 03 2b 1c 08 00 01 48H 28 00 20 56V 20 300 344 2e 30 H V 04 0 344 0a 322 399 2d 311 300 2d 300 311 0a 4eN 48H 4dM 2d 37 4
241. e defaults should work fine in most environments You can find more information on customizing SMSD in SMSD Configuration File 2 5 3 Running SMSD With configuration file ready you can actually start SMSD You can do this manually or as a system wide service For manual startup just execute it gammu smsd Alternatively you can specify path to the configuration file gammu smsd c path to gammu smsdrc The binary packages on Linux usually come with support for starting SMSD as a system wide daemon With systemd you can start it by systemctl start gammu smsd service 2 5 4 Sending message through SMSD Once SMSD is up and running you can send some messages using it gammu smsd inject TEXT 123456 text All your base are belong to us You can find more examples in the gammu smsd inject documentation Examples 2 5 Starting with SMSD 21 Gammu Manual Release GAMMU ERSIONO 22 Chapter 2 Quick starter guide CHAPTER 3 Frequently Asked Questions 3 1 General Gammu FAQ 3 1 1 Will Gammu work on my system Gammu is known to run on wide range of systems It can be compiled natively on Linux Mac OS X FreeBSD OpenBSD and Microsoft Windows It can be probably compiled also elsewhere but nobody has yet tried On some platforms however you might lack support for some specific kind of devices eg Bluetooth or USB See also Installing Gamm
242. e docs mam Warning doxygenfunction Cannot find file nome docs checkouts readthedocs org user_builds gammu checkoutp stable docs man Warning doxygentypedef Cannot find file home docs checkouts readthedocs org user builds gammu checkouts stable docs manu 98 Chapter 5 libGammu Gammu Manual Release GAMMU E RSION Q Warning doxygentypedef Cannot find file hbome docs checkouts readthedocs org user builds gammu checkouts stable docs manu Warning doxygentypedef Cannot find file hbome docs checkouts readthedocs org user builds gammu checkouts stable docs manu Warning doxygentypedef Cannot find file hbome docs checkouts readthedocs org user builds gammu checkouts stable docs manu Warning doxygentypedef Cannot find file hbome docs checkouts readthedocs org user builds gammu checkouts stable docs manu 5 3 5 Call Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org
243. e log 181 c onfig file 181 h help 181 use log 181 v version 181 gammu smsd monitor command line option C csv 182 L no use log 182 c config file 182 d delayzseconds 182 h help 182 use log 182 n loops count 182 v version 182 gammu data module 54 gammu ERR_ABORTED 56 gammu ERR_BADFEATURE 56 gammu ERR_BUG 56 gammu ERR_BUSY 56 gammu ERR_CANCELED 56 gammu ERR_CANTOPENFILE 56 gammu ERR_CORRUPTED 56 gammu ERR_COULDNT_CONNECT 56 gammu ERR COULDNT RESOLVE 56 gammu ERR DATACONVERTED 56 gammu ERR DEVICEBUS Y 56 gammu ERR DEVICECHANGESPEEDERROR 56 gammu ERR DEVICEDTRRTSERROR 56 gammu ERR_DEVICELOCKED 56 gammu ERR DEVICENODRIVER 56 gammu ERR DEVICENOPERMISSION 57 gammu ERR DEVICENOTEXIST 57 gammu ERR_DEVICENOTWORK 57 gammu ERR_DEVICEOPENERROR 57 gammu ERR_DEVICEPARITYERROR 57 gammu ERR_DEVICEREADERROR 57 gammu ERR_DEVICEWRITEERROR 57 gammu ERR_DISABLED 57 gammu ERR_EMPTY 57 gammu ERR_EMPTYSMSC 57 gammu ERR_FILEALREADYEXIST 57 gammu ERR_FILENOTEXIST 57 gammu ERR_FILENOTSUPPORTED 57 gammu ERR_FOLDERNOTEMPTY 57 gammu ERR_FOLDERPART 57 gammu ERR_FRAMENOTREQUESTED 58 gammu ERR_FULL 58 gammu ERR_GETTING_SMSC 58 gammu ERR_GNAPPLETWRONG 58 gammu ERR INSIDEPHONEMENU 58 gammu ERR INSTALL NOT FOUND 58 gammu ERR INVALIDDATA 58 gammu ERR_INVALIDDATETIME 58 gammu ERR INVALIDLOCATION 58 gammu ERR MEMORY 58 gammu ERR MORE
244. e option 152 disableemail gammu command line option 154 disablefax gammu command line option 154 disablevoice gammu command line option 154 e install event log gammu smsd command line option 179 enableemail gammu command line option 154 enablefax gammu command line option 154 enablevoice gammu command line option 154 f debug file filename gammu command line option 147 f force gammu config command line option 233 jadmaker command line option 233 f max failures count gammu smsd command line option 178 fixedbitmap gammu command line option 152 flash gammu command line option 153 flat gammu command line option 157 flatall gammu command line option 157 folder number gammu command line option 150 format Icrasbiut gammu command line option 152 h help 321 Gammu Manual Release GAMMU E RSION gammu config command line option 233 gammu detect command line option 231 gammu smsd command line option 178 gammu smsd inject command line option 181 gammu smsd monitor command line option 182 jadmaker command line option 233 hidden gammu command line option 156 i Anstall service gammu smsd command line option 178 inputunicode gammu command line option 154 k stop service gammu smsd command line option 178 use log gammu smsd command line option 179 gammu smsd inject command line option 181 gammu smsd monitor command line option 182 Jen
245. e start stop resetphonesettings PHONE 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 166 Chapter 9 Gammu Utility Gammu Manual Release OGAMMUyERSIONO 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 ALT disables netmon and PPS all hidden menus FACTORY Reset to factory defaults changes like after UIF clear date time 9 2 22 Dumps decoding commands Note These commands are available only if Gammu was compiled with debugging options decodebinarydump file phonemodel Decodes a dump made by Gammu with LogFormat set to binary decodesniff MBUS2 IRDA file phonemodel Allows one to decode sniffs See Discovering protocol for more details 9 2 23 Other commands entersecuritycode PIN PUK PIN2 PUK2 PHONE NETWORK code newpin Allow one to enter security code from PC When code is it is read from stdin In case entering PUK some phones require you to set new PIN as well presskeysequence mMnNpPuUdD 123456789 0 gGrR lt gt hHcCjJJ FoOmMdDEe Press specified key sequence on phone keyboard mM Menu nN Names key pP Power uU Up dD
246. e this structure so you will get compiler error You should allocate this pointer by GSM AllocStateMachine and free by GSM FreeStateMachine 2 Change all phone functions from sm Phone Functions SomeFunction to GSM SomeFunction Only functions which results were stored inside state machine structure have changed signature to include results of the operation 3 All callbacks are set by function GSM Set Callback instead of directly accessing structure 4 Some function have been renamed to follow GSM_x naming conventions As there might be some functions still missing from new API don t hesitate to contact author or ask on mailing list if you miss something API documentation can be generated using Doxygen make apidoc in build tree or Sphinx and is part of this manual See also libGammu 5 4 Porting from libGammu older than 1 12 0 123 Gammu Manual Release GAMMU ERSIONO 124 Chapter 5 libGammu CHAPTER 6 Gammu internals Gammu project internals are a bit more complicated than required mostly for historical reasons Before digging into source code you should look at Directory structure and Coding Style 6 1 Reply functions When phone gives answers we check if we requested received info and we redirect it to concrete reply function which will decode it Different phone answers can go to one reply function let s say responsible for getting sms status GSM_Reply Function Defines reply function for
247. eckouts readthedocs org user builds gammu checkouts stable docs manu Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual 5 3 13 Keys Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual 5 3 14 Limits 5 3 15 Memory Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file nome docs checkouts readthedocs org user_builds gammu checkoutp stable docs man Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readt
248. eckouts readthedocs org user_builds gammu checkoutp stable docs man Warning doxygenfunction Cannot find file nome docs checkouts readthedocs org user_builds gammu checkoutp stable docs man Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam 5 3 libGammu C API 93 Gammu Manual Release GAMMU ERSIONO Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file nome docs checkouts readthedocs org user_builds gammu checkoutp stable docs man Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygendefine Cannot find file home docs c
249. ed SendBefore and SendAfter fields Changed in version 1 29 90 Also PostgreSQL fields are now case sensitive same as other backends Changed in version 1 29 93 12 the changes only affect MySQL structure changing default values for timestamps from 0000 00 00 00 00 00 to CURRENT_TIMESTAMP by using triggers to update to this version just execute triggers definition at the end of SQL file Changed in version 1 28 94 11 all fields for storing message text are no longer limited to 160 chars but are arbitrary length text fields Changed in version 1 25 92 10 DeliveryDateTime is now NULL when message is not delivered added several indexes Changed in version 1 22 95 9 added sent received counters to phones table Changed in version 1 22 93 8 Signal and battery state are now stored in database Changed in version 1 20 94 7 Added CreatorID to several tables Changed in version 1 07 00 6 Many fields in outbox can now be NULL Changed in version 1 06 00 5 Introduced daemons table and various other changes Changed in version 1 03 00 10 6 Backend services 223 Gammu Manual Release GAMMU ERSIONAO 3 Introduced phones table and various other changes Changed in version 0 98 0 Examples Creating tables SQL scripts to create all needed tables for most databases are included in Gammu documentation docs sql As well as some PHP scripts interacting with the database For example to create SQLite tab
250. ed entry Return type int AnswerCall ID All Accept current incoming call Parameters ID int ID of call A11 bool Answer all calls Returns None Return type None CancelAllDiverts New in version 1 31 90 Cancels all call diverts Returns None Return type None CancelCall JD All Deny current incoming call Parameters ID int ID of call A11 bool Cancel all calls Returns None Return type None ConferenceCall D Initiates conference call Parameters ID int ID of call Returns None Return type None DeleteAllCalendar Deletes all calendar entries Returns None 34 Chapter 4 python gammu Gammu Manual Release GAMMU ERSION Return type None DeleteAllMemory Type Deletes all memory phonebooks or calls entries of specified type Parameters Type string Memory type one of ME SM ON DC RC MC MT FD VM Returns None Return type None DeleteAllToDo Deletes all todo entries in phone Returns None Return type None DeleteCalendar Location Deletes calendar entry Parameters Location int Calendar entry to delete Returns None Return type None DeleteFile FileID Deletes file from filesystem Parameters FileID string File to delete Returns None Return type None DeleteFolder FolderID Deletes folder on filesystem Parameters FolderID string Folder to delete Returns None Return type None DeleteMemory
251. eeping messages in phone restore file yes Warning Please note that restoring deletes all current content in phone If you want only to add entries to phone use gammu addnew Restore settings written in file created using gamnu backup command In some phones restoring calendar notes will not show error but won t be done when phone doesn t have set clock inside Restores SMSes from file format like gammu backupsms uses to selected folder in phone 9 2 Description 161 Gammu Manual Release GAMMU ERSIONAO savefile TYPE type options Converts between various file formats supported by Gammu following types are supported BOOKMARK target url file location Converts backup format supported by Gammu to vBookmark file CALENDAR target vcs file location Allows one to convert between various backup formats which gammu supports for calendar events The file type is guessed for input file guess is based on extension and file content for output solely on extension TODO target vcs file location Allows one to convert between various backup formats which gammu supports for todo events The file type is guessed for input file guess is based on extension and file content for output solely on extension VCARD10 VCARD21 target vcf file SM ME location Allows one to convert between various backup formats which gammu supports for phonebook events The file type is guessed for input file guess is b
252. encoded User Data Header text SMSCNumber varchar 20 decoded SMSC number Class integer SMS class or 1 0 is flash SMS 1 is normal one TextDecoded varchar 160 decoded SMS text for Default Alphabet Unicode SMS ID integer unsigned SMS identificator for using with external applications RecipientID text which Gammu daemon has added it Processed enum false true you can use for marking whether SMS was processed or not outbox Messages enqueued for sending should be placed in this table If message is multipart subsequent parts are stored in table outbox multipart Fields description UpdatedInDB timestamp when somebody daemon user etc updated it InsertIntoDB timestamp when message was inserted into database SendingDateTime timestamp set it to some value when want to force sending after some planned time SendBefore time Send message before specified time can be used to limit messages from being sent in night Default value is 23 59 59 New in version 1 29 90 SendAfter time Send message after specified time can be used to limit messages from being sent in night Default value is 00 00 00 New in version 1 29 90 Text text SMS text encoded using hex values in proper coding If you want to use TextDecoded field keep this NULL or empty DestinationNumber varchar 20 recipient number Coding enum Default No Compression Unicode No Compression 8bit Default Compression
253. eply 18 Chapter 1 Gammu project CHAPTER 2 Quick starter guide 2 1 Gammu family Gammu family consists of several programs and libraries Gammu Utility Command line utility to talk to the phone It performs one time operations only Wammu Graphical interface for Gammu providing basic functions gammu smsd Daemon to receive and send messages using your phone gammu smsd inject Injects outgoing messages into gammu smsd queue gammu detect Simple utility to detect phones or modems connected to computer python gammu Python bindings for Gammu use it from Python scripts libGammu Core library used by all other parts and you can use it directly in your C programs 2 2 Installing Gammu On most platforms you can install Gammu from binaries most Linux distributions ship Gammu and for Windows you can download binaries from Gammu website You can find more detailed instructions including instructions for compiling from source in Installing Gammu 2 3 Starting with Gammu on Linux First you need to find out device name where your phone modem is connected In most cases you can rely on gammu detect to find it it will also list all serial ports in your systems where probably nothing is connected Generally for most current modems you will end up with dev tt yUSBO The next step is to create configuration file in gammurc see Gammu Configuration File gammu device dev ttyUSBO connection at And
254. erge Gammu library has been installed Some examples Gammu on 64 bit Fedora installed to opt gammu echo opt gammu lib64 gt etc ld so conf d gammu conf Gammu installed to usr local echo usr local lib gt etc ld so conf d gammu conf The similar situation exists with Python modules if you install in path when your Python interpreter does not search it won t load newly installed Gammu bindings You can also avoid changing ldconfig configuration by installing Gammu to paths where it already searches for examble by cmake DCMAKE INSTALL PREFIX usr 1 3 6 Compiling on Microsoft Windows First install all Dependencies and Optional Dependencies 6 Chapter 1 Gammu project Gammu Manual Release GAMMU E RSION Q CMake is able to generate projects for various tools including Microsoft Visual Studio Borland toolchains Cygwin or Mingw32 Just click on CMakeLists txt in project sources and configure CMake to be able to find optional libraries see cross compilation section for more information about getting those The result should be project for your compiler where you should be able to work with it as with any other project Compiling using MS Visual C You will probably need additional SDKs Microsoft Windows Platform SDK required especially for Bluetooth It s given for free Below are links to different releases if you have problems with latest one use older The
255. ervice backend description Please note that all path should contain trailing path separator on Unix systems InboxPath Where the received SMSes are stored Default is current directory OutboxPath Where SMSes to be sent should be placed Default is current directory SentSMSPath Where the transmitted SMSes are placed if same as Out boxPath transmitted messages are deleted Default is to delete transmitted messages ErrorSMSPath Where SMSes with error in transmission is placed Default is same as Sent SMSPath 10 4 SMSD Configuration File 189 Gammu Manual Release GAMMU E RSION InboxFormat The format in which the SMS will be stored detail unicode standard detail format used for message backup by Gammu Utility see SMS Backup Format unicode message text stored in unicode UTF 16 standard message text stored in system charset The standard and unicode settings do not apply for 8 bit messages which are always written raw as they are received with extension bin Default is unicode Note In detail format all message parts are stored into signle file for all others each message part is saved separately OutboxFormat The format in which messages created by gammu smsd inject will be stored it accepts same values as Inbox Format Default is detail if Gammu is compiled in with backup functions unicode otherwise TransmitFormat The format for transmitting the SMS auto unicode 7bit Th
256. ess 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 follofing 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 UBSYSTEM tty GOTO gammu_acl_rules_end un 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 tt yACMO 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 For IrDA connections this parameters is not
257. esting of features which require internet access 12 1 5 Testing of Python interface Python module tests are performed using Dummy Driver where required It does also cover testing of SMSD interface which is done using libdbi sqlite driver 12 1 6 Testing of reply functions The tests directory contains various tests which do inject data into reply functions and check their response 12 1 7 Testing of data parsing The tests directory contains various tests which just try to parse various file formats supported by libGammu 12 1 8 Configuration of the test suite You can pass various parameters to configure the test suite 236 Chapter 12 Testing Gammu Gammu Manual Release OGAMMUyERSIONO Programs used for testing SH BIN Path to the sh program BASH BIN Path to the bash program SOQOLITE BIN Path to the sqlite3 program SED BIN Path to the sed program MYSQL BIN Path to the mysql program PSQL BIN Path to the psq1 program Limiting testsuite ONLINE_TESTING Enable testing of parts which use remote servers requires connection to interned PSQL TESTING Enable testing of PostgreSQL SMSD backend requires configured PostgreSQL database MYSQL TESTING Enable testing of MySQL SMSD backend requires configured MySQL database Database backends configuration PSQL HOST Host to use for PostgreSQL tests default 127 0 0 1 PSQL DATABASE Database to use for PostgreSQL tests default sms ad PSQL USER User to use for PostgreSQL
258. eting 0x02 Call 0x04 Birthday 0x08 block for Meeting hour minute alarm two bytes re urrance two where alarm Number of minutes before the timelof the meetii that the alarm should be triggered For meetings with No alarm OxFFFF 11 For On time 0x0000 half an hour 0x001E and so on Recurrance in hours between future occurances of th If there is no repeat this value is x0000 The si means 1 Year for Call Hour Minute Alarm as above Recurrance as above name unicode number unicode for Reminder Recurrance as above len 0x00 tring unicode for Birthday bytel byte2 alarm 4 bytes yearofbirth alarm bytel and byte2 may vary Usually are 0x00 In Birthday the Year in the common part usuall So don t consider it as Year of note neither y Birthday use the value described below where alarm 32 bit integer that is the number of seconds be alarm time and 11 59 58pm on the birthday For No 4 Ox0000FFFF 65535 YearOfBirth used instead of the one in tthe common pa but only when reading birthday entries For storim not exist AlarmType 0x00 Tone 0x01 Silent 2 Ss 0x0021 0 0x0022 0x5A 0x00 2 S 0x0025 0 0x0026 0x04 0x00 S 0x0029 r 0x002A 0x04 0x00 S Get first free pos 0x0031 r Get first free pos 0x0032 location 2bytes 13 6 Nokia 7110 277 Gammu Manual Release GAMMU ERSIONO H DR 0 0x14 Get notes info Get notes i
259. eturn type dict Get Model Reads model from phone Returns Tuple containing gammu identification and real model returned by phone Return type tuple GetNetworkInfo Gets network information Returns Dictionary with information about network NetworkName State NetworkCode CID and LAC 4 2 API documentation 39 Gammu Manual Release GAMMU ERS TON 0 Return type dict GetNextCalendar Start Location Retrieves calendar entry This is useful for continuous reading of all calendar entries Parameters Start bool Whether to start This can not be used together with Location e Location inf Last read location This can not be used together with Start Returns Dictionary with calendar values see Calendar Object Return type dict GetNextFileFolder Start Gets next filename from filesystem Parameters Start bool Whether we re starting listing Defaults to False Returns File data as dict see File Object Return type dict GetNextMemory Type Start Location Reads entry from memory phonebooks or calls Which entry shouldbe read is defined in entry This can be easily used for reading all entries Parameters Type string Memory type one of ME SM ON DC RC MC MT FD VM Start bool Whether to start This can not be used together with Location e Location int Last read location This can not be used together with Start Returns Memory entry as dict see Phonebook Object
260. ex declarations for tables primary keys CREATE UNIQUE INDEX inbox pkey ON inbox USING btree ID CREATE UNIQUE INDEX outbox pkey ON outbox USING btree ID CREATE UNIQUE INDEX outbox multipart pkey ON outbox multipart USING btree ID CREATE UNIQUE INDEX pbk groups pkey ON pbk groups USING btree ID CREATE UNIQUE I U EX sentitems_pkey ON sentitems USING btree ID Table structure for table daemons CREATE TABLE daemons Start text NOT NULL Info text NOT NULL Dumping data for table daemons Table structure for table gammu 10 6 Backend services 209 Gammu Manual Release GAMMU ERSIONO CREATE TABLE gammu Version smallint NOT NULL DEFAULT 0 Dumping data for table gammu INSERT INTO gammu Version VALUES 14 Table structure for table inbox CREATE TABLE inbox UpdatedInDB timestamp 0 WITHOUT time zone NOT NULL DEFAULT LOCALTIMESTAMP 0 ReceivingDateTime timestamp 0 WITHOUT time zone NOT NULL DEFAULT LOCALTIMESTAMP 0 Text text NOT NULL SenderNumber varchar 20 NOT NULL DEFAULT Coding varchar 255 NOT NULL DEFAULT Default No Compression UDH text NOT NULL SMSCNumber varchar 20 NOT NULL DEFAULT Class integer NOT NULL DEFAULT 1 TextDecoded text
261. expect If you want to use SMSD this topic is covered in separate FAQ see Which phone is best for SMSD gateway For backing up your contacts or calendar most of Nokia S40 or S60 phones should work as well as any other capable of AT commands Gammu also supports wide range of extensions for Samsung Motorola Siemens or Sony Ericsson phones See also Which phone is best for SMSD gateway 3 3 3 Are Nokia phones supported It depends on used operating systems Series40 and older phones should work see How to configure Nokia phone for information how to configure them Symbian based phones are covered in separate topic check Are Symbian phones supported 3 3 4 Are Symbian phones supported You need to install applet to the phone to allow Gammu talk to it For older phones Symbian 9 0 and older install gnapplet see Gnapplet Protocol Newer phones can use Python based applet called Series60 remote see Series 0 Remote Protocol This option is supported since Gammu 1 29 90 See also How to configure Symbian based phone 3 3 5 Are Andriod phones supported Unfortunately no at the moment Any help in this area is welcome 3 3 6 Are Blackberry phones supported Unfortunately no at the moment Any help in this area is welcome 26 Chapter 3 Frequently Asked Questions Gammu Manual Release GAMMU ERSION 3 3 7 Are iPhone phones supported Unfortunately no at the moment Any help in this area is welcome
262. ext x SMSInfo Entries 0 ID SMS ConcatenatedTextLong Encode message text x EncodeUnicode message unicode message text strlen message text SMSInfo Entries 0 Buffer message unicode o printf 3sin DecodeUnicodeConsole SMSInfo Entries 0 Buffer Encode message into PDU parts error GSM EncodeMultiPartSMS debug info amp SMSInfo amp SMS error handler Allocates state machine x S GSM AllocStateMachine 88 Chapter 5 libGammu contatenated Gammu Manual Release GAMMU ERSION if s NULL return 3 Enable state machine debugging to stderr Same could be achieved by just using global debug config debug_info GSM_GetDebug s GSM_SetDebugGlobal FALSE debug info GSM_SetDebugFileDescriptor stderr TRUE GSM SetDebugLevel textall debug info debug info Find configuration file first command line parameter or defaults error GSM FindGammuRC amp cfg argc 2 argv 1 NULL error_handler Read it rror GSM ReadConfig cfg GSM GetConfig s 0 0 error handler Free config file structures x INI Free cfg We have one valid configuration GSM SetConfigNum s 1 Connect to phone x 1 means number of replies you want to wait for error GSM InitConnection s 1 error handler Set callback for message sending This needs to be done after initi
263. f8 msgtext gammu command line option 153 TEXT text gammu command line option 158 Timeout 75 ToDo 67 TODO file location gammu command line option 155 TODO target vcs file location gammu command line option 162 TodoPriorities in module gammu data 54 TodoValueTypes in module gammu data 54 TPMR 317 transfercall id gammu command line option 148 TransferCall gammu StateMachine method 47 Type 61 62 67 71 73 gammu command line option 155 334 Index
264. file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual 5 3 11 Info Warning doxygenfunction Cannot find file nome docs checkouts readthedocs org user_builds gammu checkoutp stable docs man Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user b
265. file location Read WAP bookmark from file created by gamnu backup command and saves in Nokia for mat as SMS CALENDAR file location Read calendar note from file created by gammu backup command and saves in VCALENDAR 1 0 format as SMS The location identifies position of calendar item to be read in backup file usually 1 but can be useful in case the backup contains more items CALLER file Save caller logo as sms in Nokia Smart Messaging format size 72x14 two colors Warning 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 EMS unicode 16bit format lcrasbiut text text unicodefiletext file Saves EMS sequence All format specific parameters like de f sound can be used few times text adds text unicodefiletext adds text from Unicode file 9 2 Description 151 Gammu Manual Release GAMMU ERSIONO defanimation adds default animation with ID specified by user ID for different phones are different animation adds frames frames read from file1 file2 etc defsound adds default sound with ID specified by user ID for different phones are different tone10 adds IMelody version 1 0 read from RTTL or other compatible file tonel0long IMelody version 1 0 saved in one of few SMS with UPI Phones compatible with UPI like Sony Ericsson phones will read such ringtone as
266. function Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam 5 3 libGammu C API 109 Gammu Manual Release GAMMU ERSIONO
267. genfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checko
268. h are described in following subsections First general parameters of SMS daemon are listed and then specific parameters for storage backends include numbers List of numbers from which accept messages see Message filtering exclude numbers List of numbers from which reject messages see Message filtering include smsc List of SMSC numbers from which accept messages see Message filtering exclude smsc List of SMSC numbers from which reject messages see Message filtering sql Configure SQL queries used by SQL Service you usually don t have to modify them See also Configurable queries 10 4 2 General parameters of SMS daemon Service SMSD service to use one of following choices FILES Stores messages in files see Files backend for details NULL Does not store messages at all see Null Backend for details SQL Stores messages in SQL database see SOL Service for details choose database type to use by Driver New in version 1 28 93 MYSQL Deprecated since version 1 28 93 Use Service SQL and Driver native_mysq l instead Compatibility option for older configuration files stores messages in MySQL database see MySQL Back end for details PGSQL Deprecated since version 1 28 93 Use Service SQL and Driver native_pgsa l instead Compatibility option for older configuration files stores messages in PostgreSQL database see Post greSQL Backend for details 10 4 SMSD Configuration File 183 Gammu Manua
269. hanging phones Default is 0 not used DeliveryReport Whether delivery reports should be used one of no log sms log one line log entry sms store in inbox as a received SMS no no delivery reports Default is no DeliveryReportDelay Delay in seconds how long is still delivery report considered valid This depends on brokeness of your network delivery report should have same timestamp as sent message Increase this if delivery reports are not paired with sent messages Default is 600 10 minutes PhoneID String with info about phone used for sending receiving This can be useful if you want to run several SMS daemons see Multiple modems When you set PhoneID all messages including injected ones will be marked by this string stored as SenderID in the database and it allows more SMS daemons to share a single database This option has actually no effect with Files backend SMSC SMSC number to use for sending messages if not specified in the message see options of gammu smsd inject In most cases you don t need this settings as Gammu tries to read correct SMSC from phone but sometimes this fails try gammu getsmsc RunOnReceive Executes a program after receiving message This parameter is executed through shell so you might need to escape some special characters and you can include any number of parameters Additionally parameters with identifiers of received messages are appended to the command line The ide
270. heckouts readthedocs org user_builds gammu checkouts gtable docs manual 5 3 2 Bitmap Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs man Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani 94 Chapter 5 libGammu Gammu Manual Release GAMMU E RSION 0 Warning doxygenfunction Cannot find file nome docs checkouts readthedocs org user_builds gammu checkoutp stable docs man Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot f
271. hedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani 5 3 libGammu C API 107 Gammu Manual Release GAMMU ERSIONO Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readt
272. hedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual 08 Chapter 5 libGammu Gammu Manual Release GAMMU E RSION Q 5 3 16 Messages Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygen
273. help 233 u url URL 233 joinO gammu worker GammuThread method 54 K kill gammu worker GammuThread method 54 L Large 66 Left 66 Level 73 LinkSMSO in module gammu 49 listmemorycategory textInumber gammu command line option 160 listnetworks country gammu command line option 165 listtodocategory textInumber gammu command line option 160 Location 61 63 67 69 71 72 LogFile 140 183 LogFormat 147 167 183 LoopSleep 176 200 M MainLoop gammu smsd SMSD method 52 maketerminatedcall number length showlhide gammu command line option 148 Memory 61 MemoryType 71 Memory ValueTypes in module gammu data 54 Index 331 Gammu Manual Release GAMMU ERSIONAO MessageReference 61 MMSIndicator 66 MMSINDICATOR URL Title Sender gammu command line option 152 MMSSETTINGS file location gammu command line option 153 Modified 73 monitor times gammu command line option 166 N Name 61 63 73 networkinfo gammu command line option 165 nokiaaddfile TYPE type options gammu command line option 162 nokiaaddplaylists gammu command line option 162 nokiacomposer file gammu command line option 163 nokiadebug filename v11 22 v33 44 gammu command line option 163 nokiadisplayoutput gammu command line option 163 nokiadisplaytest number gammu command line option 163 nokiagetadc gammu command line option 163 nokiagetoperatorname gammu command line option
274. her described as SMS 1 are generated for each physical message where 1 is replaced by current number of message SMS 1 CLASS Class of message SMS 1 NUMBER Sender number SMS 1 TEXT Message text Text is not available for 8 bit binary messages Per part variables The variables further described as DECODED 1 are generated for each message part where 1 is replaced by current number of part Set are only those variables whose content is present in the message DECODED 1 TEXT Decoded long message text DECODED 1 MMS SENDER Sender of MMS indication message DECODED 1 MMS TITLE title of MMS indication message DECODED 1 MMS ADDRESS Address URL of MMS from MMS indication message DECODED 1 MMS SIZE Size of MMS as specified in MMS indication message 10 5 3 Examples Activating RunOnReceive To activate this feature you need to set RunOnReceive in the MSD Configuration File smsd RunOnReceive path to script sh Processing messages from the files backend Following script if used as RunOnReceive handler passes message data to other program This works only with the Files backend bin sh INBOX path to smsd inbox PROGRAM bin cat for ID in S do SPROGRAM lt SINBOX SID done 194 Chapter 10 SMS Daemon Gammu Manual Release GAMMU ERSION Passing message text to program Following script if used as RunOnRecei ve handler passes message text
275. hout all magic normal gammu smsd does include gammu smsd h include lt assert h gt int main int argc UNUSED char xargv UNUSED GSM SMSDConfig config GSM Error error char config file NULL Use default compiled in path x x We don t need gettext but need to set locales so that charset conversion works GSM_InitLocales NULL Initalize configuration with program name x config SMSD NewConfig smsd example assert config NULL 90 Chapter 5 libGammu Gammu Manual Release GAMMU E RSION Q Read configuration file error SMSD ReadConfig config file config TRUE if error ERR NONE printf Failed to read config n SMSD_FreeConfig config return 2 Start main SMSD loop which processes messages This normally never terminates you need to signal it by SMSD Shutdown config for example from signal handler to make it stop error SMSD_MainLoop config FALSE 0 if error ERR_NONE printf Failed to run SMSD n SMSD_FreeConfig config return 2 Free configuration structure SMSD_FreeConfig config return 0 5 2 6 Custom configuration libGammu example to show how to set configuration manually instead of parsing gammurc include lt gammu h gt include lt stdlib h gt include lt stdio h gt include lt string h gt GS
276. id of calendar item 13 13 7 Notes 13 13 8 Tasks 13 13 9 Files To get the file structure on the mobile there are two commands One that lists all subdirectories and one that lists all files 312 Chapter 13 Phone Protocols Gammu Manual Release GAMMU ERSION List directories List files Get file Create file Delete file 13 13 10 SMS 0x01 Inbox 0x08 Outbox Get sms count List all sms Send sms Create sms I don t think this is possible At least I didn t find the function in New PC Studio So sadly there will be no backup of sms messages 13 14 Series60 Remote Protocol Changed in version 1 31 90 There were some changes in the protocol and applet has been renamed Note The original applet has been created for lt http series60 remote sourceforge net gt Gammu uses extended version which is probably not fully compatible with original Warning Connection to S60 phones currently works only using Bluetooth 13 14 1 Choosing right version Before using this connection type you need to install the applet to the phone The applet can be found in contrib s60 directory and there are two variants of the applets gammu s60 remote sis Not signed applet which can be installed to the phone if it has enabled installation of unsigned applications see Allowing installation of unsigned applications Note This applet also lacks some capabilities so for example you will not be able to get network inf
277. ig debug info GSM GetDebug s GSM SetDebugGlobal FALSE debug info GSM SetDebugFileDescriptor stderr TRUE GSM SetDebugLevel textall debug info debug info x Find configuration file first command line parameter or defaults error GSM FindGammuRC amp cfg argc 2 argv 1 NULL error_handler Read it rror GSM_ReadConfig cfg GSM_GetConfig s 0 0 error handler Free config file structures INI Free cfg We have one valid configuration GSM SetConfigNum s 1 Connect to phone x 1 means number of replies you want to wait for error GSM InitConnection s 1 error handler Read all messages error ERR NONE start TRU E sms Number 0 sms SMS 0 Location 0 sms SMS 0 Folder 0 while error ERR NONE amp amp gshutdown 1 rror GSM GetNextSMS s amp sms start if error ERR EMPTY break error handler start FALSE Now we can do something with the message for i 0 i lt sms Number 1 printf Location d Folder d n sms SMS i Location sms SMS i Folder printf Number Ss n DecodeUnicodeConsole sms SMS i Numb r Decoding with GSM DecodeMultiPartSMS is also an option here but for simplicity we use this approach which will handle only text messages if sms SMS i Coding SMS_Coding_8bit
278. ile Qv Uo SS Send patchfile to us you can use bug tracker or mailing list 1 5 Localization Localization uses Gettext po files for both program translations and the documentation The documentation translation is managed using po4a 1 5 1 Using Translation You can set locales you want to use by specifying LANG or LC_ environment variables on Linux you usually don t care about this on Windows just export e g LANG cs_CZ 1 5 2 Improving Translation If you want to improve existing translation please visit translation server For adding new one you need to contact Michal Cihaf and then you will be able to edit it on former mentioned URL You can also go ahead with traditional way of creating updating po files in locale folder and then sending updated ones to bug tracker 1 5 Localization 11 Gammu Manual Release GAMMU ERSIONAO 1 5 3 Translation Areas There are several po files to translate libgammu po Messages used in the Gammu library see libGammu gammu po Messages used by command line utilities mostly Gammu Utility docs po Basic documentation shipped withing package eg README rst and INSTALL files 1 6 Testing Gammu comes with quite big test suite It covers some basic low level functions handling replies from the phone and also does testing of command line utilities and SMSD See also See Testing Gammu for more details 1 7 Coding Style Please follow codi
279. ilt in ringtones This option is available for DCT4 phones For getting ringtones list use gammu getringtoneslist setringtone file location location scale name name Set ringtone in phone When don t give location it will be written with preview in phones supporting this feature like 61xx or 6210 scale Scale information will be added to each note of RTTL ringtone It will avoid scale problems available during editing ringtone in composer from phone menu for example in Nokia 33xx Note When use char in ringtone name in some phones like 33xx name will blink later in phone menus 9 2 8 Calendar notes commands In Nokia 3310 3315 and 3330 these are named Reminders and have some limitations depending on phone firmware version deletecalendar start stop Deletes selected calendar entries in phone getallcalendar Retrieves all calendar entries from phone getcalendar start stop Retrieves selected calendar entries from phone 9 2 9 To do list commands deletetodo start stop Deletes selected todo entries in phone getalltodo Retrieves all todo entries from phone gettodo start stop Retrieves selected todo entries from phone 9 2 Description 159 Gammu Manual Release GAMMU ERSIONAO 9 2 10 Notes commands getallnotes Reads all notes from the phone Note Not all phones supports this function especially most Sony Ericsson phones even if they have notes inside phone
280. ind file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam 5 3 3 Calendar Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani 5 3 libGammu C API 95 Gammu Manual Release GAMMU ERSIONO
281. irst byte Last two bytes Id of contact Answer A0 00 C4 Obex ok C3 00 00 00 B4 Length of vcard without headers just data 4C 00 05 00 00 Error code 49 00 B7 42 45 47 49 4E contact as vcard TODO where is id First two bytes Delete contact To delete a contact you only have to know it s id 13 13 m obex protocol used by some Samsung mobiles 309 Gammu Manual Release GAMMU E RSION Request 82 00 28 Obex put CB 00 00 00 00 Session id 42 00 1A 6D 2D 6F 62 65 78 2F 63 6F 6E 74 61 63 74 73 2F 64 65 6C 65 74 65 00 m obex contacts delete 4C 00 06 01 00 19 First byte Last two bytes Id of contact Answer A0 00 08 Obex ok 4C 00 05 00 00 Error code 13 13 6 Calendar Get count Request 83 00 25 Obex get CB 00 00 00 00 Session id 42 00 19 6D 2D 6F 62 65 78 2F 63 61 6C 65 6E 64 61 72 2F 63 6F 75 6E 74 00 m obex calendar count 4C 00 04 FF Answer A0 00 1C Obex ok C3 00 00 00 0C length of data 4C 00 05 00 00 Error code 49 00 OF 01 2C 00 06 00 64 00 00 00 64 00 00 TODO List all Request 83 00 20 Obex get CB 00 00 00 00 Session id 42 00 18 6D 2D 6F 62 65 78 2F 63 61 6C 65 6E 64 61 72 2F 69 6E 66 6F 00 m obex calendar load 310 Chapter 13 Phone Protocols Gammu Manual Release OGAMMUyERSIONO Answer A0 00 C0 Obex ok C3 00 00 00 BO Session 4C 00 05 00 00 Error code 49 00 B3 01 07 08 00 00 00 00 00 00 00 00 Calendar items in vcalendar format TODO where are the ids
282. is option is used only if OutboxFormat is not set to detail In such case encoding specified in the message is used you can specify it to gammu smsd inject Default is auto 10 4 4 Message filtering SMSD allows one to process only limited subset of incoming messages You can define filters for sender num ber in include numbers and exclude numbers sections or using IncludeNumbersFile and ExcludeNumbersFile directives If include numbers section exists all values keys are ignored from it are used as allowed phone numbers and no other message is processed On the other side in exclude numbers you can specify numbers which you want to skip Lists from both sources are merged together If there is any number in include list only include list is used and only messages in this list are being accepted If include list is empty exclude list can be used to ignore messages from some numbers If both lists are empty all messages are accepted Similar filtering rules can be used for SMSC number filtering they just use different set of configuration options include smsc and exclude smsc sections or IncludeSMSCFile and ExcludeSMSCFile direc tives 10 4 5 Examples There is more complete example available in Gammu documentation Please note that for simplicity following exam ples do not include gammu section you can look into Gammu Configuration File for some examples how it can look like 190 Chapter 10 SMS Daemon
283. is program lists all devices which might be suitable it does not do any probing on devices them self Currently it supports following devices USB devices using udev Serial ports using udev Serial ports on Windows Bluetooth devices using Bluez Note Supported devices depend on platform you are using and compiled in features You can find out what is actually compiled in by running gammu detect v This program follows the usual GNU command line syntax with long options starting with two dashes A summary of options is included below h help Show summary of options d debug Show debugging output for detecting devices v version Show version information and compiled in features 231 Gammu Manual Release GAMMU E HS TO N 0 u no udev Disables scanning of udev b no bluez Disables scanning using Bluez w no win32 serial Disables scanning of Windows serial ports 11 1 3 Output The output of gammu detect is configuration file for Gammu see Gammu Configuration File with configuration section for every device which might be used with Gammu Utility Note You can choose which section to use in Gammu Utility by gammu s When invoked as gammu detect d also all examined devices are listed as comments in the output 11 1 4 Example Configuration file generated by gammu detect Please check The Gammu Manual for more information
284. isting Folder Start Gets next filename from filesystem folder Parameters Folder string Folder to list Start bool Whether we re starting listing Defaults to False Returns File data as dict see File Object 38 Chapter 4 python gammu Gammu Manual Release OGAMMUyERSIONO Return type dict GetHardware Gets hardware information about device Returns Hardware information as string Return type string Get IMEI Reads IMEI serial number from phone Returns IMEI of phone as string Return type string GetLocale Gets locale information from phone Returns Dictionary of locale settings Set Locale lists them all Return type dict GetManufactureMonth Gets month when device was manufactured Returns Month of manufacture as string Return type string GetManufacturer Reads manufacturer from phone Returns String with manufacturer name Return type string GetMemory Type Location Reads entry from memory phonebooks or calls Which entry shouldbe read is defined in entry Parameters Type string Memory type one of ME SM ON DC RC MC MT FD VM Returns Memory entry as dict see Phonebook Object Return type dict GetMemoryStatus Type Gets memory phonebooks or calls status eg number of used andfree entries Parameters Type string Memory type one of ME SM ON DC RC MC MT FD VM Returns Dictionary with information about memory Used and Free R
285. ity checksum type validity tel no 12 see 0x02 0x0030 0x0035 reason 0x0001 memtype where memory 0x01 0x02 0x03 0x04 0x05 0x07 0x08 location 0 telephone and SIM phonebook in one telephone phonebook SIM phonebook SIM fixdialling phonebook Own numbers Dialled numbers Missed calls 0x09 Received calls Ox0b voice mailbox location not important 0x0002 0x00 namelen name numlen number groupID 0x01 Note in 3310 all entries have null name feature of bug 0x0003 errtype where errtype Ox7d 0x74 invalid memory type empty location 248 Chapter 13 Phone Protocols yearLO ye Gammu Manual Release GAMMU ERSION r mem r Mem r Get H HU H 0x04 un Set mem location set OK mem set error Mem status request status recvd Mem status error recv Get caller group data caller group data Get call group error Set Set Set caller group data caller group OK call group error Get Get dial dial speed speed OK Get Set dial dial speed speed Set speed dial Set speed dial Phone Status Phone status Phone status error OK error Request Phone ID r RequestPhone ID 0x05 r Set profile feat Profile settings Set profile feature OK Get profile feature Get profile feature 0x8d 0x0004 memty 0x0005 0x0006 errty where errtype 0x0007 memty no PIN pe loc
286. jected because device was busy Wait and restart exception gammu ERR CANCELED Exception corresponding to gammu error ERR CANCELED Verbose error description Transfer was canceled by phone maybe you pressed cancel on phone exception gammu ERR CANTOPENFILE Exception corresponding to gammu error ERR CANTOPENFILE Verbose error description Can not open specified file exception gammu ERR_CORRUPTED Exception corresponding to gammu error ERR CORRUPTED Verbose error description Corrupted data re turned by phone exception gammu ERR COULDNT CONNECT Exception corresponding to gammu error ERR COULDNT CONNECT Verbose error description Could not connect to the server exception gammu ERR COULDNT RESOLVE Exception corresponding to gammu error ERR COULDNT RESOLVE Verbose error description Could not resolve the host name exception gammu ERR DATACONVERTED Exception corresponding to gammu error ERR DATACONVERTED Verbose error description Data were converted exception gammu ERR DEVICEBUSY Exception corresponding to gammu error ERR DEVICEBUS Y Verbose error description Error opening de vice it is already opened by other application exception gammu ERR DEVICECHANGESPEEDERROR Exception corresponding to gammu error ERR DEVICECHANGESPEEDERROR Verbose error description Error setting device speed Maybe speed not supported exception gammu ERR DEVICEDTRRTSERROR Exception corresponding to gammu error ERR DEVIC
287. l Release GAMMU ERSIONO DBI Deprecated since version 1 28 93 Use Service SQL and Driver DBI driver instead Compatibility option for older configuration files stores messages in any database supported by libdbi see DBI Backend for details Note Availability of backends depends on platform and compile time configuration PIN PIN for SIM card This is optional but you should set it if your phone after power on requires PIN NetworkCode Network personalisation password This is optional but some phones require it after power on PhoneCode Phone lock password This is optional but some phones require it after power on LogFile File where SMSD actions are being logged You can also use special value syslog which will send all mes sages to syslog daemon On Windows another special value event 10g exists which will send logs to Windows Event Log If you run SMSD as a system daemon or service it is recommended to use absolute path to log file as startup directory might be different than you expect Default is to provide no logging Note For logging to Windows Event Log it is recommended to install Event Log source by invoking gammu smsd e this is automatically done during installation of Gammu LogFacility Facility to use on logging backends which support it currently only syslog One of following chouces DAEMON default USER LOCALO LOCAL1 LOCAL2 LOCAL3
288. l handset put back ON Hook Ignition and Hook are coded into one byte e bit 0 0 on power on 1 when in operation e bit 1 IGNITION STATUS bit 2 x can be 1 or 0 e bit 3 0 bit 4 0 e bit 5 1 bit 6 Hook inverted 244 Chapter 13 Phone Protocols Gammu Manual Release GAMMU E RSION Q s bit 7 20 HFU 2 version 1F 00 04 79 00 12 02 01 02 06 00 56 20 30 36 2E 30 30 0A 48 46 55 32 00 SQ CS for HFU 2 1F 04 00 DA 00 02 00 02 SQ CS function unknown sent from Nokia phone to HFU 2mute output call active 0xD0 commands init 1F 00 1D DO 00 01 04 SQ CS sent by the Service Software or HFU 2 on startup init resp 1F 1D 00 DO 00 01 05 SQ CS response from phone to above frame 13 3 Nokia S40 filesystem SMS format This text is work in progress and does not claim to be correct or accurate It is solely based on Gammu dumps received from users Analysed by Michal Cihar lt michal Ocihar com gt 13 3 1 File structure 176 bytes header at offset 7 is length of PDU data at offset 94 is stored remote number in unicode rest is not known PDU data without SMSC here can be sometimes also some failure block which is not known yet structured data header 0x01 0x00 LEN where LEN is length of rest structured blocks Block TYPE byte LENGTH word DATA gt 13 3 2 Blocks 0x01 Unknown x00 x01 maybe received sent 0x02 SMSC number ASCII 0x03 Text unicode 0x04
289. le configuration for Bluetooth gammu device 11 22 33 44 55 66 Bluetooth address of your phone connection bluephonet Example configuration for newer phones gammu connection dku2 Example configuration for older phones on Linux gammu device dev ttyACM3 connection dlr3 Example configuration for older phones on Windows gammu device COM12 connection dlr3 3 2 4 How to configure phone not listed above First check whether your phone is supported In case it is it most likely falls into one of above categories You can also find additional user experiences in Gammu Phones Database See also Is my phone supported Gammu Configuration File 3 2 Configuring Gammu FAQ 25 Gammu Manual Release GAMMU E HS TO N 0 3 3 Phone Support FAQ 3 3 1 Is my phone supported Generally any phone capable of AT commands or IrMC should be supported Also any Nokia phone using Nokia OS should work For Symbian please check separate topic You can check other user experiences in Gammu Phones Database For information how to configure your phone see Configuring Gammu FAQ See also Are Nokia phones supported Are Symbian phones supported Are Andriod phones supported Are Blackberry phones supported Are iPhone phones supported Configuring Gammu FAQ Gammu Configuration File 3 3 2 Which phone is best supported It really depends on what you
290. len gammu command line option 153 long gammu command line option 153 maxsms num gammu command line option 151 n loops count gammu smsd monitor command line option 182 n service name name gammu smsd command line option 179 newtime gammu command line option 156 overwrite gammu command line option 162 overwriteall gammu command line option 162 p pid file gammu smsd command line option 178 protected gammu command line option 152 156 read gammu command line option 151 readonly gammu command line option 156 replacefile file gammu command line option 154 replacemessages ID gammu command line option 154 reply gammu command line option 150 report gammu command line option 155 s section lt confign gt gammu command line option 147 Start service gammu smsd command line option 178 save gammu command line option 155 scale gammu command line option 153 159 sender number gammu command line option 151 sent gammu command line option 151 smscnumber number gammu command line option 150 smscset number gammu command line option 150 smsname name gammu command line option 151 system gammu command line option 156 text gammu command line option 151 154 textutf8 gammu command line option 154 tone10 gammu command line option 152 tone 10long gammu command line option 152 tone12 gammu command line option 152 tone12long gammu command
291. les issue following command sqlite3 smsd db lt docs sql sqlite sql Injecting a message using SQL To send a message you can either use gammu smsd inject which does all the magic for you or you can insert the message manually The simplest example is short text message INSERT INTO outbox DestinationNumber TextDecoded CreatorID Coding VALUES 800123465 This is a SQL test message Program Default No Compression di Please note usage of Text Decoded field for Text field you would have to hex encode the unicode text INSERT INTO outbox DestinationNumber Text CreatorID Coding VALUES 800123465 005400680069007300200069007300200061002000530051004c002000740065007300740020006d00 Program Default No Compression i Injecting long message using SQL Inserting multipart messages is a bit more tricky you need to construct also UDH header and store it hexadeci mally written into UDH field Unless you have a good reason to do this manually use gammu smsd inject C library SMSD_Inject SMS or Python library gammu smsd SMSD Inject SMS For long text message the UDH starts with 050003 followed by byte as a message reference you can put any hex value there but it should be different for each message D3 in following example byte for number of messages 02 224 Chapter 10 SMS Daemon 500730073006 Gammu Manual Release GAMMU ERSION i
292. like 3xxx nokiasetlights keypad display torch on off nokiasetoperatorname networkcode name 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 63101 3 GPRS Always Online 4 and others nokiasetvibralevel level Set vibra power to level given in percent nokiatuneradio nokiavibratest 164 Chapter 9 Gammu Utility Gammu Manual Release GAMMU ERSION 9 2 15 Siemens specific commands Siemensnetmonact netmon type Enables network monitor in Siemens phone Currently known values for type are 1 for full and 2 for simple mode siemensnetmonitor test Siemenssatnetmon 9 2 16 Network commands getgprspoint start stop listnetworks country Show names codes of GSM networks known for Gammu networkinfo Show information about network status from the phone setautonetworklogin 9 2 17 WAP settings and bookmarks commands deletewapbookmark start stop Delete WAP bookmarks from phone Locations are numerated from 1 getchatsettings start stop getsyncmlsettings start stop getwapbookmark start stop Get WAP bookmarks from phone Locations are numerated fro
293. lt jens bennfors ing hj se gt Michael Hund lt michael drhund de gt Jay Bertrand lt jay bertrand libertysurf fr gt Gabriele Zappi lt gzappi inwind it gt Markus Plail lt plail web de gt Ralf Thelen lt ralf mythelen de gt Walek walek pa98 opole sdi tpnet pl gt and other members of gnokii mailing list and authors of some WWW pages The data provided is for information purposes only Some of the frames might be hazardous to your phone Be careful We do not take any responsibility or liability for damages etc Note this information isn t and can t be complete If you know anything about features not listed here or you noticed a bug in this list please notify us via e mail Thank you Document describing frames used in GSM Nokia 6210 and derivatives 7110 13 6 Nokia 7110 273 Gammu Manual Release GAMMU ERSIONO Correct format is FBUS version 2 Infrared MBUS version 2 see nokia txt for protocol details List 0x00 Connect to NBS port r Set ringtone 0x7c 0x01 0x00 0x0d 0x06 6 0x78 ringtone packed according Seems not to work in MBUS 0x01 Communication Status Call msg Call in progress Remote end hang up incoming call alert answered call 0x0007 seqnr terminated call 0x0009 seqnr call msg 0x000a seqnr Note in 6210 4 27 all msg from 0x01 seems to be unavailable 0x02 SMS handling 0x0002 0x0003 seqnr 0x0004 seqnr error like in netmon in 39 0x0005 seqnr
294. lts to 1 e Repeating bool Whether alarm should be repeating Defaults to True e Text string Text to be displayed on alarm Defaults to empty Returns None Return type None SetAutoNetworkLogin Enables network auto login Returns None Return type None SetCalendar Value Sets calendar entry Parameters Value dict Calendar entry data see Calendar Object Returns Location of set entry Return type int SetConfig Section Values Sets specified config section Parameters e Section int Index of config section to modify Values dict Config values see Get Config for description of accepted Returns None Return type None SetCallDivert Divert Type Number Timeout 0 New in version 1 31 90 Sets call divert 44 Chapter 4 python gammu Gammu Manual Release GAMMU E RSION Q Parameters Divert Divert Type When to do the divert Type Call Type What call types to divert Number string Phone number where to divert e Timeout int Optional timeout when divert happens Returns None Return type None SetDateTime Date Sets date and time in phone Parameters Date datetime datetime Date to set Returns None Return type None SetDebugFile File Global Sets state machine debug file Parameters e File mixed File where to write debug stuff as configured by SetDebugLevel Can be either None for no file Python file object or filenam
295. lue synchronizetime yes logfile gammulog logformat textall 142 Chapter 8 Gammu Configuration File Gammu Manual Release GAMMU ERSION 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 2 cables New Nokia protocol for FBUS DAU9P Z Connection fbus device type serial New Nokia protocol for DLR3 DLR3P d Connection fbusdlr3 dlr3 device type serial New Nokia protocol for DKU2 and phone with USB converter on phone mainboard A like 6230 E Connection dku2phonet dku2 device type dku2 on Windows Z Connection fbususb on Linux New Nokia protocol for DKU5 and phone without USB converter on phone E mainboard like 5100 Connection dku5fbus dku5 device type dku5 New Nokia protocol for PL2303 USB cable and phone without USB converter A on phone mainboard like 5100 E Connection fbuspl2303 device type usb Old Nokia protocol for MBUS DAU9P E 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
296. lways specified If you run SMSD as a system daemon or service it is recommended to use absolute path to configuration file as startup directory might be different than you expect See SMSD Configuration File for configuration file documentation pid file Lock file for storing pid empty for no locking Not supported on Windows user user Drop daemon privileges to chosed user after starting group group Drop daemon privileges to chosen group after starting daemon Daemonize program on startup Not supported on Windows install service Installs SMSD as a Windows service uninstall service Uninstalls SMSD as a Windows service start service Starts SMSD Windows service stop service Stops SMSD Windows service 178 Chapter 10 SMS Daemon Gammu Manual Release GAMMU E RSION Q f max failures count Terminate after defined number of failures Use 0 to not terminate this is default X suicide seconds Kills itself after number of seconds S run service Runs pogram as SMSD Windows service This should not be used manually but only Windows Service manager should use this command n service name name Defines name of a Windows service Each service requires an unique name so if you want to run several SMSD instances you have to name each service differently Default is GammuSMSD 1 use log Use logging as configured in config file default L no use
297. ly Just configure it for use of gnapplet connection and invoke gammu install gammu install It will automatically transmit the applet to the phone On some phones the installation will start automatically on some you need to find received files in the inbox and install them manually from there Downloading from phone Downloading files from the phone and installing them directly You can download all required files from http dl cihar com gammu gnapplet Manual Installation using Gammu If the above mentioned gammu install does not work for you for example when you need to use different applet you can still use Gammu to send files to the phone using gammu sendfile First you need to create gammurc with following content gammu connection blueobex model obexnone device 5C 57 C8 XX XX XX 4 Address of the phone And now you can send files to your phone gammu sendfile gnapplet sis gammu sendfile gnapplet ini Files should appear in inbox in your phone and you can install them from there See also You can also find documentation for some protocols and vendor extensions in separate git repository at http github com gammu gsm docs 316 Chapter 13 Phone Protocols CHAPTER 14 Glossary TPMR Message reference as generated by GSM network 317 Gammu Manual Release GAMMU ERSIONO 318 Chapter 14 Glossary Python Module Index 9 gammu
298. m 1 getwapsettings start stop Get WAP settings from phone Locations are numerated from 1 9 2 18 MMS and MMS settings commands getallmms save geteachmms save getmmsfolders getmmssettings start stop readmmsfile file save 9 2 Description 165 Gammu Manual Release GAMMU ERSIONAO 9 2 19 FM radio commands getfmstation start stop Show info about FM stations in phone 9 2 20 Phone information commands battery Displays information about battery and power source getdisplaystatus getlocation Gets network information from phone same as networkinfo and prints location latitude and longitude based on information from OpenCellID 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 Ct r1 C to interrupt this command If no parameter is given the program runs until interrupted otherwise only given number of iterations is per formed 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 9 2 21 Phone settings commands getcalendarsettings Displays calendar settings like first day of week or automatic deleting of old entries getprofil
299. m gammu s60 Python_2 0 0 sis gt This file is not distributed with Gammu due to licensing reasons Note On some phones the Python for S60 2 0 will not start in this case you need to install some additional support libraries coming with Python for S60 2 0 pips sis ssl sisand stdioserver sis You can get all of them at http wammu eu s60 as well Installing Python for S60 and Series60 remote applet can be done in several ways Installation using Gammu Gammu can transmit the applet to your phone automatically Just configure it for use of BlueS60 connection see Connecting to Series60 phone chapter below and invoke gammu install gammu install It will automatically transmit the applet to the phone On some phones the installation will start automatically on some you need to find received files in the inbox and install them manually from there If you want to install Python for S60 as well you need to download it and place in folder where Gammu searches for installation images you can configure it by setting DataPat h For example cd usr share data gammu wget http dl cihar com gammu s60 Python 2 0 0 sis wget http dl cihar com gammu s60 pips sis 314 Chapter 13 Phone Protocols Gammu Manual Release GAMMU E RSION Q Downloading from phone Downloading files from the phone and installing them directly You can download all required files from http wammu eu s60 L
300. m s 1 Connect to phone 1 means number of replies you want to wait for error GSM InitConnection s 1 error handler Here you can do some stuff with phone As an example we read some information about phone Manufacturer name x rror GSM GetManufacturer s buffer error handler 92 Chapter 5 libGammu Gammu Manual Release GAMMU E RSION Q printf Manufacturer s n buffer Model name x rror GSM GetModel s buffer error handler printf Model s s An GSM GetModelInfo s model buffer Terminate connection rror GSM TerminateConnection s error handler Free up used memory GSM FreeStateMachine s return 0 Editor configuration vim noexpandtab sw 8 ts 8 sts 8 tw 72 5 3 libGammu C API 5 3 1 Backup Warning doxygenfunction Cannot find file nome docs checkouts readthedocs org user_builds gammu checkoutp stable docs man Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file nome docs ch
301. mail sms will 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 unicode option 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 Uni code 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 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 File with replacement table in unicode UCS 2 preferably with byte order mark BOM It 154 Chapter 9 Gammu Utility Gammu Manual Release GAMMU E RSION Q contains pairs of chars first one is to replace second is repl
302. me docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mant Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam 114 Chapter 5 libGammu Gammu Manual Release GAMMU ERSION Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home do
303. mostly lack manpower 10 Chapter 1 Gammu project Gammu Manual Release OGAMMUyERSIONO 1 4 1 Sending patches As we use Git for development the preferred way to get patches is in form which can be directly applied to Git So start with cloning our Git repository git clone git github com gammu gammu git gammu Once you have done that do some fixes and commit them see Git tutorial for information how to work with Git Once you re satisfied with your results you can send the patches all changes you ve made so far to us git send email to gammu users lists sourceforge net origin Please note that mailing list requires you to subscribe before posting This is anyway good idea in case you want to contribute However if you don t want to do that just send the mails directly to one of authors git send email to michal cihar com origin 1 4 2 Creating patches If for whatever reason you don t want to use Git you can also manually create patches using diff Also we can handle if you send us just the file you have changed with reference where did you take it To manually create patch you can use following steps 1 Copy source with Gammu you start from into gammu directory Copy source with Gammu you want to modify into work directory Make your changes in work directory Go into parent directory where gammu and work directories are placed Calldiff rup X git gammu work patchf
304. mp Ge bos Se Bede Bow d 13 7 Nokia 6210 6310 CARC91 PC Experiment oso orm ee ee ee ee ES RM UBL SD lt lt de Soa Sauces op Gt Bice we ods Mis rrr 13 9 SAMSUNG Organizer AT commands s lt 5 54 5 bbe OG 9x ar ee eee e 13 10 SAMSUNG GT calendar AT commands s s i s 4 424864 o 26544 464 24 408 13 11 Sonim AT Commands ss R R Rx Kors Se ee EA R XO RS Se eee Ee es 13 12 MEK AT Commands 2 25 glk mei mou BAG OR pede dee gle edes 13 13 m obex protocol used by some Samsung mobiles 2 200000 5000 4 13 14 Series60 Remote Protocol lt x R cc ee ea ee my we RR s 13 15 Gnapplet Protocol lt ssis poe RTE Rm eR Bef Rom Bb oe a ee Be Re ew N Glossary 133 133 133 135 137 137 137 141 147 147 147 169 171 175 175 177 178 183 193 195 225 231 231 233 233 235 235 237 239 239 240 245 246 260 273 285 296 297 302 304 305 306 313 316 317 Python Module Index 319 CHAPTER 1 Gammu project 1 1 About Gammu Gammu is library and command line utility for mobile phones It is released under GNU GPL version 2 It has been initiated by Marcin Wiacek and other people Originally the code was based on Gnokii and later MyGnokii projects Gammu was former up to version 0 58 called MyGnokii2 Currently the project is lead by Michal Cihaf with help of many contributors 1 2 Motivation to fork Gnokii Note Please note that this is original list of differences writte
305. n by Marcin when forking Gnokii so it represents state of the code in that time 1 Unicode used almost everywhere In MyGnokii and Gnokii with modern phones they return everything in Unicode things are converted from Unicode and again to Unicode in other places No more unnecessary conversions Almost everything is structural In Gnokii some things are declared in files not in main phone structure It can make some problems when will try to support two phones on two serial ports in one application in Gammu you can make support for some things without adding source to main phone modules Very good idea for things which are available only for few models and for all other will be UNIMPLE MENTED It includes also some obsolete functions why should we compile RLP source when all new better phones have modems built in Gnokii MyGnokii has to have some compatibility with previously written source In Gammu some solutions are reimplemented and done easier no more reimplementing C libraries in source see snprintf in gnokii more OS supported better sharing source Less source smaller application easier to debug better user friendly interface no more 2 years rewriting source it s easier to see what frames are implemented what not in phone modules they re put line after line better compatiblity with ANSI C no warnings in MS VC 6 Gammu Manual Release GAMMU ERSIONAO
306. n example it should be unique for each message you send to same phone number and byte for number of current message 01 for first message 02 for second etc I most cases the mutlipart message has to be class 1 For example long text message of two parts could look like following INSERT INTO outbox CreatorID MultiPart DestinationNumber UDH TextDecoded Coding Class VALUES Gammu 1 23 91 true 123465 050003D30201 Mqukqirip ya konej eqniu rejropocejor hugiygydewl tfej nrupxujob xuemymiyliralj T Default No Compression il INSERT INTO outbox_multipart SequencePosition UDH Class TextDecoded ID Coding Class VALUES 2 050003D30202 u xewz qisubevumxyzk ufuylehyzc Nse xobq dfolizygqys j t bvowsyhyhyemim ovutpapeae ID OF INSERTED RECORD IN OUBOX TABLE Default No Compression 1 Note Adding UDH means that you have less space for text in above example you can use only 153 characters in single message 10 7 Developer documentation 10 7 1 Backend services The backend service is responsible for storing received messages and giving the SMSD core messages to send It is solely up to them how the message will be stored for example currently Gammu includes backends to store messages on filesystem Files backend various databases MySQL Backend PostgreSQL Backend DBI Backend or backend which does not store anything at all Null
307. n numerical order You can also specify which configuration section to use by giving it s number gammu has number 0 as a parameter to Gammu Utility and it will then use only this section gammu This section is read by default unless you specify other on command line 137 Gammu Manual Release QGAMMU ERSIONAO 8 2 1 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 at 19200 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 For Bluetooth connection use one of following bluephonet Phonet connection for Nokia phones blueat AT comma
308. name S Answer call part 2 0x0006 seqnr 0x00 r answered call 0x0007 seqnr S Hang up 0x0008 seqnr 0x85 r terminated call 0x0009 seqnr r call msg 0x000a seqnr r call held 0x0023 seqnr 0x01 r call resumed 0x0025 seqnr 0x01 r Send DTMF voice call 0x0040 S Answer call part 1 0x0042 0x05 0x01 0x07 0xa2 0x88 0x81 0x21 0x15 0x63 0xa8 0x00 0x00 0x07 0xa3 0xb8 0x81 0x20 0x15 0x63 0x80 S Sent after issuing 0x0042 0x05 0x81 0x07 0xa1 0x88 0x89 0x21 0x15 0x63 0xa0 0x00 0x06 data call 0x88 0x90 0x21 0x48 0x40 0xbb 0x07 0xa3 digital lines 0xb8 0x81 0x20 0x15 0x63 0x80 S Sent after issuing 0x0042 0x05 0x01 0x07 0xa2 0xc8 0x81 0x21 0x15 0x63 0xa8 0x00 0x00 data call 0x07 0xa3 0xb8 0x81 0x20 0x15 0x63 0x80 non digital lines 0x01 0x60 s Send DTMF 0x0050 length ascii codes for DTMF 0x01 T Note to make data call non digital lines l send Make call for non digital lines 2 send Sent after issuing data call non digital lines to make data call digital lines l send Answer call part 1 2 send Sent after issuing data call digital lines 3 send Make call for digital lines to answer call l send Answer call part 1 2 send Answer call part 2 0x02 SMS handling S Send SMS message 0x0001 0x02 0x00 SEND REQUEST r Message sent 0x0002 r Send failed 0x0003 error like in netmon in 65 13 4 Nokia 6110 247 Gammu Manual Release
309. named Gammu dsw or Gammu sln depending on what MSVC version you choose You should see ALL BUILD target which builds everything needed simmilar to make all on Linux For running testsuite you need working sh and sed The easiest way to install them is from MinGW project lt http mingw org gt I know this guide is incomplete I don t have environment to test you re welcome to improve it Some more information can be found in howtos for other projects using CMake eg Blender SIM KDE VTK ISGTK ITK wxWidgets http www wxwidgets org wiki index php CMake Compiling using Borland C Borland toolchain you can download compiler at lt http www codegear com downloads free cppbuilder gt You need to add c Borland BCC55 Bin to system path or manually set it when running CMake and add Lc Borland BCC55 Lib Ic Borland BCC55 Include Lc Borland BCC55 Lib PSDK to CMAKE C FLAGS in CMake otherwise compilation fails 1 3 Installing Gammu 7 Gammu Manual Release GAMMU ERSIONAO Compiling using Cygwin This should work pretty much same as on Linux 1 3 7 Compiling on Mac OS X First install all Dependencies and Optional Dependencies Gammu should be compilable on Mac OS X you need to have installed Developer Tols version 2 4 1 was tested and CMake there is a Mac OS X Darwin DMG download For database support in SMSD install wanted database eg MySQL The rest of the compilation should be
310. nd line option 161 backupsms file yesl all gammu command line option 161 batch file gammu command line option 168 battery gammu command line option 166 Bitmap 66 Bold 66 Bookmark 66 BOOKMARK file location gammu command line option 151 BOOKMARK target url file location gammu command line option 162 Buffer 67 73 C Calendar 67 CALENDAR file location gammu command line option 151 CALENDAR target vcs file location gammu command line option 162 CalendarTypes in module gammu data 54 JARIBMPIPNGIGIFIPGIMIDIIWBMPIAMRIGRNIIGliar Value Types in module gammu data 54 readonly hidden newtime gammu command line option 156 AddFilePart gammu StateMachine method 33 addfolder parentfolderID name gammu command line option 156 AddFolder gammu StateMachine method 33 AddMemory gammu StateMachine method 33 addnew file yes memory MEISMI gammu command line option 160 addsms folder file yes gammu command line option 160 AddSMSQ gammu StateMachine method 33 addsmsfolder name gammu command line option 150 AddSMSFolder gammu StateMachine method 34 AddToDo gammu StateMachine method 34 AllParts 62 ANIMATION frames filel file2 gammu command line option 151 answercall id gammu command line option 147 AnswerCall gammu StateMachine method 34 APPLICATIONIGAME file readonly overwrite overwriteall gammu command line option 162 protected s
311. ndar VCard LDIF ICS Gammu GammuUni code the default is AutoUnicode Returns None Return type None gammu ReadBackup Filename Format Reads backup into file Parameters Filename string Name of file where backup is stored Format string File format to use Auto Aut oUnicode LMB VCalendar VCard LDIF ICS Gammu GammuUnicode the default is Aut oUnicode Returns Dictionary of read entries it contains following keys each might be empty 4 2 API documentation 51 Gammu Manual Release GAMMU ERSIONAO IMEI Model Creator PhonePhonebook SIMPhonebook Calendar ToDo DateTime Return type dict gammu SaveSMSBackup Filename Backup Saves SMS backup into file Parameters Filename string Name of file where to save SMS backup Backup list List of messages to store Returns None Return type None gammu ReadSMSBackup Filename Reads SMS backup into file Parameters Filename string Name of file where SMS backup is stored Returns List of messages read from file Return type list Various data gammu GSMNetworks Dictionary with GSM network codes gammu GSMCountries Dictionary with GSM country codes 4 2 2 gammu smsd SMSD access SMSD class gammu smsd SMSD Config SMSD main class that is used for communication with phone You don t need to run the SMS daemon itself to control or ask it for status this can be also done on separately run
312. ndar note recvd 0x0067 0x01 length type yrH yrL mon day hr tz alrm r Cal note recvd error 0x0067 err where err 0x93 not available 0x01 OK other error s Delete cal note 0x0068 location r Del cal note report 0x0069 err where err 0x01 OK 0x93 cannot delete 0x14 SMS funcs S Write SMS to SIM 0x0004 T s Mark SMS as read 0x0007 0x02 location 0x00 0x64 r SMS message frame rcv 0x0008 subtype num BCD smscenter 20 gt type where type 0x06 delivery report status 0x00 delivered 0x30 pending 0x46 failed 0x09 reading failed subtype 0x02 invalid mem type 0x07 empty SMS location 0x0c no access to memory no PIN in card etc S Delete SMS messag 0x000a 0x02 location r Delete OK Ox000b s SMS status request 0x0036 0x64 r SMS status 0x0037 msgnumber unread r SMS status error 0x0038 Ox3f WAP s Enable WAP frames 0x0000 r Enable WAP frames 0x0002 0x01 s 7 0x0003 di CP 0x0004 22 58 9 0 0 0 0 0 yrH yrL mon atus 254 Chapter 13 Phone Protocols Gammu Manual Release GAMMU ERSION S Get WAP bookmark 0x0006 0x00 location where location 0 14 r Get WAP bookmark 0x0007 0x00 name len name unicode url len url unicode 0x01 0x80 0x00 7 r Get WAP bookmark err 0x0008 error where error 0x00 invalid position 0x01 user inside Bookmarks menu
313. nds 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 blues60 Connection to Series60 applet in S60 phones see Series60 Remote Protocol New in version 1 29 90 See also Configuring Gammu FAQ Device New 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 ttyACMO 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 138 Chapter 8 Gammu Configuration File Gammu Manual Release GAMMU E RSION Q 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 addr
314. ne Return type None gammu SetDebugLevel Level Sets global debug level accorting to passed string You need to configure output file using Set DebugFile to activate it Parameters Level string name of debug level to use currently one of nothing text textall binary errors textdate textalldate errorsdate Returns None Return type None 48 Chapter 4 python gammu Gammu Manual Release OGAMMUyERSIONO Message processing gammu LinkSMS Messages EMS Links multi part SMS messages Parameters Messages list List of messages to link see SMS Object EMS bool Whether to detect ems defauls to True Returns List of linked messages see MS Object Return type list gammu SMSCounter Text UDH NoUDH Coding Default Calculates number of SMS and free chars in SMS Parameters Text string Message text UDH string Message UDH Coding string Message coding eg Unicode or Default Returns Number of messages and number of free chars Return type tuple New in version 1 29 90 gammu DecodeSMS Messages EMS Decodes multi part SMS message Parameters Messages list Nessages to decode see SMS Object EMS bool Whether to use EMS defalt to True Returns Multi part message information see MS Info Object Return type dict gammu EncodeSMS Messagelnfo Encodes multi part SMS message Parameters MessageInfo dict Description of mess
315. ne method 42 presskeysequence mMnNpPuUdD 123456789 0ffgGrR hHcCjJfFoOmMdD gammu command line option 167 Priority 68 PROFILE name name bitmap bitmap ringtone ring tone gammu command line option 153 Protected 66 73 H ReadBackup in module gammu 51 ReadConfig gammu StateMachine method 43 ReadDevice gammu StateMachine method 43 readmmsfile file save gammu command line option 165 ReadOnly 73 ReadSMSBackup in module gammu 52 Receive 221 ReceiveFrequency 176 RejectDuplicates 61 332 Index Gammu Manual Release GAMMU E RSION Q ReplaceMessage 61 64 Reply ViaSameSMSC 61 reset SOFTIHARD gammu command line option 167 Reset gammu StateMachine method 43 ResetFrequency 176 186 resetphonesettings PHONEIDEVIUIFIALLIFACTORY gammu command line option 166 ResetPhoneSettings gammu StateMachine method 43 restore file yes gammu command line option 161 restoresms file yes gammu command line option 161 Right 66 Ringtone 66 RINGTONE file long scale gammu command line option 153 run gammu worker GammuThread method 55 RunOnReceive 187 193 195 218 S SaveBackup in module gammu 51 savefile TYPE type options gammu command line option 161 SaveRingtone in module gammu 51 savesms TYPE type parameters type options folder id unread read unsent sent sender number smsname name smscset number smscnumber number
316. nfo Get calendar note Get calendar note S Get Picture Image r Get Picture Image r Get SMS failed K u Get SMS status Get SMS Status s Set Picture Image Set SMS name Set SMS name List Picture Q0 RUK List Picture Write SMS to Write SMS to Write SMS to Get SMS from 0 HH UH r Get SMS from wh Set Picture Image Images 0x003a OxFF OxFE 0x003b how many notes used 2 bytes 0x01 0x07 two 0x003E location 2 bytes 0x003F location 2bytes AAA o5 0x0007 location number 2 bytes 0x00 0x64 0x0008 0x07 location number 2 bytes 0x07 38 width height lenH lenL bitmap 0x00 0x00 ta 0x0009 0x02 0x0036 0x64 0x0037 0x05 0x03 0x01 0x00 0x00 a 2 octets b 2 octets c 2 octets d 2 octets e 2 octets 0x00 where a according to P Kot Number of locations in fixed memory These are all Templates entries in my Nokias 6210 NPE 3 c NMP V05 36 14 11 01 NPE 3 c NMP V05 27 01 08 01 I can t remove any of Templates entries in my phone Marcin Wiacek Rather not I don t agree I have 0x00 0x0f and 10 templates and 3 SMS and 10 Picture Images b Number of used messages in phone memory These are messages manually moved from the other folders Picture messages are saved her c Number of unread messages in phone memory Probably only smart msssages d Number of used messages in SIM memory These ar
317. ng style when touching Gammu code We know that there are still some parts which really do not follow it and fixes to that are also welcome The coding style is quite similar to what Linux kernel uses the only major differences are requested block braces and switch indentation 1 Use indentation tab is tab and is 8 chars wide 2 Try to avoid long lines though there is currently no hard limit on line length 3 Braces are placed according to K amp R int function int x body of function do body of do loop T while condition if x y else if x gt y else 4 All blocks should have braces even if the statements are one liners if a 2 foo 5 There should be no spaces after function names but there should be space after do while if statements 12 Chapter 1 Gammu project Gammu Manual Release GAMMU ERSION while TRUE do something work FALSE 6 Each operand should have spaces around no spaces after opening parenthesis or before closing parenthesis if i 1 3 2 5 return bar 7 Generally all enums start from 1 not from 0 0 is used for not set value You can use admin Gindent to adjust coding style of your file to match our coding style 1 8 Versioning There are two types of releases testing and stable both having version x y z Stable releases have usually z
318. nge phone numbers type to mobile for numbers starting from 3620 3630 and removing the corresponding TextUnicode line Find Type NumberGeneral nEntry 0 9 0 9 Text 36 2367 0 nEntry 0 Replace Type NumberMobile nEntry 1lText 36 2 3 n See also Converting file formats 136 Chapier 7 File formats used by Gammu 0 9 V Text CHAPTER 8 Gammu Configuration File 8 1 Synopsis On Linux MacOS X BSD and other Unix like systems the config file is searched in following order 1 SXDG_CONFIG_HOME gammu config 2 config gammu config 3 gammurc 4 etc gammurc On Microsoft Windows 1 SPROFILE Application Data gammurc 2 Ngammurc 8 2 Description Gammu requires configuration to be able to properly talk to your phone Gammu Utility reads configuration from a config file It s location is determined on runtime see above for search paths You can use gammu config or gammu detect to generate configuration file or start from Fully documented example For hints about configuring your phone you can check Gammu Phone Database lt http wammu eu phones gt to see what user users experienced This file use ini file syntax see ZNI file format Configuration file for gammu can contain several sections gammu gammul gammuN Each section configures one connection setup and in default mode gammu tries all of them i
319. ning instances All you need to do for this is to give same configuration file as that instance is using Parameters Config string Path to SMSD configuration file MainLoop MaxFailures Runs SMS daemon main loop Please note that this will run until some serious error occurs or until terminated by Shutdown 52 Chapter 4 python gammu Gammu Manual Release GAMMU ERSION Parameters MaxFailures int After how many init failures SMSD ends Defaults to 0 what means never Returns None Return type None Shutdown Signals SMS daemon to stop Returns None Return type None GetStatus Returns SMSD status The following values are set in resulting dictionary Client Client software name PhoneID PhoneID which can be used for multiple SMSD setup IMEI IMEI of currently connected phone Sent Number of sent messages Received Number of received messages Failed Number of failed messages BatterPercent Last battery state as reported by connected phone NetworkSignal Last signal level as reported by connected phone Returns Dict with status values Return type dict InjectSMS Message Injects SMS message into outgoing messages queue in SMSD Parameters Message list of MS Object Message to inject can be multipart Returns ID of inserted message Return type string 4 2 API documentation 53 Gammu Manual Release GAMMU ERSIONAO 4 2 3 gammu data Generic data usa
320. nly exception of GSM SMSDService FindOutboxSMS where ID is used for detection of repeated sending of same message The lifetime of ID for sent message e GSM SMSDService CreateOutboxSMS or direct manipulation with backend storage creates new ID e GSM SMSDService FindOutboxSMS returns ID of message to process e GSM SMSDService AddSentSMSInfo and GSM_SMSDService RefreshSendStatus are then notified using this ID about sending of the message GSM_SMSDService MoveSMS then moves the message based on ID to sent items The lifetime of ID for incoming messages e GSM SMSDService SaveInboxSMS generates the message s RunOnReceive Directive uses this ID 228 Chapter 10 SMS Daemon Gammu Manual Release GAMMU ERSION 10 7 Developer documentation 229 Gammu Manual Release GAMMU ERSIONAO 10 7 2 Message Sending Workflow Cem Error Too many retries E Error ending RefreshSendStatus X gt _ Timeout AddSentSMSInfo ERROR AddSentSMSInfo OK A Error MoveSMS noforce OK Error MoveSMS force ERR 10 7 3 Message Receiving Workflow 230 Chapter 10 SMS Daemon received message CHAPTER 11 Miscellaneous utilities 11 1 gammu detect New in version 1 28 95 11 1 1 Synopsis gammu detect OPTIONS 11 1 2 Description Script to detect available devices which might be suitable for Gammu Urtility Note Th
321. not find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani 5 3 libGammu C API 103 Gammu Manual Release GAMMU ERSIONO Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find
322. ntID TEXT NOT NULL Processed TEXT NOT NULL DEFAULT false CHECK Coding IN Default No Compression Unicode No Compression 8bit Default Compression Unic de Compressi Y CREATE TRIGGER update_inbox_time UPDATE ON inbox BEGIN UPDATE inbox SET UpdatedInDB datetime now WHERE ID old ID END CREATE TABLE outbox UpdatedInDB NUMERIC NOT NULL DEFAULT datetime now InsertIntoDB NUMERIC NOT NULL DEFAULT datetime now SendingDateTime NUMERIC NOT NULL DEFAULT datetime now SendBefore time NOT NULL DEFAULT 23 59 59 SendAfter time NOT NULL DEFAULT 00 00 00 Text TEXT DestinationNumber TEXT NOT NULL DEFAULT Coding TEXT NOT NULL DEFAULT Default_No_Compression UDH TEXT Class INTEGER DEFAULT 1 TextDecoded TEXT NOT NULL DEFAULT ID INTEGER PRIMARY KEY AUTOINCREMENT MultiPart TEXT NOT NULL DEFAULT false RelativeValidity INTEGER DEFAULT 1 SenderID TEXT SendingTimeOut NUMERIC NOT NULL DEFAULT datetime now DeliveryReport TEXT DEFAULT default CreatorID TEXT NOT NULL CHECK Coding IN Default No Compression Unicode No Compression 8bit Default Compression Unic de Compress CHECK DeliveryReport IN default yes no 10 6 Backend services 215 Gammu Manual Release GAMMU ERSIONO
323. ntation for both end users and developers as well as SQL scripts for creating SMSD database config configuration file samples examples examples using libGammu manual sources of The Gammu Manual which you are reading sql SQL scripts to create table structures for MS Daemon user user documentation like man pages 1 10 7 admin directory Administrative scripts for updating locales making release etc 1 10 8 cmake directory CMake include files and templates for generated files 1 10 9 include directory Public headers for libGammu 1 10 10 locale directory Gettext po files for translating Gammu libGammu and user documentation See Localization for more information 1 10 11 tests directory CTest based test suite for libGammu See Testing for more information 1 10 12 utils directory Various utilities usable with Gammu 1 10 Directory structure 15 Gammu Manual Release GAMMU ERSIONAO 1 10 13 contrib directory This directory contains various things which might be useful with Gammu Most of them were contributed by Gammu users Note Please note that that code here might have different license terms than Gammu itself bash completion Completion script for bash conversion Various scripts for converting data init Init scripts for Gammu SMSD media Sample media files which can be used with Gammu perl Various perl scripts which interface to Gammu or SMSD php Various PHP fr
324. ntifiers depend on used service backend typically it is ID of inserted row for database backends or file name for file based backends 186 Chapter 10 SMS Daemon Gammu Manual Release GAMMU E RSION Q Gammu SMSD waits for the script to terminate If you make some time consuming there it will make SMSD not receive new messages However to limit breakage from this situation the waiting time is limited to two minutes After this time SMSD will continue in normal operation and might execute your script again The process has available lot of information about received message in environment check RunOnReceive Directive for more details RunOnFailure New in version 1 28 93 Executes a program on failure This can be used to proactively react on some failures or to interactively detect failure of sending message The program will receive optional parameter which can currently be either INIT meaning failure during phone initialization or message ID which would indicate error while sending the message Note The environment with message as is in RunOnRecei ve is not passed to the command RunOnSent New in version 1 36 4 Executes a program after sending message The program will receive optional parameter a message ID and environment with message details as described in RunOnReceive Directive IncludeNumbersFile File with list of numbers which are accepted by SMSD The file contains one number per line blank lines
325. ntry whatever one was included in string see Calendar Object Todo Object Return type dict gammu EncodeVCALENDAR Entry Encodes calendar entry to a vCalendar Parameters Entry dict Calendar entry see Calendar Object Returns String with vCalendar Return type string gammu EncodeICALENDAR Entry Encodes calendar entry to a iCalendar Parameters Entry dict Calendar entry see Calendar Object Returns String with iCalendar 50 Chapter 4 python gammu Gammu Manual Release OGAMMUyERSIONO Return type string gammu EncodeVTODO Entry Encodes todo entry to a vTodo Parameters Entry dict Todo entry see Todo Object Returns String with vTodo Return type string gammu EncodeITODO Entry Encodes todo entry to a iTodo Parameters Entry dict Todo entry see Todo Object Returns String with vCard Return type string Backup reading and writing gammu SaveRingtone Filename Ringtone Format Saves ringtone into file Parameters e Filename string Name of file where ringote will be saved e Ringtone dict Ringtone to save Format string One of ott mid rng imy wav rttl Returns None Return type None gammu SaveBackup Filename Backup Format Saves backup into file Parameters e Filename string Name of file to read backup from Backup dict Backup data see ReadBackup for description e Format string File format to use Auto AutoUnicode LMB VCale
326. obile to accept this I had to create update PIM data in exactly one package Request 82 00 88 Obex put CB 00 00 00 00 Session id 42 00 1A 6D 2D 6F 62 65 78 2F 63 6F 6E 74 61 63 74 73 2F 63 72 65 61 74 65 00 m obex contacts create 4C 00 04 01 maybe flag for internal external memory C3 00 00 00 5A Length of the vcard string 49 00 5D 42 45 Contact as vcard Answer A0 00 12 Obex ok C3 00 00 00 02 4C 00 05 00 00 Error code 49 00 05 00 21 last two bytes the id of the newly created contact 308 Chapter 13 Phone Protocols Gammu Manual Release GAMMU E RSION Q Update a contact Beware This is a put operation and is performed in some obex implementations in several packages for example 0x02 0x02 0x82 But I didn t get the mobile to accept this I had to create update PIM data in exactly one package Request 82 00 8D Obex put CB 00 00 00 00 Session id 42 00 19 6D 2D 6F 62 65 78 2F 63 6F 6E 74 61 63 74 73 2F 77 72 69 74 65 00 m obex contacts write 4C 00 06 01 00 20 Id of the contact which should be updated C3 00 00 00 5E Length of the vcard string 49 00 61 42 Contact as vcard Answer A0 00 08 Obex ok 4C 00 05 00 00 Error code 0x00 0x00 means successful Read one contact There is also the possibility to read exactly one contact Request 83 00 26 Obex get CB 00 00 00 00 Session id 42 00 18 6D 2D 6F 62 65 78 2F 63 6F 6E 74 61 63 74 73 2F 72 65 61 64 00 m obex contacts read 4C 00 06 01 00 20 F
327. ocation number Set SMSC settings on SIM card This keeps all SMSC configuration intact it just changes the SMSC number Locations are numerated from 1 9 2 4 Memory phonebooks and calls commands Memory types Gammu recognizes following memory types DC Dialled calls MC Missed calls RC Received calls ON Own numbers VM voice mailbox SM SIM phonebook ME phone internal phonebook 9 2 Description 155 Gammu Manual Release GAMMU ERSIONAO FD fixed dialling SL 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 search ing by pressing Ct r1 C 9 2 5 Filesystem commands Gammu allows one to access phones using native protocol Nokias o
328. ock active 8 is SMS storage full t 0x0053 Leon Ztoft 1 will send displayed messages with x y coordinates YA OP WN n 13 4 Nokia 6110 253 Lach netcode symbols 0 Gammu Manual Release GAMMU ERSIONO r Display status ack 0x0054 1 Ox11 Phone clock amp alarm s set date and time 0x0060 1 1 7 yearh yearl month mday hour min 0x00 r date and time set 0x0061 T s get date and time 0x0062 r date and time recvd 0x0063 date set time set 7 yearh yearl month mday houi where date set amp time set 0x01 set 0x00 not set yearh yearl month mday not available in frame S set alarm 0x006b 1 32 3 0x02 on off hour min 0x00 r alarm set Ox006c s get alarm 0x006d r alarm received 0x006e alrm 2 0n hour min 0x12 Connect to NBS port 61xx only s Send 0x0c 0x01 UDH header data without 0 1 header for oplogo cli ringtone etc upload where UDH header 0x06 0x05 0x04 destporth destportl srcporth srcpor 0x13 Calendar notes t min second hour min seco tl s Write calendar note 0x0064 0x01 0x10 length type yearH yearL month day hour time alarm alarm yearH yearL month day hour timezone textlen text r Write cal note report 0x0065 return where return 0x01 ok 0x73 failure 0x81 calendar functions busy Exit Calendar menu and try again S Calendar notes set 0x0066 r Cale
329. ocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual 5 3 22 SMSD Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file nome docs checkouts readthedocs org user_builds gammu checkoutp stable docs man Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable
330. odule gammu 48 setfileattrib folderID system readonly hidden protected gammu command line option 157 SetFileAttributes gammu StateMachine method 45 SetIncomingCall gammu StateMachine method 46 SetIncomingCallback gammu StateMachine method 46 SetIncomingCB gammu StateMachine method 45 SetIncomingSMS gammu StateMachine method 46 SetIncomingUSSD gammu StateMachine method 46 SetLocale gammu StateMachine method 46 SetMemory gammu StateMachine method 46 setpower ONIOFF gammu command line option 168 setringtone file location location scale name name gammu command line option 159 SetSMS gammu StateMachine method 46 setsmsc location number gammu command line option 155 SetSMSC gammu StateMachine method 47 SetSpeedDial gammu StateMachine method 47 Settings 66 SetToDo gammu StateMachine method 47 Shutdown gammu smsd SMSD method 53 siemensnetmonact netmon type gammu command line option 165 siemensnetmonitor test gammu command line option 165 siemenssatnetmon gammu command line option 165 Small 66 SMSC 60 SMSCDateTime 62 SMSCounter in module gammu 49 SMSD class in gammu smsd 52 Index 333 Gammu Manual Release GAMMU E RSION SMSTEMPLATE unicode text text unicodefiletext U file defsound ID defanimation ID UDH 61 tonelO file tonelOlong file tone12 file Underlined 66 tone12long file toneSE fil
331. of SMSC Oxf8 0x00 validity 0x55 blocks blocks v2 0x03 PHONEBOOK HANDLING s Get memory status 0x03 0x01 memory type 0x55 0x55 0x55 0x00 where memory type see 0x03 0x07 r Get memory status 0x04 0x00 location 0x00 7 0x01 0x10 0x00 0x00 Ox c total low total high used low used high 0x01 0x00 0x00 S Read memory 0x07 0x01 0x01 0x00 0x01 0x02 memory type 0x00 0x00 0x00 0x00 location low location high 0x00 0x00 where MT memory type 0x01 256 Dialled numbers 0x02 512 Missed calls 0x03 768 Received calls 0x05 500 telephone phonebook 0x06 160 SIM phonebook 0x07 10 0 0x08 1 0 0x09 4 voice mailbox Ox0e 10 speed dials 0x10 5 caller groups r Read memory 0x08 0x00 0x01 code 0x00 0x00 z xH xL yH yL 0x00 7 no of blocks bl 13 5 Nokia 6510 261 Gammu Manual Release GAMMU ERSIONO where if code 0x0f amp amp xH 0x34 phonebook location not found y location z generic block size block id 0 0 blocksize block no contents 0x00 id 0x04 pointer to another memory location Oxff yH yL xL 0x00 0x07 name len unicode 0x08 email 0x09 postal OxOa note len unicode OxOb number type 0x00 3 len unicode Ox0c ringtone ringtone no 0 0 0x13 date for a called list DC RC etc Oxlb caller group graphic width height 0 O bitmap Oxlc caller group graphic on 1 yes 0 no 0 Q
332. off S get used network r network registration Keys S Get key assignments r Get key assignments S Press key r Press key ack ack 0x0d Status r Display Status request Status Kh uo K u s Display status 0x0004 code current 0x00 new 0x00 where code 1 security code 5 chars 2 PIN 4 chars 3 PIN2 4 chars 4 PUK 8 chars 5 PUK2 8 chars 0x0007 0x01 0x0008 accepted where accepted 0x0c or 0x06 OK code waiting for 0x08 0x0004 code L 0x000a code code 0x00 where code see 0x08 0x0004 0x0080 0x0081 0x0044 on 0x01 0x02 0x0070 0x0071 length netstatus netsel cellIDH cellIDL lac 0x0040 0x01 0x0041 key 1 0x00 key 2 key 0 0 0 0 where key 0 j gt 0 0x0042 press 0x01 release 0x02 button 0x01 where button 0x01 0x09 1 9 0x0a 0 Ox0b Ox0c x OxO0d Power 0x0e Pick up phone Ox0f Hang 0x10 Volume 0x11 Volume 0x17 Up 0x18 Down 0x19 Menu Oxla Names OxlB onwards don t know but they do produce a beep and light up the keypad as if a key had been pressed 0x0043 press release error 0x05 0x0044 0x0045 0x01 0x0050 0x01 y x len string unicode 0x0051 0x0052 no of byte pairs byte pair where cmd l off 2 on byte pair call in progress 232 cmd have unread sms voice call active fax call active data call active key l
333. old cb radio only one talking at a time Many transmission are made this way computer sends request phone sends ack phone sends response computer sends ack Some frames are sent from phone without asking for them You have to implement collision protocol IE you should listen for what you are transmitting and if it does not come back you have collision You should wait for bus to be free for 3 miliseconds before normal message and for 2 5 miliseconds before acknowl edge You should wait for acknowledge for 200 miliseconds then retransmit 13 2 2 Frame format for FBUS version 1 All frames FrameID FrameLength MsgType block SeqNo ChkSum where FrameID 0x01 Command frame from computer to Nokia 0x02 Data call frame from computer to Nokia 0x03 Data call frame from Nokia to computer 13 2 Nokia protocols 241 Gammu Manual Release GAMMU ERSIONO 0x04 Command frame from Nokia to computer FrameLength block 2 MsgType see List SeqNum Sequence number of command in case where direction is from ME to computer the sequence number is counting from 0x30 to 0x37 and resetting back to 0x30 When direction is from computer to ME Sequence number counts from 0x08 to 0x0f and resets back to It may not be required to be this way Sequence numbers are used in acknowledging commands ChkSuml CRC 0 for i 0 i lt 2 CMD
334. on 162 copybitmap inputfile outputfile OPERA TORIPICTUREISTARTUPICALLER gammu command line option 157 copyringtone source destination RTTLIBINARY gammu command line option 158 D Database 197 DataPath 168 314 DateTime 61 DBDir 197 DEALER gammu command line option 158 DEALER text 324 Index Gammu Manual Release GAMMU E RSION Q gammu command line option 158 decodebinarydump file phonemodel gammu command line option 167 DecodeICS in module gammu 50 DecodePDU in module gammu 49 DecodeSMS in module gammu 49 decodesniff MBUS2IIRDA file phonemodel gammu command line option 167 DecodeVCARDO in module gammu 50 DecodeVCS in module gammu 50 DefaultNumber 63 DeleteAllCalendar gammu StateMachine method 34 deleteallmemory DCIMCIRCIONIVMISMIMEIMTIFDISL gammu command line option 156 DeleteAlIMemory gammu StateMachine method 35 deleteallsms folder gammu command line option 150 DeleteAlIToDo gammu StateMachine method 35 deletecalendar start stop gammu command line option 159 DeleteCalendar gammu StateMachine method 35 DeleteFile gammu StateMachine method 35 deletefiles fileID gammu command line option 157 deletefolder name gammu command line option 157 DeleteFolder gammu StateMachine method 35 deletememory DCIMCIRCIONIVMISMIMEIMTIFDISL start stop gammu command line option 156 DeleteMemory gammu StateMachine method 35 deletesms
335. on File for details to run defined program after receiving every message It can receive single message or more messages which are parts of one multipart message This parameter is executed through shell so you might need to escape some special characters and you can include any number of parameters Additionally parameters with identifiers of received messages are appended to the command line The identifiers depend on used service backend typically it is ID of inserted row for database backends or file name for file based backends Gammu SMSD waits for the script to terminate If you make some time consuming there it will make SMSD not receive new messages However to limit breakage from this situation the waiting time is limited to two minutes After this time SMSD will continue in normal operation and might execute your script again Note All input and output file descriptors are closed when this program is invoked so you have to ensure to open files on your own 10 5 2 Environment program is executed with environment which contains lot of information about the message You can use it together with NULL service see Null Backend to implement completely own processing of messages Global variables SMS MESSAGES Number of physical messages received DECODED PARTS Number of decoded message parts 10 5 RunOnReceive Directive 193 Gammu Manual Release GAMMU ERSIONAO Per message variables The variables furt
336. ons Parameters before command configure gammu behaviour c config filename name of configuration file see Gammu Configuration File s section lt confign gt section of config file to use eg 42 d debug level debug level see LogFormat in Gammu Configuration File for possible values f debug file filename file for logging debug messages 9 2 2 Call commands answercall id Answer incoming call cancelcall id Cancel incoming call canceldiverts Cancel all existing call diverts 147 Gammu Manual Release GAMMU ERSIONAO 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 get or set whether to get divert information or to set it all or busy or noans or outofreach condition when apply divert all or voice or fax or data call type when apply divert number number where to divert timeout 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 after Length seconds senddtmf sequence Plays DTMF sequence In
337. ontends to SMSD or Gammu directly sms This directory contains SMS default alphabet saved in Unicode text file charset t xt and table used for converting chars during saving SMS with default alphabet convert t xt sms gammu2android Perl script to convert SMS Backup Format into XML suitable for Android SMS Backup amp Restore application See also http blog ginkel com 2009 12 transferring sms from nokia to android 16 Chapter 1 Gammu project Gammu Manual Release GAMMU ERSION smscgi Simple cgi application gor handling SMS messages a bit lighter version of SMSD sql Various SQL snippets and triggers useful with SMSD testing Helper scripts for automatic testing or git bisect sqlreply System for automatic replying to SMS messages symbian GNapplet sources and binaries This comes from Gnokii project but Gammu includes slightly modified version s60 Series60 applet to use with recent Symbian phones See also Series 0 Remote Protocol win32 Unsupported applications built on top of libGammu dll on Windows 1 11 Roadmap for Gammu There are some major issues which should be addressed in Gammu soon This list is not sorted at all but includes bad design decisions made in Gammu past which we would like to fix 1 11 1 Locations handling One problem is locations handling because current scheme using numbers really does not match majority of current phones and it should be converted
338. onth REPEAT MONTH Repeat x th month REPEAT FREQUI Lr NCY Repeating frequency REPEAT STARTDATE Repeating start REPEAT STOPDATE Repeating end REPEAT COUNT Number of repetitions e LUID IIMC LUID which can be used for synchronisation LAST MODIFIED Date and time of last modification 70 Chapter 4 python gammu ays 1 Gammu Manual Release GAMMU ERSION Value Actual value corresponding type to Type field Phonebook Object Phonebook entry is a dictionary consisting of following fields Location Location where the entry is stored MemoryType Memory where the message is stored Entries Actual entries see Phonebook Entries Object Example PBK Location 1000 MemoryType ME Entries Type Number General Value 420123456789 Type Text Name Value Stojan Jakotyc l Phonebook Entries Object Type Type of entry one of Number General General number Text Number Mobile Mobile number Text Number Fax Fax number Text Number Pager Pager number Text Number Other Other number Text Text Note Note Text Text Postal Complete postal address Text Text Email Email Text Text Email2 Second email Text Text_URL URL Text Date Date and time of
339. org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual 5 3 libGammu C API 10 al Gammu Manual Release GAMMU ERSIONO Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org
340. ormation gammu s60 remote sign sis Applet ready for signing using Open Signed Online This will allow you to install applet to your phone only it is bound to IMEI but you don t need to allow installation of unsigned applications 13 14 Series60 Remote Protocol 313 Gammu Manual Release GAMMU ERSIONAO Note The best way of course would be to have properly signed applet However access to signing tools costs 200 USD per year what is something we can not afford right now Allowing installation of unsigned applications For security reasons Symbian defaults to install signed applications only As getting properly signed applet is expen sive for non commercial product like Gammu you need to either sign applet yourself the signature is valid for single phone or allow installation of unsigned applications 1 Open Application Manager it is usually located in Control Center Press left soft key for Options menu From the menu choose Settings Change the Software Installation to All Change the Online certif check to Off RN AeA U N Warning This allows installation of any not signed code to your phone You should consider reverting this change once you have installed applet required for Gammu 13 14 2 Installation To run the applet you need to install Python for S60 2 0 to the phone You can either download it from their website or just get mirrored installation package from lt http dl cihar co
341. ort 0x02 stored SMS 0x07 picture message S Delete SMS messag 0x010a folderID location 2 bytes 0x01 r Delete SMS 0x010b s Get folder status 0x016b folderID OxOF 0x01 wher folderID S 0x14 0x017B r Get folder status 0x016c number of entries 2 bytes entrylnumber 2 bytes S Get folder names 0x017A 0x00 0x00 r Get folder names 0x017B number of strings folderID namel 0x00 folderlII wher folderID 0x08 Inbox 0x10 Outbox 0x18 Archive 0x20 Templates 0x29 first My folders 0x31 second My folders 0x39 third and so on 0x17 S Get Battery info 0x0002 r Get Battery info 0x0003 Ox0b batt 0x14 0x01 0x19 Phone clock amp alarm These frames are like the same frames subtypes in 0x11 in 6110 S set date and time 0x0060 1 1 7 yearh yearl month mday hour min 0x00 r date and time set 0x0061 s get date and time 0x0062 r date and time recvd 0x0063 date set time set 7 yearh yearl month mday houi where date set amp time set 0x01 set 0x00 not set yearh yearl month mday not available in frame S set alarm 0x006b 1 32 3 0x02 on off hour min 0x00 r alarm set Ox006c s get alarm Ox006d r alarm received 0x006e alrm 2 0n hour min These are new 2 s 0x0083 id 2 E22 0x0084 0x01 0x40 0x03 id 0x00 0x00 pcm 0x0084 0x01 0x40 0x03 id 0x00 0x01 2 m2 0x0084 0x01 0x40 0x03 id
342. ounter so it might overflow 10 6 Backend services 221 Gammu Manual Release GAMMU ERSIONO sentitems Log of sent messages and unsent ones with error code Also if delivery reports are enabled message state is updated after receiving delivery report Fields description UpdatedInDB timestamp when somebody daemon user etc updated it InsertIntoDB timestamp when message was inserted into database SendingDateTime timestamp when message has been sent DeliveryDateTime timestamp Time of receiving delivery report if it has been enabled Status enum SendingOK SendingOKNoReport SendingError DeliveryOK DeliveryFailed DeliveryPending Del Status of message sending SendingError mens that phone failed to send the message Error indicates some other error while processing message SendingOK Message has been sent waiting for delivery report SendingOKNoReport Message has been sent without asking for delivery report SendingError Sending has failed DeliveryOK Delivery report arrived and reported success DeliveryFailed Delivery report arrived and reports failure DeliveryPending Delivery report announced pending deliver DeliveryUnknown Delivery report reported unknown status Error Some other error happened during sending usually bug in SMSD StatusError integer Status of delivery from delivery report message codes are defined in GSM specification 03 40 section 9 2 3 1
343. outs readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual 5 3 libGammu C API 117 Gammu Manual Release GAMMU ERSIONO Warning doxygenenum Cannot find file home docs checkouts readthed
344. ox SendingDateTime SendingTimeOut CREATE INDEX outbox sender ON outbox SenderID gt Dumping data for table outbox 204 Chapter 10 SMS Daemon Gammu Manual Release GAMMU ERSION Table structure for table outbox_multipart CREATE TABLE outbox multipart Text text Coding enum Default No Compression Unicode No Compression 8bit Default Comprd UDH text Class integer default 1 TextDecoded text default NULL ID integer unsigned NOT NULL default 0 SequencePosition integer NOT NULL default 1 PRIMARY KEY ID SequencePosition ENGINE MyISAM DEFAULT CHARSET utf8mb4 Dumping data for table outbox multipart Table structure for table pbk CREATE TABLE pbk ID integer NOT NULL auto increment GroupID integer NOT NULL default 1 Name text NOT NULL Number text NOT NULL PRIMARY KEY ID ENGINE MyISAM DEFAULT CHARSET utf8mb4 Dumping data for table pbk Table structure for table pbk groups CREATE TABLE pbk groups Name text NOT NULL ID integer NOT NULL auto increment PRIMARY KEY ID ID ENGINE MyISAM DEFAULT CHARSET utf8mb4 AUTO_INCREMENT 1 Dumping data for table pbk groups Pssion Unic 10 6 Backend services 205 Gammu Manual Release GAMMU ERSIONO Table structure for table phones CREATE TABLE phones I
345. pe validity 2 DefaultRecipient no 12 SMScenter no 12 SMSC name 0x00 274 Chapter 13 Phone Protocols to SM2 0 Gammu Manual Release GAMMU ERSION r SMS center error recv S r S3 iene 0x03 Phonebook functions s Get memory status r Get memory status S Read memory r Read memory error r Read memory OK 0x13 date for a called list DC RC etc xlb caller group graphic width height 0 0 bitmap where priority checksum type validity tel no 12 see 0x02 0x0030 0x0035 reason 0x0074 0x0075 OxFF 0x11 0x98 0x008C 0x008D 0x00 0x0103 0x02 memory type where memory type see 0x03 0x0107 0x0104 0x00 xL 0x00 2 y1H ylL 0x10 0x00 2 z ymaxH ymaxL y2H y2L 0x0d xH 0x00 2 where yl location lowermost y2 no of locations ymax maximum location no 0x0107 0x01 0x01 0x00 OxO0O1 xH xL yH yL 0x00 0x00 where x memory type 0x01 256 Dialled numbers 0x02 512 Missed calls 0x03 768 Received calls 0x05 500 telephone phonebook 0x06 160 SIM phonebook 0x07 10 0 0x08 1 0 0x09 4 voice mailbox Ox0e 10 speed dials 0x10 5 caller groups y location 0x0108 0x00 0x01 code 0x00 0x00 z error where code 0x0f error 0x34 phonebook location not found Ox3b speed dial not assigned 0x0108 0x00 0x01 code 0x00 0x00 z xH xL yH yL 0x00
346. process messages from evil number 666 exclude numbers numberl 666 Debugging Enabling debugging smsd debuglevel 255 logfile smsd log Multiple modems You can run any number of SMSD instances and they can even share same backend database For routing the messages you need to set different Phone ID for each instance and set Sender ID column in outbox table Following example shows configuration for two modems but you can have any number of SMSD instances The only limitation is performance of your hardware especially if all modems are connected using USB Configuration for first SMSD gammu device dev ttyACMO connection at smsd Service sql Driver native_mysql PIN 1234 LogFile syslog User smsd Password smsd PC localhost Database smsd PhoneID first Configuration for second SMSD 192 Chapter 10 SMS Daemon Gammu Manual Release GAMMU ERSION gammu device dev ttyACM1 connection at smsd Service sql Driver native mysql PIN 1234 LogFile syslog User smsd Password smsd PC localhost Database smsd PhoneID second You can then start two separate instances of SMSD gammu smsd c path to first smsdrc gammu smsd c path to second smsdrc 10 5 RunOnReceive Directive 10 5 1 Description Gammu SMSD can be configured by RunOnReceive directive see MSD Configurati
347. ption gammu ERR_NOTCONNECTED Exception corresponding to gammu error ERR NOTCONNECTED Verbose error description Phone is not connected exception gammu ERR NOTIMPLEMENTED Exception corresponding to gammu error ERR NOTIMPLEMENTED Verbose error description Functionality not implemented You are welcome to help authors with it exception gammu ERR NOTRUNNING Exception corresponding to gammu error ERR NOTRUNNING Verbose error description Service is not run ning exception gammu ERR NOTSUPPORTED Exception corresponding to gammu error ERR NOTSUPPORTED Verbose error description Function not supported by phone exception gammu ERR OTHERCONNECTIONREQUIRED Exception corresponding to gammu error ERR OTHERCONNECTIONREQUIRED Verbose error description Current connection type doesn t support called function exception gammu ERR PERMISSION Exception corresponding to gammu error ERR PERMISSION Verbose error description Operation not al lowed by phone exception gammu ERR PHONEOFF Exception corresponding to gammu error ERR PHONEOFF Verbose error description Phone is disabled and connected to charger exception gammu ERR PHONE INTERNAL Exception corresponding to gammu error ERR PHONE INTERNAL Verbose error description Internal phone error exception gammu ERR READ ONLY Exception corresponding to gammu error ERR READ ONLY Verbose error description Entry is read only exception gammu ERR SECURITYERROR Exception
348. r 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 prot 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 156 Chapter 9 Gammu Utility Gammu Manual Release GAMMU E RSION Q 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 filesytem getfiles fileID fileID Retrieve files with given IDs from a phone filesytem 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 fla
349. r Reminder Recurrance as above len 0x00 tring unicode for Birthday bytel byte2 alarm 4 bytes yearofbirth alarm bytel and byte2 may vary Usually are 0x00 In Birthday the Year in the common part usuall So don t consider it as Year of note neither y Birthday use the value described below where alarm 32 bit integer that is the number lot seconds be alarm time and 11 59 58pm on the birthday For No 4 Ox0000FFFF 65535 YearOfBirth used instead of the one in tthe common pa but only when reading birthday entries For storin not exist AlarmType 0x00 Tone 0x01 Silent 5 0x0021 13 5 Nokia 6510 263 Gammu Manual Release GAMMU E HS TO N 0 2 re 0x0022 0x5A 0x00 S 0x0025 0 0x0026 0x04 0x00 S 0x0029 0x002A 0x04 0x00 s Get first free pos 0x0031 r Get first free pos 0x0032 location 2bytes s Get notes info 0x003a OxFF OxFE r Get notes info 0x003b how many notes used 2 bytes 0x01 0x07 two S Get first free pos 0x0031 r Get first free pos 0x0032 location 2bytes S Get notes info 0x003a OxFF OxFE r Get notes info 0x003b how many notes used 2 bytes 0x01 0x07 two T S Get calendar note 0x003E location 2 bytes r Get calendar note 0x003F location 2bytes 0x14 FOLDER PICTURE SMS HANDLING S Get SMS Status 0x08 0x00 0x01 r Get SMS Status 0x09 0
350. r on message seql 05 Oxdl s Get HW amp SW version 0x0003 0x00 0xd2 r Get HW amp SW version 0x0003 V firmware n firmware daten model n c NMP Oxf4 Power on message seq 2 13 7 Nokia 6210 6310 CARC91 PC Experiment Author Jens Bennfors Company AB Indevia Date 2002 04 09 13 7 Nokia 6210 6310 CARC91 PC Experiment 285 Gammu Manual Release GAMMU ERS TON 0 13 7 1 Introduction The purpose of this experiment is to gain understanding about how Nokias commands for handsfree works in a way that can be of use in the construction of Com n sense The means available is a Nokia 6210 a Nokia 6310 a HFU 2 CARC91 and a PC with a LabVIEW program installed 13 7 2 Setup I have connected the phone to a Nokia original handsfree CARC91 I then use the PC for listening to the data communication between the phone and CARC91 I also send the frames directly from the PC to the phone 13 7 3 Nokia 6210 Phone connected to PC Initiation 1F0004 DO 0001 04 00CE Power up from PC 1F0004 DO 0001 04 01CF Power up from PC 1F0400 DO 0001 05 10DF Power up from phone 1F0004 79 0005 0201 0164 00 0203 Enable carkit mode from PC 1F0004 79 0005 0201 0164 00 0302 Enable carkit mode from PC 1F0400 7F 0367 Ack from phone 1F0004 79 0012 0201 0206 0056 2030 372E 3030 0448 4655 3200 044F HFU 2 Version 1F0400 7F 0460 Ack from phone 1F0400 78 0004 0102 0801 117C Status 0x08 0x01 from phone 1F0400 DA 0002 0002 12D3 Type gt OxDA da
351. r_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot
352. re e Config Pointer to SMSD configuration data ID Identification of found message will be stored here this should be unique for different message so that repeated attempts to send same message can be detected by SMSD core Empty string avoids this check Returns Error code GSM Error GSM_SMSDService MoveSMS GSM_MultiSMSMessage sms GSM_SMSDConfig Con fig char ID gboolean alwaysDelete gboolean sent Moves sent message from outbox to sent items Parameters 226 Chapter 10 SMS Daemon Gammu Manual Release GAMMU E RSION Q sms Message which should be moved backend usually can get it by ID as well Config Pointer to SMSD configuration data ID Identification of message to be moved alwaysDelete Whether to delete message from outbox even if moving fails sent Whether message was sent TRUE or there was a failure FALSE wm Returns Error code GSM_Error GSM_SMSDService CreateOutboxSMS GSM_MultiSMSMessage sms GSM_SMSDConfig Config char NewID Saves message into outbox queue Parameters sms Message data to save e Config Pointer to SMSD configuration data NewID ID of created message will be stored here Returns Error code GSM Error GSM_SMSDService AddSentSMSInfo GSM MultiSMSMessage sms GSM_SMSDConfig Config char ID int Part GSM_SMSDSendingError err int TPMR Logs information about sent message eg delivery report Parameters
353. rease the maximum transmission speed to 9600bps if possible because the intercept program doesn t seem to handle speed changes 9600 239 Gammu Manual Release GAMMU E HS TO N 0 is for searching devices in range and then the highest possible speed is chosen If it isn t possible you have to change the default bitrate in intercept source code too Then you won t see anything until the windows machine and the phone start transmitting data which isn t too bad At least here in my setup I could sniff the data coming from phone and sent to it in one go like that win gt Nokia machin lt phone sniffing device You get a raw data file trc from the intercept program which you can then decode to hex with the second program from the above mentioned page You should possibly be able to use Marcin s magnokii for decoding the trc files too but it didn t work for me so I just figured things out from the hex files In the hex files you should look for primary frames with 00 01 00 in it because this is the FBUS header which is in every valuable frame sent to phone It s not really joy to do that but if it brings support for a new phone it s worth it 13 2 Nokia protocols Document describing protocol used in Nokia phones The data provided is for information purposes only Some of the frames might be hazardous to your phone Be careful We do not take any responsibility or liability for damages et
354. receiving or status error on sending t message reference d receiving datetime for received sms E encoded text of SMS c SMS coding ie 8bit or UnicodeNoCompression F sms centre number u UDH header x class T decoded SMS text A CreatorID of SMS sending sms V relative validity Configurable queries All configurable queries can be set in sql section Sequence of rows in selects are mandatory All default queries noted here are noted for MySQL Actual time and time addition are selected for default queries during initialization Sender number for received messages insert to inbox or delivery notifications destination otherwise 198 Chapter 10 SMS Daemon Gammu Manual Release GAMMU E RSION Q delete phone Deletes phone from database Default value DELETE FROM phones WHERE IMEI SI insert phone Inserts phone to database Default value INSERT INTO phones IMEI ID Send Receive VALUES I P 1 2 NOW NOW INT InsertIntoDB ERVAL 10 SECOND 0 TimeOut Client SN 1 1 Battery Query specific parameters 1 enable send yes or no configuration option Send 2 enable receive yes or no configuration option Receive save inbox sms select Select message for update delivery status Default value SELECT ID Status SendingDateTime WHERE DeliveryDateTim DeliveryDateTime
355. res 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 GSM Feature values without leading F prefix Please report correct values to Gammu authors 8 2 4 Locales and character set options GammuCoding Forces using specified codepage for example 1250 will force CP 1250 or ut 8 for UTF 8 This should not be needed Gammu detects it according to your locales GammuLoc Path to directory with localisation files the directory should contain LANG LC MESSAGES gammu mo If gammu is properly installed it should find these files automatically 8 2 5 Other options DataPath Additional path where to search for data files The default path is configured on build time and defaults to usr share data gammu on Unix systems Currently it is used only for searching files to upload to phone using gammu install 8 3 Examples There is more complete example available in Gammu documentation see Gammu Utility 8 3 1 Connection examples Gammu configuration for Nokia phone using DLR 3 cable gammu device dev ttyACMO connection dlr3 Gammu configuration for Sony Ericsson phone or any other AT compatible phone connected using USB cable gammu device dev ttyACMO connection at Gammu configuration for Sony Ericsson or any other AT compatible phone connected using bluetooth gammu device
356. return If Callers 0xff means Alert for All calls Then need to read other groups selection for number2 0x09 Automatic answer block Qx01 0x22 0OxTT Switch 0x01 where Switch 0 Off 1 On N B This feature is valid for Handsfree and Headset prq 0x0101 0x04 0x01 0x01 Oxff 0x03 0x0102 0x01 0x02 0x03 0x01 0x01 2222 22 0 0x01 0x85 0x087 y 0x0105 0x0106 WAP Enable WAP frames r Enable WAP frames 0x01 0x04 0x0000 0x0002 x01 27 0x0003 2 2 0x0004 Get WAP bookmark 0x0006 0x00 location where location 0 14 0x0007 0x00 name len url len url unicode 0x0008 error where error 0x00 invalid position 0x01 user inside Bookmarks 0x02 invalid too high empty location Get WAP name unicode 0x01 0x80 0x00 7 bookmark Get WAP bookmark err menu Must leave it Set WAP 0x0009 url_len Oxff Oxff name_len name unicode url unicode 0x01 0x80 0x00 7 Note bookmark is added to the first free location 0x01 0x36 Ox0a block where block OxOa location of just written bookmark 0x00 next free location 40x01 0x36 Ox0b error where error 0x04 memory is full 0x01 we are in the bookmark menu 0x00 unknown reason for now bookmark Set WAP bookmark OK Set WAP bookmark err Delete WAP bookmark 0x000c 0x00 where location 0x000d 0x000e location 0 14 Delete WAR bookmark OK Delete W
357. rom outbox multipart after threir successful send Default value DELETE FROM outbox multipart WHERE ID 1 Query specific parameters 1 ID of message create outbox Create message insert to outbox Default value INSERT INTO outbox CreatorID SenderID DeliveryReport InsertIntoDB Text DestinationNumber RelativeValidity TextDecoded VALUES 1 SP 2 3 NOW SR V oR SI MultiPart Coding UDH Class c ST o o Su X Query specific parameters 1 2 3 4 creator of message delivery status report yes default multipart FALSE TRUE Part part number 5 ID of message create outbox multipart Create message remaining parts Default value INSERT INTO outbox multipart TextDecoded ID VALUES 54 SequencePosition c T Text 5 SE SI o a Su SX Coding UDH Class Query specific parameters 1 creator of message 2 delivery status report yes default 3 multipart FALSE TRUE 4 Part part number 5 ID of message add_sent_info Insert to sentitems Default value INSERT INTO sentitems CreatorID ID SequencePosition Status SendingDateTime SMSCNumber TPMR SenderID Text DestinationNumber Coding UDH Class TextDecoded InsertIntoDB RelativeValidity VALUES A 1 2 3 NOW SF 4 SP SE SR c Su x T 5 V Query specific parameters 1 ID of sms message
358. rom specified SMS folder deletesms folder start stop Delete SMS from phone See description for gammu get sms for 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 like sendsms 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 use gammu getsms geteachsms pbk Similiary to gammu getallsms Difference is that links all concatenated sms 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 phone sa
359. rt stop 165 getlocation 166 listtodocategory textInumber 160 maketerminatedcall number length showlhide 148 MMSINDICATOR URL Title Sender 152 MMSSETTINGS file location 153 monitor times 166 networkinfo 165 nokiaaddfile TYPE type options 162 nokiaaddplaylists 162 nokiacomposer file 163 nokiadebug filename v11 22 v33 44 163 nokiadisplayoutput 163 nokiadisplaytest number 163 nokiagetadc 163 nokiagetoperatorname 163 nokiagetpbkfeatures memorytype 163 nokiagett9 163 nokiagetvoicerecord location 163 nokiamakecamerashoot 163 nokianetmonitor test 163 nokianetmonitor36 164 nokiasecuritycode 164 nokiaselftests 164 nokiasetlights keypadldisplayltorch onloff 164 nokiasetoperatorname networkcode name 164 nokiasetphonemenus 164 nokiasetvibralevel level 164 nokiatuneradio 164 nokiavibratest 164 OPERATOR file netcode netcode biglogo 153 Index 327 Gammu Manual Release GAMMU ERSIONAO OPERATOR file netcode 158 OPERATOR file 158 PICTURE file text text unicode alcatelbmmi 153 PICTURE file location text 158 PICTURE location file 158 playringtone file 159 playsavedringtone number 159 presskeysequence mMnNpPuUdD 123456789 0 gGrR lt gt hHcCjJfFoOmMdD 167 PROFILE name name bitmap bitmap ringtone ringtone 153 readmmsfile file save 165 reset SOFTIHARD 167 resetphonesettings PHONEIDEVIUIFIALLIFACTORY 1
360. s Under Windows 7 you might need to disable UAC user account control before you will be able to install SMSD service Windows Service Examples Install Gammu SMSD Windows service gammu smsd exe c c Gammu smsdre i Install two instances of SMSD Windows service gammu smsd exe c c Gammu smsdrc 1 n Gammu first phon i gammu smsd exe c c MGammuNsmsdrc 2 n Gammu second phon al To uninstall a Windows service gammu smsd exe u Troubleshooting Windows Service If Gammu fails to start as a Windows service you will usually get Error 1053 The service did not respond to the start or control request in a timely fashion first check your SMSD logs If they do not contain any useful hint try starting SMSD manually with exactly same parameters as you installed the service without i For example the command line can look like gammu smsd exe c smsdrc You now should be able to get errors from SMSD even if it fails to start as a service Known Limitations You can not use same phone by more programs in same time However in case you did not enable locking in gammu section it might be able to start the communication with phone from more programs In this case neither of the programs will probably work There is no way to detect that SMS message is reply to another by looking at message headers The only way to achieve this is to add some token to the message and let the user
361. s Type Reads category status number of used entries from phone Parameters Type string Type of category to read one of ToDo Phonebook Returns Dictionary containing information about category status Used Return type dict GetConfig Section Gets specified config section Configuration consists of all params which can be defined in gammurc config file 4 2 API documentation 37 Gammu Manual Release QGAMMU ERSIONAO Model DebugLevel Device Connection SyncTime LockDevice DebugFile StartInfo UseGlobalDebugFile Parameters Section int Index of config section to read Defaults to 0 Returns Dictionary containing configuration Return type dict GetDateTime Reads date and time from phone Returns Date and time from phone as datetime datetime object Return type datetime datetime GetDisplayStatus Acquired display status return List of indicators displayed on display rtype list GetFilePart File Gets file part from filesystem Parameters File dict File data see File Object Returns File data for subsequent calls Finished indicates transfer has been completed see File Object Return type dict GetFileSystemStatus Acquires filesystem status Returns Dictionary containing filesystem status Used and Free Return type dict GetFirmware Reads firmware information from phone Returns Tuple from version date and numeric version Return type tuple GetFolderL
362. says 160 Chapter 9 Gammu Utility Gammu Manual Release GAMMU E RSION Q addsms folder file yes Adds SMSes from file format like gammu backupsms uses to selected folder in phone backup file yes Backup your phone to file It s possible to backup depends on phone and backup format phonebook from SIM and phone memory calendar notes SMSC settings operator logo estartup static logo or startup text WAP bookmarks WAP settings ecaller logos and groups user ringtones There are various backup formats supported and the backup format is guessed based on file extension e 1mb Nokia backup supports contacts caller logos and startup logo vcs vCalendar supports calendar and todo vcf vCard supports contacts 1dif LDAP import supports contacts ics iCalendar supports calendar and todo Any other extension is Gammu backup file and it supports all data mentioned above see Backup Format for more details By default this command is interactive and asks which items tou want to backup Use yes for answering yes to all questions backupsms file yes all Stores all SMSes from phone to file into MS Backup Format By default this command is interactive and asks which folders you want to backup and whether you want to remove messages from phone afterwards Use yes for answering yes to all questions backup all messages and delete them from phone or all to just backup all folders while k
363. sms Message which should be moved backend usually can get it by ID as well e Config Pointer to SMSD configuration data ID Identification of message to be marked Part Part of the message which is being processed e err Status of sending message TPMR Message reference if available TPMR Returns Error code GSM Error GSM SMSDService RefreshSendStatus GSM_SMSDConfig Config char ID Updates sending status in service backend Parameters e Config Pointer to SMSD configuration data ID Identification of message to be marked Returns Error code GSM Error GSM_SMSDService RefreshPhoneStatus GSM SMSDConfig Config Updates information about phone in database network status battery etc Parameters Config Pointer to SMSD configuration data Returns Error code GSM Error GSM_SMSDService ReadConfiguration GSM SMSDConfig Config Reads configuration specific for this backend 10 7 Developer documentation 227 Gammu Manual Release GAMMU E HS TO N 0 Parameters e Config Pointer to SMSD configuration data Returns Error code Message ID You might have noticed that message ID is often used in the API The primary reason for this is that it is usu ally easier for backend to handle message just by it s internal identification instead of handling message data from GSM MultiSMSMessage If the backend does not use any IDs internally it really does not have to provide them with o
364. t 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 using getfilesystem 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 Sends file to a phone It s up to phone to decide where to store this file and how to handle it for example when you send vCard or vCalendar most of phones will offer you to import it setfileattrib folderID system readonly hidden protected 9 2 6 Logo and pictures commands These options are mainly there are few exceptions 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 copybitmap inputfile outputfile OPERATOR
365. t 0x05 5 second 0x0a 10 second OxOf 15 second 0x14 20 second 0x19 25 second Oxle 30 second where divtype 0x02 all diverts for all call types Found only when deactivate all diverts for all call types with 0x15 all calls 0x43 when busy Ox3d when not answered Ox3e if not reached calltype 0x00 all calls data voice fax Ox0b voice calls OxO0d fax calla 0x19 data calls s Deactivate calldiverts 0x0001 0x04 0x00 divtype calltype 0x00 where divtype calltype see above r Deactivate calldiverts 0x0002 0x04 0x00 divtype 0x02 calltype data s Get call diverts 0x0001 0x05 0x00 divtype calltype 0x00 where divtype calltype see above r Get call diverts ok 0x0002 0x05 0x00 divtype 0x02 calltype data where divtype calltype see above data 0x01 0x00 isn t active 0x02 0x01 number packed like in SMS 0x00 0x00 timeout r Get prepaid info 0x0005 length message packed like in bit SMS r Call diverts active 0x0006 0x07 e 27 0x0022 1 amp 2 sounds OK r OK 0x0023 r error 0x0024 reason T s 0x0025 r r 29 OK 0x0026 r error 0x0027 reason T 0x08 Security codes 252 Chapter 13 Phone Protocols Gammu Manual Release GAMMU ERSION S Change code S Status request r pin recvd S entering code SIM login r login r logout Network status S Key duplication on
366. t Timestamp when message has been sent PDU Message type one of Deliver received message Submit message to send Status Report message to send with delivery report DateTime Timestamp of message sent or received RejectDuplicates Whether receiver should reject duplicates ReplaceMessage ID of message to replace MessageReference Message reference number as generated by network State State of the message Read UnRead Sent UnSent Number Recipient number 134 Chapter 7 File formats used by Gammu Gammu Manual Release GAMMU E RSION Q Name Name of the message Length Length of message text Coding Coding of the message 8bit binary message Default GSM encoding up to 160 chars in message Unicode Unicode encoding up to 70 chars in message Text00 TextNN Numbered parts of the message payload Folder ID of folder where the message was saved UDH User defined header of the message 7 2 2 Example The backup of message can look like following SMSBackup000 ZABCDEFGHIJKLMNOPQRSTUVWXYZ SMSC 4540590000 SMSCUnicode 002B0034003500340030003500390030003000300030 Sent 20021201T025023 State UnRead Number 4522706947 NumberUnicode 002B0034003500320032003700300036003900340037 Name NameUnicode Text00 004100420043004400450046004700480049004A004B004C004D004E004F0050005100520053004 Coding Default Folder 1 Length 27 Class 1 ReplySM
367. t you are acknowleging from the other part Frame format for Infrared FrameID DestDEV SrcDEV MsgType FrameLengthLo FrameLengthHi block where FrameID 0x14 DestDev SrcDev 0x00 mobile phone 0x0c TE eg PC MsgType see List FrameLength block Frame format for Bluetooth FrameID DestDEV SrcDEV MsgType FrameLengthLo FrameLengthHi block where FrameID 0x19 DestDev SrcDev 0x00 mobile phone 0x10 TE eg PC MsgType see List FrameLength block Frames list format hex Short description x msg desc METTE OxXX one byte OxXXYY gt two bytes OxXX OxYY where hex message type xX s send eg to mobile r receive data after 0x00 0x01 header raw data without header 13 2 5 Misc about MBUS version 2 0x4E commands sent from a 51601 TDMA 61601 TDMA 6185 CDMA or 7110 GSM phone to the uC in the DLR 3 cable DLR 3 req 1F 48 00 4E 00 02 01 XX SQ CS frame sent from the phone to the DLR 3 cable after 15kOhm resistor detected betw XMIC 3 and DGND 9 DSR DCD CTS flow control data is coded into the 2nd databyte XX bit 0 CTS bit 1 DCD bit 2 CMD DATA 13 2 Nokia protocols 243 Gammu Manual Release GAMMU ERSIONO bit 3 DSR bit 4 7 0 0x78 0x79 commands used by handsfree carkit Works also on GSM phones 5110 6110 etc These commands are used by the Nokia
368. ta gt 0x00 0x02 1F0004 79 0005 0201 0164 00 0504 Enable carkit mode from PC 1F0004 79 0005 0201 0164 00 0607 Enable carkit mode from PC 1F0400 7F 0662 Ack from phone 1F0004 78 0003 0201 0307 67 Status confirm from PC 1F0004 78 0003 0201 0308 68 Status confirm from PC 1F0400 7F 086C Ack from phone The phone enters the profile handsfree when the frame carkit enable is sent It sends out an unknown status frame 0x08 0x01 Incoming call 1F0400 78 0004 0102 0701 197B Status 0x07 0x01 from phone 1F0400 78 0004 0102 0E03 1A73 Status OxOE 0x03 from phone Status type 0x07 with status Ox01 means mute external audio equipment Status type OxOE with status 0x03 means audio amplifier on 286 Chapter 13 Phone Protocols Gammu Manual Release GAMMU ERSION Connected The phone doesn t send out anything when a call has been set up Initiation with connected phone 1F0004 DO 0001 04 00CE Power up from PC 1F0400 DO 0001 05 1BD4 Power up from phone 1F0004 79 0005 0201 0164 0001 00 Enable carkit mode from PC 1F0400 7F 0165 Ack from phone 1F0400 78 0004 0102 0E03 1C75 Status OxOE 0x03 from phone 1F0400 78 0004 0102 0701 1D7F Status 0x07 0x01 from phone 1F0004 79 0012 0201 0206 00 5620 3037 2E30 300A 4846 5532 00 0249 HFU 2 Version from PC 1F0400 7F 0266 Ack from phone 1F0400 78 0004 0102 0801 1E73 Status 0x08 0x01 from phone 1F0004 79 0005 0201 0164 0003 02 Enable carkit mode from PC 1F0400 7F 0367 Ack from phone 1F0400 7
369. tallation of applet only without possible support libraries this can be useful for updates 9 2 26 Gammu information commands checkversion STABLE Checks whether there is newer Gammu version available online if Gammu has been compiled with CURL If you pass additional parameter STABLE only stable versions will be checked La features Print information about compiled in features help topic Print help By default general help is printed but you can also specify a help category to get more detailed help on some topic 168 Chapter 9 Gammu Utility Gammu Manual Release OGAMMUyERSIONO version Print version information and license 9 3 Return values gammu returns 0 on success In case of failure non zero code is returned 1 Out of memory or other critical error 2 Invalid command line parameters 3 Failed to open file specified on command line 4 Program was interrupted 98 Gammu library version mismatch 99 Functionality has been moved For example to gammu smsd Errors codes greater than 100 map to the GSM Error values increased by 100 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
370. tatus 0x07 0x01 1F0004 78 0003 0201 03 0565 Status confirm from HFU 2 1F0400 7F 0561 Ack from phone 1F0400 78 0004 0102 0701 1E7C Status 0x07 0x01 1F0004 7F 1E7A Ack from HFU 2 1F0400 78 0004 0102 0701 1F7D Status 0x07 0x01 1F0004 7F 1F7B Ack from phone 1F0400 DA 0002 0002 20E1 Typ gt OxDA data gt 0x00 0x02 1F0004 7F 2044 Ack from HFU 2 Disconnected 1F0400 78 0004 0102 0700 1774 Status 0x07 0x00 1F0004 7F 1773 Ack from HFU 2 1F0400 78 0004 0102 0E00 1872 Status OxOE 0x00 1F0004 7F 187C Ack from HFU 2 1F0004 78 0003 0201 03 OB6B Status confirm from HFU 2 1F0400 7F OB6F Ack from phone Incoming SMS 1F0400 78 0004 0102 0E03 076E Status OxOE 0x03 1F0004 7F 0763 Ack from HFU 2 1F0004 78 0003 0201 03 0666 Status confirm from HFU 2 13 7 Nokia 6210 6310 CARC91 PC Experiment 289 Gammu Manual Release GAMMU ERSIONO 1F0400 7F 0662 Ack from phone 1F 0400 78 0004 0102 0E00 0862 Status OxOE 0x00 1F0004 7F 086C Ack from HFU 2 1F 0004 78 0003 0201 03 0767 Status confirm from HFU 2 1F0400 7F 0763 Ack from phone Button pushed 1F 0400 78 0004 0102 0E03 0960 Status OxOE 0x03 1F 0004 7F 096D Ack from HFU 2 1F0004 78 0003 0201 03 0868 Status confirm from HFU 2 1F0400 7F 086C Ack from phone 1F 0400 78 0004 0102 0E00 0A60 Status OxOE 0x00 1F 0004 7F 0A6E Ack from HFU 2 1F0004 78 0003 0201 03 0969 Status confirm from HFU 2 1F0400 7F 096D Ack from phone 13 7 4 Nokia 6310 Phone connected to PC Initiation
371. te similar for any storage service 2 5 1 Configuring the storage First we have to setup the actual storage With MySQL we need access to the MySQL server Now connect as administrative user to the server usually root grant privileges to the smsd user and create smsd database GRANT USAGE ON TO smsd localhost IDENTIFIED BY password GRANT SELECT INSERT UPDATE DELETE ON smsd TO smsd localhost CREATE DATABASE smsd 20 Chapter 2 Quick starter guide Gammu Manual Release OGAMMUyERSIONO Once this is ready you should import the tables structure It is shipped as docs sql mysql sql with Gammu so all you have to do is to import this file see Creating tables for more details mysql u root p password smsd lt docs sql mysql sql 2 5 2 Configuring SMSD Now we just have to tell SMSD what service it is supposed to use This is done in the SMSD configuration file You can place it anywhere and tell SMSD on startup where it can find it but on Linux the recommended location for system wide service is etc gammu smsdrc see SMSD Configuration File for more information You have to put both modem and storage service configuration into this file gammu device dev ttyUSBO connection at smsd service SOL driver native_mysql host localhost database smsd user smsd password password There are many ways to customize SMSD but th
372. th incoming and queue of outgoing ones 10 6 Backend services 195 smsd mms lox Gammu Manual Release GAMMU ERSIONAO 10 6 1 Files backend Description FILES backend stores all data on a filesystem in folders defined by configuration see MSD Configuration File for description of configuration options Receiving of messages Received messages are stored in a folder defined by configuration The filename will be IN date time serial sender sequence ext for example IN20021130 021531 00 45409000931640979 00 txt Explanation of fields date date in format YYYYMMDD time time in format HHMMSS sender sender number serial order of a message in case more messages were received at same time in format NN sequence part of the message for multipart messages in format NN ext txt for text message 8 bit messages are stored with bin extension smsbackup for SMS Backup Format The content of the file is content of the message and the format is defined by configuration directive InboxFormat see SMSD Configuration File Transmitting of messages Transmitted messages are read from a folder defined by configuration The filename should be one of the following formats OUT lt recipient gt lt ext gt OUT lt priority gt _ lt recipient gt _ lt serial gt lt ext gt e OUT lt priority gt lt date gt _ lt time gt _ lt serial gt _ lt recipient gt _ lt note gt lt ext gt
373. ther time based configurations because they will be effectively rounded to multiply of this value Setting this to O disables sleeping Please note this might cause Gammu to consume quite a lot of CPU power Default is 1 MultipartTimeout The number of seconds how long will SMSD wait for all parts of multipart message If all parts won t arrive in time parts will be processed as separate messages Default is 600 10 minutes CheckSecurity Whether to check if phone wants to enter PIN Default is 1 enabled HangupCalls New in version 1 34 0 Whether to automatically hangup any incoming calls Default is O disabled CheckBattery Whether to check phone battery state periodically Default is 1 enabled 10 4 SMSD Configuration File 185 Gammu Manual Release GAMMU ERSIONAO CheckSignal Whether to check signal level periodically Default is 1 enabled ResetFrequency The number of seconds between performing a preventive soft reset in order to minimize the cases of hanging phones e g Nokia 5110 will sometimes freeze to a state when only after unmounting the battery the phone will be functional again Default is 0 not used HardResetFrequency New in version 1 28 92 Warning For some phones hard reset means deleting all data in it Use Reset Frequency instead unless you know what you are doing The number of seconds between performing a preventive hard reset in order to minimize the cases of
374. to command enqueue task command commands Enqueues task Parameters command tuple of list of tuples Command s to execute Each command is tuple containing function name and it s parameters commands list of tuples or strings List of commands to execute initiate Connects to phone terminate timeout None Terminates phone connection exception gammu worker InvalidCommand value Exception indicating invalid command gammu worker check_worker_command command Checks whether command is valid Parameters command string Name of command 4 2 API documentation 55 Gammu Manual Release GAMMU ERS TON 0 4 2 5 gammu exception Gammu exception handling exception gammu GSMError Generic class as parent for all Gammu exceptions This is never raised directly but should be used to catch any Gammu related exception exception gammu ERR_ABORTED Exception corresponding to gammu error ERR_ABORTED Verbose error description Operation aborted exception gammu ERR_BADFEATURE Exception corresponding to gammu error ERR BADFEATURE Verbose error description Bad feature string in configuration exception gammu ERR BUG Exception corresponding to gammu error ERR BUG Verbose error description Nobody is perfect some bug appeared in protocol implementation Please contact authors exception gammu ERR BUSY Exception corresponding to gammu error ERR BUSY Verbose error description Command re
375. to using path based locations for messages phonebook calendar etc 1 11 2 Unicode strings The another major obstacle which is all around Gammu code is own implementation of unicode UCS 2 BE strings This code should be dropped and wchar_t used instead 1 11 Roadmap for Gammu 17 Gammu Manual Release GAMMU E HS TO N 0 1 11 3 Hardcoded length for strings Most of the strings have hardcoded length limits This limitation should be removed and strings allocated on the fly 1 11 4 Unsigned char mess In many cases unsigned char is used without any reason 1 11 5 Extendability of libGammu Current way of adding protocol specific functionality from applications using libGammu is broken Actually only application using this is Gammu utility This option should be either completely removed or rewritten from scratch not to be dependant on libGammu internals 1 11 6 Built time configuration Avoid heavy usage of gsmstate h header and move the ifdef define endif blocks to gammu config h Or rather cleanup them and have only single define for single compile time option 1 11 7 Config file handling Drop multiple configurations handling in libGammu it should provide just API to read some section from Gammurc and possible fall back logic should be in application 1 11 8 AT module There should be simpler way to generate AT command with proper escaping and charset conversion of fields Some thing like reverse ATGEN ParseR
376. ts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual 5 3 4 Callback Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stabl
377. ts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual 5 3 7 Date and time Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable
378. ts stable docs manual 5 3 21 Settings Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file nome docs checkouts readthedocs org user_builds gammu checkoutp stable docs man Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam 116 Chapter 5 libGammu Gammu Manual Release GAMMU ERSION Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs check
379. ty code if configured configured by CheckSecurit y c Check for received messages frequency configured by ReceiveFrequency d Check for reset of the phone if configured frequency configured by Reset Frequency e Check for messages to send frequency configured by CommTimeout f Check phone status frequency configured by StatusFrequency g Sleep for defined time LoopS1eep 176 Chapter 10 SMS Daemon Gammu Manual Release OGAMMUyERSIONO 4 Backend service is freed 10 2 Usage This chapter will describe basic ways of using SMSD It s use is not limited to these but they can give you overview of SMSD abilities 10 2 1 Storing Messages in Backend The standard mode of operating SMSD You simply configure backend service and all received messages will end up in it and any message you put into outbox storage will be sent 10 2 2 Creating Messages to Send Creating of messages to send heavily depends on service backend you use Most of them support gammu smsd inject which can be used to construct the message or you can just insert message manually to the backend storage Alternatively you can use SMSD_InjectSMS from C or using gammu smsd SMSD InjectSMS from Python 10 2 3 Notification about Received Messages Once SMSD receives message and stores it in backend service it can invoke your own program to do any message processing see RunOnReceive Directive 10 2 4 Monitoring SMSD Status You can
380. tyle 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 8 2 2 Connection options SynchronizeTime If you want to set time from computer to phone during starting connection 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 8 2 3 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 LogFormat Determines what all will be logged to LogF ile 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 140 Chapter 8 Gammu Configuration File Gammu Manual Release GAMMU E RSION Q binary transmission dump in binary format For debugging use either textalldate or textall it contains all needed information to diagnose prob lems Features Custom featu
381. u 3 1 2 How to set sender number in message You can quite often see messages sent from textual address or with some other nice looking sender number However this needs to be done in the GSM network and it is not possible to influence this from the terminal device phone Usually it is set by SMSC and some network providers allow you to set this based on some contract Alternatively you can use their SMS gateways which also allow this functionality See also SMS and EMS commands 3 1 3 Can use Gammu to send MMS MMS contains of two parts the actual MMS data in SMIL format and the SMS containing notification about the data Gammu can create the notification SMS where you just need to put URL of the data use gammu sendsms MMSINDICATOR for that However you need to encode MMS data yourself or use other program to do that 3 1 4 Device name always changes on Linux how to solve that You can use udev to assign persistent device name used as Device You can either use standard peristent names based on serial number located in dev serial by id or define own rules ACTION add SUBSYSTEMS usb ATTRS manufacturer Nokia KERNEL ttyUSBx SYMLINK phone Better is to use vendor and product IDs you can get them for example using lsusb 23 Gammu Manual Release GAMMU ERSIONO ACTION add SUBSYSTEMS usb ATTRS idVendor xxxx ATTRS idProduct yyyy SYNLINK phone
382. u gammu gt You can usually also find Gammu in your distribution so unless you need a newer version just install package from your distribution Debian Gammu packages are included in Debian testing versions go to experimental and stable to unsta ble If you want to build Debian package on your own you can find packaging in Git repos itory at git git debian org git collab maint gammu git you can browse it on lt http git debian org p collab maint gammu git gt RPM Gammu packages are included in openSUSE and Fedora Additionally source tarball contains gammu spec which you can use for building RPM package Slackware Gammu packages are included in Gentoo Additionally source tarball contains description pak which you can use for building Slackware package 2 Chapter 1 Gammu project Gammu Manual Release GAMMU ERSION 1 3 2 Prebuilt Binaries for Windows You can download Windows binaries from http wammu eu gammu For Windows 95 98 and NT 4 0 you will also need ShFolder DLL which can be downloaded from Microsoft http www microsoft com downloads details aspx displaylang en amp FamilyID 6AE02498 07E9 48F 1 A5D6 DBFA18D37E0F 1 3 3 Dependencies You need CMake from lt http www cmake org gt for compiling Gammu Additionally pkg config lt http pkg config freedesktop org gt is used for detecting available libraries 1 3 4 Optional Dependencies Gammu does not require any spe
383. u worker GammuWorker method 55 enqueue task gammu worker GammuWorker method 55 entersecuritycode PINIPUKIPIN2IPUK2IPHONEINETWORK codel newpinl gammu command line option 167 EnterSecurityCode gammu StateMachine method 36 Entries 64 68 70 71 environment variable DECODED 1 MMS ADDRESS 194 DECODED 1 MMS SENDER 194 DECODED 1 MMS SIZE 194 DECODED 1 MMS TITLE 194 DECODED 1 TEXT 194 DECODED PARTS 193 SMS 1 CLASS 194 SMS 1 NUMBER 194 SMS 1 TEXT 194 SMS MESSAGES 193 ErrorNumbers in module gammu data 54 Errors in module gammu data 54 ExcludeNumbersFile 190 ExcludeSMSCHile 190 Features 238 features gammu command line option 168 File 67 Finished 74 Folder 61 73 Format 63 G GALLERYIGALLERY2ICAMERAITONESITONES2IRECORDSIVIDEOII Index 325 Gammu Manual Release GAMMU E HS TO N 0 file name name protected readonly system hidden newtime gammu command line option 162 gammu module 32 gammu command line option 16bit 152 154 animation 152 autolen len 153 biglogo 153 c config filename 147 d debug level 147 defanimation 151 defsound 152 disableemail 154 disablefax 154 disablevoice 154 enableemail 154 enablefax 154 enablevoice 154 f debug file filename 147 fixedbitmap 152 flash 153 flat 157 flatall 157 folder number 150 format Icrasbiut 152 hidden 156 inputunicode 15
384. ue Adds calendar entry Parameters Value dict Calendar entry data see Calendar Object Returns Location of newly created entry Return type int AddCategory Type Name Adds category to phone Parameters Type string Type of category to read one of ToDo Phonebook e Name string Category name Returns Location of created category Return type int AddFilePart File Adds file part to filesystem Parameters File dict File data see File Object Returns File data for subsequent calls Finished indicates transfer has been completed Return type dict AddFolder ParentFolderID Name Adds folder to filesystem Parameters ParentFolderID string Folder where to create subfolder Name string New folder name Returns New folder ID Return type string AddMemory Value Adds memory phonebooks or calls entry Parameters Value dict Memory entry see Phonebook Object Returns Location of created entry Return type int AddSMS Value Adds SMS to specified folder Parameters Value dict SMS data see MS Object Returns Tuple for location and folder 4 2 API documentation 33 Gammu Manual Release GAMMU ERSIONO Return type tuple AddSMSFolder Name Creates SMS folder Parameters Name string Name of new folder Returns None Return type None AddToDo Value Adds ToDo in phone Parameters Value dict ToDo data see Todo Object Returns Location of creat
385. uilds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani 104 Chapter 5 libGammu Gammu Manual Release GAMMU ERSION Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs
386. uilds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual 5 3 libGammu C API mb Gammu Manual Release GAMMU ERSIONO Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org use
387. uilds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam 110 Chapter 5 libGammu Gammu Manual Release GAMMU ERSION Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_b
388. urrently 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 15 fu 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 170 Chapter 9 Gammu Utility Gammu Manual Release GAMMU E RSION Q 161 162 163 164 165 166 167 168 169 170 171 172 Bad feature string in configuration Desired functionality has been disabled on compile time Bluetooth configuration requires
389. user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual 5 3 12 INI files Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygentypedef Cannot find file home docs checkouts readthedocs org user builds gammu checkouts stable docs manu 106 Chapter 5 libGammu Gammu Manual Release GAMMU E RSION Q Warning doxygentypedef Cannot find file home docs ch
390. utp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam 5 3 libGammu C API 121 Gammu Manual Release GAMMU ERSIONO 5 3 26 WAP Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user builds gammu checkoutb stable docs mani Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds g
391. uts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam 96 Chapter 5 libGammu Gammu Manual Release GAMMU ERSION Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenfunction Cannot find file home docs che
392. vesms TYPE type parameters type options folder id unread read unsent s Saves SMS to phone see bellow 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 150 Chapter 9 Gammu Utility Gammu Manual Release GAMMU ERSION The most often folder 1 Inbox 2 Outbox etc Use gammu 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 smsname name set message name sender number set sender number default Gammu maxsms num Limit maximal number of messages which will be created If there are more messages Gammu will terminate with failure Types of messages ANIMATION frames filel 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
393. w h help Show summary of options f force Force rewriting of JAD file even if exists u url URL Define URL to be included in JAD file 11 2 gammu config 233 Gammu Manual Release GAMMU ERSIONO 234 Chapter 11 Miscellaneous utilities CHAPTER 12 Testing Gammu 12 1 Gammu Testsuite Gammu comes with quite big test suite It covers some basic low level functions handling replies from the phone and also does testing of command line utilities and SMSD 12 1 1 Running the tests You can run the test suite this using make test CMake build system uses for testing CTest which also includes option to connect to dashboard and submit test results there so that they can be reviewed and fixed by others To participate in this testing you need just to run make Experimental which also does submission to the dashboard There are some more options for testing make test Runs testsuite with no uploading of results make Experimenta Runs testsuite and uploads results to the dashboard make ExperimentalMemCheck This checks memory accesses using valgrind during tests and submits report You need to do this after bmit make Experimental and you can submit results using make ExperimentalSu Coverage reports To get test coverage reports you need to configure project using cmake DCOVI ERAGE Nightly testing Currently several machines
394. wnloads the MMS data using special APN which does not count to transmitted data however there might be limitations which URLs can be accessed MMSSETTINGS file location Saves a message with MMS configuration The configuration will be read from Gammu backup file from given location OPERATOR fil netcode netcode biglogo Save operator logo as sms in Nokia Smart Messaging format size 72x14 in two colors biglogo Use 78x21 formatted logo instead of standard 72x14 Note This isn t designed for colour logos available for example in newer phones you need to put bitmap file there inside phone using filesystem commands PICTURE fil text text unicode alcatelbmmi 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 PROFILE name name bitmap bitmap ringtone ringtone Read ringtone RTTL format bitmap Picture Image size and name format into Smart Mes saging profile and send save as SMS Warning Please note that this format is abandoned by Nokia and supported by some older devices only like Nokia 3310 RINGTONE file long scale Read RTTL ringtone from file and save as SMS into SIM phone memory Ringtone is saved in Nokia Smart Messaging format long ringtone is saved using Profile style It can be longer and saved in
395. x00 blocks type length blocknumber a 2 octets b 2 octets c 2 octets 0x00 0x55 type length blocknumber d 2 octets e 2 octets f 2 octets 0X01 0x55 where a max number of messages in phone memory b Number of used messages in phone memory These are messages manually moved from the other folders Picture messages are saved her c Number of unread messages in phone memory Probably only smart messages d max number of messages on SIM e Number of used messages in SIM memory These are ither received messages or saved into Outbox Inbox Note that you x can tx save message into this memory using Move option Picture messages are not her f Number of unread messages in SIM memory S Get SMS from folder 0x02 memory folderID location location 0x01 0x00 where memory 0x01 for SIM 0x02 for phone SIM only for IN OUTBOX folderID see 0x14 0x017B r Get SMS from folder 0x03 0x00 0x01 memory folderID locationH locationL 0x01 on big block type length of big block date timel date time2 blocks type length data T s Delete SMS 0x04 memory folderID location location OxOF 0x55 r Delete SMS 0x05 264 Chapter 13 Phone Protocols ytes with lo ytes with lo 0x55 0x55 Gammu Manual Release GAMMU ERSION S Get folder status 0x0c memory folderID 0x0F 0x55 0x55 0x55 0x55 wher folderID S 0x14 0x017B
396. x05 r Get HW Oxc8 0x05 0x00 HW version 4 bytes 0x00 T s Get Made Dat Oxc8 0x05 r Get Made Dat Oxc8 0x05 0x00 date 4 bytes 0x00 s Get DSP Internal SW 0xc8 0x09 r Get DSP Internal SW Oxc8 0x09 0x00 version 1 bytes 0x00 S Get PCI version 0xc8 Ox0b r Get PCI version Oxc8 Ox0b 0x00 version 0x00 s Get system ASIC L OxcS UxUc T r Get system ASIC Oxc8 0x0c 0x00 string 0x00 T S Get COBBA f Oxcs 0x d r Get COBBA 0xc8 0x0d 0x00 string 0x00 S Get PLUSSA 0xc8 0x0e selected lock is close 13 6 Nokia 7110 283 0x0a mode Gammu Manual Release GAMMU ERSIONO H 000R00R0000805080800505 0 HAH NK 0 Get PLUSSA Oxc8 0x0e available 0x00 where available 0x01 not available Get CCONT Oxc8 OxOf Get CCONT Oxc8 OxOf available 0x00 where available 0x01 not available Get PPM version Oxc8 0x10 Get PPM version Oxc8 0x10 0x00 V firmware 0x0a firmware date Get PPM info Oxc8 0x12 Get PPM info Oxc8 0x12 0x00 PPM version B C etc 0x00 Set HW version Oxc9 0x05 version 0x00 Get Product Code Oxca 0x01 Get Product Code Oxca 0x01 0x00 number 0x00 Get Order Number Oxca 0x02 Get Order Number Oxca 0x02 0x00 string 0x00 Get Prod Ser Number Oxca 0x03 Get Prod Ser Number Ox
397. xf4 Power on message seq 2 13 4 Nokia 6110 259 Gammu Manual Release GAMMU ERSIONAO 13 5 Nokia 6510 Assembled by Markus Plail lt plail web de gt Marcin Wiacek Marcin M Wiacek com gt lt tibor harsszegi essnet se gt and other members of gnokii mailing list and authors of some WWW pages Heavily based on nk7110 txt The data provided is for information purposes only Some of the frames might be hazardous to your phone Be careful We do not take any responsibility or liability for damages etc Note this information isn t and can t be complete If you know anything about features not listed here or you noticed a bug in this list please notify us via e mail Thank you Document describing frames used in GSM Nokia 6510 and derivatives Correct format is FBUS version 2 Infrared MBUS version 2 see nokia txt for protocol details 0x00 Connect to NBS port r Set ringtone ringtone packed according to SM2 0 0x01 COMMUNICATION switch message 3 case 0x02 dprintf Call established remote phone is ringing in dprintf Call ID i n message 4 break case 0x03 dprintf Call complete n dprintf Call ID i n message 4 dprintf Call Mode i n message 5 dummy malloc message 6 1 DecodeUnicode dummy message 7 message 6 dprintf Number s n dummy break case 0x04 dprintf Hangup Nn dprintf Call ID i n message 4
398. xt where nr see 0x05 0x0013 len text length flen len len nr len len 2 Note in Nokia 3310 name is in Unicode O0x00lc 0x001d 0x93 0x0030 location MCC1 MCC2 MNC lenhi 0x00 lenlo 0x82 OTABitmap 0x0031 0x0032 reason where reason Ox7d invalid location 0x0033 where location 1 doesn t seem to matter 0x0034 location location MCC1 MCC2 MNC lenhi 0x00 lenlo 0x82 OTABitmap T 13 4 Nokia 6110 251 Gammu Manual Release GAMMU ERSIONO r Get oplogo error 0x0035 reason where reason 0x7d invalid location S Set ringtone 0x0036 location 0x00 0x78 ringtone packed according to M2 0 r Set ringtone OK i 0x0037 L r Set ringtone error 0x0038 reason where reason 0x7d when not supported location S Get services settings 0x0080 setting 2 bytes where setting 0x02 0x00 Nokia access number 1 0x02 0x01 Operator access number 1 0x01 0x00 Personal bookmark 1 settings name only 0x01 0x01 0x02 0x02 r Get services sett OK 0x0081l r Get services sett err 0x0082 Ox7b 0x06 Calling line restriction Call forwarding etc r Get call divert 0x0001 0x02 x 0x00 divtype 0x02 calltype y z 0x0 number Ox s Set call divert 0x0001 0x03 0x00 divtype calltype 0x01 number packed like in SMS length of number byte 29 0x00 0x00 timeou byte 52 NOTE msglen 0x37 where timeout 0x00 not se
399. y out of three blocks First byte Header type second and third byte length of the header if the headers length is variable following bytes data The most used header types are Obex Byte following following bytes description two bytes Name 0x01 length of Used for filesystem operation to name a path or file header Type 0x42 length of Obex command for example m obex contacts list header Length 0xC3 Used in put operations and specifies the length of the transfered data without header bytes The length is represented in 4 bytes Body 0x48 length of Data in a multi package put operation header End of 0x49 length of Last data package in a put operation Bady header Session id OxCB Four bytes representing the session id Needed for multiplexing Application 0X4C length of In a request Parameters for example a contact s id lt p gt In an answer The Parameter header error return code If it is 0x00 0x00 than the operation was successful 13 13 5 Contacts Get contacts count Request 83 00 25 Obex Get CB 00 00 00 00 Session Id 42 00 19 6D 2D 6F 62 65 78 2F 63 6F 6E 74 61 63 74 73 2F 63 6F 75 6E 74 00 m obex command m obex contacts count 4C 00 04 01 Unknown Didn see PC Studio sending something other than 0x01 as parameter Answer A0 00 14 Obex ok C3 00 00 00 04 Maybe the number of requests you have to send to get all contacts See next chapter for more infor mation 4C 00 05 00
400. y work for various Windows versions even though Microsoft named them Windows Server 2003 Platform SDK For free Visual C Express 2005 you need to set compiler to work with Platform SDK see description MySQL include library files from MySQL install package for MySQL support in SMSD PostgreSQL include library files from PostgreSQL install package for PostgreSQL support in SMSD For gettext internationalization support you will need gettext packages from GnuWin32 project As build is now based on CMake you will need to get it from http cmake org After downloading and installing them into your system Now you should be able to execute cmake by clicking on CMakeLists txt file in Gammu sources this should pop up dialog with configuration options You can also start CMakeSetup from start menu and select source directory just point to it to Gammu sources Select directory where binaries will be stored I suggest this is different than source one eg append subdirectory build Select compiler you want to use in Build for select In list bellow you can tweak paths to some optional libraries and project configuration Then just press Configure button which will do the hard job After this just click OK button to generate Visual Studio project Project files for Visual Studio should be now generated in directory you selected just open it in Visual Studio and compile Project file should be
401. yCharge ATEOBOT tf s WARNING Unknown battery state d n bcs 0x00 0x00 ID GetBatteryCharge As you can see all reply function first need to handle which error code did they receive and return appropriate error if needed Functions ATG EN HandleCMSError and ATGEN HandleCME Error simplify this but you might need to customize it by handling some error codes manually eg when phone returns error on empty location The rest of the function is just call to ATGI EN ParseReply and processing parsed data 6 3 Adding support for new phone 131 Gammu Manual Release GAMMU ERSIONO 132 Chapter 6 Gammu internals CHAPTER 7 File formats used by Gammu Gammu understands wide range of standard formats as well as introduces own formats for storing some data 7 1 INI file format The INI file format is widely used in Gammu for both configuration see Gammu Configuration File and storing data see Backup Format and SMS Backup Format This file use ini file syntax with comment parts being marked with both and Sections of config file are identified in square brackets line this All key values are case insensitive 7 1 1 Examples You most likely know INI files from other programs however to illustrate here is some example comment section key value another section key longer value another comment 7 2 SMS Backup Form
402. ygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual 5 3 libGammu C API vak vk ol Gammu Manual Release GAMMU ERSIONO Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual 5 3 20 Security Warning doxygenfunction Cannot find file nome docs checkouts readthedocs org user_builds gammu checkoutp stable docs man Warning doxygenfunction Cannot find file home docs checkouts readthedocs org user_builds gammu checkoutp stable docs mam Warning doxygenenum Cannot find file home docs checkouts readthedocs org user_builds gammu checkouts stable docs manual Warning doxygenstruct Cannot find file home docs checkouts readthedocs org user_builds gammu checkou
403. you have to send this AT command first AT SYNCML MOBEXSTART Some phones seem to start with following command ATSTSSPCSW 1 13 13 4 Obex commands In the following chapters I will describe the obex packages to read and edit data on the mobile I think most of them are in standard obex format and are following this structure Package Header Session Id Obex Headers First byte Type of request e Second and third bytes length of package OxCB and four bytes of session id First byte Type of header Second and third bytes length of header Next bytes data Last byte 0x00 For detailed information about obex for example what types of packages and headers exists get the official Obex documentation from Inrared Data Association But I don t know if this is available for free 306 Chapter 13 Phone Protocols Gammu Manual Release GAMMU E RSION Q Here is a list of the most used types for the Samsung mobiles There exists mainly two types of operations Put package header 0x02 and 0x82 to write data to the mobile and Get package header 0x03 and 0x83 to retrieve data from the mobile A put or get operation can be divided into several packages The high bit indicates if this is the last package of an operation For example if you want to transfer a file to the mobile you send n time 0x02 packages and only the last one is 0x82 Headers consists normall
404. ystem CALLER file gammu command line option 151 CALLER location file gammu command line option 158 CallType 75 CancelAllDiverts gammu StateMachine method 34 cancelcall id gammu command line option 147 CancelCall gammu StateMachine method 34 canceldiverts gammu command line option 147 Center 66 check_worker_command in module gammu worker 55 CheckSecurity 176 checkversion STABLE gammu command line option 168 Class 61 64 Coding 61 COLOUROPERATOR fileID netcode gammu command line option 158 COLOURSTARTUP fileID gammu command line option 158 CommTimeout 176 185 conferencecall id gammu command line option 147 ConferenceCall gammu StateMachine method 34 configuration option Index 323 Gammu Manual Release GAMMU ERSIONO add_sent_info 201 BackendRetries 187 CheckBattery 185 CheckSecurity 176 185 CheckSignal 185 CommTimeout 176 185 Connection 24 25 138 315 create_outbox 201 create_outbox_multipart 201 Database 188 197 DataPath 141 168 314 DBDir 189 197 DebugLevel 184 delete_outbox 200 delete_outbox_multipart 201 delete_phone 198 DeliveryReport 186 DeliveryReportDelay 186 Device 23 25 138 140 237 Driver 183 184 188 197 DriversPath 189 197 ErrorSMSPath 189 ExcludeNumbersFile 187 190 ExcludeSMSCFile 187 190 Features 141 238 find_outbox_body 200 find_outbox_multipart 200 find_outbox_sms_id 200 GammuCoding
405. zation support you need gettext 0 14 4 bin zip gettext 0 14 4 dep zip gettext 0 14 4 lib zip from http gnuwin32 sourceforge net Unpack these to same directory CURL For CURL support you need curl 7 19 0 devel mingw32 zip from lt http curl haxx se gt 1 3 9 Crosscompiling to different platform To cross compile Gammu to different architecture or platform you need to provide CMake toolchain file for that and invoke CMake with it cmake DCMAKE TOOLCHAIN FILE Toolchain eldk ppc74xx cmake More information on creating that is described in CMake Cross Compiling wiki page Also distributions like Open Embedded usually already come with prepared recipes for CMake 1 3 10 Advanced Build Options The build system accepts wide range of options You can see them all by running GUI version of CMake or by inspecting CMakeCache txt in build directory 1 3 Installing Gammu 9 Gammu Manual Release GAMMU ERSIONAO Limiting set of installed data By setting following flags you can control which additional parts will be installed INSTALL_GNAPPLET Install Gnapplet binaries INSTALL MEDIA Install sample media files INSTALL PHP EXAMPLES Install PHP example scripts INSTALL BASH COMPLETION Install bash completion script for Gammu INSTALL LSB INIT Install LSB compatible init script for Gammu s INSTALL DOC Install documentation INSTALL LOC Install locales data For example

Download Pdf Manuals

image

Related Search

Related Contents

Document  SVFlux Tutorial Manual - SoilVision Systems, Ltd  EVGA e-GeForce 8800 GT NVIDIA GeForce 8800 GT 1GB  Siemens SN26N291EU  Polaroid 3 Piece Filter 49mm  manuel d`utilisation livret du chef d`etablissement et  et préface - Page d`accueil  

Copyright © All rights reserved.
Failed to retrieve file