summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMichal Čihař <michal@cihar.com>2010-09-16 13:53:12 +0200
committerMichal Čihař <michal@cihar.com>2010-09-16 13:53:12 +0200
commit468ee374ccf16a5e86fae6a911067112999b2a44 (patch)
tree3cccacc5788ca8f36ad59635f7eaa81de94bb0cf /docs
parent20eaa095b9422d0341b72ef382cd84f83d66136b (diff)
Imported Upstream version 1.28.91
Diffstat (limited to 'docs')
-rw-r--r--docs/develop/formats/smsbackup.rst10
-rw-r--r--docs/develop/python/exceptions.rst149
-rw-r--r--docs/develop/sms/charset.txtbin258 -> 0 bytes
-rw-r--r--docs/develop/sms/convert.txtbin1110 -> 0 bytes
-rw-r--r--docs/develop/sms/readme3
-rw-r--r--docs/develop/smsd/index.rst74
-rw-r--r--docs/develop/sounds/readme45
-rw-r--r--docs/develop/sounds/ring2.txt799
-rw-r--r--docs/examples/CMakeLists.txt21
-rw-r--r--docs/examples/Makefile (renamed from docs/develop/examples/Makefile)0
-rw-r--r--docs/examples/README (renamed from docs/develop/examples/README)0
-rw-r--r--docs/examples/custom-config.c (renamed from docs/develop/examples/custom-config.c)0
-rw-r--r--docs/examples/long-sms.c (renamed from docs/develop/examples/long-sms.c)0
-rw-r--r--docs/examples/phone-info.c (renamed from docs/develop/examples/phone-info.c)0
-rw-r--r--docs/examples/sms-read.c (renamed from docs/develop/examples/sms-read.c)0
-rw-r--r--docs/examples/sms-send.c (renamed from docs/develop/examples/sms-send.c)0
-rw-r--r--docs/examples/smsd.c (renamed from docs/develop/examples/smsd.c)0
-rw-r--r--docs/manual/CMakeLists.txt (renamed from docs/develop/CMakeLists.txt)20
-rw-r--r--docs/manual/Gammu.htm (renamed from docs/develop/Gammu.htm)0
-rw-r--r--docs/manual/c/api.rst (renamed from docs/develop/c/api.rst)0
-rw-r--r--docs/manual/c/backup.rst (renamed from docs/develop/c/backup.rst)0
-rw-r--r--docs/manual/c/bitmap.rst (renamed from docs/develop/c/bitmap.rst)0
-rw-r--r--docs/manual/c/calendar.rst (renamed from docs/develop/c/calendar.rst)0
-rw-r--r--docs/manual/c/call.rst (renamed from docs/develop/c/call.rst)0
-rw-r--r--docs/manual/c/callback.rst (renamed from docs/develop/c/callback.rst)0
-rw-r--r--docs/manual/c/category.rst (renamed from docs/develop/c/category.rst)0
-rw-r--r--docs/manual/c/datetime.rst (renamed from docs/develop/c/datetime.rst)0
-rw-r--r--docs/manual/c/debug.rst (renamed from docs/develop/c/debug.rst)0
-rw-r--r--docs/manual/c/error.rst (renamed from docs/develop/c/error.rst)0
-rw-r--r--docs/manual/c/examples.rst (renamed from docs/develop/c/examples.rst)14
-rw-r--r--docs/manual/c/file.rst (renamed from docs/develop/c/file.rst)0
-rw-r--r--docs/manual/c/hints.rst (renamed from docs/develop/c/hints.rst)0
-rw-r--r--docs/manual/c/index.rst (renamed from docs/develop/c/index.rst)0
-rw-r--r--docs/manual/c/info.rst (renamed from docs/develop/c/info.rst)0
-rw-r--r--docs/manual/c/inifile.rst (renamed from docs/develop/c/inifile.rst)0
-rw-r--r--docs/manual/c/keys.rst (renamed from docs/develop/c/keys.rst)0
-rw-r--r--docs/manual/c/limits.rst (renamed from docs/develop/c/limits.rst)0
-rw-r--r--docs/manual/c/memory.rst (renamed from docs/develop/c/memory.rst)0
-rw-r--r--docs/manual/c/message.rst (renamed from docs/develop/c/message.rst)0
-rw-r--r--docs/manual/c/misc.rst (renamed from docs/develop/c/misc.rst)0
-rw-r--r--docs/manual/c/nokia.rst (renamed from docs/develop/c/nokia.rst)0
-rw-r--r--docs/manual/c/porting.rst (renamed from docs/develop/c/porting.rst)0
-rw-r--r--docs/manual/c/ringtone.rst (renamed from docs/develop/c/ringtone.rst)0
-rw-r--r--docs/manual/c/security.rst (renamed from docs/develop/c/security.rst)0
-rw-r--r--docs/manual/c/settings.rst (renamed from docs/develop/c/settings.rst)0
-rw-r--r--docs/manual/c/smsd.rst (renamed from docs/develop/c/smsd.rst)0
-rw-r--r--docs/manual/c/statemachine.rst (renamed from docs/develop/c/statemachine.rst)0
-rw-r--r--docs/manual/c/types.rst (renamed from docs/develop/c/types.rst)0
-rw-r--r--docs/manual/c/unicode.rst (renamed from docs/develop/c/unicode.rst)0
-rw-r--r--docs/manual/c/wap.rst (renamed from docs/develop/c/wap.rst)0
-rw-r--r--docs/manual/conf.py (renamed from docs/develop/conf.py)32
-rw-r--r--docs/manual/configext.py156
-rw-r--r--docs/manual/contents.rst24
-rw-r--r--docs/manual/formats/backup.rst (renamed from docs/develop/formats/backup.rst)0
-rw-r--r--docs/manual/formats/index.rst (renamed from docs/develop/formats/index.rst)0
-rw-r--r--docs/manual/formats/smsbackup.rst40
-rw-r--r--docs/manual/glossary.rst8
-rw-r--r--docs/manual/index.rst (renamed from docs/develop/index.rst)16
-rw-r--r--docs/manual/internal/index.rst (renamed from docs/develop/internal/index.rst)1
-rw-r--r--docs/manual/internal/reply.rst (renamed from docs/develop/internal/reply.rst)0
-rw-r--r--docs/manual/internal/state-machine.rst29
-rw-r--r--docs/manual/project/about.rst (renamed from docs/develop/project/about.rst)0
-rw-r--r--docs/manual/project/coding-style.rst (renamed from docs/develop/project/coding-style.rst)0
-rw-r--r--docs/manual/project/contributing.rst (renamed from docs/develop/project/contributing.rst)0
-rw-r--r--docs/manual/project/directories.rst (renamed from docs/develop/project/directories.rst)0
-rw-r--r--docs/manual/project/index.rst (renamed from docs/develop/project/index.rst)0
-rw-r--r--docs/manual/project/install.rst (renamed from docs/develop/project/install.rst)0
-rw-r--r--docs/manual/project/localization.rst (renamed from docs/develop/project/localization.rst)0
-rw-r--r--docs/manual/project/motivation.rst (renamed from docs/develop/project/motivation.rst)0
-rw-r--r--docs/manual/project/testing.rst (renamed from docs/develop/project/testing.rst)0
-rw-r--r--docs/manual/protocol/carkit.rst (renamed from docs/develop/protocol/carkit.rst)65
-rw-r--r--docs/manual/protocol/discovering.rst (renamed from docs/develop/protocol/discovering.rst)0
-rw-r--r--docs/manual/protocol/index.rst (renamed from docs/develop/protocol/index.rst)0
-rw-r--r--docs/manual/protocol/n6110.rst (renamed from docs/develop/protocol/n6110.rst)0
-rw-r--r--docs/manual/protocol/n6510.rst (renamed from docs/develop/protocol/n6510.rst)0
-rw-r--r--docs/manual/protocol/n7110.rst (renamed from docs/develop/protocol/n7110.rst)0
-rw-r--r--docs/manual/protocol/nokia-s40-sms-scratch.txt (renamed from docs/develop/protocol/nokia-s40-sms-scratch.txt)0
-rw-r--r--docs/manual/protocol/nokia-s40-sms.rst (renamed from docs/develop/protocol/nokia-s40-sms.rst)0
-rw-r--r--docs/manual/protocol/nokia.rst (renamed from docs/develop/protocol/nokia.rst)0
-rw-r--r--docs/manual/protocol/readme (renamed from docs/develop/protocol/readme)0
-rw-r--r--docs/manual/protocol/samsung-gt.rst (renamed from docs/develop/protocol/samsung-gt.rst)0
-rw-r--r--docs/manual/protocol/samsung.rst (renamed from docs/develop/protocol/samsung.rst)0
-rw-r--r--docs/manual/protocol/sonim.rst (renamed from docs/develop/protocol/sonim.rst)0
-rw-r--r--docs/manual/protocol/tdma_5120.rst (renamed from docs/develop/protocol/tdma_5120.rst)0
-rw-r--r--docs/manual/python/data.rst (renamed from docs/develop/python/data.rst)0
-rw-r--r--docs/manual/python/examples.rst (renamed from docs/develop/python/examples.rst)0
-rw-r--r--docs/manual/python/exceptions.rst149
-rw-r--r--docs/manual/python/gammu.rst (renamed from docs/develop/python/gammu.rst)0
-rw-r--r--docs/manual/python/index.rst (renamed from docs/develop/python/index.rst)0
-rw-r--r--docs/manual/python/objects.rst (renamed from docs/develop/python/objects.rst)0
-rw-r--r--docs/manual/python/smsd.rst (renamed from docs/develop/python/smsd.rst)6
-rw-r--r--docs/manual/python/worker.rst (renamed from docs/develop/python/worker.rst)0
-rw-r--r--docs/manual/smsd/backends.rst18
-rw-r--r--docs/manual/smsd/code.rst193
-rw-r--r--docs/manual/smsd/config.rst482
-rw-r--r--docs/manual/smsd/dbi.rst10
-rw-r--r--docs/manual/smsd/files.rst72
-rw-r--r--docs/manual/smsd/index.rst13
-rw-r--r--docs/manual/smsd/inject.rst90
-rw-r--r--docs/manual/smsd/manual.rst9
-rw-r--r--docs/manual/smsd/monitor.rst52
-rw-r--r--docs/manual/smsd/mysql.rst10
-rw-r--r--docs/manual/smsd/null.rst8
-rw-r--r--docs/manual/smsd/overview.rst51
-rw-r--r--docs/manual/smsd/pgsql.rst10
-rw-r--r--docs/manual/smsd/run.rst107
-rw-r--r--docs/manual/smsd/smsd-interactions.dia (renamed from docs/develop/smsd/smsd-interactions.dia)0
-rw-r--r--docs/manual/smsd/smsd-interactions.png (renamed from docs/develop/smsd/smsd-interactions.png)bin29711 -> 29711 bytes
-rw-r--r--docs/manual/smsd/smsd.rst178
-rw-r--r--docs/manual/smsd/tables.rst417
-rw-r--r--docs/manual/smsd/usage.rst54
-rw-r--r--docs/manual/testing/dummy-driver.rst (renamed from docs/develop/testing/dummy-driver.rst)0
-rw-r--r--docs/manual/testing/index.rst (renamed from docs/develop/testing/index.rst)0
-rw-r--r--docs/manual/testing/testsuite.rst (renamed from docs/develop/testing/testsuite.rst)0
-rw-r--r--docs/user/cs/gammu.12
-rw-r--r--docs/user/gammurc.51
116 files changed, 2258 insertions, 1180 deletions
diff --git a/docs/develop/formats/smsbackup.rst b/docs/develop/formats/smsbackup.rst
deleted file mode 100644
index 4dd1a25..0000000
--- a/docs/develop/formats/smsbackup.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-SMS Backup Format
-=================
-
-The SMS backup format is text file encoded in current encoding of platform
-where Gammu is running. The syntax is standard INI file, with both ``;`` and
-``#`` used for comments.
-
-The file consists of unlimited number of sections, each is for one message and
-it's name is formatted like ``SMSBackup001``. The numbering of messages must
-be consistent - Gammu stops to read the file on first skipped number.
diff --git a/docs/develop/python/exceptions.rst b/docs/develop/python/exceptions.rst
deleted file mode 100644
index c3fdced..0000000
--- a/docs/develop/python/exceptions.rst
+++ /dev/null
@@ -1,149 +0,0 @@
-:mod:`gammu.exception` -- Gammu exception handling
-==================================================
-
-.. module:: gammu.exception
- :synopsis: Defines all exceptions used in Gammu.
-
-.. exception:: gammu.exception.GSMError
-
- Generic class as parent for all Gammu exceptions. This is never raised
- directly, but should be used to catch any Gammu related exception.
-
-.. autoexception:: gammu.exception.ERR_NONE
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_DEVICEOPENERROR
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_DEVICELOCKED
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_DEVICENOTEXIST
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_DEVICEBUSY
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_DEVICENOPERMISSION
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_DEVICENODRIVER
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_DEVICENOTWORK
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_DEVICEDTRRTSERROR
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_DEVICECHANGESPEEDERROR
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_DEVICEWRITEERROR
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_DEVICEREADERROR
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_DEVICEPARITYERROR
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_TIMEOUT
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_FRAMENOTREQUESTED
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_UNKNOWNRESPONSE
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_UNKNOWNFRAME
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_UNKNOWNCONNECTIONTYPESTRING
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_UNKNOWNMODELSTRING
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_SOURCENOTAVAILABLE
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_NOTSUPPORTED
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_EMPTY
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_SECURITYERROR
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_INVALIDLOCATION
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_NOTIMPLEMENTED
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_FULL
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_UNKNOWN
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_CANTOPENFILE
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_MOREMEMORY
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_PERMISSION
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_EMPTYSMSC
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_INSIDEPHONEMENU
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_NOTCONNECTED
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_WORKINPROGRESS
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_PHONEOFF
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_FILENOTSUPPORTED
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_BUG
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_CANCELED
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_NEEDANOTHERANSWER
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_OTHERCONNECTIONREQUIRED
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_WRONGCRC
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_INVALIDDATETIME
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_MEMORY
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_INVALIDDATA
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_FILEALREADYEXIST
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_FILENOTEXIST
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_SHOULDBEFOLDER
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_SHOULDBEFILE
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_NOSIM
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_GNAPPLETWRONG
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_FOLDERPART
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_FOLDERNOTEMPTY
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_DATACONVERTED
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_UNCONFIGURED
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_WRONGFOLDER
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_PHONE_INTERNAL
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_WRITING_FILE
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_NONE_SECTION
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_USING_DEFAULTS
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_CORRUPTED
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_BADFEATURE
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_DISABLED
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_SPECIFYCHANNEL
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_NOTRUNNING
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_NOSERVICE
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_BUSY
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_COULDNT_CONNECT
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_COULDNT_RESOLVE
- :show-inheritance:
-.. autoexception:: gammu.exception.ERR_GETTING_SMSC
- :show-inheritance:
diff --git a/docs/develop/sms/charset.txt b/docs/develop/sms/charset.txt
deleted file mode 100644
index cf6adc6..0000000
--- a/docs/develop/sms/charset.txt
+++ /dev/null
Binary files differ
diff --git a/docs/develop/sms/convert.txt b/docs/develop/sms/convert.txt
deleted file mode 100644
index 4060214..0000000
--- a/docs/develop/sms/convert.txt
+++ /dev/null
Binary files differ
diff --git a/docs/develop/sms/readme b/docs/develop/sms/readme
deleted file mode 100644
index d77c3c5..0000000
--- a/docs/develop/sms/readme
+++ /dev/null
@@ -1,3 +0,0 @@
-This directory contains SMS default alphabet saved in Unicode text file
-(charset.txt) and table used for converting chars during saving SMS
-with default alphabet (convert.txt)
diff --git a/docs/develop/smsd/index.rst b/docs/develop/smsd/index.rst
deleted file mode 100644
index 47c89ac..0000000
--- a/docs/develop/smsd/index.rst
+++ /dev/null
@@ -1,74 +0,0 @@
-SMS Daemon
-==========
-
-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.
-
-Overall schema
---------------
-
-
-.. figure:: smsd-interactions.png
- :alt: SMSD interactions
-
- Interaction of SMSD programs
-
-.. _smsd_services:
-
-Backend services
-----------------
-
-The backend service is used to store messages (both incoming and queue of
-outgoing ones).
-
-Each service needs to support few operations:
-
-* ``Init`` - Initializes internal state, connect to backend storage.
-* ``Free`` - Freeing internal data, disconnect from backend storage.
-* ``InitAfterConnect`` - Optional hook called after SMSD is connected to phone, can be used for storing infromation about phone in backend.
-* ``SaveInboxSMS`` - Saves message into inbox.
-* ``FindOutboxSMS`` - Finds message in outbox suitable for sending.
-* ``MoveSMS`` - Moves sent message from outbox.
-* ``CreateOutboxSMS`` - Saves message into outbox queue.
-* ``AddSentSMSInfo`` - Logs information about sent message (eg. delivery report).
-* ``RefreshSendStatus`` - Updates information about phone in database (network status, battery, etc.).
-
-Files service
-+++++++++++++
-
-Files service stores all messages as files in folders defined by configuration.
-
-
-Database based services
-+++++++++++++++++++++++
-
-All database based services share same (or similar) database schema. Currently
-following databases are supported:
-
-* MySQL
-* PostgreSQL
-* libDBI driver, which can connect to various other databases
-
-Null service
-++++++++++++
-
-This service is there primarily for testing purposes, as it does not store
-messages at all.
-
-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.
- 1. Try to connect to phone if not connected.
- 2. Check for security code if configured (configured by ``CheckSecurity``).
- 3. Check for received messages (frequency configured by ``ReceiveFrequency``).
- 4. Check for reset of the phone if configured (frequency configured by ``ResetFrequency``).
- 5. Check for messages to send (frequency configured by ``CommTimeout``).
- 6. Check phone status (frequency configured by ``StatusFrequency``).
- 7. Sleep for defined time (``LoopSleep``).
-4. Backend service is freed.
diff --git a/docs/develop/sounds/readme b/docs/develop/sounds/readme
deleted file mode 100644
index 2070c2d..0000000
--- a/docs/develop/sounds/readme
+++ /dev/null
@@ -1,45 +0,0 @@
-In subdirs there are original ringtones and SMS tones
-from various Nokia phones. They're saved in special
-binary format used in phone's firmware. You can download them to your phone,
-if it has downloadable ringtone(s) - use
-"gnokii --setbinringtone file [location]". I tested Nokia 6150 5.22 and it was
-OK. I hope, that Nokia will not change this format and you will be able to
-use it with new phones too (update: 3310 seems to have different format).
-
-I also noticed, that with Nokia 6150 some ringtones required small changes
-(inserting space (0x20 char) after name displayed in phone's menu).
-Maximal length of names for this phone is 12 chars (that's why "Moon & clouds"
-is only "Moon & cloud", "Mexican Hat Dance" -> "Mexican Dance",
-"Piano concerto" -> "Piano concer", "WalzeBrillant" -> "WalzeBrilla")
-
-I wasn't also to restore Badinerie, Tchaikovsky,
-Entertainer, Valkyrie, Four seasons, Auld lang syne, Bumblebee,
-Brave Scotland, Liszt, Hungarian, Left Hand
-(I had it in the file - it was no problem to save
-it), because it was too long (ringtones in phone's firmware in flash
-can be infinitely long, downloadable not - frame can be 317 chars long
-only)... I had to short name in "Swan Lake" to "Swan" because of it...
-
-In Get_Cool,Sunny_Walks,Tick tick ringtones there is and error - small
-"pyk" on the end. It's not my fault, it was made by Nokia...
-
-Similiary Hopping-down seems to cut (next Nokia fault ?)...
-
-PS. I didn't compared many of these ringtones with original phones.
-If there are differences, please let me know (my files could be broken too)
-
-PS2. I tried to understand this format, but I didn't make it at all (too small
-free time, etc.). Here are some observations:
-
-Format is used by 0x40/0x9e and 0x40/0xa0 frames. General format is:
-
-0x00,0x01,0xa0(0x9e),location,0x00,0xc1,0x01,?,name,0x00,0x00,0x02,
-commands and tones?each probably in two bytes?,0x0b
-
-where: location=0x00,0x01,etc.
- name=name in ASCII displayed in menu
-
-If phone doesn't find 0xc1,0x01,? bytes in 7,8,9 byte, don't display ringtone
-name and treat them (if there are next) as ringtone contenst
-
-Marcin@MWiacek.com
diff --git a/docs/develop/sounds/ring2.txt b/docs/develop/sounds/ring2.txt
deleted file mode 100644
index d9e8982..0000000
--- a/docs/develop/sounds/ring2.txt
+++ /dev/null
@@ -1,799 +0,0 @@
-http://www.gsmcity.de/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=1&t=001084&counterhit=yes
-03.09.2001 19:00
-
- can i change the original ringtones on 5110? i've heard that
- with datasuite u can change the ringtones. pls let me know
- regards
- --------------------
- ---I'M UNIQUE AND SO IS MY PHONE---
- -- sms,logos,soft,ringtones and many more free --
-
-
- Posts: 247 | From: Bucharest,Romania | Registered: May 2001 |
- IP:
-
- azywerks
- Newbie
-
- posted 09 June 2001 18:58
-
- No.
- You can add/change 1 ringtone (Received tone) for a 61XX phone
- using Datasuite though.
-
- aCe
-
-
- IP:
-
- mrENigma
- Moderator
-
- Member # 4409
- Member Rated:
- posted 09 June 2001 19:01
-
-
- TOO BAD!!!!
- IS ANY WAY TO DO THIS? ON ANY NOKIA HANDY???
- --------------------
- ---I'M UNIQUE AND SO IS MY PHONE---
- -- sms,logos,soft,ringtones and many more free --
-
-
- Posts: 247 | From: Bucharest,Romania | Registered: May 2001 |
- IP:
-
- azywerks
- Newbie
-
- posted 09 June 2001 19:48
-
- Except for the downloaded ringtones which is available to most
- nokia phones(GSM) except 5110, no.
- Maybe if you can understand the two byte(i guess, or was it
- four) sequence for the tones notation in the PPM section and
- have it manually changed to a tone of your desire then your
- probably half way there.
- The other half would then be spent on how to get your phone to
- accept the new PPM package you've just made without causing
- any problems like Contact Service, sim locks, and Network
- Access. Heck, I can't even change just the simple "Insert"
- from "Insert SIM Card" to tresnI without causing my phone to
- display Contact Service. Must have some security data
- elsewhere.
-
- Anyway, we'll keep on trying.
-
- aCe
-
-
- IP:
-
- zizo
- Freak Poster
-
- Member # 2631
- Member Rated:
- posted 10 June 2001 00:32
-
- Hi mrENigma!
- U can not change a ringtone on your phone, U have only I think
- 2 byte free memory there u can recive one ringtone on it.
- Good luck!
- --------------------
- /Z
-
-
- Posts: 102 | From: Sweden | Registered: Nov 2000 | IP:
-
- mrENigma
- Moderator
-
- Member # 4409
- Member Rated:
- posted 10 June 2001 20:44
-
- even if i erase some of them? 10 originals for one of mine
- it's kind a stupid can't do this....
- --------------------
- ---I'M UNIQUE AND SO IS MY PHONE---
- -- sms,logos,soft,ringtones and many more free --
-
-
- Posts: 247 | From: Bucharest,Romania | Registered: May 2001 |
- IP:
-
- Ice Dragon
- Freak Poster
-
- Member # 3365
- Member Rated:
- posted 14 June 2001 03:23
-
-
- quote:
-
- Originally posted by mrENigma:
- even if i erase some of them? 10 originals for one of mine
- it's kind a stupid can't do this....
-
-
- Well, I have a post of this a while (months) ago.
- It's not possible to ADD TONES to the Nokia 5110 but it is
- possible to CHANGE TONES on the Nokia 5110.
- Well, changing RING TONES is a bit hard but changing ALERT
- TONES is relatively easier to do.
- Of course us all Nokia users can add ring tones to phone like
- the 61xx, 6210, 3210, 33xx, etc. but I bet most of our alert
- tones are all the same.
- The beep, the standard (which is a dit-dit tone), the special
- (which is a dit-dit-dit-dat-dat-dit-dit-dit, which is actually
- a Morse code for "SMS"), and the ascending (which is actualy a
- Morse code for "connecting people") are the same to all Nokia
- phones unless there is one I don't know about.
- Anyway, have any of you once experienced when on a crowd when
- a SMS message came and most people around you have Nokia
- phones (riding a bus for example or on a bar).
- Some of us would check their phone if it was for them, like I
- did.
- So I changed my standard tone which is a dit-dit to dit-dat to
- sound differently. And my special tone from
- dit-dit-dit-dat-dat-dit-dit-dit to
- dat-dit-dit-dit-dat-dit-dit-dit (which sounds like "Who let
- the dogs out" with dit-dit-dit at the end). So when I myself
- received a message, I know that it's for me coz I only have to
- take note of the tone.
- Too bad, Viper stopped his research with the NFREE project. I
- have been inquiring about the checksums but he's no longer
- responding. So I guess I have to do this on my own.
- I'm coming up with a software to change the ringtone on the
- 5110, just like I came up with the soft for changing the alert
- tone on my 5110. Imagine, we have 30 changeable ringtones on
- our Nokia, not just the 5110 but also with the 3210, 33xx,
- 51xx, 61xx, 62xx, 7110, 82xx, 88xx, etc.
- The info about this is not for free of course. Anyone
- experimenting with his Nokia can come with a way to change the
- fixed ringtones and alert tones on his phone.
- BTW, the ringtones can be found on the PPM part of the phone.
- Regards...
- [ 15 June 2001 06:43: Message edited 1 time, lastly by Ice
- Dragon ]
- --------------------
- "Keyboard not found. Press F1 to continue."
- ICQ#:97427188
- -------------------
- Send me private messages if any, no kinky stuff though. :-)
-
-
- Posts: 171 | From: Bacolod, Philippines | Registered: Feb 2001
- | IP:
-
- azywerks
- Newbie
-
- posted 14 June 2001 18:05
-
- Yo Ice! Could you share with me the search values for the SMS
- tones. Pleazzee.
- BTW, have you tried changing the words in our PPM package (i.e
- "Insert" in Insert SIM card to something else). I've tried
- even simply reversing Insert to tresnI so as not to get any
- checksum problems but still I get the CS.
- Maybe their using a different method of calculation (CRC
- perhaps) or they have a compare module elsewhere?
- Just wondering,
- aCe
-
-
- IP:
-
- Leeloo
- Major Poster
-
- Member # 2809
- Rate Member posted 16 June 2001 13:31
-
- If the ringtones are saved in the ppm pack, and you get cs
- when trying to change places of some letters in ppm.....what
- happens in the phon when you download a new ringtone ?
- does it recalculate the cs for ppm itself ?
- I thought these ringtones where saved in a area without any cs
- check.
- /Leeloo
-
-
- Posts: 46 | From: Sweden | Registered: Dec 2000 | IP:
-
- azywerks
- Newbie
-
- posted 17 June 2001 20:27
-
- The downloaded tones aren't stored in your PPM, they are
- stored in your EEPROM. It is in the EEPROM where checksum
- recalculation takes place.
- The tones that are in the PPM are the static tones (i.e Ring
- Ring, Mosquito).
- The SMS alert tones on the other hand (according to ICE
- DRAGON) are located at the MCU portion of your flash.
- Hope this clears up the confusion.
- Regards,
- aCe
-
-
- IP:
-
- Ice Dragon
- Freak Poster
-
- Member # 3365
- Member Rated:
- posted 03 July 2001 04:11
-
-
- quote:
-
- Originally posted by aZyWeRks:
- Yo Ice! Could you share with me the search values for the
- SMS tones. Pleazzee.
- BTW, have you tried changing the words in our PPM package
- (i.e "Insert" in Insert SIM card to something else). I've
- tried even simply reversing Insert to tresnI so as not to
- get any checksum problems but still I get the CS.
- Maybe their using a different method of calculation (CRC
- perhaps) or they have a compare module elsewhere?
- Just wondering,
- aCe
-
-
-
- Yo aCe! Here's the hex values particularly for the Special and
- Ascending alerts tones.
- Using flash from a 5110v5.30C:
- For Special (morse code for "SMS"):
- 5A0C,400C,5A0C,400C,0AFE,5A0C,
- 4025,0A01,5A25,400C,5A25,4025,
- 0AFE,5A0C,400C,5A0C,400C,5A0C
- So it sounds like:
- dit-dit-dit dat-dat dit-dit-dit
- "5A0C" is a "dit" with a duration of 0C
- "5A25" is a "dat" with a duration of 25
- "400C" is a pause with a duration of 0C
- "4025" is a pause with a duration of 25
- "0AFE" is.... I don't know what this means, let me know
- For Ascending (morse code for "connecting people"):
- 5A25,400C,5A0C,0AFE,400C,5A25,400C,5A0C,4025,0A01,
- 5A25,400C,5A25,0AFE,400C,5A25,4025,
- 5A25,400C,5A0C,4025,
- 5A25,400C,5A0C,4025,
- 5A0C,4025,
- 5A25,400C,5A0C,400C,5A25,400C,5A0C,4025,
- 5A25,4025,
- 5A0C,400C,5A0C,4025,
- 5A25,400C,5A0C,4025,
- 5A25,400C,5A25,400C,5A0C,4064
- 5A0C,400C,5A25,400C,5A25,400C,5A0C,4025
- 5A0C,4025
- 5A25,400C,5A25,400C,5A25,4025
- 5A0C,400C,5A25,400C,5A25,400C,5A0C,4025
- 5A0C,400C,5A25,400C,5A0C,400C,5A0C,4025
- 5A0C,4025
- So it sounds like:
- dat-dit-dat-dit dat-dat-dat dat-dit dat-dit dit
- dat-dit-dat-dit dat dit-dit dat-dit dat-dat-dit
- dit-dat-dat-dit dit dat-dat-dat dit-dat-dat-dit
- dit-dat-dit-dit dit
- Again:
- "5A0C" is a "dit" with a duration of 0C
- "5A25" is a "dat" with a duration of 25
- "400C" is a pause with a duration of 0C
- "4025" is a pause with a duration of 25
- "4064" is a pause with a duration of 64 (long pause)
- "0A01" and "0AFE" are.... I don't know what these means, let
- me know
- Correct me if I'm wrong, I think "0A01" and "0AEF" is a system
- pause to let the user interrupt the beeping. for sure, it's
- not a checksum.
- On other phone models:
- Read a full flash from any model of Nokia phone (from 3210,
- 33xx, 51xx, 61xx, 62xx, 7110, 82xx, 88xx) and use these search
- strings on a hex editor (I use HexWorks):
- For alert tones: 8005020A01
- Following hex values after these hex are actual alert tones
- For ringtones: 0905020A01 or 0A05020A01
- Hex values following after these hex are not necessarily ring
- tones but you can see the names of the ring tones and
- following them are their ringtone values. Just see for
- yourself what I mean.
- Can I ask one-thing? If any of you find these info
- interesting, please rate me
- Thanks and best regards...
- P.S. Oh, about changing the "Insert" to "tresnI" in PPM won't
- work.
- You see, checksum calculation in PPM is not done by
- byte-addition (byte added to another byte) but by
- word-addition (two bytes added to the next two bytes).
- Let's take "Insert" as an example:
- Letter - Hex value - Decimal
- I 49 73
- n 6E 110
- s 73 115
- e 65 101
- r 72 114
- t 74 116
- In a byte-to-byte addition, the resulting checksum should be:
- hex 275, decimal 629
- And it would be equal to the checksum of "tresnI"
- But in a word-to-word addition, checksum is computed in
- byte-pairs, therefore taking "In" as one word or hex
- equivalent to 496E, decimal 18798
- So if we are to add them in words:
- Letters - Hex values - Decimal
- In 496E 18798
- se 7365 29541
- rt 7274 29300
- The checksum should be: hex 2F47 or decimal 12103.
- Now with "tresnI", the first two letter pair would be "tr"
- with a hex equivalent to 7472, decimal 29810.
- So if we are to add them in words:
- Letters - Hex values - Decimal
- tr 7472 29810
- es 6573 25971
- nI 6E49 28233
- The checksum should be: hex 482E or decimal 18478.
- Therefore, changing "Insert" to "tresnI" would yield a
- "Contact Service" error.
- Again, I only ask one favor. If any of you find these info
- interesting, please rate me
- Cheers...
- [ 03 July 2001 04:43: Message edited 1 time, lastly by Ice
- Dragon ]
- --------------------
- "Keyboard not found. Press F1 to continue."
- ICQ#:97427188
- -------------------
- Send me private messages if any, no kinky stuff though. :-)
-
-
- Posts: 171 | From: Bacolod, Philippines | Registered: Feb 2001
- | IP:
-
- mrENigma
- Moderator
-
- Member # 4409
- Member Rated:
- posted 03 July 2001 08:06
-
- i'm confuse a little bit, but i think that i learn something.
- and when release software to do this pls let me know 'cause i
- want to get ride off those stupid ringtones.
- thx again and keep in touch.
- --------------------
- ---I'M UNIQUE AND SO IS MY PHONE---
- -- sms,logos,soft,ringtones and many more free --
-
-
- Posts: 247 | From: Bucharest,Romania | Registered: May 2001 |
- IP:
-
- qtboy
- Major Poster
-
- Member # 3427
- Rate Member posted 03 July 2001 13:03
-
- yo ice!!!
- da bes ka gid migs bah!
- pakopyahon mo na lang ko kung matapos na imo
- program. hehehe
-
-
- Posts: 46 | From: davao city, philippines | Registered: Feb
- 2001 | IP:
-
- mrENigma
- Moderator
-
- Member # 4409
- Member Rated:
- posted 03 July 2001 13:53
-
- yo qtboy......... english pls
- --------------------
- ---I'M UNIQUE AND SO IS MY PHONE---
- -- sms,logos,soft,ringtones and many more free --
-
-
- Posts: 247 | From: Bucharest,Romania | Registered: May 2001 |
- IP:
-
- brittnee
- Insane Poster
-
- Member # 2085
- Rate Member posted 03 July 2001 16:06
-
- nice job, i would just like to ask if i should have the same
- number of dits and dats as to avoid contact service?
- salamat
-
- Posts: 94 | Registered: Sep 2000 | IP:
-
- Ice Dragon
- Freak Poster
-
- Member # 3365
- Member Rated:
- posted 04 July 2001 04:17
-
-
- quote:
-
- Originally posted by brittnee:
- nice job, i would just like to ask if i should have the same
- number of dits and dats as to avoid contact service?
- salamat
-
-
- Not necessarily.
- Let's take the Standard alert tone (Morse code for "M") as an
- example (using the 5110v5.30C flash):
- 5519, 400A, 5519, 400A
- So it sounds like "dat-dat"
- 5519 - is a "dat" with a duration of 19
- 400A - is a pause with a duration of 0C
- We could change it to:
- 550C, 400A, 5526, 400A
- So it sounds like "dit-dat"
- Take note that we subtracted hex 0D from the first 5519 and
- added it to the second 5519 to compensate the values so we
- wont have a contact service message.
- Here's a more interesting one. Change the Standard alert tone
- (5519,400A, 5519,400A) to something like this:
- 5B19, 4005, 4F19, 400F
- So it sounds like high-note-dat, low-note-dat
- Or to something like:
- 4C0C, 4005, 5E25, 400F
- So it sounds like low-note-dit, high-note-dat
- Notice that we subtracted duration values from the first pause
- and add it to the next pause, and so with the first tone to
- the second tone.
- Sometimes I get an error when I subtract values from the pause
- and add it to the tone. Or vice versa. It won't work.
- So the following won't work in changing Special alert (morse
- code for "SMS"):
- 5A0C,400C,5A0C,400C,0AFE,5A0C,4025,
- 0A01,5A25,400C,5A25,4025,0AFE,
- 5A0C,400C,5A0C,400C,5A0C
- That sounds like:
- dit-dit-dit dat-dat dit-dit-dit
- "5A0C" is a "dit" with a duration of 0C
- "5A25" is a "dat" with a duration of 25
- "400C" is a pause with a duration of 0C
- "4025" is a pause with a duration of 25
- "0AFE" is.... I don't know what this means, let me know
- Into a variation of "Let's go":
- 5A0C,4025,5A0C,4025,0AFE,
- 5A0C,400C,0A01,5A0C,400C,5A0C,400C,0AFE,5A0C,4025,
- 5A0C,4025,5A0C
- That sounds like:
- dit-dit dit-dit-dit-dit dit-dit
- "5A0C" is a "dit" with a duration of 0C
- "400C" is a pause with a duration of 0C
- "4025" is a pause with a duration of 25
- "0AFE" is.... I don't know what this means, let me know
- It wont work because we subtract values from pause and add it
- to the tone.
- So that's that. I'm still studying the behaviour for the
- default ringtones.
- Sure I can change some values without incurring a "Contact
- Service" but the tones won't make any sense.
- Anyway, I would know who reads this forum in my area when I
- start hearing a different alert tone around here.
- P.S. If you find some info here to be interesting, I only ask
- one thing: please rate me
- BR
- --------------------
- "Keyboard not found. Press F1 to continue."
- ICQ#:97427188
- -------------------
- Send me private messages if any, no kinky stuff though. :-)
-
-
- Posts: 171 | From: Bacolod, Philippines | Registered: Feb 2001
- | IP:
-
- brittnee
- Insane Poster
-
- Member # 2085
- Rate Member posted 04 July 2001 17:16
-
- very nice indeed, i've change the alert tone of my 6210, still
- looking for the standard tone, but i found the special tone
- which is the one i change, thanks a lot!!!!
-
- Posts: 94 | Registered: Sep 2000 | IP:
-
- Ice Dragon
- Freak Poster
-
- Member # 3365
- Member Rated:
- posted 05 July 2001 03:50
-
-
- quote:
-
- Originally posted by brittnee:
- very nice indeed, i've change the alert tone of my 6210,
- still looking for the standard tone, but i found the special
- tone which is the one i change, thanks a lot!!!!
-
-
-
- On a 6210:
- As always, before tinkering with your phone flash, make a full
- backup of your phone flash if you haven't yet.
- Let's assume you don't have a full backup of your phone flash.
- 1. Read the flash address 00200000 to 00600000.
- 2. Copy the \flasher\flash.out to \nk_files\6210full.fls
- 3. Use a hex editor (I suggest Hexworks), open the
- \nk_files\6210full.fls and do the following to obtain a full
- flash without the EEPROM:
- WARNING: If you notice the file contains FF00,FF00 from
- beginning to end, DO NOT PROCEED because this is a bad read
- flash.
- 3.1 Go to address 3FC000 (this is equivalent to flash address
- 005FC000)
- 3.2 Press Shift-Ctrl-Home. This will highlight the data from
- offset 00000000 to 003FC000. Release the keys.
- 3.3 Press Ctrl-C. This will copy the highlighted data to the
- clipboard or memory.
- 3.4 Press Ctrl-N. This will create an empty file.
- 3.5 Press Ctrl-V. you will be asked "Are you sure you want to
- insert?", select "Ok".
- This will copy the previously highlighted data to the new
- file.
- 3.6 Save the file as "my6210.fls"
- 4. Make a copy of the flash that contains the alert tones.
- 4.1 Still using the hex editor, open the file "my6210.fls"
- 4.2 Go to offset 350000. Press Shift-Ctrl-Home. This will
- highlight the data from offset 00000000 to 003FC000. Release
- the keys.
- 4.3 Press Del. You will be asked "Are you sure you want to
- delete?". Press "Ok". This will delete the data from 0 to
- 350000.
- 4.4 Go to offset 10000. Press Shift-Ctrl-End. This will
- highlight the data from offset 10000 to the end of file.
- 4.5 Press Del. You will be asked "Are you sure you want to
- delete?". Press "Ok". This will leave you a 64k data from 0 to
- 10000 (which is equivalent to flash address 00550000 to
- 00560000).
- 4.6 Save the file as \nk_files\6210al.fls
- 5. Copy \nk_files\6210al.fls to \nk_files\alert.fls
- 6. Open the \nk_files\alert.fls with a hex editor (I use
- Hexworks).
- 7. Use the search string "8005020A01".
- First stop should be the Special alert tone.
- You will notice that there's "SMSS.......S.p.e.c.i.a.l" before
- it.
- Pressing F3 will take you to the next found string. This is
- the Standard alert. You will notice that there's
- "SMS.......S.t.a.n.d.a.r.d" before it.
- Again pressing F3 will take you to the next found string. This
- is the Ascending alert. You will notice that there's
- "SMSL.......L.o.n.g. .l.o.u.d" before it.
- Don't forget when you flash it back, you should use alert.fls
- as source and the address should be 00550000.
- Assuming you have flashed it back to the correct address and
- it shows a "Contact Service", you may have incorrectly
- modified your alert tone. If this happens, proceed to number 5.
- If you want to flash it back to its original alert tones,
- flash it back with 6210al.fls at address 00550000.
- But if it still has a Contact Service, flash it back with a
- my6210.fls starting from address 00200000. This should restore
- your original flash without the EEPROM part.
- This procedure is a little bit for advanced flasher users. If
- you don't know what you're doing, don't try it out. You have
- yourself to blame if something pukes up.
- Hmmm... I guess few people are interested in what I'm posting
- here. Out of more than 100 readers since my first posting in
- this thread, only 2 person rated me.
- Oh well, all I'm asking is: rate me please
- -----------------
- Misqouted qoutes:
- "Don't judge the book without its cover"
- "Birds flock together on the same feather"
- "Don't cross the bridge when you get there"
- "There's no water under the bridge"
- --------------------
- "Keyboard not found. Press F1 to continue."
- ICQ#:97427188
- -------------------
- Send me private messages if any, no kinky stuff though. :-)
-
-
- Posts: 171 | From: Bacolod, Philippines | Registered: Feb 2001
- | IP:
-
- nuggie
- Junior Member
-
- Member # 3304
- Member Rated:
- posted 05 July 2001 13:34
-
- I've tryed to do this like that :
- 1.make a full backup 002 to 006 (6210)
- 2.edit with hexworkshop and change the SMS alert
- 3.try to correct checksums with NK1.2 to avoid Contact Service
- 4.put flash back to phone
- 5.works fine
- Ice Dragon: does point 3 make any sense?
- [ 05 July 2001 13:38: Message edited 3 times, lastly by nuggie ]
-
-
- Posts: 27 | From: Westcoast, Poland | Registered: Feb 2001 |
- IP:
-
- Ice Dragon
- Freak Poster
-
- Member # 3365
- Member Rated:
- posted 06 July 2001 03:07
-
-
- quote:
-
- Originally posted by nuggie:
- I've tryed to do this like that :
- 1.make a full backup 002 to 006 (6210)
- 2.edit with hexworkshop and change the SMS alert
- 3.try to correct checksums with NK1.2 to avoid Contact
- Service
- 4.put flash back to phone
- 5.works fine
- Ice Dragon: does point 3 make any sense?
-
-
-
- Not only "sense" (cents), but also dollars... heh..heh...heh...
- I did that already but it always take a long wait to write the
- whole modified flash back to the phone.
- With a 5110v530C flash, I also tried cutting the first part of
- the modified flash (flash address 00200000-00210000), write it
- back to the phone, then cut the last part of the modified
- flash (002F0000-00300000) back to the phone so it would take a
- much lesser time.
- The one I posted earlier is also to let our members reader
- learn a little bit about the alert and ring tones in the
- flash, and the possibility of changing them. Although I
- believe that our members here know more than I do.
- Cheers to you... and best regards to all
- [ 06 July 2001 03:10: Message edited 1 time, lastly by Ice
- Dragon ]
- --------------------
- "Keyboard not found. Press F1 to continue."
- ICQ#:97427188
- -------------------
- Send me private messages if any, no kinky stuff though. :-)
-
-
- Posts: 171 | From: Bacolod, Philippines | Registered: Feb 2001
- | IP:
-
- aZyWeRks
- Freak Poster
-
- Member # 3170
- Member Rated:
- posted 06 July 2001 15:56
-
- Man, thanks a lot for the values. I'll try it.
- And about the word addition information. I'll try to make a
- workaround on this if I have enough time. I've been off the
- internet for a time.
- Thanks a lot man. You're great.
-
- Regards,
- aCe
- --------------------
- http://getit.at/azywerks
-
-
- Posts: 131 | From: I.C., R.P. | Registered: Jan 2001 | IP:
-
- koloksky
- Freak Poster
-
- Member # 718 posted 07 July 2001 00:26
-
- hi,
- That is really cool!! thanks IceDragon!
- u deserve a
- regards
-
-
- Posts: 156 | Registered: Nov 1999 | IP:
-
- nuggie
- Junior Member
-
- Member # 3304
- Member Rated:
- posted 14 July 2001 20:23
-
- Ice Dragon:
- Look here at the ringtone info.
- web page
- [ 14 July 2001 20:26: Message edited 2 times, lastly by nuggie
- ]
-
-
- Posts: 27 | From: Westcoast, Poland | Registered: Feb 2001 |
- IP:
-
- Rayborg
- Newbie
-
- Member # 5357
- Rate Member posted 19 July 2001 14:37
-
- How does it works with a Nokia 3310?
- I think there are other HexValues, but I´m not able to find
- them! Please help me!
-
- Posts: 8 | From: Germany | Registered: Jul 2001 | IP:
-
- Ice Dragon
- Freak Poster
-
- Member # 3365
- Member Rated:
- posted 23 July 2001 03:32
-
-
- quote:
-
- Originally posted by Rayborg:
- How does it works with a Nokia 3310?
- I think there are other HexValues, but I´m not able to find
- them! Please help me!
-
-
- Still use the search string: "8005020A01".
- First stop should be the Special alert tone.
- You will notice that previously the tones have 5A0C, 400C,
- 5A25, 400C values. With the 3310, it uses the 5B0C, 400C,
- 5A25, 400c values.
- "5B0C" is a "dit" with a duration of 0C
- "5B25" is a "dat" with a duration of 25
- "400C" is a pause with a duration of 0C
- "4025" is a pause with a duration of 25
- Pressing F3 will take you to the next found string. This is
- the Standard alert. It uses the 5619, 400A, 5618, 400A values.
- "5619" is a "dit" with a duration of 19
- "400A" is a pause with a duration of 0A
- Again pressing F3 will take you to the next found string. This
- is the Ascending alert. It uses the 5B0C, 400C, 5B25, 400C
- values.
- "5B0C" is a "dit" with a duration of 0C
- "5B25" is a "dat" with a duration of 25
- "400C" is a pause with a duration of 0C
- "4025" is a pause with a duration of 25
- The alert tones on the 3310 reside in the MCU part of the full
- flash.
- Best regards and cheers...
- [ 23 July 2001 03:45: Message edited 1 time, lastly by Ice
- Dragon ]
- --------------------
- "Keyboard not found. Press F1 to continue."
- ICQ#:97427188
- -------------------
- Send me private messages if any, no kinky stuff though. :-)
-
-
diff --git a/docs/examples/CMakeLists.txt b/docs/examples/CMakeLists.txt
new file mode 100644
index 0000000..fe4e287
--- /dev/null
+++ b/docs/examples/CMakeLists.txt
@@ -0,0 +1,21 @@
+project (Gammu-doc-examples C)
+
+set (EXAMPLES
+ Makefile
+ phone-info.c
+ sms-send.c
+ smsd.c
+ sms-read.c
+ long-sms.c
+ custom-config.c
+ )
+
+foreach (DOC ${EXAMPLES})
+ get_filename_component(DIRNAME ${DOC} PATH)
+ install (
+ FILES ${DOC}
+ DESTINATION "${INSTALL_DOC_DIR}/examples/${DIRNAME}"
+ COMPONENT "manual"
+ )
+endforeach (DOC)
+
diff --git a/docs/develop/examples/Makefile b/docs/examples/Makefile
index 9150989..9150989 100644
--- a/docs/develop/examples/Makefile
+++ b/docs/examples/Makefile
diff --git a/docs/develop/examples/README b/docs/examples/README
index b137d8f..b137d8f 100644
--- a/docs/develop/examples/README
+++ b/docs/examples/README
diff --git a/docs/develop/examples/custom-config.c b/docs/examples/custom-config.c
index 63f84bc..63f84bc 100644
--- a/docs/develop/examples/custom-config.c
+++ b/docs/examples/custom-config.c
diff --git a/docs/develop/examples/long-sms.c b/docs/examples/long-sms.c
index 19e388c..19e388c 100644
--- a/docs/develop/examples/long-sms.c
+++ b/docs/examples/long-sms.c
diff --git a/docs/develop/examples/phone-info.c b/docs/examples/phone-info.c
index 72ad634..72ad634 100644
--- a/docs/develop/examples/phone-info.c
+++ b/docs/examples/phone-info.c
diff --git a/docs/develop/examples/sms-read.c b/docs/examples/sms-read.c
index e835403..e835403 100644
--- a/docs/develop/examples/sms-read.c
+++ b/docs/examples/sms-read.c
diff --git a/docs/develop/examples/sms-send.c b/docs/examples/sms-send.c
index cea36fa..cea36fa 100644
--- a/docs/develop/examples/sms-send.c
+++ b/docs/examples/sms-send.c
diff --git a/docs/develop/examples/smsd.c b/docs/examples/smsd.c
index 619f778..619f778 100644
--- a/docs/develop/examples/smsd.c
+++ b/docs/examples/smsd.c
diff --git a/docs/develop/CMakeLists.txt b/docs/manual/CMakeLists.txt
index 9486b7e..c6d6699 100644
--- a/docs/develop/CMakeLists.txt
+++ b/docs/manual/CMakeLists.txt
@@ -8,36 +8,27 @@ file(GLOB_RECURSE DOCSRC RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.rst")
set (DEVELDOCS
${DOCSRC}
- sms/charset.txt
- sms/convert.txt
- sms/readme
- sounds/readme
- sounds/ring2.txt
- examples/Makefile
- examples/phone-info.c
- examples/sms-send.c
- examples/smsd.c
- examples/sms-read.c
)
foreach (DOC ${DEVELDOCS})
get_filename_component(DIRNAME ${DOC} PATH)
install (
FILES ${DOC}
- DESTINATION "${INSTALL_DOC_DIR}/devel/${DIRNAME}"
- COMPONENT "develdocs"
+ DESTINATION "${INSTALL_DOC_DIR}/manual/${DIRNAME}"
+ COMPONENT "manual"
)
endforeach (DOC)
find_program(SPHINX_BUILD_EXECUTABLE NAMES sphinx-build
- DOC "Sphinx tool for generating Gammu developer documentation <http://sphinx.pocoo.org/>")
+ DOC "Sphinx tool for generating Gammu documentation <http://sphinx.pocoo.org/>")
if (SPHINX_BUILD_EXECUTABLE)
set (SPHINX_PAPER_SIZE "a4" CACHE STRING "Paper size for Sphinx LaTeX output")
configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/conf.py" "${CMAKE_CURRENT_BINARY_DIR}/conf.py" @ONLY)
macro(sphinxdoc _format)
- add_custom_target (devdoc-${_format} ${PYTHON_EXECUTABLE} ${SPHINX_BUILD_EXECUTABLE}
+ add_custom_target (manual-${_format} ${PYTHON_EXECUTABLE} ${SPHINX_BUILD_EXECUTABLE}
-c ${CMAKE_CURRENT_BINARY_DIR}/
+ -n
-b ${_format}
-D latex_paper_size=${SPHINX_PAPER_SIZE}
${CMAKE_CURRENT_SOURCE_DIR}/
@@ -48,4 +39,5 @@ if (SPHINX_BUILD_EXECUTABLE)
sphinxdoc(html)
sphinxdoc(htmlhelp)
sphinxdoc(latex)
+ sphinxdoc(man)
endif (SPHINX_BUILD_EXECUTABLE)
diff --git a/docs/develop/Gammu.htm b/docs/manual/Gammu.htm
index 768830a..768830a 100644
--- a/docs/develop/Gammu.htm
+++ b/docs/manual/Gammu.htm
diff --git a/docs/develop/c/api.rst b/docs/manual/c/api.rst
index ab9aed7..ab9aed7 100644
--- a/docs/develop/c/api.rst
+++ b/docs/manual/c/api.rst
diff --git a/docs/develop/c/backup.rst b/docs/manual/c/backup.rst
index 894f62d..894f62d 100644
--- a/docs/develop/c/backup.rst
+++ b/docs/manual/c/backup.rst
diff --git a/docs/develop/c/bitmap.rst b/docs/manual/c/bitmap.rst
index 41d0570..41d0570 100644
--- a/docs/develop/c/bitmap.rst
+++ b/docs/manual/c/bitmap.rst
diff --git a/docs/develop/c/calendar.rst b/docs/manual/c/calendar.rst
index 0fd65a7..0fd65a7 100644
--- a/docs/develop/c/calendar.rst
+++ b/docs/manual/c/calendar.rst
diff --git a/docs/develop/c/call.rst b/docs/manual/c/call.rst
index 28dfd8e..28dfd8e 100644
--- a/docs/develop/c/call.rst
+++ b/docs/manual/c/call.rst
diff --git a/docs/develop/c/callback.rst b/docs/manual/c/callback.rst
index 81b2ad3..81b2ad3 100644
--- a/docs/develop/c/callback.rst
+++ b/docs/manual/c/callback.rst
diff --git a/docs/develop/c/category.rst b/docs/manual/c/category.rst
index 6e07f90..6e07f90 100644
--- a/docs/develop/c/category.rst
+++ b/docs/manual/c/category.rst
diff --git a/docs/develop/c/datetime.rst b/docs/manual/c/datetime.rst
index 5d031cf..5d031cf 100644
--- a/docs/develop/c/datetime.rst
+++ b/docs/manual/c/datetime.rst
diff --git a/docs/develop/c/debug.rst b/docs/manual/c/debug.rst
index f60a06c..f60a06c 100644
--- a/docs/develop/c/debug.rst
+++ b/docs/manual/c/debug.rst
diff --git a/docs/develop/c/error.rst b/docs/manual/c/error.rst
index 7e238ae..7e238ae 100644
--- a/docs/develop/c/error.rst
+++ b/docs/manual/c/error.rst
diff --git a/docs/develop/c/examples.rst b/docs/manual/c/examples.rst
index 386d6e8..789c18c 100644
--- a/docs/develop/c/examples.rst
+++ b/docs/manual/c/examples.rst
@@ -1,42 +1,42 @@
Examples
========
-All these examples are also available in docs/develop/examples/
+All these examples are also available in docs/examples/
directory in Gammu sources.
Getting phone information
-------------------------
-.. literalinclude:: ../examples/phone-info.c
+.. literalinclude:: ../../examples/phone-info.c
:language: c
Reading SMS message
-------------------
-.. literalinclude:: ../examples/sms-read.c
+.. literalinclude:: ../../examples/sms-read.c
:language: c
Sending SMS message
-------------------
-.. literalinclude:: ../examples/sms-send.c
+.. literalinclude:: ../../examples/sms-send.c
:language: c
Sending Long SMS message
------------------------
-.. literalinclude:: ../examples/long-sms.c
+.. literalinclude:: ../../examples/long-sms.c
:language: c
SMSD example
------------
-.. literalinclude:: ../examples/smsd.c
+.. literalinclude:: ../../examples/smsd.c
:language: c
Custom configuration
--------------------
-.. literalinclude:: ../examples/custom-config.c
+.. literalinclude:: ../../examples/custom-config.c
:language: c
diff --git a/docs/develop/c/file.rst b/docs/manual/c/file.rst
index 4ad6e07..4ad6e07 100644
--- a/docs/develop/c/file.rst
+++ b/docs/manual/c/file.rst
diff --git a/docs/develop/c/hints.rst b/docs/manual/c/hints.rst
index d4df8eb..d4df8eb 100644
--- a/docs/develop/c/hints.rst
+++ b/docs/manual/c/hints.rst
diff --git a/docs/develop/c/index.rst b/docs/manual/c/index.rst
index 45e7208..45e7208 100644
--- a/docs/develop/c/index.rst
+++ b/docs/manual/c/index.rst
diff --git a/docs/develop/c/info.rst b/docs/manual/c/info.rst
index dacd616..dacd616 100644
--- a/docs/develop/c/info.rst
+++ b/docs/manual/c/info.rst
diff --git a/docs/develop/c/inifile.rst b/docs/manual/c/inifile.rst
index 65cd620..65cd620 100644
--- a/docs/develop/c/inifile.rst
+++ b/docs/manual/c/inifile.rst
diff --git a/docs/develop/c/keys.rst b/docs/manual/c/keys.rst
index 97ed9a6..97ed9a6 100644
--- a/docs/develop/c/keys.rst
+++ b/docs/manual/c/keys.rst
diff --git a/docs/develop/c/limits.rst b/docs/manual/c/limits.rst
index a120917..a120917 100644
--- a/docs/develop/c/limits.rst
+++ b/docs/manual/c/limits.rst
diff --git a/docs/develop/c/memory.rst b/docs/manual/c/memory.rst
index 335787f..335787f 100644
--- a/docs/develop/c/memory.rst
+++ b/docs/manual/c/memory.rst
diff --git a/docs/develop/c/message.rst b/docs/manual/c/message.rst
index 7b10454..7b10454 100644
--- a/docs/develop/c/message.rst
+++ b/docs/manual/c/message.rst
diff --git a/docs/develop/c/misc.rst b/docs/manual/c/misc.rst
index ff9e343..ff9e343 100644
--- a/docs/develop/c/misc.rst
+++ b/docs/manual/c/misc.rst
diff --git a/docs/develop/c/nokia.rst b/docs/manual/c/nokia.rst
index 055792f..055792f 100644
--- a/docs/develop/c/nokia.rst
+++ b/docs/manual/c/nokia.rst
diff --git a/docs/develop/c/porting.rst b/docs/manual/c/porting.rst
index 789d5e9..789d5e9 100644
--- a/docs/develop/c/porting.rst
+++ b/docs/manual/c/porting.rst
diff --git a/docs/develop/c/ringtone.rst b/docs/manual/c/ringtone.rst
index 21c8d45..21c8d45 100644
--- a/docs/develop/c/ringtone.rst
+++ b/docs/manual/c/ringtone.rst
diff --git a/docs/develop/c/security.rst b/docs/manual/c/security.rst
index 12e8052..12e8052 100644
--- a/docs/develop/c/security.rst
+++ b/docs/manual/c/security.rst
diff --git a/docs/develop/c/settings.rst b/docs/manual/c/settings.rst
index bcfe4d5..bcfe4d5 100644
--- a/docs/develop/c/settings.rst
+++ b/docs/manual/c/settings.rst
diff --git a/docs/develop/c/smsd.rst b/docs/manual/c/smsd.rst
index 1980224..1980224 100644
--- a/docs/develop/c/smsd.rst
+++ b/docs/manual/c/smsd.rst
diff --git a/docs/develop/c/statemachine.rst b/docs/manual/c/statemachine.rst
index cc23d28..cc23d28 100644
--- a/docs/develop/c/statemachine.rst
+++ b/docs/manual/c/statemachine.rst
diff --git a/docs/develop/c/types.rst b/docs/manual/c/types.rst
index 8cc6996..8cc6996 100644
--- a/docs/develop/c/types.rst
+++ b/docs/manual/c/types.rst
diff --git a/docs/develop/c/unicode.rst b/docs/manual/c/unicode.rst
index feee6a3..feee6a3 100644
--- a/docs/develop/c/unicode.rst
+++ b/docs/manual/c/unicode.rst
diff --git a/docs/develop/c/wap.rst b/docs/manual/c/wap.rst
index 44f9008..44f9008 100644
--- a/docs/develop/c/wap.rst
+++ b/docs/manual/c/wap.rst
diff --git a/docs/develop/conf.py b/docs/manual/conf.py
index c16d73b..0436a07 100644
--- a/docs/develop/conf.py
+++ b/docs/manual/conf.py
@@ -21,16 +21,17 @@ import sys, os
# absolute, like shown here.
sys.path.insert(0, '@CMAKE_CURRENT_BINARY_DIR@/../../python')
sys.path.append('@Gammu_SOURCE_DIR@/external/breathe')
+sys.path.append('@CMAKE_CURRENT_SOURCE_DIR@')
# General configuration
# ---------------------
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc', 'breathe']
+extensions = ['sphinx.ext.autodoc', 'breathe', 'configext', 'sphinx.ext.graphviz']
# Add any paths that contain templates here, relative to this directory.
-templates_path = ['@CMAKE_CURRENT_SOURCE_DIR@/doc/.templates']
+templates_path = ['@CMAKE_CURRENT_SOURCE_DIR@/.templates']
# The suffix of source filenames.
source_suffix = '.rst'
@@ -161,7 +162,9 @@ htmlhelp_basename = 'gammudoc'
# ------------------------
# The paper size ('letter' or 'a4').
-#latex_paper_size = 'letter'
+latex_elements = {
+ 'papersize': 'a4',
+}
# The font size ('10pt', '11pt' or '12pt').
#latex_font_size = '10pt'
@@ -169,8 +172,10 @@ htmlhelp_basename = 'gammudoc'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, document class [howto/manual]).
latex_documents = [
- ('index', 'gammu.tex', ur'Gammu Documentation',
- ur'Michal Čihař <michal@cihar.com>', 'manual'),
+ ('contents', 'gammu.tex', ur'Gammu Manual',
+ ur'Michal Čihař <michal@cihar.com>', 'manual', True),
+ ('smsd/index', 'smsd.tex', ur'Gammu SMSD Daemon Manual',
+ ur'Michal Čihař <michal@cihar.com>', 'manual', True),
]
# The name of an image file (relative to this directory) to place at the top of
@@ -188,7 +193,7 @@ latex_documents = [
#latex_appendices = []
# If false, no module index is generated.
-#latex_use_modindex = True
+latex_domain_indices = True
# Options for breathe extension
# -----------------------------
@@ -199,3 +204,18 @@ breathe_projects = {
breathe_default_project = 'api'
+
+man_pages = [
+ ('smsd/files', 'gammu-smsd-files', 'gammu-smsd(1) backend using filesystem as a message storage', u'Michal Čihař <michal@cihar.com>', 7),
+ ('smsd/tables', 'gammu-smsd-tables', 'description of tables for database backends of gammu-smsd(1)', u'Michal Čihař <michal@cihar.com>', 7),
+ ('smsd/mysql', 'gammu-smsd-mysql', 'gammu-smsd(1) backend using MySQL database server as a message storage', u'Michal Čihař <michal@cihar.com>', 7),
+ ('smsd/pgsql', 'gammu-smsd-pgsql', 'gammu-smsd(1) backend using PostgreSQL database server as a message storage', u'Michal Čihař <michal@cihar.com>', 7),
+ ('smsd/dbi', 'gammu-smsd-dbi', 'gammu-smsd(1) backend using DBI abstraction layer to use any supported database as a message storage', u'Michal Čihař <michal@cihar.com>', 7),
+ ('smsd/run', 'gammu-smsd-run', 'documentation for RunOnReceive directive', u'Michal Čihař <michal@cihar.com>', 7),
+ ('smsd/null', 'gammu-smsd-null', 'gammu-smsd(1) backend not storing messages', u'Michal Čihař <michal@cihar.com>', 7),
+ ('smsd/config', 'gammu-smsdrc', 'gammu-smsd(1) configuration file', u'Michal Čihař <michal@cihar.com>', 5),
+ ('smsd/inject', 'gammu-smsd-inject', 'Inject messages into queue of SMS daemon for Gammu', u'Michal Čihař <michal@cihar.com>', 1),
+ ('smsd/monitor', 'gammu-smsd-monitor', 'Monitor state of SMS daemon for Gammu', u'Michal Čihař <michal@cihar.com>', 1),
+ ('smsd/smsd', 'gammu-smsd', 'SMS daemon for Gammu', u'Michal Čihař <michal@cihar.com>', 1),
+]
+
diff --git a/docs/manual/configext.py b/docs/manual/configext.py
new file mode 100644
index 0000000..50b1cb7
--- /dev/null
+++ b/docs/manual/configext.py
@@ -0,0 +1,156 @@
+from sphinx.locale import l_, _
+from sphinx.domains import Domain, ObjType
+from sphinx.roles import XRefRole
+from sphinx.domains.std import GenericObject, StandardDomain
+from sphinx.directives import ObjectDescription
+from sphinx.util.nodes import clean_astext, make_refnode
+from sphinx.util import ws_re
+from sphinx import addnodes
+from docutils import nodes
+
+class ConfigOption(ObjectDescription):
+ indextemplate = l_('configuration option; %s')
+ parse_node = None
+
+ def handle_signature(self, sig, signode):
+ if self.parse_node:
+ name = self.parse_node(self.env, sig, signode)
+ else:
+ signode.clear()
+ signode += addnodes.desc_name(sig, sig)
+ # normalize whitespace like XRefRole does
+ name = ws_re.sub('', sig)
+ return name
+
+ def add_target_and_index(self, name, sig, signode):
+ targetname = '%s-%s' % (self.objtype, name)
+ signode['ids'].append(targetname)
+ self.state.document.note_explicit_target(signode)
+ if self.indextemplate:
+ colon = self.indextemplate.find(':')
+ if colon != -1:
+ indextype = self.indextemplate[:colon].strip()
+ indexentry = self.indextemplate[colon+1:].strip() % (name,)
+ else:
+ indextype = 'single'
+ indexentry = self.indextemplate % (name,)
+ self.indexnode['entries'].append((indextype, indexentry,
+ targetname, targetname))
+ self.env.domaindata['config']['objects'][self.objtype, name] = \
+ self.env.docname, targetname
+
+
+class ConfigSectionXRefRole(XRefRole):
+ """
+ Cross-referencing role for configuration sections (adds an index entry).
+ """
+
+ def result_nodes(self, document, env, node, is_ref):
+ if not is_ref:
+ return [node], []
+ varname = node['reftarget']
+ tgtid = 'index-%s' % env.new_serialno('index')
+ indexnode = addnodes.index()
+ indexnode['entries'] = [
+ ('single', varname, tgtid, varname),
+ ('single', _('configuration section; %s') % varname, tgtid, varname)
+ ]
+ targetnode = nodes.target('', '', ids=[tgtid])
+ document.note_explicit_target(targetnode)
+ return [indexnode, targetnode, node], []
+
+class ConfigSection(ObjectDescription):
+ indextemplate = l_('configuration section; %s')
+ parse_node = None
+
+ def handle_signature(self, sig, signode):
+ if self.parse_node:
+ name = self.parse_node(self.env, sig, signode)
+ else:
+ signode.clear()
+ signode += addnodes.desc_name(sig, sig)
+ # normalize whitespace like XRefRole does
+ name = ws_re.sub('', sig)
+ return name
+
+ def add_target_and_index(self, name, sig, signode):
+ targetname = '%s-%s' % (self.objtype, name)
+ signode['ids'].append(targetname)
+ self.state.document.note_explicit_target(signode)
+ if self.indextemplate:
+ colon = self.indextemplate.find(':')
+ if colon != -1:
+ indextype = self.indextemplate[:colon].strip()
+ indexentry = self.indextemplate[colon+1:].strip() % (name,)
+ else:
+ indextype = 'single'
+ indexentry = self.indextemplate % (name,)
+ self.indexnode['entries'].append((indextype, indexentry,
+ targetname, targetname))
+ self.env.domaindata['config']['objects'][self.objtype, name] = \
+ self.env.docname, targetname
+
+
+class ConfigOptionXRefRole(XRefRole):
+ """
+ Cross-referencing role for configuration options (adds an index entry).
+ """
+
+ def result_nodes(self, document, env, node, is_ref):
+ if not is_ref:
+ return [node], []
+ varname = node['reftarget']
+ tgtid = 'index-%s' % env.new_serialno('index')
+ indexnode = addnodes.index()
+ indexnode['entries'] = [
+ ('single', varname, tgtid, varname),
+ ('single', _('configuration option; %s') % varname, tgtid, varname)
+ ]
+ targetnode = nodes.target('', '', ids=[tgtid])
+ document.note_explicit_target(targetnode)
+ return [indexnode, targetnode, node], []
+
+
+class ConfigFileDomain(Domain):
+ name = 'config'
+ label = 'Config'
+
+ object_types = {
+ 'option': ObjType(l_('config option'), 'option'),
+ 'section': ObjType(l_('config section'), 'section'),
+ }
+ directives = {
+ 'option': ConfigOption,
+ 'section': ConfigSection,
+ }
+ roles = {
+ 'option': ConfigOptionXRefRole(),
+ 'section': ConfigSectionXRefRole(),
+ }
+
+ initial_data = {
+ 'objects': {}, # (type, name) -> docname, labelid
+ }
+
+ def clear_doc(self, docname):
+ for key, (fn, _) in self.data['objects'].items():
+ if fn == docname:
+ del self.data['objects'][key]
+
+ def resolve_xref(self, env, fromdocname, builder,
+ typ, target, node, contnode):
+ docname, labelid = self.data['objects'].get((typ, target), ('', ''))
+ if not docname:
+ return None
+ else:
+ return make_refnode(builder, fromdocname, docname,
+ labelid, contnode)
+
+ def get_objects(self):
+ for (type, name), info in self.data['objects'].iteritems():
+ yield (name, name, type, info[0], info[1],
+ self.object_types[type].attrs['searchprio'])
+
+def setup(app):
+ app.add_domain(ConfigFileDomain)
+
diff --git a/docs/manual/contents.rst b/docs/manual/contents.rst
new file mode 100644
index 0000000..d6a6d89
--- /dev/null
+++ b/docs/manual/contents.rst
@@ -0,0 +1,24 @@
+.. _contents:
+
+Gammu Documentation Contents
+----------------------------
+
+.. toctree::
+ :maxdepth: 2
+
+ project/index
+ python/index
+ c/index
+ internal/index
+ formats/index
+ smsd/index
+ testing/index
+ protocol/index
+ glossary
+
+Indices and tables
+------------------
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
diff --git a/docs/develop/formats/backup.rst b/docs/manual/formats/backup.rst
index 5cf7d5a..5cf7d5a 100644
--- a/docs/develop/formats/backup.rst
+++ b/docs/manual/formats/backup.rst
diff --git a/docs/develop/formats/index.rst b/docs/manual/formats/index.rst
index b0623b5..b0623b5 100644
--- a/docs/develop/formats/index.rst
+++ b/docs/manual/formats/index.rst
diff --git a/docs/manual/formats/smsbackup.rst b/docs/manual/formats/smsbackup.rst
new file mode 100644
index 0000000..4133d21
--- /dev/null
+++ b/docs/manual/formats/smsbackup.rst
@@ -0,0 +1,40 @@
+.. _smsbackup:
+
+SMS Backup Format
+=================
+
+The SMS backup format is text file encoded in current encoding of platform
+where Gammu is running. The syntax is standard INI file, with both ``;`` and
+``#`` used for comments.
+
+The file consists of unlimited number of sections, each is for one message and
+it's name is formatted like ``SMSBackup001``. The numbering of messages must
+be consistent - Gammu stops to read the file on first skipped number.
+
+Example
+-------
+
+The backup of message can look like following:
+
+.. code-block:: ini
+
+ [SMSBackup000]
+ #ABCDEFGHIJKLMNOPQRSTUVWXYZ
+ #
+ SMSC = "+4540590000"
+ SMSCUnicode = 002B0034003500340030003500390030003000300030
+ Sent = 20021201T025023
+ State = UnRead
+ Number = "+4522706947"
+ NumberUnicode = 002B0034003500320032003700300036003900340037
+ Name = ""
+ NameUnicode =
+ Text00 = 004100420043004400450046004700480049004A004B004C004D004E004F0050005100520053005400550056005700580059005A000A
+ Coding = Default
+ Folder = 1
+ Length = 27
+ Class = \-1
+ ReplySMSC = False
+ RejectDuplicates = True
+ ReplaceMessage = 0
+ MessageReference = 0
diff --git a/docs/manual/glossary.rst b/docs/manual/glossary.rst
new file mode 100644
index 0000000..c2645ed
--- /dev/null
+++ b/docs/manual/glossary.rst
@@ -0,0 +1,8 @@
+Glossary
+========
+
+.. glossary::
+ :sorted:
+
+ TPMR
+ Message reference as generated by GSM network.
diff --git a/docs/develop/index.rst b/docs/manual/index.rst
index a215867..5c80afc 100644
--- a/docs/develop/index.rst
+++ b/docs/manual/index.rst
@@ -1,5 +1,5 @@
-Welcome to Gammu's documentation!
-=================================
+Gammu Manual
+============
`Gammu library`_ and `python-gammu`_ provide you way to communicate with
your cell phone using standard API. This documentation explains both
@@ -9,20 +9,18 @@ You can also learn something about :doc:`internal/index` and also about
:doc:`protocol/index`.
-Contents
---------
+Continue reading
+----------------
.. toctree::
- :maxdepth: 2
+ :maxdepth: 1
+ contents
project/index
+ smsd/index
python/index
c/index
internal/index
- formats/index
- smsd/index
- testing/index
- protocol/index
Indices and tables
------------------
diff --git a/docs/develop/internal/index.rst b/docs/manual/internal/index.rst
index 4aa35fa..3d36a5c 100644
--- a/docs/develop/internal/index.rst
+++ b/docs/manual/internal/index.rst
@@ -9,3 +9,4 @@ historical reasons. Before digging into source code, you should look at
:maxdepth: 2
reply
+ state-machine
diff --git a/docs/develop/internal/reply.rst b/docs/manual/internal/reply.rst
index 6403c22..6403c22 100644
--- a/docs/develop/internal/reply.rst
+++ b/docs/manual/internal/reply.rst
diff --git a/docs/manual/internal/state-machine.rst b/docs/manual/internal/state-machine.rst
new file mode 100644
index 0000000..67ec6a0
--- /dev/null
+++ b/docs/manual/internal/state-machine.rst
@@ -0,0 +1,29 @@
+State Machine
+=============
+
+The state machine is core of libGammu operations. It gets the data from the
+phone and dispatches them through protocol layer to phone drivers.
+
+To see how it operates, following figure shows example of what happens when
+:c:func:`GSM_GetModel` is called from the program:
+
+.. graphviz::
+
+ digraph statemachine {
+ "GSM_GetModel" -> "Phone.Functions.GetModel";
+ "Phone.Functions.GetModel" -> "GSM_WaitFor";
+ "GSM_WaitFor" -> "Protocol.Functions.WriteMessage";
+ "Protocol.Functions.WriteMessage" -> "GSM_WaitForOnce";
+ "GSM_WaitForOnce" -> "GSM_WaitFor" [label="Retries"];
+ "GSM_WaitForOnce" -> "GSM_ReadDevice";
+ "GSM_ReadDevice" -> "GSM_WaitForOnce" [label="Wair for complete request"];
+ "GSM_ReadDevice" -> "Device.Functions.ReadDevice";
+ "Device.Functions.ReadDevice" -> "GSM_ReadDevice" [label="Wait for data"];
+ "Device.Functions.ReadDevice" -> "Protocol.Functions.StateMachine";
+ "Protocol.Functions.StateMachine" -> "Phone.Functions.DispatchMessage"
+ "Phone.Functions.DispatchMessage" -> "GSM_DispatchMessage";
+ "GSM_DispatchMessage" -> "Phone.Functions.ReplyFunctions[]()";
+ "Phone.Functions.ReplyFunctions[]()" -> "Phone.Functions.GetModel";
+ "Phone.Functions.GetModel" -> "GSM_GetModel";
+ }
+
diff --git a/docs/develop/project/about.rst b/docs/manual/project/about.rst
index 74c42a9..74c42a9 100644
--- a/docs/develop/project/about.rst
+++ b/docs/manual/project/about.rst
diff --git a/docs/develop/project/coding-style.rst b/docs/manual/project/coding-style.rst
index 3043a6d..3043a6d 100644
--- a/docs/develop/project/coding-style.rst
+++ b/docs/manual/project/coding-style.rst
diff --git a/docs/develop/project/contributing.rst b/docs/manual/project/contributing.rst
index 4021c62..4021c62 100644
--- a/docs/develop/project/contributing.rst
+++ b/docs/manual/project/contributing.rst
diff --git a/docs/develop/project/directories.rst b/docs/manual/project/directories.rst
index 737e17f..737e17f 100644
--- a/docs/develop/project/directories.rst
+++ b/docs/manual/project/directories.rst
diff --git a/docs/develop/project/index.rst b/docs/manual/project/index.rst
index a9859d5..a9859d5 100644
--- a/docs/develop/project/index.rst
+++ b/docs/manual/project/index.rst
diff --git a/docs/develop/project/install.rst b/docs/manual/project/install.rst
index dfb49a3..dfb49a3 100644
--- a/docs/develop/project/install.rst
+++ b/docs/manual/project/install.rst
diff --git a/docs/develop/project/localization.rst b/docs/manual/project/localization.rst
index 06d97d7..06d97d7 100644
--- a/docs/develop/project/localization.rst
+++ b/docs/manual/project/localization.rst
diff --git a/docs/develop/project/motivation.rst b/docs/manual/project/motivation.rst
index 559408d..559408d 100644
--- a/docs/develop/project/motivation.rst
+++ b/docs/manual/project/motivation.rst
diff --git a/docs/develop/project/testing.rst b/docs/manual/project/testing.rst
index 53cf9cc..53cf9cc 100644
--- a/docs/develop/project/testing.rst
+++ b/docs/manual/project/testing.rst
diff --git a/docs/develop/protocol/carkit.rst b/docs/manual/protocol/carkit.rst
index 85ffc5d..15392a7 100644
--- a/docs/develop/protocol/carkit.rst
+++ b/docs/manual/protocol/carkit.rst
@@ -46,16 +46,8 @@ Initiation
Ack from phone
1F0400 78 0004 0102 0801 117C
Status 0x08, 0x01 from phone
-1F0400 78 0004 0102 0801 117C
-
-1F0400 78 0004 0102 0801 117C
-
1F0400 DA 0002 0002 12D3
Type => 0xDA, data => 0x00, 0x02
-1F0400 DA 0002 0002 12D3
-
-1F0400 DA 0002 0002 12D3
-
1F0004 79 0005 0201 0164 00 0504
Enable carkit mode from PC
1F0004 79 0005 0201 0164 00 0607
@@ -76,16 +68,9 @@ Incoming call
1F0400 78 0004 0102 0701 197B
Status 0x07, 0x01 from phone
-1F0400 78 0004 0102 0701 197B
-
-1F0400 78 0004 0102 0701 197B
-
1F0400 78 0004 0102 0E03 1A73
Status 0x0E, 0x03 from phone
-1F0400 78 0004 0102 0E03 1A73
-
-1F0400 78 0004 0102 0E03 1A73
-
+
Status type 0x07 with status 0x01 means mute external audio equipment. Status type 0x0E with status 0x03 means audio amplifier on.
Connected
@@ -106,42 +91,22 @@ Initiation with connected phone
Ack from phone
1F0400 78 0004 0102 0E03 1C75
Status 0x0E, 0x03 from phone
-1F0400 78 0004 0102 0E03 1C75
-
-1F0400 78 0004 0102 0E03 1C75
-
1F0400 78 0004 0102 0701 1D7F
Status 0x07, 0x01 from phone
-1F0400 78 0004 0102 0701 1D7F
-
-1F0400 78 0004 0102 0701 1D7F
-
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
-1F0400 78 0004 0102 0801 1E73
-
-1F0400 78 0004 0102 0801 1E73
-
1F0004 79 0005 0201 0164 0003 02
Enable carkit mode from PC
1F0400 7F 0367
Ack from phone
1F0400 78 0004 0102 0E03 1F76
Status 0x0E, 0x03 from phone
-1F0400 78 0004 0102 0E03 1F76
-
-1F0400 78 0004 0102 0E03 1F76
-
1F0400 78 0004 0102 0701 2042
Status 0x07, 0x01 from phone
-1F0400 78 0004 0102 0701 2042
-
-1F0400 78 0004 0102 0701 2042
-
1F0004 78 0003 0201 03 0464
Status confirm from PC
1F0400 7F 0460
@@ -152,10 +117,6 @@ Disconnected
1F04 0078 0004 0102 0700 2142
Status 0x07, 0x00
-1F04 0078 0004 0102 0700 2142
-
-1F04 0078 0004 0102 0700 2142
-
Incoming SMS
~~~~~~~~~~~~
@@ -165,10 +126,7 @@ FCF0 F0F0 F0F0 F0F0 F0F0 F0F0 F0F0 F0F0 F0F0 F0F0 F0F0 F0F0 F0F0 F0F0 F0F0 F0F0
1F0400 78 0004 0102 0E03 254C
Status 0x0E, 0x03 from phone
F0F0F0F0
-
-1F0400 78 0004 0102 0E03 254C
-
-1F0400 78 0004 0102 0E03 254C
+ Initiation of bit length from phone
Phone connected to CARC91
+++++++++++++++++++++++++
@@ -373,30 +331,18 @@ Initiation
Ack from phone
1F0400 78 0004 0128 0B00 0E4B
Status 0x0B, 0x00 from phone
-1F0400 78 0004 0128 0B00 0E4B
-
-1F0400 78 0004 0128 0B00 0E4B
-
1F0004 79 0012 0201 0206 0056 2030 372E 3030 0A48 4655 3200 0D46
HFU-2 version from PC
1F0400 7F 0E6A
Ack from phone
1F0400 DA 0004 0028 0000 0FE2
-
-1F0400 DA 0004 0028 0000 0FE2
-
-1F0400 DA 0004 0028 0000 0FE2
-
+ ?
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 0x0B, 0x00 from phone
-1F0400 78 0004 0128 0B00 1055
-
-1F0400 78 0004 0128 0B00 1055
-
1F0004 78 0003 0201 03 1878
Status confirm from PC
1F0400 7F 1A7E
@@ -438,7 +384,6 @@ Initiation with connected phone
Status 0x09, 0x00
1F0400 78 0004 0128 0701 1D55
Status 0x07, 0x01
-
1F0004 D0 0001 04 00CE
Power up from HFU-2
1F0400 D0 0001 05 74BB
@@ -558,7 +503,7 @@ Initiation
1F0400 7F 0460
Ack from phone
1F0400 DA 0004 0028 0000 2FC2
-
+ ?
1F0004 7F 2F4B
Ack from HFU-2
@@ -668,7 +613,7 @@ Initiation with connected phone
1F0400 7F 0561
Ack from phone
1F0400 DA 0004 0028 0000 5EB3
-
+ ?
1F0004 7F 5E3A
Ack from HFU-2
diff --git a/docs/develop/protocol/discovering.rst b/docs/manual/protocol/discovering.rst
index b885fb5..b885fb5 100644
--- a/docs/develop/protocol/discovering.rst
+++ b/docs/manual/protocol/discovering.rst
diff --git a/docs/develop/protocol/index.rst b/docs/manual/protocol/index.rst
index 35a58c7..35a58c7 100644
--- a/docs/develop/protocol/index.rst
+++ b/docs/manual/protocol/index.rst
diff --git a/docs/develop/protocol/n6110.rst b/docs/manual/protocol/n6110.rst
index aaede76..aaede76 100644
--- a/docs/develop/protocol/n6110.rst
+++ b/docs/manual/protocol/n6110.rst
diff --git a/docs/develop/protocol/n6510.rst b/docs/manual/protocol/n6510.rst
index e236a12..e236a12 100644
--- a/docs/develop/protocol/n6510.rst
+++ b/docs/manual/protocol/n6510.rst
diff --git a/docs/develop/protocol/n7110.rst b/docs/manual/protocol/n7110.rst
index 0a7e8d3..0a7e8d3 100644
--- a/docs/develop/protocol/n7110.rst
+++ b/docs/manual/protocol/n7110.rst
diff --git a/docs/develop/protocol/nokia-s40-sms-scratch.txt b/docs/manual/protocol/nokia-s40-sms-scratch.txt
index 485d3e8..485d3e8 100644
--- a/docs/develop/protocol/nokia-s40-sms-scratch.txt
+++ b/docs/manual/protocol/nokia-s40-sms-scratch.txt
diff --git a/docs/develop/protocol/nokia-s40-sms.rst b/docs/manual/protocol/nokia-s40-sms.rst
index 4ee56ae..4ee56ae 100644
--- a/docs/develop/protocol/nokia-s40-sms.rst
+++ b/docs/manual/protocol/nokia-s40-sms.rst
diff --git a/docs/develop/protocol/nokia.rst b/docs/manual/protocol/nokia.rst
index 61e9078..61e9078 100644
--- a/docs/develop/protocol/nokia.rst
+++ b/docs/manual/protocol/nokia.rst
diff --git a/docs/develop/protocol/readme b/docs/manual/protocol/readme
index eb1437f..eb1437f 100644
--- a/docs/develop/protocol/readme
+++ b/docs/manual/protocol/readme
diff --git a/docs/develop/protocol/samsung-gt.rst b/docs/manual/protocol/samsung-gt.rst
index 10aea3e..10aea3e 100644
--- a/docs/develop/protocol/samsung-gt.rst
+++ b/docs/manual/protocol/samsung-gt.rst
diff --git a/docs/develop/protocol/samsung.rst b/docs/manual/protocol/samsung.rst
index 4976cff..4976cff 100644
--- a/docs/develop/protocol/samsung.rst
+++ b/docs/manual/protocol/samsung.rst
diff --git a/docs/develop/protocol/sonim.rst b/docs/manual/protocol/sonim.rst
index 60c2214..60c2214 100644
--- a/docs/develop/protocol/sonim.rst
+++ b/docs/manual/protocol/sonim.rst
diff --git a/docs/develop/protocol/tdma_5120.rst b/docs/manual/protocol/tdma_5120.rst
index 17f2e9d..17f2e9d 100644
--- a/docs/develop/protocol/tdma_5120.rst
+++ b/docs/manual/protocol/tdma_5120.rst
diff --git a/docs/develop/python/data.rst b/docs/manual/python/data.rst
index 82df385..82df385 100644
--- a/docs/develop/python/data.rst
+++ b/docs/manual/python/data.rst
diff --git a/docs/develop/python/examples.rst b/docs/manual/python/examples.rst
index a8568e3..a8568e3 100644
--- a/docs/develop/python/examples.rst
+++ b/docs/manual/python/examples.rst
diff --git a/docs/manual/python/exceptions.rst b/docs/manual/python/exceptions.rst
new file mode 100644
index 0000000..f935d6e
--- /dev/null
+++ b/docs/manual/python/exceptions.rst
@@ -0,0 +1,149 @@
+:mod:`gammu.exception` -- Gammu exception handling
+==================================================
+
+.. module:: gammu.exception
+ :synopsis: Defines all exceptions used in Gammu.
+
+.. 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.
+
+.. autoexception:: gammu.ERR_NONE
+ :show-inheritance:
+.. autoexception:: gammu.ERR_DEVICEOPENERROR
+ :show-inheritance:
+.. autoexception:: gammu.ERR_DEVICELOCKED
+ :show-inheritance:
+.. autoexception:: gammu.ERR_DEVICENOTEXIST
+ :show-inheritance:
+.. autoexception:: gammu.ERR_DEVICEBUSY
+ :show-inheritance:
+.. autoexception:: gammu.ERR_DEVICENOPERMISSION
+ :show-inheritance:
+.. autoexception:: gammu.ERR_DEVICENODRIVER
+ :show-inheritance:
+.. autoexception:: gammu.ERR_DEVICENOTWORK
+ :show-inheritance:
+.. autoexception:: gammu.ERR_DEVICEDTRRTSERROR
+ :show-inheritance:
+.. autoexception:: gammu.ERR_DEVICECHANGESPEEDERROR
+ :show-inheritance:
+.. autoexception:: gammu.ERR_DEVICEWRITEERROR
+ :show-inheritance:
+.. autoexception:: gammu.ERR_DEVICEREADERROR
+ :show-inheritance:
+.. autoexception:: gammu.ERR_DEVICEPARITYERROR
+ :show-inheritance:
+.. autoexception:: gammu.ERR_TIMEOUT
+ :show-inheritance:
+.. autoexception:: gammu.ERR_FRAMENOTREQUESTED
+ :show-inheritance:
+.. autoexception:: gammu.ERR_UNKNOWNRESPONSE
+ :show-inheritance:
+.. autoexception:: gammu.ERR_UNKNOWNFRAME
+ :show-inheritance:
+.. autoexception:: gammu.ERR_UNKNOWNCONNECTIONTYPESTRING
+ :show-inheritance:
+.. autoexception:: gammu.ERR_UNKNOWNMODELSTRING
+ :show-inheritance:
+.. autoexception:: gammu.ERR_SOURCENOTAVAILABLE
+ :show-inheritance:
+.. autoexception:: gammu.ERR_NOTSUPPORTED
+ :show-inheritance:
+.. autoexception:: gammu.ERR_EMPTY
+ :show-inheritance:
+.. autoexception:: gammu.ERR_SECURITYERROR
+ :show-inheritance:
+.. autoexception:: gammu.ERR_INVALIDLOCATION
+ :show-inheritance:
+.. autoexception:: gammu.ERR_NOTIMPLEMENTED
+ :show-inheritance:
+.. autoexception:: gammu.ERR_FULL
+ :show-inheritance:
+.. autoexception:: gammu.ERR_UNKNOWN
+ :show-inheritance:
+.. autoexception:: gammu.ERR_CANTOPENFILE
+ :show-inheritance:
+.. autoexception:: gammu.ERR_MOREMEMORY
+ :show-inheritance:
+.. autoexception:: gammu.ERR_PERMISSION
+ :show-inheritance:
+.. autoexception:: gammu.ERR_EMPTYSMSC
+ :show-inheritance:
+.. autoexception:: gammu.ERR_INSIDEPHONEMENU
+ :show-inheritance:
+.. autoexception:: gammu.ERR_NOTCONNECTED
+ :show-inheritance:
+.. autoexception:: gammu.ERR_WORKINPROGRESS
+ :show-inheritance:
+.. autoexception:: gammu.ERR_PHONEOFF
+ :show-inheritance:
+.. autoexception:: gammu.ERR_FILENOTSUPPORTED
+ :show-inheritance:
+.. autoexception:: gammu.ERR_BUG
+ :show-inheritance:
+.. autoexception:: gammu.ERR_CANCELED
+ :show-inheritance:
+.. autoexception:: gammu.ERR_NEEDANOTHERANSWER
+ :show-inheritance:
+.. autoexception:: gammu.ERR_OTHERCONNECTIONREQUIRED
+ :show-inheritance:
+.. autoexception:: gammu.ERR_WRONGCRC
+ :show-inheritance:
+.. autoexception:: gammu.ERR_INVALIDDATETIME
+ :show-inheritance:
+.. autoexception:: gammu.ERR_MEMORY
+ :show-inheritance:
+.. autoexception:: gammu.ERR_INVALIDDATA
+ :show-inheritance:
+.. autoexception:: gammu.ERR_FILEALREADYEXIST
+ :show-inheritance:
+.. autoexception:: gammu.ERR_FILENOTEXIST
+ :show-inheritance:
+.. autoexception:: gammu.ERR_SHOULDBEFOLDER
+ :show-inheritance:
+.. autoexception:: gammu.ERR_SHOULDBEFILE
+ :show-inheritance:
+.. autoexception:: gammu.ERR_NOSIM
+ :show-inheritance:
+.. autoexception:: gammu.ERR_GNAPPLETWRONG
+ :show-inheritance:
+.. autoexception:: gammu.ERR_FOLDERPART
+ :show-inheritance:
+.. autoexception:: gammu.ERR_FOLDERNOTEMPTY
+ :show-inheritance:
+.. autoexception:: gammu.ERR_DATACONVERTED
+ :show-inheritance:
+.. autoexception:: gammu.ERR_UNCONFIGURED
+ :show-inheritance:
+.. autoexception:: gammu.ERR_WRONGFOLDER
+ :show-inheritance:
+.. autoexception:: gammu.ERR_PHONE_INTERNAL
+ :show-inheritance:
+.. autoexception:: gammu.ERR_WRITING_FILE
+ :show-inheritance:
+.. autoexception:: gammu.ERR_NONE_SECTION
+ :show-inheritance:
+.. autoexception:: gammu.ERR_USING_DEFAULTS
+ :show-inheritance:
+.. autoexception:: gammu.ERR_CORRUPTED
+ :show-inheritance:
+.. autoexception:: gammu.ERR_BADFEATURE
+ :show-inheritance:
+.. autoexception:: gammu.ERR_DISABLED
+ :show-inheritance:
+.. autoexception:: gammu.ERR_SPECIFYCHANNEL
+ :show-inheritance:
+.. autoexception:: gammu.ERR_NOTRUNNING
+ :show-inheritance:
+.. autoexception:: gammu.ERR_NOSERVICE
+ :show-inheritance:
+.. autoexception:: gammu.ERR_BUSY
+ :show-inheritance:
+.. autoexception:: gammu.ERR_COULDNT_CONNECT
+ :show-inheritance:
+.. autoexception:: gammu.ERR_COULDNT_RESOLVE
+ :show-inheritance:
+.. autoexception:: gammu.ERR_GETTING_SMSC
+ :show-inheritance:
diff --git a/docs/develop/python/gammu.rst b/docs/manual/python/gammu.rst
index 012fb6a..012fb6a 100644
--- a/docs/develop/python/gammu.rst
+++ b/docs/manual/python/gammu.rst
diff --git a/docs/develop/python/index.rst b/docs/manual/python/index.rst
index db9beb0..db9beb0 100644
--- a/docs/develop/python/index.rst
+++ b/docs/manual/python/index.rst
diff --git a/docs/develop/python/objects.rst b/docs/manual/python/objects.rst
index 3c3e967..3c3e967 100644
--- a/docs/develop/python/objects.rst
+++ b/docs/manual/python/objects.rst
diff --git a/docs/develop/python/smsd.rst b/docs/manual/python/smsd.rst
index 2ef2010..8b451ab 100644
--- a/docs/develop/python/smsd.rst
+++ b/docs/manual/python/smsd.rst
@@ -4,10 +4,10 @@
.. module:: gammu.smsd
:synopsis: Provides access to Gammu SMSD functions.
-:class:`gammu.smsd.SMSD`
-------------------------
+:class:`SMSD`
+-------------
-.. class:: gammu.smsd.SMSD(Config)
+.. class:: SMSD(Config)
SMSD main class, that is used for communication with phone.
diff --git a/docs/develop/python/worker.rst b/docs/manual/python/worker.rst
index 457dfb7..457dfb7 100644
--- a/docs/develop/python/worker.rst
+++ b/docs/manual/python/worker.rst
diff --git a/docs/manual/smsd/backends.rst b/docs/manual/smsd/backends.rst
new file mode 100644
index 0000000..6fce75d
--- /dev/null
+++ b/docs/manual/smsd/backends.rst
@@ -0,0 +1,18 @@
+.. _smsd_services:
+
+Backend services
+----------------
+
+The backend service is used to store messages (both incoming and queue of
+outgoing ones).
+
+.. toctree::
+ :maxdepth: 2
+
+ files
+ mysql
+ pgsql
+ dbi
+ null
+ tables
+
diff --git a/docs/manual/smsd/code.rst b/docs/manual/smsd/code.rst
new file mode 100644
index 0000000..6bd4495
--- /dev/null
+++ b/docs/manual/smsd/code.rst
@@ -0,0 +1,193 @@
+Developer documentation
+=======================
+
+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 (:ref:`smsd_files`), various databases (:ref:`smsd_mysql`,
+:ref:`smsd_pgsql`, :ref:`smsd_dbi`) or backend which does not store anything
+at all (:ref:`smsd_null`).
+
+
+Backend interface
++++++++++++++++++
+
+Each backend service needs to support several operations, which are exported
+in ``GSM_SMSDService`` structure:
+
+.. c:function:: GSM_Error GSM_SMSDService::Init (GSM_SMSDConfig *Config)
+
+ Initializes internal state, connect to backend storage.
+
+ :param Config: Pointer to SMSD configuration data
+ :return: Error code.
+
+.. c:function:: GSM_Error GSM_SMSDService::Free (GSM_SMSDConfig *Config)
+
+ Freeing internal data, disconnect from backend storage.
+
+ :param Config: Pointer to SMSD configuration data
+ :return: Error code.
+
+.. c:function:: 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.
+
+ :param Config: Pointer to SMSD configuration data
+ :return: Error code.
+
+.. c:function:: GSM_Error GSM_SMSDService::SaveInboxSMS (GSM_MultiSMSMessage *sms, GSM_SMSDConfig *Config, char **Locations)
+
+ Saves message into inbox.
+
+ :param sms: Message data to save
+ :param Config: Pointer to SMSD configuration data
+ :param Locations: Newly allocation pointer to string with IDs identifying saved messages.
+ :return: Error code.
+
+.. c:function:: GSM_Error GSM_SMSDService::FindOutboxSMS (GSM_MultiSMSMessage *sms, GSM_SMSDConfig *Config, char *ID)
+
+ Finds message in outbox suitable for sending.
+
+ :param sms: Found outbox message will be stored here
+ :param Config: Pointer to SMSD configuration data
+ :param 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.
+ :return: Error code.
+
+.. c:function:: GSM_Error GSM_SMSDService::MoveSMS (GSM_MultiSMSMessage *sms, GSM_SMSDConfig *Config, char *ID, gboolean alwaysDelete, gboolean sent)
+
+ Moves sent message from outbox to sent items.
+
+ :param sms: Message which should be moved, backend usually can get it by ID as well.
+ :param Config: Pointer to SMSD configuration data.
+ :param ID: Identification of message to be moved.
+ :param alwaysDelete: Whether to delete message from outbox even if moving fails.
+ :param sent: Whether message was sent (``TRUE``) or there was a failure (``FALSE``).
+ :return: Error code.
+
+.. c:function:: GSM_Error GSM_SMSDService::CreateOutboxSMS (GSM_MultiSMSMessage *sms, GSM_SMSDConfig *Config, char *NewID)
+
+ Saves message into outbox queue.
+
+ :param sms: Message data to save
+ :param Config: Pointer to SMSD configuration data
+ :param NewID: ID of created message will be stored here.
+ :return: Error code.
+
+.. c:function:: 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).
+
+ :param sms: Message which should be moved, backend usually can get it by ID as well.
+ :param Config: Pointer to SMSD configuration data
+ :param ID: Identification of message to be marked.
+ :param Part: Part of the message which is being processed.
+ :param err: Status of sending message.
+ :param TPMR: Message reference if available (:term:`TPMR`).
+ :return: Error code.
+
+.. c:function:: GSM_Error GSM_SMSDService::RefreshSendStatus (GSM_SMSDConfig *Config, char *ID)
+
+ Updates sending status in service backend.
+
+ :param Config: Pointer to SMSD configuration data
+ :param ID: Identification of message to be marked.
+ :return: Error code.
+
+.. c:function:: GSM_Error GSM_SMSDService::RefreshPhoneStatus (GSM_SMSDConfig *Config)
+
+ Updates information about phone in database (network status, battery, etc.).
+
+ :param Config: Pointer to SMSD configuration data
+ :return: 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 usually easier for backend to handle message
+just by it's internal identification instead of handling message data from
+:c:type:`GSM_MultiSMSMessage`.
+
+If the backend does not use any IDs internally, it really does not have to
+provide them, with only exception of :c:func:`GSM_SMSDService::FindOutboxSMS`,
+where ID is used for detection of repeated sending of same message.
+
+The lifetime of ID for sent message:
+
+ * :c:func:`GSM_SMSDService::CreateOutboxSMS` or direct manipulation
+ with backend storage creates new ID
+ * :c:func:`GSM_SMSDService::FindOutboxSMS` returns ID of message to
+ process
+ * :c:func:`GSM_SMSDService::AddSentSMSInfo` and
+ :c:func:`GSM_SMSDService::RefreshSendStatus` are then notified using
+ this ID about sending of the message
+ * :c:func:`GSM_SMSDService::MoveSMS` then moves the message based on
+ ID to sent items
+
+The lifetime of ID for incoming messages:
+
+ * :c:func:`GSM_SMSDService::SaveInboxSMS` generates the message
+ * :ref:`smsd_run` uses this ID
+
+Message Sending Workflow
+------------------------
+
+.. graphviz::
+
+ digraph smsdsending {
+ "new message" [shape=box];
+ "message in storage" [shape=box];
+ "message sent" [shape=box];
+ "error sending message" [shape=box];
+ "new message" -> "manually created SMS";
+ "new message" -> "CreateOutboxSMS";
+ "manually created SMS" -> "message in storage";
+ "CreateOutboxSMS" -> "message in storage"
+ "message in storage" -> "FindOutboxSMS";
+ "FindOutboxSMS" -> "AddSentSMSInfo(ERROR)" [label="Error", style=dotted];
+ "FindOutboxSMS" -> "check duplicates";
+ "check duplicates" -> "AddSentSMSInfo(ERROR)" [label="Too many retries", style=dotted];
+ "check duplicates" -> "GSM_SendSMS";
+ "GSM_SendSMS" -> "RefreshSendStatus";
+ "GSM_SendSMS" -> "AddSentSMSInfo(ERROR)" [label="Error", style=dotted];
+ "RefreshSendStatus" -> "RefreshSendStatus" [label="Sending"];
+ "RefreshSendStatus" -> "AddSentSMSInfo(ERROR)" [label="Timeout", style=dotted];
+ "RefreshSendStatus" -> "AddSentSMSInfo(OK)";
+ "AddSentSMSInfo(OK)" -> "MoveSMS(noforce, OK)";
+ "MoveSMS(noforce, OK)" -> "MoveSMS(force, ERR)" [label="Error", style=dotted];
+ "AddSentSMSInfo(OK)" -> "MoveSMS(force, ERR)" [label="Error", style=dotted];
+ "AddSentSMSInfo(ERROR)" -> "MoveSMS(force, ERR)";
+ "MoveSMS(noforce, OK)" -> "message sent";
+ "MoveSMS(force, ERR)" -> "error sending message";
+ }
+
+Message Receiving Workflow
+--------------------------
+
+.. graphviz::
+
+ digraph smsdreceiving {
+ "received message" [shape=box];
+ "ignored message" [shape=box];
+ "failed message" [shape=box];
+ "waiting message" [shape=box];
+ "processed message" [shape=box];
+ "received message" -> "GSM_GetNextSMS";
+ "GSM_GetNextSMS" -> "SMSD_ValidMessage";
+ "SMSD_ValidMessage" -> "GSM_LinkSMS";
+ "SMSD_ValidMessage" -> "ignored message" [label="Not valid", style=dotted];
+ "GSM_LinkSMS" -> "SMSD_CheckMultipart";
+ "SMSD_CheckMultipart" -> "SaveInboxSMS";
+ "SMSD_CheckMultipart" -> "waiting message" [label="Not all parts", style=dotted];
+ "SaveInboxSMS" -> "SMSD_RunOnReceive" [label="Locations are passed here"];
+ "SaveInboxSMS" -> "failed message" [label="Error", style=dotted];
+ "SMSD_RunOnReceive" -> "GSM_DeleteSMS";
+ "GSM_DeleteSMS" -> "processed message"
+ "GSM_DeleteSMS" -> "failed message" [label="Error", style=dotted];
+ }
diff --git a/docs/manual/smsd/config.rst b/docs/manual/smsd/config.rst
new file mode 100644
index 0000000..78e803e
--- /dev/null
+++ b/docs/manual/smsd/config.rst
@@ -0,0 +1,482 @@
+.. _gammu-smsdrc:
+
+SMSD Configuration File
+=======================
+
+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, 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.
+
+Configuration file of gammu-smsd consists of at least two sections - :config:section:`[gammu]`
+and :config:section:`[smsd]`.
+
+.. config:section:: [gammu]
+
+ The :config:section:`[gammu]` section is configuration of a phone connection and is same as
+ described in gammurc(5) with the only exception that logfile is ignored and
+ common logging for gammu library and SMS daemon is used. However the logformat
+ directive still configures how much messages gammu emits.
+
+.. config:section:: [smsd]
+
+ The :config:section:`[smsd]` section configures SMS daemon itself, which are described in
+ following subsections. First general parameters of SMS daemon are listed and
+ then specific parameters for storage backends.
+
+.. config:section:: [include_numbers]
+
+ List of numbers from which accept messages, see :ref:`message_filtering`.
+
+.. config:section:: [exclude_numbers]
+
+ List of numbers from which reject messages, see :ref:`message_filtering`.
+
+.. config:section:: [include_smsc]
+
+ List of SMSC numbers from which accept messages, see :ref:`message_filtering`.
+
+.. config:section:: [exclude_smsc]
+
+ List of SMSC numbers from which reject messages, see :ref:`message_filtering`.
+
+General parameters of SMS daemon
+--------------------------------
+
+.. config:option:: Service
+
+ SMSD service to use, one of FILES, NULL, MYSQL, PGSQL, DBI (depends on compiled
+ in support for backends).
+
+ ``FILES``
+ stores messages in files, see :ref:`smsd_files` for details
+ ``NULL``
+ does not store messages at all, see gammu\-smsd\-null(7) for details
+ ``MYSQL``
+ stores messages in MySQL database, see gammu\-smsd\-mysql(7) for details
+ ``PGSQL``
+ stores messages in PostgreSQL database, see gammu\-smsd\-pgsql(7) for details
+ ``DBI``
+ stores messages in any database supported by libdbi, this includes
+ MSSQL, MySQL, PostgreSQL or SQLite databases, see gammu\-smsd\-dbi(7) for
+ details
+
+.. config:option:: PIN
+
+ PIN for SIM card. This is optional, but you should set it if your phone after
+ power on requires PIN.
+
+.. config:option:: NetworkCode
+
+ Network personalisation password. This is optional, but some phones require it
+ after power on.
+
+.. config:option:: PhoneCode
+
+ Phone lock password. This is optional, but some phones require it after power
+ on.
+
+.. config:option:: LogFile
+
+ File where SMSD actions are being logged. You can also use special value
+ ``syslog`` which will send all messages to syslog daemon. On Windows another
+ special value ``eventlog`` 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.
+
+.. config:option:: DebugLevel
+
+ 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
+
+ Generally to get as much debug information as possible, use 255.
+
+ Default is 0, what should mean no extra information.
+
+.. config:option:: CommTimeout
+
+ How many seconds should SMSD wait after there is no message in outbox.
+
+ Default is 30.
+
+.. config:option:: 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.
+
+.. config:option:: MaxRetries
+
+ How many times will SMSD try to resend message if sending fails.
+
+ Default is 1.
+
+.. config:option:: 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 0 (not used).
+
+.. config:option:: 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.
+
+.. config:option:: 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 other time based configurations, because they will be effectively
+ rounded to multiply of this value.
+
+ Default is 1.
+
+.. config:option:: 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).
+
+.. config:option:: CheckSecurity
+
+ Whether to check if phone wants to enter PIN.
+
+ Default is 1 (enabled).
+
+.. config:option:: CheckBattery
+
+ Whether to check phone battery state periodically.
+
+ Default is 1 (enabled).
+
+.. config:option:: CheckSignal
+
+ Whether to check signal level periodically.
+
+ Default is 1 (enabled).
+
+.. config:option:: 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).
+
+.. config:option:: 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``.
+
+.. config:option:: 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).
+
+.. config:option:: PhoneID
+
+ String with info about phone used for sending/receiving. This can be useful if
+ you want to run several SMS daemons.
+
+ When you set PhoneID, all messages (including injected ones) will be marked by
+ this string and it allow more SMS daemons to share single database. This
+ option has actually no effect of FILES backend service.
+
+.. config:option:: 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 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.
+
+ The process has available lot of information about received message in
+ environment, check :ref:`smsd_run` for more details.
+
+.. config:option:: IncludeNumbersFile
+
+ File with list of 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.
+
+.. config:option:: 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.
+
+.. config:option:: 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.
+
+.. config:option:: 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.
+
+.. config:option:: 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.
+
+.. config:option:: Send
+
+ Whether to enable sending of messages.
+
+ Default is True.
+
+.. config:option:: Receive
+
+ Whether to enable receiving of messages.
+
+ Default is True.
+
+
+Database backends options
+-------------------------
+
+All DBI, MYSQL and PGSQL backends (see gammu\-smsd\-mysql(7),
+gammu\-smsd\-pgsql(7), gammu\-smsd\-dbi(7)) for their documentation) supports
+same options for configuring connection to a database:
+
+.. config:option:: User
+
+ User name used for connection to a database.
+
+.. config:option:: Password
+
+ Password used for connection to a database.
+
+.. config:option:: PC
+
+ Database server address. It can also contain port or socket path after
+ semicolon, for example localhost:/path/to/socket.
+
+.. config:option:: Database
+
+ Name of database to use. Please note that you should create tables in this
+ database before using gammu\-smsd. SQL files for creating needed tables are
+ included in documentation.
+
+.. config:option:: 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.
+
+.. config:option:: Driver
+
+ DBI driver to use. Depends on what DBI drivers you have installed, DBI
+ supports: mysql, freetds (provides access to MS SQL Server and Sybase), pgsql,
+ sqlite, sqlite3, firebird and ingres, msql and oracle drivers are under
+ development.
+
+.. config:option:: DriversPath
+
+ Path, where DBI drivers are stored, this usually does not have to be set if
+ you have properly installed drivers.
+
+.. config:option:: 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
+gammu\-smsd\-files(7) for more detailed service backend description. Please note
+that all path should contain trailing path separator (/ on Unix systems):
+
+.. config:option:: InboxPath
+
+ Where the received SMSes are stored.
+
+ Default is current directory.
+
+.. config:option:: OutboxPath
+
+ Where SMSes to be sent should be placed.
+
+ Default is current directory.
+
+.. config:option:: SentSMSPath
+
+ Where the transmitted SMSes are placed, if same as OutBoxPath transmitted
+ messages are deleted.
+
+ Default is to delete transmitted messages.
+
+.. config:option:: ErrorSMSPath
+
+ Where SMSes with error in transmission is placed.
+
+ Default is same as SentSMSPath.
+
+.. config:option:: InboxFormat
+
+ The format in which the SMS will be stored: ``detail``, ``unicode``, ``standard``.
+
+ ``detail``
+ format used for message backup by gammu(1)
+ ``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``.
+
+.. config:option:: OutboxFormat
+
+ The format in which messages created by gammu-smsd-inject(1) will be stored,
+ it accepts same values as InboxFormat.
+
+ Default is ``detail`` if Gammu is compiled in with backup functions, ``unicode``
+ otherwise.
+
+.. config:option:: TransmitFormat
+
+ The format for transmitting the SMS: ``auto``, ``unicode``, ``7bit``.
+
+ Default is ``auto``.
+
+.. _message_filtering:
+
+Message filtering
+-----------------
+
+SMSD allows to process only limited subset of incoming messages. You can define
+filters for sender number in :config:section:`[include_numbers]` and
+:config:section:`[exclude_numbers]` sections or using
+:config:option:`IncludeNumbersFile` and :config:option:`ExcludeNumbersFile`
+directives.
+
+If :config:section:`[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 :config:section:`[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 - :config:section:`[include_smsc]` and
+:config:section:`[exclude_smsc]` sections or :config:option:`IncludeSMSCFile`
+and :config:option:`ExcludeSMSCFile` directives.
+
+Examples
+--------
+
+There is more complete example available in Gammu documentation. Please note
+that for simplicity following examples do not include :config:section:`[gammu]`
+section, you can look into gammurc(5) for some examples how it can look like.
+
+SMSD configuration file for FILES backend could look like:
+
+.. code-block:: ini
+
+ [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/
+
+If you want to use MYSQL backend, you will need something like this:
+
+.. code-block:: ini
+
+ [smsd]
+ Service = mysql
+ PIN = 1234
+ LogFile = syslog
+ User = smsd
+ Password = smsd
+ PC = localhost
+ Database = smsd
+
+Process only messages from 123456 number:
+
+.. code-block:: ini
+
+ [include_numbers]
+ number1 = 123456
+
+Do not process messages from evil number 666:
+
+.. code-block:: ini
+
+ [exclude_numbers]
+ number1 = 666
+
+Enabling debugging:
+
+.. code-block:: ini
+
+ [smsd]
+ debuglevel = 255
+ logfile = smsd.log
diff --git a/docs/manual/smsd/dbi.rst b/docs/manual/smsd/dbi.rst
new file mode 100644
index 0000000..f8b8a92
--- /dev/null
+++ b/docs/manual/smsd/dbi.rst
@@ -0,0 +1,10 @@
+.. _smsd_dbi:
+
+DBI Backend
+===========
+
+DBI backend stores all data in any database supported by libdbi, which
+parameters are defined by configuration (see :ref:`gammu-smsdrc` for description of
+configuration options).
+
+For tables description see :ref:`smsd_tables`.
diff --git a/docs/manual/smsd/files.rst b/docs/manual/smsd/files.rst
new file mode 100644
index 0000000..cbf8646
--- /dev/null
+++ b/docs/manual/smsd/files.rst
@@ -0,0 +1,72 @@
+.. _smsd_files:
+
+Files backend
+=============
+
+FILES backend stores all data on a filesystem in folders defined by
+configuration (see :ref:`gammu-smsdrc` 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>_<serialno>_<phone_number>_<sequence>.<ext>``,
+for example ``NN20021130_021531_00_+45409000931640979_00.txt``.
+
+Explanation of fields:
+
+``<date>``
+ date in format ``YYYYMMDD``
+``<time>``
+ time in format ``HHMMSS``
+``<serialno>``
+ 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 :ref:`smsbackup`
+
+The content of the file is content of the message and the format is defined by
+configuration directive InboxFormat (see gammu-smsdrc(5)).
+
+Transmitting of messages
+++++++++++++++++++++++++
+
+Transmitted messages are read from a folder defined by configuration. The
+filename should be one of the following formats:
+
+- ``OUT<phone_number>.<ext><options>``
+- ``OUT<priority>_<phone_number>_<serialno>.<ext><options>``
+- ``OUT<priority><date>_<time>_<serialno>_<phone_number>_<anything>.<ext><options>``
+
+Explanation of fields:
+
+``<priority>``
+ an alphabetic character (A-Z) A = highest priority
+``<ext>``
+ ``txt`` for normal text SMS, ``smsbackup`` for :ref:`smsbackup`
+``<options>``
+ Options appended to the extension applying to text SMS:
+
+ ``d``
+ delivery report requested
+ ``f``
+ flash SMS
+ ``b``
+ WAP bookmark as name,URL
+
+For example OUTG20040620_193810_123_+4512345678_xpq.txtdf is a flash text SMS
+requesting delivery reports.
+
+Other fields are same as for received messages.
+
+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.
diff --git a/docs/manual/smsd/index.rst b/docs/manual/smsd/index.rst
new file mode 100644
index 0000000..59a2fce
--- /dev/null
+++ b/docs/manual/smsd/index.rst
@@ -0,0 +1,13 @@
+SMS Daemon
+==========
+
+.. toctree::
+ :maxdepth: 2
+
+ overview
+ usage
+ manual
+ config
+ run
+ backends
+ code
diff --git a/docs/manual/smsd/inject.rst b/docs/manual/smsd/inject.rst
new file mode 100644
index 0000000..b93324d
--- /dev/null
+++ b/docs/manual/smsd/inject.rst
@@ -0,0 +1,90 @@
+.. _gammu-smsd-inject:
+
+gammu-smsd-inject
+=================
+
+.. program:: gammu-smsd-inject
+
+Synopsis
+--------
+
+gammu-smsd-inject [`OPTION`]... MESSAGETYPE RECIPIENT [`MESSAGE_PARAMETER`]...
+
+Description
+-----------
+
+This manual page documents briefly the :program:`gammu-smsd-inject` command.
+
+:program:`gammu-smsd-inject` 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):
+
+.. option:: -h, --help
+
+ Shows help.
+
+.. option:: -v, --version
+
+ Shows version information and compiled in features.
+
+.. option:: -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.
+
+For description of message types and their parameters, please check
+:manpage:`gammu(1)`. The options are identical to ones you can use for gammu
+sendsms.
+
+Examples
+--------
+
+To check it out, you need to have configuration file for SMSD, see
+:ref:`gammu-smsdrc` for more details about it.
+
+Inject text message up to standard 160 chars:
+
+.. code-block:: sh
+
+ echo "All your base are belong to us" | gammu-smsd-inject TEXT 123456
+
+or
+
+.. code-block:: sh
+
+ gammu-smsd-inject TEXT 123456 -text "All your base are belong to us"
+
+Inject long text message:
+
+.. code-block:: sh
+
+ echo "All your base are belong to us" | gammu-smsd-inject TEXT 123456 -len 400
+
+or
+
+.. code-block:: sh
+
+ gammu-smsd-inject TEXT 123456 -len 400 -text "All your base are belong to us"
+
+or
+
+.. code-block:: sh
+
+ 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:
+
+.. code-block:: sh
+
+ gammu-smsd-inject EMS 123456 -text "Greetings" -defsound 1 -text "from Gammu" -tone10 axelf.txt -animation 2 file1.bmp file2.bmp
+
+Inject protected message with ringtone:
+
+.. code-block:: sh
+
+ gammu-smsd-inject EMS 123456 -protected 2 -variablebitmaplong ala.bmp -toneSElong axelf.txt -toneSE ring.txt
diff --git a/docs/manual/smsd/manual.rst b/docs/manual/smsd/manual.rst
new file mode 100644
index 0000000..a413fff
--- /dev/null
+++ b/docs/manual/smsd/manual.rst
@@ -0,0 +1,9 @@
+Program Manuals
+===============
+
+.. toctree::
+ :maxdepth: 2
+
+ smsd
+ inject
+ monitor
diff --git a/docs/manual/smsd/monitor.rst b/docs/manual/smsd/monitor.rst
new file mode 100644
index 0000000..0c5308c
--- /dev/null
+++ b/docs/manual/smsd/monitor.rst
@@ -0,0 +1,52 @@
+.. _gammu-smsd-monitor:
+
+gammu-smsd-monitor
+==================
+
+.. program:: gammu-smsd-monitor
+
+Synopsis
+--------
+
+gammu-smsd-monitor [`OPTION`]...
+
+Description
+-----------
+
+This manual page documents briefly the :program:`gammu-smsd-monitor` command.
+
+:program:`gammu-smsd-monitor` is a program that monitors state of Gammu SMS
+Daemon. It periodically displays information about phone and number of
+processed messages.
+
+Program accepts following options (please note that long options might be not
+accepted on some platforms):
+
+.. option:: -h, --help
+
+ Shows help.
+
+.. option:: -v, --version
+
+ Shows version information and compiled in features.
+
+.. option:: -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.
+
+.. option:: -l, --loops=count
+
+ Number of loops, by default monitor loops infinitely.
+
+.. option:: -d, --delay=seconds
+
+ Delay betwen polling SMSD state, default is 20 seconds.
+
+.. option:: -C, --csv
+
+ Print output in comma separated values format:
+
+ .. code-block:: text
+
+ client;phone ID;IMEI;sent;received;failed;battery;signal
diff --git a/docs/manual/smsd/mysql.rst b/docs/manual/smsd/mysql.rst
new file mode 100644
index 0000000..bd4b598
--- /dev/null
+++ b/docs/manual/smsd/mysql.rst
@@ -0,0 +1,10 @@
+.. _smsd_mysql:
+
+MySQL Backend
+=============
+
+MYSQL backend stores all data in a MySQL database server, which parameters are
+defined by configuration (see :ref:`gammu-smsdrc` for description of configuration
+options).
+
+For tables description see :ref:`smsd_tables`.
diff --git a/docs/manual/smsd/null.rst b/docs/manual/smsd/null.rst
new file mode 100644
index 0000000..60c4167
--- /dev/null
+++ b/docs/manual/smsd/null.rst
@@ -0,0 +1,8 @@
+.. _smsd_null:
+
+Null Backend
+============
+
+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
+:config:option:`RunOnReceive` handler.
diff --git a/docs/manual/smsd/overview.rst b/docs/manual/smsd/overview.rst
new file mode 100644
index 0000000..df3121a
--- /dev/null
+++ b/docs/manual/smsd/overview.rst
@@ -0,0 +1,51 @@
+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.
+
+Overall schema
+--------------
+
+The interactions of SMS Daemon and related components can be seen on following
+picture.
+
+.. graphviz::
+
+ digraph smsdinteractions {
+ "gammu-smsd-inject" [shape=box];
+ "gammu-smsd" [shape=box];
+ "Run on receive" [shape=box, style=dotted];
+ "GSM modem" [shape=box, style=dashed];
+ "gammu-smsd-monitor" [shape=box];
+ "Service\nstorage" [shape=doublecircle];
+ "Kalkun" [shape=box, style=dotted];
+ "gammu-smsd" -> "GSM modem" [label="Outgoing"];
+ "GSM modem" -> "gammu-smsd" [label="Incoming"];
+ "gammu-smsd" -> "Service\nstorage" [label="Save"];
+ "Service\nstorage" -> "gammu-smsd" [label="Read"];
+ "gammu-smsd" -> "Run on receive" [label="Execute"];
+ "Service\nstorage" -> "Run on receive" [label="Read"];
+ "Kalkun" -> "Service\nstorage" [label="Inject"];
+ "Service\nstorage" -> "Kalkun" [label="Read"];
+ "gammu-smsd-inject" -> "Service\nstorage" [label="Inject"];
+ "gammu-smsd" -> "gammu-smsd-monitor" [label="Monitor"];
+ }
+
+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.
+ 1. Try to connect to phone if not connected.
+ 2. Check for security code if configured (configured by ``CheckSecurity``).
+ 3. Check for received messages (frequency configured by ``ReceiveFrequency``).
+ 4. Check for reset of the phone if configured (frequency configured by ``ResetFrequency``).
+ 5. Check for messages to send (frequency configured by ``CommTimeout``).
+ 6. Check phone status (frequency configured by ``StatusFrequency``).
+ 7. Sleep for defined time (``LoopSleep``).
+4. Backend service is freed.
diff --git a/docs/manual/smsd/pgsql.rst b/docs/manual/smsd/pgsql.rst
new file mode 100644
index 0000000..a28b862
--- /dev/null
+++ b/docs/manual/smsd/pgsql.rst
@@ -0,0 +1,10 @@
+.. _smsd_pgsql:
+
+PostgreSQL Backend
+==================
+
+PGSQL backend stores all data in a PostgreSQL database server, which
+parameters are defined by configuration (see :ref:`gammu-smsdrc` for description of
+configuration options).
+
+For tables description see :ref:`smsd_tables`.
diff --git a/docs/manual/smsd/run.rst b/docs/manual/smsd/run.rst
new file mode 100644
index 0000000..64250d8
--- /dev/null
+++ b/docs/manual/smsd/run.rst
@@ -0,0 +1,107 @@
+.. _smsd_run:
+
+RunOnReceive Directive
+======================
+
+Description
+-----------
+
+Gammu SMSD can be configured by RunOnReceive directive (see :ref:`gammu-smsdrc`
+for details) to run defined 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 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.
+
+Environment
+-----------
+
+program is executed with environment which contains lot of information about
+the message. You can use it together with NULL service (see :ref:`smsd_null`)
+to implement completely own processing of messages.
+
+Global variables
+++++++++++++++++
+
+.. envvar:: SMS_MESSAGES
+
+ Number of physical messages received.
+
+.. envvar:: DECODED_PARTS
+
+ Number of decoded message parts.
+
+Per message variables
++++++++++++++++++++++
+
+The variables further described as ``SMS_1_...`` are generated for each physical
+message, where 1 is replaced by current number of message.
+
+.. envvar:: SMS_1_CLASS
+
+ Class of message.
+
+.. envvar:: SMS_1_NUMBER
+
+ Sender number.
+
+.. envvar:: 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.
+
+.. envvar:: DECODED_1_TEXT
+
+ Decoded long message text.
+
+.. envvar:: DECODED_1_MMS_SENDER
+
+ Sender of MMS indication message.
+
+.. envvar:: DECODED_1_MMS_TITLE
+
+ title of MMS indication message.
+
+.. envvar:: DECODED_1_MMS_ADDRESS
+
+ Address (URL) of MMS from MMS indication message.
+
+.. envvar:: DECODED_1_MMS_SIZE
+
+ Size of MMS as specified in MMS indication message.
+
+
+Examples
+--------
+
+Passing MMS indication parameters to external program
++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+Following script (if used as RunOnReceive 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.
+
+.. code-block: sh
+
+ #!/bin/sh
+ if [ $DECODED_PARTS \-eq 0 ] ; then
+ # No decoded parts, nothing to process
+ exit
+ fi
+ if [ "$DECODED_1_MMS_ADDRESS" ] ; then
+ echo "$DECODED_1_MMS_ADDRESS" "$DECODED_1_MMS_SENDER" "$DECODED_1_MMS_TITLE" >> /tmp/smsd-mms.log
+ fi
diff --git a/docs/develop/smsd/smsd-interactions.dia b/docs/manual/smsd/smsd-interactions.dia
index 87f2ef8..87f2ef8 100644
--- a/docs/develop/smsd/smsd-interactions.dia
+++ b/docs/manual/smsd/smsd-interactions.dia
diff --git a/docs/develop/smsd/smsd-interactions.png b/docs/manual/smsd/smsd-interactions.png
index 250af4a..250af4a 100644
--- a/docs/develop/smsd/smsd-interactions.png
+++ b/docs/manual/smsd/smsd-interactions.png
Binary files differ
diff --git a/docs/manual/smsd/smsd.rst b/docs/manual/smsd/smsd.rst
new file mode 100644
index 0000000..e5aadc8
--- /dev/null
+++ b/docs/manual/smsd/smsd.rst
@@ -0,0 +1,178 @@
+.. _gammu-smsd:
+
+gammu-smsd
+==========
+
+.. program:: gammu-smsd
+
+Synopsis
+--------
+
+gammu-smsd [`OPTION`]...
+
+
+Description
+-----------
+
+This manual page documents briefly the :program:`gammu-smsd` command.
+
+:program:`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):
+
+.. option:: -h, --help
+
+ Shows help.
+
+.. option:: -v, --version
+
+ Shows version information and compiled in features.
+
+.. option:: -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.
+
+ 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 :ref:`gammu-smsdrc` for configuration file documentation.
+
+.. option:: -p, --pid=file
+
+ Lock file for storing pid, empty for no locking. Not supported on Windows.
+
+.. option:: -U, --user=user
+
+ Drop daemon privileges to chosed user after starting.
+
+.. option:: -G, --group=group
+
+ Drop daemon privileges to chosen group after starting.
+
+.. option:: -d, --daemon
+
+ Daemonize program on startup. Not supported on Windows.
+
+.. option:: -i, --install-service
+
+ Installs SMSD as a Windows service.
+
+.. option:: -u, --uninstall-service
+
+ Uninstalls SMSD as a Windows service.
+
+.. option:: -s, --start-service
+
+ Starts SMSD Windows service.
+
+.. option:: -k, --stop-service
+
+ Stops SMSD Windows service.
+
+.. option:: -f, --max-failures=count
+
+ Terminate after defined number of failures. Use 0 to not terminate (this is default).
+
+.. option:: -X, --suicide=seconds
+
+ Kills itself after number of seconds.
+
+.. option:: -S, --run-service
+
+ Runs pogram as SMSD Windows service. This should not be used manually, but
+ only Windows Service manager should use this command.
+
+.. option:: -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".
+
+Examples
+--------
+
+Linux/Unix Examples
++++++++++++++++++++
+
+Start SMSD as a daemon on Linux:
+
+.. code-block:: sh
+
+ gammu-smsd --config /etc/gammu-smsdrc --pid /var/run/gammu-smsd.pid --daemon
+
+Start SMSD as a daemon on Linux with reduced privileges:
+
+.. code-block:: sh
+
+ gammu-smsd --config /etc/gammu-smsdrc --pid /var/run/gammu-smsd.pid --daemon --user gammu --group gammu
+
+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 instructions.
+
+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:
+
+.. code-block:: sh
+
+ gammu-smsd.exe -c c:\Gammu\smsdrc -i
+
+Install two instances of SMSD Windows service:
+
+.. code-block:: sh
+
+ gammu-smsd.exe -c c:\Gammu\smsdrc-1 -n Gammu-first-phone -i
+
+ gammu-smsd.exe -c c:\Gammu\smsdrc-2 -n Gammu-second-phone -i
+
+To uninstall a Windows service:
+
+.. code-block:: sh
+
+ 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:
+
+.. code-block:: sh
+
+ 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 :config:section:`[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 include it in the message on reply.
diff --git a/docs/manual/smsd/tables.rst b/docs/manual/smsd/tables.rst
new file mode 100644
index 0000000..e81740a
--- /dev/null
+++ b/docs/manual/smsd/tables.rst
@@ -0,0 +1,417 @@
+.. _smsd_tables:
+
+SMSD Database Structure
+=======================
+
+The backends themselves are described in their sections, this document
+describes general database structure and required tables.
+
+More SMS daemons can share single database. If you do not specify PhoneID 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 (:ref:`gammu-smsd-inject` does this), each SMS
+daemon will have separate outbox queue.
+
+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 ``outbox_multipart``.
+
+Description of tables
+---------------------
+
+daemons
++++++++
+
+Information about running daemons.
+
+gammu
++++++
+
+Table holding single value - version of a database schema. See HISTORY 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)
+
+``SenderNumber`` (varchar(20))
+ decoded SMS sender number
+
+``Coding`` (enum('Default_No_Compression', 'Unicode_No_Compression', '8bit', 'Default_Compression', 'Unicode_Compression'))
+ SMS text coding
+
+``UDH`` (text)
+ 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
+
+``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', 'Unicode_Compression'))
+ 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
+
+``SenderID`` (text)
+ which SMSD instance should send this one sequence
+
+``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)
+ sender identification, it has to match PhoneID in SMSD configuration to make
+ SMSD process this 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_No_Compression', '8bit', 'Default_Compression', 'Unicode_Compression'))
+ 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)
+ currently always true
+
+``Receive`` (boolean)
+ currently always true
+
+``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 counter, so it might
+ overflow).
+
+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', 'DeliveryUnknown', 'Error'))
+ 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.15 (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_Compression'))
+ 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
+
+``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, matches PhoneID
+
+
+pbk
++++
+
+Not used by SMSD currently, included only for application usage.
+
+pbk_groups
+++++++++++
+
+Not used by SMSD currently, included only for application usage.
+
+History
+-------
+
+History of schema versions:
+
+11
+ all fields for storing message text are no longer limited to 160 chars,
+ but are arbitrary length text fields (1.25.92)
+10
+ ``DeliveryDateTime`` is now NULL when message is not delivered, added several
+ indexes
+9
+ added sent/received counters to phones table
+8
+ introduced phones table
+
+7
+ added CreatorID to tables (it holds PhoneID if set)
+
+
+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 tables, issue following command:
+
+.. code-block:: sh
+
+ sqlite3 smsd.db < docs/sql/sqlite.sql
+
+Injecting a message using SQL
++++++++++++++++++++++++++++++
+
+To send a message, you can either use :ref:`gammu-smsd-inject`, which does all the
+magic for you, or you can insert the message manually. The simplest example is
+short text message:
+
+.. code-block:: sql
+
+ INSERT INTO outbox (
+ DestinationNumber,
+ TextDecoded,
+ CreatorID,
+ Coding
+ ) VALUES (
+ '800123465',
+ 'This is a SQL test message',
+ 'Program',
+ 'Default_No_Compression'
+ );
+
+Injecting long message using SQL
+++++++++++++++++++++++++++++++++
+
+Inserting multipart messages is a bit more tricky, you need to construct also
+UDH header and store it hexadecimally written into UDH field.
+
+For long text message, the UDH starts with 050003 followed by byte as a message
+reference (you can put anything there, but it should be different for each
+message, D3 in following example), byte for number of messages (02 in 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.).
+
+For example long text message of two parts could look like following:
+
+.. code-block:: sql
+
+ INSERT INTO outbox (
+ CreatorID,
+ MultiPart,
+ DestinationNumber,
+ UDH,
+ TextDecoded,
+ Coding
+ ) VALUES (
+ 'Gammu 1.23.91',
+ 'true',
+ '123465',
+ '050003D30201',
+ 'Mqukqirip ya konej eqniu rejropocejor hugiygydewl tfej nrupxujob xuemymiyliralj. Te tvyjuh qaxumur ibewfoiws zuucoz tdygu gelum L ejqigqesykl kya jdytbez',
+ 'Default_No_Compression'
+ )
+
+ INSERT INTO outbox_multipart (
+ SequencePosition,
+ UDH,
+ Class,
+ TextDecoded,
+ ID,
+ Coding
+ ) VALUES (
+ 2,
+ '050003D30202',
+ 'u xewz qisubevumxyzk ufuylehyzc. Nse xobq dfolizygqysj t bvowsyhyhyemim ovutpapeaempye giuuwbib.',
+ <ID_OF_INSERTED_RECORD_IN_OUBOX_TABLE>,
+ 'Default_No_Compression'
+ )
diff --git a/docs/manual/smsd/usage.rst b/docs/manual/smsd/usage.rst
new file mode 100644
index 0000000..feb8fbf
--- /dev/null
+++ b/docs/manual/smsd/usage.rst
@@ -0,0 +1,54 @@
+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.
+
+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.
+
+Creating Messages to Send
+-------------------------
+
+Creating of messages to send heavily depends on service backend you use. Most
+of them support :ref:`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 :c:func:`SMSD_InjectSMS` (from C) or using
+:meth:`gammu.smsd.SMSD.GetStatus` (from Python).
+
+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 :ref:`smsd_run`.
+
+Monitoring SMSD Status
+----------------------
+
+You can use :ref:`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
+:c:func:`SMSD_GetStatus` or python-gammu using
+:meth:`gammu.smsd.SMSD.GetStatus`.
+
+Reporting Bugs
+--------------
+
+Please report bugs to <http://bugs.cihar.com>.
+
+Before reporting a bug, please enable verbose logging in SMSD configuration:
+
+
+.. code-block:: ini
+
+ [smsd]
+ debuglevel = 255
+ logfile = smsd.log
+
+and include this verbose log within bug report.
diff --git a/docs/develop/testing/dummy-driver.rst b/docs/manual/testing/dummy-driver.rst
index ed462b8..ed462b8 100644
--- a/docs/develop/testing/dummy-driver.rst
+++ b/docs/manual/testing/dummy-driver.rst
diff --git a/docs/develop/testing/index.rst b/docs/manual/testing/index.rst
index 1dd62c3..1dd62c3 100644
--- a/docs/develop/testing/index.rst
+++ b/docs/manual/testing/index.rst
diff --git a/docs/develop/testing/testsuite.rst b/docs/manual/testing/testsuite.rst
index 18fcf75..18fcf75 100644
--- a/docs/develop/testing/testsuite.rst
+++ b/docs/manual/testing/testsuite.rst
diff --git a/docs/user/cs/gammu.1 b/docs/user/cs/gammu.1
index 72cfb47..f72be2e 100644
--- a/docs/user/cs/gammu.1
+++ b/docs/user/cs/gammu.1
@@ -3,7 +3,7 @@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
-.TH GAMMU 1 "Jul 27 2010" "Gammu 1.28.90" "Dokumentace Gammu"
+.TH GAMMU 1 "27. červenec, 2010" "Gammu 1.28.90" "Dokumentace Gammu"
.SH JMÉNO
diff --git a/docs/user/gammurc.5 b/docs/user/gammurc.5
index d4de987..2fe3c71 100644
--- a/docs/user/gammurc.5
+++ b/docs/user/gammurc.5
@@ -104,6 +104,7 @@ vendor/product IDs or device address on USB:
Device = 0x1234:-1 # Match device by vendor id
Device = 1.10 # Match device by usb bus and device address
Device = 10 # Match device by usb device address
+ Device = serial:123456 # Match device by serial string
For Bluetooth connection you have to enter Bluetooth address of your phone
(you can list Bluetooth devices in range on Linux using "hcitool scan"