| 1 |
OVERVIEW |
| 2 |
|
| 3 |
The GSM library is written in C++ and uses the latest C++ |
| 4 |
features: namespaces, exceptions, the standard template library. |
| 5 |
|
| 6 |
The actual library source code is in the gsmlib subdirectory of |
| 7 |
this distribution. The following modules are available: |
| 8 |
|
| 9 |
gsm_alloca.h OS-specific alloca defines |
| 10 |
gsm_at.h Utility classes for AT command sequence handling |
| 11 |
gsm_error.h Error codes and error handling functions |
| 12 |
gsm_event.h Event handler interface |
| 13 |
gsm_me_ta.h Mobile Equipment/Terminal Adapter and SMS functions |
| 14 |
(ETSI GSM 07.07 and 07.05) |
| 15 |
gsm_parser.h Parser to parse MA/TA result strings |
| 16 |
gsm_phonebook.h Phonebook management functions |
| 17 |
gsm_port.h Abstract port definition |
| 18 |
gsm_sms.h SMS functions (ETSI GSM 07.05) |
| 19 |
gsm_sms_codec.h Coder and Encoder for SMS TPDUs |
| 20 |
gsm_sms_store.h SMS functions, SMS store (ETSI GSM 07.05) |
| 21 |
gsm_sorted_phonebook.h Alphabetically sorted phonebook |
| 22 |
(residing in files or in the ME) |
| 23 |
gsm_sorted_sms_store.h Sorted SMS store |
| 24 |
(sorted by address, time or type) |
| 25 |
(residing in files or in the ME) |
| 26 |
gsm_unix_serial.h UNIX serial port implementation |
| 27 |
gsm_util.h Various utilities |
| 28 |
|
| 29 |
|
| 30 |
REQUIREMENTS |
| 31 |
|
| 32 |
I have used egcs-1.1.2 and libstdc++.so.2.8.0 for compiling the |
| 33 |
library and all programs. Older probably don't work because of |
| 34 |
missing features. |
| 35 |
|
| 36 |
|
| 37 |
AVAILABLE DOCUMENTATION |
| 38 |
|
| 39 |
If you want to do your own programming using the GSM library please |
| 40 |
refer to the extensively documented header files or to the example |
| 41 |
programs in the test or apps subdirectory. |
| 42 |
|
| 43 |
I have used the following documentation to develop this software: |
| 44 |
|
| 45 |
gts_gsm_02.30_v5.2.0.pdf |
| 46 |
gts_gsm_03.40_v5.3.0.pdf |
| 47 |
gts_gsm_04.11_v5.1.0.pdf |
| 48 |
gts_gsm_02.82_v5.0.0.pdf |
| 49 |
gts_gsm_03.41_v5.2.0.pdf |
| 50 |
gts_gsm_07.05_v5.3.0.pdf |
| 51 |
gts_gsm_03.38_v5.3.0.pdf |
| 52 |
gts_gsm_04.08_v5.1.0.pdf |
| 53 |
gts_gsm_07.07_v5.0.0.pdf |
| 54 |
|
| 55 |
Due to copyright reasons I cannot include this documentation in |
| 56 |
this distribution. You can download it from the ETSI website |
| 57 |
(www.etsi.org) for free, though. |
| 58 |
|
| 59 |
|
| 60 |
COMPILATION |
| 61 |
|
| 62 |
The code is automatically compiled without debugging code enabled |
| 63 |
(mostly assert()'s). |
| 64 |
|
| 65 |
If there are any problems you can generate a debug version |
| 66 |
by issuing |
| 67 |
|
| 68 |
CXXFLAGS="-g" ./configure --disable-shared |
| 69 |
|
| 70 |
To switch on asserts and additional debugging output change the line |
| 71 |
|
| 72 |
CXXFLAGS="-DNEBUG $CXXFLAGS" |
| 73 |
|
| 74 |
in configure.in do |
| 75 |
|
| 76 |
dnl CXXFLAGS="-DNEBUG $CXXFLAGS" |
| 77 |
|
| 78 |
Then regenerate configure by executing autoconf. |
| 79 |
|
| 80 |
You must use at least gcc-2.95.2 to compile gsmlib successfully. |
| 81 |
|
| 82 |
|
| 83 |
TESTS |
| 84 |
|
| 85 |
The tests directory contains a number of software tests. Two kinds |
| 86 |
of test programs are provided: Those, that run without a mobile |
| 87 |
phone and those that require a mobile phone to be connected to a |
| 88 |
serial port. |
| 89 |
|
| 90 |
No access to mobile phone needed: |
| 91 |
runparser.sh Test the parser for AT responses |
| 92 |
runsms.sh Test SMS message encoding and decoding routines |
| 93 |
runspb.sh Test sorted phonebook module |
| 94 |
runssms.sh Test sorted SMS store module |
| 95 |
|
| 96 |
Give mobile phone device as argument: |
| 97 |
testsms2 Manipulate SMS store in the mobile phone (read/write) |
| 98 |
testgsmlib Test the gsm_me_ta module (readonly) |
| 99 |
testpb Dump all phonebooks in the mobile phone to the stdout |
| 100 |
(readonly) |
| 101 |
testpb2 Manipulate phonebook in the mobile phone (read/write) |
| 102 |
|
| 103 |
The tests that do not require a mobile phone can be executed by |
| 104 |
issuing "make check" in the tests subdirectory. The others must be |
| 105 |
invoked manually. WARNING: These tests alter the contents of the |
| 106 |
mobile phone's phonebook or SMS message memory!!! Make sure, that |
| 107 |
you understand what the test does and be prepared for loss of data in |
| 108 |
the mobile phone. |
| 109 |
|
| 110 |
HINTS |
| 111 |
|
| 112 |
- By default gsmlib is compiled with NDEBUG set. There are lots |
| 113 |
of assert()s all over the library that may help to find problems |
| 114 |
in programs that use the library. Disable NDEBUG to get best |
| 115 |
debugging support. |
| 116 |
|
| 117 |
CUSTOM BACKENDS |
| 118 |
|
| 119 |
gsmlib now allows custom backends to be defined for sorted phonebooks |
| 120 |
and sorted SMS stores. This can be used to store phonebook entries in |
| 121 |
relational databases or LDAP servers. The interfaces are defined in |
| 122 |
gsm_sorted_phonebook_base.h and gsm_sorted_sms_store_base.h, |
| 123 |
respectively. |
| 124 |
|
| 125 |
To register a custom backend (eg. for sorted phonebooks) follow |
| 126 |
these steps: |
| 127 |
|
| 128 |
1. Define a subclass of CustomPhonebookFactory. |
| 129 |
|
| 130 |
2. Define a static initializer class in your module that uses the |
| 131 |
interface CustomPhonebookRegistry::registerCustomPhonebookFactory() |
| 132 |
to make your custom backend available. |
| 133 |
|
| 134 |
3. Link your module to any application that should use your custom |
| 135 |
backend. The gsmpb and gsmsmsstore programs are prepared to use the |
| 136 |
CustomPhonebookRegistry class to obtain your custom backend |
| 137 |
objects. |
| 138 |
|