summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--ChangeLog9
-rw-r--r--cmake/FindBashCompletion.cmake8
-rw-r--r--cmake/templates/gammu.spec.in339
-rw-r--r--contrib/CMakeLists.txt4
-rw-r--r--description-pak2
-rw-r--r--docs/man/gammu-backup.52
-rw-r--r--docs/man/gammu-config.12
-rw-r--r--docs/man/gammu-detect.12
-rw-r--r--docs/man/gammu-smsbackup.52
-rw-r--r--docs/man/gammu-smsd-dbi.72
-rw-r--r--docs/man/gammu-smsd-files.74
-rw-r--r--docs/man/gammu-smsd-inject.114
-rw-r--r--docs/man/gammu-smsd-monitor.12
-rw-r--r--docs/man/gammu-smsd-mysql.76
-rw-r--r--docs/man/gammu-smsd-null.72
-rw-r--r--docs/man/gammu-smsd-odbc.72
-rw-r--r--docs/man/gammu-smsd-pgsql.72
-rw-r--r--docs/man/gammu-smsd-run.72
-rw-r--r--docs/man/gammu-smsd-sql.72
-rw-r--r--docs/man/gammu-smsd-tables.72
-rw-r--r--docs/man/gammu-smsd.12
-rw-r--r--docs/man/gammu-smsdrc.593
-rw-r--r--docs/man/gammu.14
-rw-r--r--docs/man/gammurc.54
-rw-r--r--docs/man/jadmaker.12
-rw-r--r--docs/manual/config/index.rst2
-rw-r--r--docs/manual/contents.rst1
-rw-r--r--docs/manual/gammu/index.rst2
-rw-r--r--docs/manual/index.rst1
-rw-r--r--docs/manual/python/examples.rst2
-rw-r--r--docs/manual/python/index.rst4
-rw-r--r--docs/manual/quick/index.rst200
-rw-r--r--docs/manual/smsd/config.rst77
-rw-r--r--docs/manual/smsd/files.rst2
-rw-r--r--docs/manual/smsd/inject.rst8
-rw-r--r--docs/manual/smsd/mysql.rst6
-rw-r--r--gammu.spec339
-rw-r--r--helper/win32-dirent.c33
-rw-r--r--helper/win32-dirent.h6
-rw-r--r--libgammu/debug.c16
-rw-r--r--libgammu/device/serial/ser_unx.c4
-rw-r--r--libgammu/gsmstate.c61
-rw-r--r--libgammu/gsmstate.h8
-rw-r--r--libgammu/misc/misc.c8
-rw-r--r--libgammu/phone/at/at-sms.c2
-rw-r--r--libgammu/phone/at/atgen.c12
-rw-r--r--libgammu/protocol/alcatel/alcabus.c4
-rw-r--r--libgammu/protocol/at/at.c5
-rw-r--r--libgammu/protocol/nokia/fbus2.c8
-rw-r--r--libgammu/protocol/nokia/mbus2.c4
-rw-r--r--libgammu/protocol/nokia/phonet.c4
-rw-r--r--libgammu/protocol/obex/obex.c4
-rw-r--r--libgammu/protocol/s60/s60.c4
-rw-r--r--libgammu/protocol/symbian/gnapbus.c8
-rw-r--r--locale/es/gammu.po19
-rw-r--r--locale/es/libgammu.po14
57 files changed, 845 insertions, 540 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3bac08a..44d2481 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,7 +28,7 @@ if (LARGE_FILES)
endif (LARGE_FILES)
# Set version
-set (GAMMU_VERSION "1.36.5" CACHE INTERNAL "")
+set (GAMMU_VERSION "1.36.6" CACHE INTERNAL "")
string (REGEX REPLACE "^([0-9]*)\\.([0-9]*)\\.([0-9]*)$" "\\1" "GAMMU_VERSION_MAJOR" "${GAMMU_VERSION}")
string (REGEX REPLACE "^([0-9]*)\\.([0-9]*)\\.([0-9]*)$" "\\2" "GAMMU_VERSION_MINOR" "${GAMMU_VERSION}")
string (REGEX REPLACE "^([0-9]*)\\.([0-9]*)\\.([0-9]*)$" "\\3" "GAMMU_VERSION_PATCH" "${GAMMU_VERSION}")
diff --git a/ChangeLog b/ChangeLog
index 5fd463e..98eb823 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,15 @@ the issue.
ChangeLog
=========
+20151012 - 1.36.6
+
+[-] * Fixed installation of bash-completion script.
+[-] * Fixed timezone manipulation in SMSD.
+[-] * Documentation improvements.
+[-] * Fixed licensing of helper/win32-dirent.*.
+[*] * Increased default speed for AT connection to 115200.
+[*] * Improve AT module initialization.
+
20150826 - 1.36.5
[-] * Properly use timezones with SQLite in SMSD.
diff --git a/cmake/FindBashCompletion.cmake b/cmake/FindBashCompletion.cmake
new file mode 100644
index 0000000..5482ac3
--- /dev/null
+++ b/cmake/FindBashCompletion.cmake
@@ -0,0 +1,8 @@
+pkg_check_modules(BASH_COMPLETION "bash-completion")
+
+if (BASH_COMPLETION_FOUND)
+ execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE}
+ --variable=completionsdir bash-completion
+ OUTPUT_VARIABLE _BASH_COMPLETION_COMPLETIONSDIR)
+ string(STRIP ${_BASH_COMPLETION_COMPLETIONSDIR} BASH_COMPLETION_COMPLETIONSDIR)
+endif (BASH_COMPLETION_FOUND)
diff --git a/cmake/templates/gammu.spec.in b/cmake/templates/gammu.spec.in
index cb12957..14dc94d 100644
--- a/cmake/templates/gammu.spec.in
+++ b/cmake/templates/gammu.spec.in
@@ -1,12 +1,26 @@
-Name: gammu
-Version: @GAMMU_VERSION@
-Release: 1
-# Set to 0 to disable bluetooth support
-%if 0%{?opensuse_bs} && 0%{?sles_version} == 9
-%define bluetooth 0
+#
+# spec file for package gammu
+#
+
+
+%define so_ver @GAMMU_SOVERSION@
+
+# Change if using tar.gz sources
+%define extension bz2
+
+Name: gammu
+Version: @GAMMU_VERSION@
+Release: 0
+Summary: Mobile phone management utility
+License: GPL-2.0
+%if 0%{?suse_version}
+Group: Hardware/Mobile
%else
-%define bluetooth 1
+Group: Applications/Communications
%endif
+Url: http://wammu.eu/gammu/
+Source0: http://dl.cihar.com/gammu/releases/%{name}-%{version}.tar.%{extension}
+
# Set to 0 to disable PostgreSQL support
%define pqsql 1
# Set to 0 to disable MySQL support
@@ -17,74 +31,48 @@ Release: 1
%define odbc 1
# Set to 0 to disable USB support
%define usb 1
-# Change if using tar.gz sources
-%define extension bz2
-
-%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
-%define gammu_docdir %_docdir/%{name}-%{version}
+# Set to 0 to disable bluetooth support
+%if 0%{?opensuse_bs} && 0%{?sles_version} == 9
+%define bluetooth 0
%else
-%define gammu_docdir %_docdir/%{name}
+%define bluetooth 1
%endif
-
-Summary: Mobile phone management utility
-License: GPL-2.0
-%if 0%{?suse_version}
-Group: Hardware/Mobile
+# Docdir
+%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
+%define gammu_docdir %{_docdir}/%{name}-%{version}
%else
-Group: Applications/Communications
+%define gammu_docdir %{_docdir}/%{name}
%endif
-Vendor: Michal Čihař <michal@cihar.com>
-
-# Detect build requires, I really hate this crap
-
+# Detect build requires
# SUSE
%if 0%{?suse_version}
-
%define dist_usb_libs libusb-1_0-devel
-%define dist_dbi_libs libdbi-devel libdbi-drivers-dbd-sqlite3 sqlite
-
-# 11.1 changed name of devel package for Bluetooth
-%if 0%{?suse_version} >= 1110
+%define dist_dbi_libs libdbi-devel libdbi-drivers-dbd-sqlite3 sqlite3
%define dist_bluez_libs bluez-devel
-%else
-%define dist_bluez_libs bluez-libs >= 2.0
-%endif
-
%define dist_postgres_libs postgresql-devel
-
%else
-
# Mandriva
%if 0%{?mandriva_version}
-
-%define dist_usb_libs libusb-1.0-devel
-%define dist_dbi_libs libdbi-devel libdbi-drivers-dbd-sqlite3 sqlite3-tools
-
# 64-bit Mandriva has 64 in package name
%ifarch x86_64
%define mandriva_hack 64
%endif
-
-# Bluetooth things got renamed several times
-%if 0%{?mandriva_version} > 2007
-%define dist_bluez_libs lib%{?mandriva_hack}bluez-devel
-%else
-%if 0%{?mandriva_version} > 2006
-%define dist_bluez_libs lib%{?mandriva_hack}bluez2-devel
+%if 0%{?mandriva_version} > 200910
+%define dist_usb_libs lib%{?mandriva_hack}usb1.0-devel
%else
-%define dist_bluez_libs libbluez1-devel >= 2.0
+%define dist_usb_libs lib%{?mandriva_hack}usb-devel
%endif
+%if 0%{?mandriva_version} > 2010
+%define dist_dbi_libs lib%{?mandriva_hack}dbi-devel libdbi-drivers-dbd-sqlite3 sqlite3-tools
%endif
-
+%define dist_bluez_libs lib%{?mandriva_hack}bluez-devel
# postgresql-devel does not work for whatever reason in buildservice
%if 0%{?mandriva_version} == 2009
%define dist_postgres_libs postgresql8.3-devel
%else
%define dist_postgres_libs postgresql-devel
%endif
-
%else
-
# Fedora / Redhat / Centos
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
%if 0%{?opensuse_bs}
@@ -95,69 +83,59 @@ Vendor: Michal Čihař <michal@cihar.com>
%define dist_dbi_libs libdbi-devel libdbi-dbd-sqlite sqlite
%define dist_bluez_libs bluez-libs-devel >= 2.0
%define dist_postgres_libs postgresql-devel
-
%else
-
-#Defaults for not know distributions
+# Defaults for not known distributions
%define dist_usb_libs libusb1-devel
%define dist_dbi_libs libdbi-devel libdbi-dbd-sqlite sqlite
%define dist_bluez_libs bluez-libs-devel >= 2.0
%define dist_postgres_libs postgresql-devel
-
%endif
%endif
%endif
-
-%if %bluetooth
-BuildRequires: %{dist_bluez_libs}
+BuildRequires: cmake >= 2.8
+BuildRequires: gcc
+BuildRequires: gettext
+BuildRequires: pkgconfig
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+%if %{bluetooth}
+BuildRequires: %{dist_bluez_libs}
%endif
-
-%if %pqsql
-BuildRequires: %{dist_postgres_libs}
+%if %{pqsql}
+BuildRequires: %{dist_postgres_libs}
%endif
-
-%if %mysql
-BuildRequires: mysql-devel
+%if %{mysql}
+BuildRequires: mysql-devel
%endif
-
-%if %dbi
-BuildRequires: %{dist_dbi_libs}
+%if %{dbi}
+BuildRequires: %{dist_dbi_libs}
%endif
-
-%if %odbc
-BuildRequires: unixODBC-devel
+%if %{odbc}
+BuildRequires: unixODBC-devel
%endif
-
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
-BuildRequires: libgudev1-devel glib2-devel
+BuildRequires: glib2-devel
+BuildRequires: libgudev1-devel
%else
%if 0%{?mandriva_version}
-BuildRequires: libgudev1.0-devel glib2-devel
+BuildRequires: glib2-devel
+BuildRequires: libgudev1.0-devel
%else
-BuildRequires: libgudev-1_0-devel glib2-devel
+BuildRequires: glib2-devel
+BuildRequires: libgudev-1_0-devel
%endif
%endif
-
%if 0%{?suse_version} > 1310 || 0%{?fedora_version} >= 15 || 0%{?centos_version} >= 700 || 0%{?rhel_version} >= 700 || 0%{?scientificlinux_version} >= 600
-BuildRequires: systemd
+BuildRequires: systemd
%endif
-
%if 0%{?centos_version} || 0%{?rhel_version} || 0%{?rhel} || 0%{?suse_version} < 1100
-BuildRequires: curl-devel
+BuildRequires: curl-devel
%else
-BuildRequires: libcurl-devel
+BuildRequires: libcurl-devel
%endif
-
-%if %usb
-BuildRequires: %{dist_usb_libs}
+%if %{usb}
+BuildRequires: %{dist_usb_libs}
%endif
-BuildRequires: gettext cmake pkgconfig gcc
-
-Source: http://dl.cihar.com/gammu/releases/gammu-%{version}.tar.%{extension}
-URL: http://wammu.eu/gammu/
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
-
%description
Gammu is command line utility and library to work with mobile phones
from many vendors. Support for different models differs, but basic
@@ -177,13 +155,14 @@ Currently supported phones include:
This package contains Gammu binary as well as some examples.
%package devel
-Summary: Development files for Gammu
+Summary: Development files for Gammu
%if 0%{?suse_version}
-Group: Development/Libraries/C and C++
+Group: Development/Libraries/C and C++
%else
-Group: Development/Libraries
+Group: Development/Libraries
%endif
-Requires: %{name} = %{version}-%{release} pkgconfig
+Requires: libGammu%{so_ver} = %{version}
+Requires: libgsmsd%{so_ver} = %{version}
%description devel
Gammu is command line utility and library to work with mobile phones
@@ -204,9 +183,10 @@ Currently supported phones include:
This package contain files needed for development.
%package smsd
-Summary: SMS message daemon
+Summary: SMS message daemon
%if 0%{?suse_version}
-PreReq: %insserv_prereq %fillup_prereq
+# FIXME: use proper Requires(pre/post/preun/...)
+PreReq: %insserv_prereq %fillup_prereq
%endif
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
Requires(post): chkconfig
@@ -214,9 +194,9 @@ Requires(preun): chkconfig
Requires(preun): initscripts
%endif
%if 0%{?suse_version}
-Group: Hardware/Mobile
+Group: Hardware/Mobile
%else
-Group: Applications/Communications
+Group: Applications/Communications
%endif
%description smsd
@@ -235,14 +215,14 @@ Currently supported phones include:
* OBEX and IrMC capable phones (Sony-Ericsson, Motorola).
* Symbian phones through gnapplet.
-This package contains Gammu SMS Daemon and tool to inject messages
+This package contains the Gammu SMS Daemon and tool to inject messages
into the queue.
-%package -n libGammu@GAMMU_SOVERSION@
-Summary: Mobile phone management library
-Group: System/Libraries
+%package -n libGammu%{so_ver}
+Summary: Mobile phone management library
+Group: System/Libraries
-%description -n libGammu@GAMMU_SOVERSION@
+%description -n libGammu%{so_ver}
Gammu is command line utility and library to work with mobile phones
from many vendors. Support for different models differs, but basic
functions should work with majority of them. Program can work with
@@ -258,13 +238,13 @@ Currently supported phones include:
* OBEX and IrMC capable phones (Sony-Ericsson, Motorola).
* Symbian phones through gnapplet.
-This package contains Gammu shared library.
+This package contains the Gammu shared library.
-%package -n libgsmsd@GAMMU_SOVERSION@
-Summary: SMS daemon helper library
-Group: System/Libraries
+%package -n libgsmsd%{so_ver}
+Summary: SMS daemon helper library
+Group: System/Libraries
-%description -n libgsmsd@GAMMU_SOVERSION@
+%description -n libgsmsd%{so_ver}
Gammu is command line utility and library to work with mobile phones
from many vendors. Support for different models differs, but basic
functions should work with majority of them. Program can work with
@@ -280,49 +260,60 @@ Currently supported phones include:
* OBEX and IrMC capable phones (Sony-Ericsson, Motorola).
* Symbian phones through gnapplet.
-This package contains Gammu SMS daemon shared library.
+This package contains the Gammu SMS daemon shared library.
%prep
%setup -q
%build
-mkdir build-dir
-cd build-dir
+mkdir build
+cd build
+export CFLAGS="%{optflags}"
+export CXXFLAGS="%{optflags}"
cmake ../ \
-DBUILD_SHARED_LIBS=ON \
+ -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+ -DINSTALL_DOC_DIR=%{gammu_docdir} \
+ -DINSTALL_LIB_DIR=%{_lib} \
+ -DINSTALL_LIBDATA_DIR=%{_lib} \
-DINSTALL_LSB_INIT=ON \
- -DCMAKE_INSTALL_PREFIX=%_prefix \
- -DINSTALL_DOC_DIR=%gammu_docdir \
- -DINSTALL_LIB_DIR=%_lib \
- -DINSTALL_LIBDATA_DIR=%_lib
-make %{?_smp_mflags} %{!?_smp_mflags:%{?jobs:-j %jobs}}
+ -DINSTALL_UDEV_RULES=ON \
+ -DSYSTEMD_FOUND=ON \
+ -DWITH_SYSTEMD=ON \
+ -DSYSTEMD_SERVICES_INSTALL_DIR=%{_libexecdir}/systemd/system
+make %{?_smp_mflags} VERBOSE=1
%check
-cd build-dir
+cd build
ctest -V
+cd ..
%install
-%if 0%{?suse_version} == 0
-rm -rf %buildroot
-mkdir %buildroot
-%endif
-make -C build-dir install DESTDIR=%buildroot
+make -C build install DESTDIR=%{buildroot}
+
+# Install config file
+install -pm 0644 docs/config/smsdrc %{buildroot}%{_sysconfdir}/gammu-smsdrc
+
+# Move init script to correct location
+if [ /etc/init.d != %{_initddir} ] ; then
+ install -d -m 0755 %{buildroot}%{_initddir}
+ mv %{buildroot}/etc/init.d/gammu-smsd %{buildroot}%{_initddir}
+fi
+
%find_lang %{name}
%find_lang libgammu
-cat libgammu.lang >> %{name}.lang
-install -m644 docs/config/smsdrc %buildroot/etc/gammu-smsdrc
-%post -n libGammu@GAMMU_SOVERSION@ -p /sbin/ldconfig
+%post -n libGammu%{so_ver} -p /sbin/ldconfig
-%post -n libgsmsd@GAMMU_SOVERSION@ -p /sbin/ldconfig
+%postun -n libGammu%{so_ver} -p /sbin/ldconfig
-%postun -n libGammu@GAMMU_SOVERSION@ -p /sbin/ldconfig
+%post -n libgsmsd%{so_ver} -p /sbin/ldconfig
-%postun -n libgsmsd@GAMMU_SOVERSION@ -p /sbin/ldconfig
+%postun -n libgsmsd%{so_ver} -p /sbin/ldconfig
%post smsd
%if 0%{?mandriva_version}
-%_post_service gammu-smsd
+%{_post_service} gammu-smsd
%endif
%if 0%{?suse_version}
%fillup_and_insserv gammu-smsd
@@ -336,7 +327,7 @@ install -m644 docs/config/smsdrc %buildroot/etc/gammu-smsdrc
%stop_on_removal gammu-smsd
%endif
%if 0%{?mandriva_version}
-%_preun_service gammu-smsd
+%{_preun_service} gammu-smsd
%endif
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
if [ $1 = 0 ] ; then
@@ -353,53 +344,59 @@ fi
%endif
-%files -f %name.lang
-%defattr(-,root,root)
-%doc %gammu_docdir
-%config /etc/bash_completion.d/gammu
-%_bindir/gammu
-%_bindir/gammu-config
-%_bindir/gammu-detect
-%_bindir/jadmaker
-%_mandir/man1/gammu.1*
-%_mandir/man1/gammu-config.1*
-%_mandir/man1/gammu-detect.1*
-%_mandir/man1/jadmaker.1*
-%_mandir/man5/gammurc.5*
-%_mandir/man5/gammu-backup.5*
-%_mandir/man5/gammu-smsbackup.5*
-
-%files smsd
-%defattr(-,root,root)
-%_bindir/gammu-smsd
-%_bindir/gammu-smsd-inject
-%_bindir/gammu-smsd-monitor
-%_mandir/man1/gammu-smsd*
-%_mandir/man7/gammu-smsd*
-%_mandir/man5/gammu-smsd*
-%if 0%{?suse_version} > 1310 || 0%{?fedora_version} >= 15 || 0%{?centos_version} >= 700 || 0%{?rhel_version} >= 700 || 0%{?scientificlinux_version} >= 600
-/usr/lib/systemd/system/gammu-smsd.service
-%endif
-%attr(755,root,root) %config /etc/init.d/gammu-smsd
-%config /etc/gammu-smsdrc
-
-%files -n libGammu@GAMMU_SOVERSION@
-%defattr(-,root,root)
-%_libdir/libGammu*.so.*
-%_datadir/gammu/
-
-%files -n libgsmsd@GAMMU_SOVERSION@
-%defattr(-,root,root)
-%_libdir/libgsmsd*.so.*
+%files -f %{name}.lang
+%defattr(-,root,root,-)
+%config %{_sysconfdir}/bash_completion.d/gammu
+%{_bindir}/gammu
+%{_bindir}/gammu-config
+%{_bindir}/gammu-detect
+%{_bindir}/jadmaker
+%doc %{gammu_docdir}
+%doc %{_mandir}/man1/gammu-config.1*
+%doc %{_mandir}/man1/gammu-detect.1*
+%doc %{_mandir}/man1/gammu.1*
+%doc %{_mandir}/man1/jadmaker.1*
+%doc %{_mandir}/man5/gammu-backup.5*
+%doc %{_mandir}/man5/gammu-smsbackup.5*
+%doc %{_mandir}/man5/gammurc.5*
%files devel
-%defattr(-,root,root)
-%_includedir/%name
-%_libdir/pkgconfig/%name.pc
-%_libdir/pkgconfig/%name-smsd.pc
-%_libdir/*.so
+%defattr(-,root,root,-)
+%{_includedir}/gammu/
+%{_libdir}/*.so
+%{_libdir}/pkgconfig/gammu-smsd.pc
+%{_libdir}/pkgconfig/gammu.pc
-%clean
-rm -rf %buildroot
+%files smsd
+%defattr(-,root,root)
+%attr(755,root,root) %config %{_initddir}/gammu-smsd
+%config %{_sysconfdir}/gammu-smsdrc
+%{_bindir}/gammu-smsd
+%{_bindir}/gammu-smsd-inject
+%{_bindir}/gammu-smsd-monitor
+%doc %{_mandir}/man1/gammu-smsd-inject.1*
+%doc %{_mandir}/man1/gammu-smsd-monitor.1*
+%doc %{_mandir}/man1/gammu-smsd.1*
+%doc %{_mandir}/man5/gammu-smsdrc.5*
+%doc %{_mandir}/man7/gammu-smsd-dbi.7*
+%doc %{_mandir}/man7/gammu-smsd-files.7*
+%doc %{_mandir}/man7/gammu-smsd-mysql.7*
+%doc %{_mandir}/man7/gammu-smsd-null.7*
+%doc %{_mandir}/man7/gammu-smsd-odbc.7*
+%doc %{_mandir}/man7/gammu-smsd-pgsql.7*
+%doc %{_mandir}/man7/gammu-smsd-run.7*
+%doc %{_mandir}/man7/gammu-smsd-sql.7*
+%doc %{_mandir}/man7/gammu-smsd-tables.7*
+%{_libexecdir}/systemd/system/gammu-smsd.service
+
+%files -n libGammu%{so_ver} -f libgammu.lang
+%defattr(-,root,root,-)
+%{_libdir}/libGammu.so.%{so_ver}*
+%{_datadir}/gammu/
+/etc/udev/rules.d/69-gammu-acl.rules
+
+%files -n libgsmsd%{so_ver}
+%defattr(-,root,root,-)
+%{_libdir}/libgsmsd.so.%{so_ver}*
%changelog
diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt
index 39911dd..4d563c1 100644
--- a/contrib/CMakeLists.txt
+++ b/contrib/CMakeLists.txt
@@ -83,9 +83,9 @@ if (INSTALL_PHP_EXAMPLES)
endif (INSTALL_PHP_EXAMPLES)
if (INSTALL_BASH_COMPLETION)
- macro_optional_find_package (bash-completion QUIET)
+ macro_optional_find_package (BashCompletion)
if (NOT BASH_COMPLETION_FOUND)
- set (BASH_COMPLETION_COMPLETIONSDIR "/etc/bash_completion.d")
+ set (BASH_COMPLETION_COMPLETIONSDIR "/etc/bash_completion.d" CACHE PATH "Location of bash_completion.d")
endif (NOT BASH_COMPLETION_FOUND)
install (
FILES bash-completion/gammu
diff --git a/description-pak b/description-pak
index 21c139d..d914ac6 100644
--- a/description-pak
+++ b/description-pak
@@ -1,4 +1,4 @@
-Gammu (Gammu All Mobile Management Utilities) 1.36.5
+Gammu (Gammu All Mobile Management Utilities) 1.36.6
Gammu is a command line utility and library to work with mobile phones
from many vendors. Support for different models differs, but basic
diff --git a/docs/man/gammu-backup.5 b/docs/man/gammu-backup.5
index 14ccd57..9ab74d4 100644
--- a/docs/man/gammu-backup.5
+++ b/docs/man/gammu-backup.5
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-BACKUP" "5" "August 26, 2015" "1.36.5" "Gammu"
+.TH "GAMMU-BACKUP" "5" "October 07, 2015" "1.36.6" "Gammu"
.SH NAME
gammu-backup \- gammu(1) backup file format.
.
diff --git a/docs/man/gammu-config.1 b/docs/man/gammu-config.1
index 8a53837..6b1fc6f 100644
--- a/docs/man/gammu-config.1
+++ b/docs/man/gammu-config.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-CONFIG" "1" "August 26, 2015" "1.36.5" "Gammu"
+.TH "GAMMU-CONFIG" "1" "October 07, 2015" "1.36.6" "Gammu"
.SH NAME
gammu-config \- Gammu configurator
.
diff --git a/docs/man/gammu-detect.1 b/docs/man/gammu-detect.1
index c2f71fb..bd924d8 100644
--- a/docs/man/gammu-detect.1
+++ b/docs/man/gammu-detect.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-DETECT" "1" "August 26, 2015" "1.36.5" "Gammu"
+.TH "GAMMU-DETECT" "1" "October 07, 2015" "1.36.6" "Gammu"
.SH NAME
gammu-detect \- Gammu device detection
.
diff --git a/docs/man/gammu-smsbackup.5 b/docs/man/gammu-smsbackup.5
index 02d731c..816e797 100644
--- a/docs/man/gammu-smsbackup.5
+++ b/docs/man/gammu-smsbackup.5
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSBACKUP" "5" "August 26, 2015" "1.36.5" "Gammu"
+.TH "GAMMU-SMSBACKUP" "5" "October 07, 2015" "1.36.6" "Gammu"
.SH NAME
gammu-smsbackup \- gammu(1) SMS backup file format.
.
diff --git a/docs/man/gammu-smsd-dbi.7 b/docs/man/gammu-smsd-dbi.7
index e8b094e..cb732bb 100644
--- a/docs/man/gammu-smsd-dbi.7
+++ b/docs/man/gammu-smsd-dbi.7
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD-DBI" "7" "August 26, 2015" "1.36.5" "Gammu"
+.TH "GAMMU-SMSD-DBI" "7" "October 07, 2015" "1.36.6" "Gammu"
.SH NAME
gammu-smsd-dbi \- gammu-smsd(1) backend using DBI abstraction layer to use any supported database as a message storage
.
diff --git a/docs/man/gammu-smsd-files.7 b/docs/man/gammu-smsd-files.7
index dab959b..ed4e7a4 100644
--- a/docs/man/gammu-smsd-files.7
+++ b/docs/man/gammu-smsd-files.7
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD-FILES" "7" "August 26, 2015" "1.36.5" "Gammu"
+.TH "GAMMU-SMSD-FILES" "7" "October 07, 2015" "1.36.6" "Gammu"
.SH NAME
gammu-smsd-files \- gammu-smsd(1) backend using filesystem as a message storage
.
@@ -38,7 +38,7 @@ configuration (see gammu\-smsdrc for description of configuration options).
.sp
Received messages are stored in a folder defined by configuration. The
filename will be \fBIN<date>_<time>_<serial>_<sender>_<sequence>.<ext>\fP,
-for example \fBNN20021130_021531_00_+45409000931640979_00.txt\fP\&.
+for example \fBIN20021130_021531_00_+45409000931640979_00.txt\fP\&.
.sp
Explanation of fields:
.INDENT 0.0
diff --git a/docs/man/gammu-smsd-inject.1 b/docs/man/gammu-smsd-inject.1
index 17b1d4c..e64d47f 100644
--- a/docs/man/gammu-smsd-inject.1
+++ b/docs/man/gammu-smsd-inject.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD-INJECT" "1" "August 26, 2015" "1.36.5" "Gammu"
+.TH "GAMMU-SMSD-INJECT" "1" "October 07, 2015" "1.36.6" "Gammu"
.SH NAME
gammu-smsd-inject \- Inject messages into queue of SMS daemon for Gammu
.
@@ -111,6 +111,18 @@ gammu\-smsd\-inject TEXT 123456 \-text "All your base are belong to us"
.UNINDENT
.UNINDENT
.sp
+Inject unicode text message:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+gammu\-smsd\-inject TEXT 123456 \-unicode \-text "Zkouška sirén"
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
Inject long text message:
.INDENT 0.0
.INDENT 3.5
diff --git a/docs/man/gammu-smsd-monitor.1 b/docs/man/gammu-smsd-monitor.1
index 4c23a94..26b2c18 100644
--- a/docs/man/gammu-smsd-monitor.1
+++ b/docs/man/gammu-smsd-monitor.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD-MONITOR" "1" "August 26, 2015" "1.36.5" "Gammu"
+.TH "GAMMU-SMSD-MONITOR" "1" "October 07, 2015" "1.36.6" "Gammu"
.SH NAME
gammu-smsd-monitor \- Monitor state of SMS daemon for Gammu
.
diff --git a/docs/man/gammu-smsd-mysql.7 b/docs/man/gammu-smsd-mysql.7
index 1ce2b43..a23d8d5 100644
--- a/docs/man/gammu-smsd-mysql.7
+++ b/docs/man/gammu-smsd-mysql.7
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD-MYSQL" "7" "August 26, 2015" "1.36.5" "Gammu"
+.TH "GAMMU-SMSD-MYSQL" "7" "October 07, 2015" "1.36.6" "Gammu"
.SH NAME
gammu-smsd-mysql \- gammu-smsd(1) backend using MySQL database server as a message storage
.
@@ -68,7 +68,7 @@ gammu\-smsdrc
.SH PRIVILEGES
.sp
The user accessing the database does not need much privileges, the following
-privleges should be enough:
+privileges should be enough:
.INDENT 0.0
.INDENT 3.5
.sp
@@ -77,6 +77,8 @@ privleges should be enough:
GRANT USAGE ON *.* TO \(aqsmsd\(aq@\(aqlocalhost\(aq IDENTIFIED BY \(aqpassword\(aq;
GRANT SELECT, INSERT, UPDATE, DELETE ON \(gasmsd\(ga.* TO \(aqsmsd\(aq@\(aqlocalhost\(aq;
+
+CREATE DATABASE smsd;
.ft P
.fi
.UNINDENT
diff --git a/docs/man/gammu-smsd-null.7 b/docs/man/gammu-smsd-null.7
index dc1dae8..f67bc01 100644
--- a/docs/man/gammu-smsd-null.7
+++ b/docs/man/gammu-smsd-null.7
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD-NULL" "7" "August 26, 2015" "1.36.5" "Gammu"
+.TH "GAMMU-SMSD-NULL" "7" "October 07, 2015" "1.36.6" "Gammu"
.SH NAME
gammu-smsd-null \- gammu-smsd(1) backend not storing messages
.
diff --git a/docs/man/gammu-smsd-odbc.7 b/docs/man/gammu-smsd-odbc.7
index da0a35a..e070271 100644
--- a/docs/man/gammu-smsd-odbc.7
+++ b/docs/man/gammu-smsd-odbc.7
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD-ODBC" "7" "August 26, 2015" "1.36.5" "Gammu"
+.TH "GAMMU-SMSD-ODBC" "7" "October 07, 2015" "1.36.6" "Gammu"
.SH NAME
gammu-smsd-odbc \- gammu-smsd(1) backend using ODBC abstraction layer to use any supported database as a message storage
.
diff --git a/docs/man/gammu-smsd-pgsql.7 b/docs/man/gammu-smsd-pgsql.7
index 0342791..8a5de80 100644
--- a/docs/man/gammu-smsd-pgsql.7
+++ b/docs/man/gammu-smsd-pgsql.7
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD-PGSQL" "7" "August 26, 2015" "1.36.5" "Gammu"
+.TH "GAMMU-SMSD-PGSQL" "7" "October 07, 2015" "1.36.6" "Gammu"
.SH NAME
gammu-smsd-pgsql \- gammu-smsd(1) backend using PostgreSQL database server as a message storage
.
diff --git a/docs/man/gammu-smsd-run.7 b/docs/man/gammu-smsd-run.7
index 1738f78..e181c83 100644
--- a/docs/man/gammu-smsd-run.7
+++ b/docs/man/gammu-smsd-run.7
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD-RUN" "7" "August 26, 2015" "1.36.5" "Gammu"
+.TH "GAMMU-SMSD-RUN" "7" "October 07, 2015" "1.36.6" "Gammu"
.SH NAME
gammu-smsd-run \- documentation for RunOnReceive directive
.
diff --git a/docs/man/gammu-smsd-sql.7 b/docs/man/gammu-smsd-sql.7
index 2e62e3b..5edfd3b 100644
--- a/docs/man/gammu-smsd-sql.7
+++ b/docs/man/gammu-smsd-sql.7
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD-SQL" "7" "August 26, 2015" "1.36.5" "Gammu"
+.TH "GAMMU-SMSD-SQL" "7" "October 07, 2015" "1.36.6" "Gammu"
.SH NAME
gammu-smsd-sql \- gammu-smsd(1) backend using SQL abstraction layer to use any supported database as a message storage
.
diff --git a/docs/man/gammu-smsd-tables.7 b/docs/man/gammu-smsd-tables.7
index 8fa77f3..2d0a48a 100644
--- a/docs/man/gammu-smsd-tables.7
+++ b/docs/man/gammu-smsd-tables.7
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD-TABLES" "7" "August 26, 2015" "1.36.5" "Gammu"
+.TH "GAMMU-SMSD-TABLES" "7" "October 07, 2015" "1.36.6" "Gammu"
.SH NAME
gammu-smsd-tables \- description of tables for database backends of gammu-smsd(1)
.
diff --git a/docs/man/gammu-smsd.1 b/docs/man/gammu-smsd.1
index f76b2f3..4aa7012 100644
--- a/docs/man/gammu-smsd.1
+++ b/docs/man/gammu-smsd.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD" "1" "August 26, 2015" "1.36.5" "Gammu"
+.TH "GAMMU-SMSD" "1" "October 07, 2015" "1.36.6" "Gammu"
.SH NAME
gammu-smsd \- SMS daemon for Gammu
.
diff --git a/docs/man/gammu-smsdrc.5 b/docs/man/gammu-smsdrc.5
index c3f013c..1b952c7 100644
--- a/docs/man/gammu-smsdrc.5
+++ b/docs/man/gammu-smsdrc.5
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSDRC" "5" "August 26, 2015" "1.36.5" "Gammu"
+.TH "GAMMU-SMSDRC" "5" "October 07, 2015" "1.36.6" "Gammu"
.SH NAME
gammu-smsdrc \- gammu-smsd(1) configuration file
.
@@ -94,42 +94,38 @@ SMSD service to use, one of following choices:
.INDENT 7.0
.TP
.B \fBFILES\fP
-stores messages in files, see gammu\-smsd\-files for details
+Stores messages in files, see gammu\-smsd\-files for details.
.TP
.B \fBNULL\fP
-does not store messages at all, see gammu\-smsd\-null for details
+Does not store messages at all, see gammu\-smsd\-null for details.
.TP
.B \fBSQL\fP
-stores messages in SQL database, see gammu\-smsd\-sql for details
+Stores messages in SQL database, see gammu\-smsd\-sql for details,
+choose database type to use by \fI\%Driver\fP\&.
.sp
New in version 1.28.93.
.TP
.B \fBMYSQL\fP
-synonym for \fI\%Service\fP = \fBSQL\fP and \fI\%Driver\fP = \fBnative_mysql\fP
-.sp
-stores messages in MySQL database, see gammu\-smsd\-mysql for details
-.sp
-Deprecated since version 1.28.93.
+Deprecated since version 1.28.93: Use \fI\%Service\fP = \fBSQL\fP and \fI\%Driver\fP = \fBnative_mysql\fP instead.
+.sp
+Compatibility option for older configuration files, stores messages in
+MySQL database, see gammu\-smsd\-mysql for details.
.TP
.B \fBPGSQL\fP
-synonym for \fI\%Service\fP = \fBSQL\fP and \fI\%Driver\fP = \fBnative_pgsql\fP
-.sp
-stores messages in PostgreSQL database, see gammu\-smsd\-pgsql for details
-.sp
-Deprecated since version 1.28.93.
+Deprecated since version 1.28.93: Use \fI\%Service\fP = \fBSQL\fP and \fI\%Driver\fP = \fBnative_pgsql\fP instead.
+.sp
+Compatibility option for older configuration files, stores messages in
+PostgreSQL database, see gammu\-smsd\-pgsql for details.
.TP
.B \fBDBI\fP
-synonym for \fI\%Service\fP = \fBSQL\fP and \fI\%Driver\fP = DBI driver
-.sp
-stores messages in any database supported by libdbi, this includes
-MSSQL, MySQL, PostgreSQL or SQLite databases, see gammu\-smsd\-dbi for
-details
-.sp
-Deprecated since version 1.28.93.
+Deprecated since version 1.28.93: Use \fI\%Service\fP = \fBSQL\fP and \fI\%Driver\fP = DBI driver instead.
+.sp
+Compatibility option for older configuration files, stores messages in
+any database supported by libdbi, see gammu\-smsd\-dbi for details.
.UNINDENT
.sp
\fBNOTE:\fP
@@ -278,7 +274,7 @@ 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.
.sp
-Setting this to 0 disables sleeping. Please not this might cause Gammu to
+Setting this to 0 disables sleeping. Please note this might cause Gammu to
consume quite a lot of CPU power.
.sp
Default is 1.
@@ -343,7 +339,8 @@ New in version 1.28.92.
.INDENT 7.0
.INDENT 3.5
For some phones hard reset means deleting all data in it. Use
-\fI\%ResetFrequency\fP, unless you know what you are doing.
+\fI\%ResetFrequency\fP instead, unless you know what you are
+doing.
.UNINDENT
.UNINDENT
.sp
@@ -384,7 +381,7 @@ Default is 600 (10 minutes).
.TP
.B PhoneID
String with info about phone used for sending/receiving. This can be useful if
-you want to run several SMS daemons (see \fI\%Multiple modems\fP);
+you want to run several SMS daemons (see \fI\%Multiple modems\fP).
.sp
When you set PhoneID, all messages (including injected ones) will be marked
by this string (stored as SenderID in the database) and it allows more SMS
@@ -556,10 +553,10 @@ New in version 1.28.92.
.INDENT 0.0
.TP
.B PC
-Synonym for \fI\%Host\fP\&.
-.sp
-Deprecated since version 1.28.92.
+Deprecated since version 1.28.92: Please use \fI\%Host\fP instead.
+.sp
+Synonym for \fI\%Host\fP, kept for backwards compatibility.
.UNINDENT
.INDENT 0.0
.TP
@@ -581,15 +578,43 @@ will not check it\(aqs number during assigning reports to sent SMS.
.INDENT 0.0
.TP
.B Driver
-SQL driver to use.
+SQL driver to use, Gammu supports several native drivers and generic
+interface using ODBC and DBI. Availability of the backends depdens on
+compile time options.
+.sp
+Available drivers:
+.sp
+\fBodbc\fP
+.INDENT 7.0
+.INDENT 3.5
+Connects to the database using ODBC, see gammu\-smsd\-odbc\&.
+.UNINDENT
+.UNINDENT
+.sp
+\fBnative_mysql\fP
+.INDENT 7.0
+.INDENT 3.5
+Stores messages in MySQL database, see gammu\-smsd\-mysql for
+details.
+.UNINDENT
+.UNINDENT
.sp
-Can be either one of native drivers (\fBodbc\fP, \fBnative_mysql\fP or
-\fBnative_pgsql\fP) or gammu\-smsd\-dbi driver.
+\fBnative_pgsql\fP
+.INDENT 7.0
+.INDENT 3.5
+Stores messages in PostgreSQL database, see gammu\-smsd\-pgsql for
+details.
+.UNINDENT
+.UNINDENT
.sp
-Depends on what DBI drivers you have installed, DBI
-supports: \fBmysql\fP, \fBfreetds\fP (provides access to MS SQL Server and
-Sybase), \fBpgsql\fP, \fBsqlite\fP, \fBsqlite3\fP, \fBfirebird\fP and \fBingres\fP,
-\fBmsql\fP and \fBoracle\fP drivers are under development.
+\fBdb2\fP, \fBfirebird\fP, \fBfreetds\fP, \fBingres\fP, \fBmsql\fP, \fBmysql\fP, \fBoracle\fP, \fBpgsql\fP, \fBsqlite\fP, \fBsqlite3\fP
+.INDENT 7.0
+.INDENT 3.5
+Stores messages using DBI library in given backend. You need to have
+installed appropriate DBI driver to make it work. See
+gammu\-smsd\-dbi for details.
+.UNINDENT
+.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
diff --git a/docs/man/gammu.1 b/docs/man/gammu.1
index 56fd3ba..b6e6a92 100644
--- a/docs/man/gammu.1
+++ b/docs/man/gammu.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU" "1" "August 26, 2015" "1.36.5" "Gammu"
+.TH "GAMMU" "1" "October 07, 2015" "1.36.6" "Gammu"
.SH NAME
gammu \- Does some neat things with your cellular phone or modem.
.
@@ -54,7 +54,7 @@ Parameters before command configure gammu behaviour:
.INDENT 0.0
.TP
.B \-c, \-\-config <filename>
-name of configuration file
+name of configuration file (see gammurc)
.UNINDENT
.INDENT 0.0
.TP
diff --git a/docs/man/gammurc.5 b/docs/man/gammurc.5
index e74bf3c..7f024ac 100644
--- a/docs/man/gammurc.5
+++ b/docs/man/gammurc.5
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMURC" "5" "August 26, 2015" "1.36.5" "Gammu"
+.TH "GAMMURC" "5" "October 07, 2015" "1.36.6" "Gammu"
.SH NAME
gammurc \- gammu(1) configuration file
.
@@ -301,7 +301,7 @@ faq\-config
.INDENT 0.0
.TP
.B Port
-Deprecated since version 1.27.95.
+Deprecated since version 1.27.95: Please use \fI\%Device\fP instead.
.sp
Alias for \fI\%Device\fP, kept for backward compatibility.
diff --git a/docs/man/jadmaker.1 b/docs/man/jadmaker.1
index 55d23ba..f997e3e 100644
--- a/docs/man/jadmaker.1
+++ b/docs/man/jadmaker.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "JADMAKER" "1" "August 26, 2015" "1.36.5" "Gammu"
+.TH "JADMAKER" "1" "October 07, 2015" "1.36.6" "Gammu"
.SH NAME
jadmaker \- JAD File Generator
.
diff --git a/docs/manual/config/index.rst b/docs/manual/config/index.rst
index 74dd998..1fe8de3 100644
--- a/docs/manual/config/index.rst
+++ b/docs/manual/config/index.rst
@@ -186,6 +186,8 @@ Device connection parameters
.. deprecated:: 1.27.95
+ Please use :config:option:`Device` instead.
+
Alias for :config:option:`Device`, kept for backward compatibility.
.. config:option:: Model
diff --git a/docs/manual/contents.rst b/docs/manual/contents.rst
index 4e511ee..41bd579 100644
--- a/docs/manual/contents.rst
+++ b/docs/manual/contents.rst
@@ -7,6 +7,7 @@ Gammu Documentation Contents
:maxdepth: 2
project/index
+ quick/index
faq/index
python/index
c/index
diff --git a/docs/manual/gammu/index.rst b/docs/manual/gammu/index.rst
index dddf908..97ba533 100644
--- a/docs/manual/gammu/index.rst
+++ b/docs/manual/gammu/index.rst
@@ -30,7 +30,7 @@ Parameters before command configure gammu behaviour:
.. option:: -c, --config <filename>
- name of configuration file
+ name of configuration file (see :ref:`gammurc`)
.. option:: -s, --section <confign>
diff --git a/docs/manual/index.rst b/docs/manual/index.rst
index a66c06a..aad45c7 100644
--- a/docs/manual/index.rst
+++ b/docs/manual/index.rst
@@ -16,6 +16,7 @@ Continue reading
.. hlist::
:columns: 2
+ * :ref:`quick` -- quick starter guide
* :ref:`project` -- learn about Gammu project
* :ref:`smsd` -- comprehensive SMSD documentation
* :ref:`gammu` -- the Gammu utility
diff --git a/docs/manual/python/examples.rst b/docs/manual/python/examples.rst
index 586c0e9..5f9a9d8 100644
--- a/docs/manual/python/examples.rst
+++ b/docs/manual/python/examples.rst
@@ -87,7 +87,7 @@ Sending a long message
# Create SMS info structure
smsinfo = {
- 'Class': 1,
+ 'Class': -1,
'Unicode': False,
'Entries': [
{
diff --git a/docs/manual/python/index.rst b/docs/manual/python/index.rst
index 1c32616..2ec00eb 100644
--- a/docs/manual/python/index.rst
+++ b/docs/manual/python/index.rst
@@ -1,7 +1,7 @@
.. _python:
-python-gammu API
-================
+python-gammu
+============
A taste of python-gammu
-----------------------
diff --git a/docs/manual/quick/index.rst b/docs/manual/quick/index.rst
new file mode 100644
index 0000000..bfdb9d1
--- /dev/null
+++ b/docs/manual/quick/index.rst
@@ -0,0 +1,200 @@
+.. _quick:
+
+Quick starter guide
+===================
+
+Gammu family
+------------
+
+Gammu family consists of several programs and libraries:
+
+:ref:`gammu`
+ Command line utility to talk to the phone. It performs one time operations
+ only.
+`Wammu <http://wammu.eu/wammu>`_
+ Graphical interface for Gammu, providing basic functions.
+:ref:`gammu-smsd`
+ Daemon to receive and send messages using your phone.
+:ref:`gammu-smsd-inject`
+ Injects outgoing messages into :ref:`gammu-smsd` queue.
+:ref:`gammu-detect`
+ Simple utility to detect phones or modems connected to computer.
+:ref:`python`
+ Python bindings for Gammu, use it from Python scripts.
+:ref:`libgammu`
+ Core library, used by all other parts and you can use it directly in your C
+ programs.
+
+Installing Gammu
+----------------
+
+On most platforms you can install Gammu from binaries - most Linux
+distributions ship Gammu and for Windows you can download binaries from
+`Gammu website <http://wammu.eu/download/>`_. You can find more detailed
+instructions (including instructions for compiling from source) in
+:ref:`installing`.
+
+Starting with Gammu on Linux
+----------------------------
+
+First you need to find out device name where your phone/modem is connected. In
+most cases you can rely on :ref:`gammu-detect` to find it (it will also list
+all serial ports in your systems, where probably nothing is connected).
+
+Generally for most current modems you will end up with ``/dev/ttyUSB0``.
+
+The next step is to create configuration file in :file:`~/.gammurc` (see
+:ref:`gammurc`):
+
+.. code-block:: ini
+
+ [gammu]
+ device = /dev/ttyUSB0
+ connection = at
+
+And you can connect to the phone:
+
+.. code-block:: console
+
+ $ gammu identify
+ Device : /dev/ttyUSB0
+ Manufacturer : Wavecom
+ Model : MULTIBAND 900E 1800 (MULTIBAND 900E 1800)
+ Firmware : 641b09gg.Q2403A 1320676 061804 14:38
+ IMEI : 123456789012345
+ SIM IMSI : 987654321098765
+
+Starting with Gammu on Windows
+------------------------------
+
+First you need to find out device name where your phone/modem is connected. The
+easiest way is to look into :guilabel:`Device manager` under
+:guilabel:`Ports (COM & LPT)` and lookup correct COM port there.
+
+Generally for most current modems you will end up with something like
+``COM12``.
+
+The next step is to create configuration file in
+:file:`$PROFILE\\Application Data\\gammurc` (see :ref:`gammurc`):
+
+.. code-block:: ini
+
+ [gammu]
+ device = COM12:
+ connection = at
+
+And you can connect to the phone:
+
+.. code-block:: console
+
+ C:\Program Files\Gammu 1.33.0\bin> gammu identify
+ Device : COM12:
+ Manufacturer : Wavecom
+ Model : MULTIBAND 900E 1800 (MULTIBAND 900E 1800)
+ Firmware : 641b09gg.Q2403A 1320676 061804 14:38
+ IMEI : 123456789012345
+ SIM IMSI : 987654321098765
+
+Starting with SMSD
+------------------
+
+.. note::
+
+ Before starting with SMSD, make sure you can connect to your phone using
+ Gammu (see chapters above for guide how to do that).
+
+Once you have configured Gammu, running :ref:`gammu-smsd` is pretty easy. You
+need to decide where you want to store messages (see :config:option:`Service`).
+For this example we will stick with MySQL database, but the instructions are
+quite similar for any storage service.
+
+Configuring the storage
++++++++++++++++++++++++
+
+First we have to setup the actual storage. With MySQL, we need access to the
+MySQL server. Now connect as administrative user to the server (usually
+``root``), grant privileges to the ``smsd`` user and create ``smsd`` database:
+
+.. code-block:: mysql
+
+ GRANT USAGE ON *.* TO 'smsd'@'localhost' IDENTIFIED BY 'password';
+
+ GRANT SELECT, INSERT, UPDATE, DELETE ON `smsd`.* TO 'smsd'@'localhost';
+
+ CREATE DATABASE smsd;
+
+Once this is ready, you should import the tables structure. It is shipped as
+:file:`docs/sql/mysql.sql` with Gammu, so all you have to do is to import this
+file (see :ref:`mysql-create` for more details):
+
+.. code-block:: console
+
+ $ mysql -u root -p password smsd < docs/sql/mysql.sql
+
+Configuring SMSD
+++++++++++++++++
+
+Now we just have to tell SMSD what service it is supposed to use. This is done
+in the SMSD configuration file. You can place it anywhere and tell SMSD on
+startup where it can find it, but on Linux the recommended location for system
+wide service is :file:`/etc/gammu-smsdrc` (see :ref:`gammu-smsdrc` for more
+information).
+
+You have to put both modem and storage service configuration into this file:
+
+.. code-block:: ini
+
+ [gammu]
+ device = /dev/ttyUSB0
+ connection = at
+
+ [smsd]
+ service = SQL
+ driver = native_mysql
+ host = localhost
+ database = smsd
+ user = smsd
+ password = password
+
+There are many ways to customize SMSD, but the defaults should work fine in
+most environments. You can find more information on customizing SMSD in
+:ref:`gammu-smsdrc`.
+
+Running SMSD
+++++++++++++
+
+With configuration file ready, you can actually start SMSD. You can do this
+manually or as a system wide service.
+
+For manual startup, just execute it:
+
+.. code-block:: console
+
+ $ gammu-smsd
+
+Alternatively you can specify path to the configuration file:
+
+.. code-block:: console
+
+ $ gammu-smsd -c /path/to/gammu-smsdrc
+
+The binary packages on Linux usually come with support for starting SMSD as a
+system wide daemon.
+
+With systemd, you can start it by:
+
+.. code-block:: console
+
+ $ systemctl start gammu-smsd.service
+
+Sending message through SMSD
+++++++++++++++++++++++++++++
+
+Once SMSD is up and running, you can send some messages using it:
+
+.. code-block:: console
+
+ $ gammu-smsd-inject TEXT 123456 -text "All your base are belong to us"
+
+You can find more examples in the :ref:`gammu-smsd-inject` documentation:
+:ref:`smsd-inject-examples`.
diff --git a/docs/manual/smsd/config.rst b/docs/manual/smsd/config.rst
index b3055d3..f973056 100644
--- a/docs/manual/smsd/config.rst
+++ b/docs/manual/smsd/config.rst
@@ -58,33 +58,37 @@ General parameters of SMS daemon
SMSD service to use, one of following choices:
``FILES``
- stores messages in files, see :ref:`gammu-smsd-files` for details
+ Stores messages in files, see :ref:`gammu-smsd-files` for details.
``NULL``
- does not store messages at all, see :ref:`gammu-smsd-null` for details
+ Does not store messages at all, see :ref:`gammu-smsd-null` for details.
``SQL``
- stores messages in SQL database, see :ref:`gammu-smsd-sql` for details
+ Stores messages in SQL database, see :ref:`gammu-smsd-sql` for details,
+ choose database type to use by :config:option:`Driver`.
.. versionadded:: 1.28.93
``MYSQL``
- synonym for :config:option:`Service` = ``SQL`` and :config:option:`Driver` = ``native_mysql``
-
- stores messages in MySQL database, see :ref:`gammu-smsd-mysql` for details
-
.. deprecated:: 1.28.93
- ``PGSQL``
- synonym for :config:option:`Service` = ``SQL`` and :config:option:`Driver` = ``native_pgsql``
+
+ Use :config:option:`Service` = ``SQL`` and :config:option:`Driver` = ``native_mysql`` instead.
- stores messages in PostgreSQL database, see :ref:`gammu-smsd-pgsql` for details
+ Compatibility option for older configuration files, stores messages in
+ MySQL database, see :ref:`gammu-smsd-mysql` for details.
+ ``PGSQL``
.. deprecated:: 1.28.93
- ``DBI``
- synonym for :config:option:`Service` = ``SQL`` and :config:option:`Driver` = DBI driver
+
+ Use :config:option:`Service` = ``SQL`` and :config:option:`Driver` = ``native_pgsql`` instead.
- stores messages in any database supported by libdbi, this includes
- MSSQL, MySQL, PostgreSQL or SQLite databases, see :ref:`gammu-smsd-dbi` for
- details
+ Compatibility option for older configuration files, stores messages in
+ PostgreSQL database, see :ref:`gammu-smsd-pgsql` for details.
+ ``DBI``
.. deprecated:: 1.28.93
+
+ Use :config:option:`Service` = ``SQL`` and :config:option:`Driver` = DBI driver instead.
+
+ Compatibility option for older configuration files, stores messages in
+ any database supported by libdbi, see :ref:`gammu-smsd-dbi` for details.
.. note::
@@ -198,7 +202,7 @@ General parameters of SMS daemon
effects to other time based configurations, because they will be effectively
rounded to multiply of this value.
- Setting this to 0 disables sleeping. Please not this might cause Gammu to
+ Setting this to 0 disables sleeping. Please note this might cause Gammu to
consume quite a lot of CPU power.
Default is 1.
@@ -253,7 +257,8 @@ General parameters of SMS daemon
.. warning::
For some phones hard reset means deleting all data in it. Use
- :config:option:`ResetFrequency`, unless you know what you are doing.
+ :config:option:`ResetFrequency` instead, unless you know what you are
+ doing.
The number of seconds between performing a preventive hard reset in order to
minimize the cases of hanging phones.
@@ -285,7 +290,7 @@ General parameters of SMS daemon
.. config:option:: PhoneID
String with info about phone used for sending/receiving. This can be useful if
- you want to run several SMS daemons (see :ref:`smsd-multi`);
+ you want to run several SMS daemons (see :ref:`smsd-multi`).
When you set PhoneID, all messages (including injected ones) will be marked
by this string (stored as SenderID in the database) and it allows more SMS
@@ -432,10 +437,12 @@ database:
.. config:option:: PC
- Synonym for :config:option:`Host`.
-
.. deprecated:: 1.28.92
+ Please use :config:option:`Host` instead.
+
+ Synonym for :config:option:`Host`, kept for backwards compatibility.
+
.. config:option:: Database
Name of database (or schema) to use and where SMSD can find it's tables.
@@ -453,15 +460,31 @@ database:
.. config:option:: Driver
- SQL driver to use.
+ SQL driver to use, Gammu supports several native drivers and generic
+ interface using ODBC and DBI. Availability of the backends depdens on
+ compile time options.
+
+ Available drivers:
+
+ ``odbc``
+
+ Connects to the database using ODBC, see :ref:`gammu-smsd-odbc`.
+
+ ``native_mysql``
+
+ Stores messages in MySQL database, see :ref:`gammu-smsd-mysql` for
+ details.
+
+ ``native_pgsql``
+
+ Stores messages in PostgreSQL database, see :ref:`gammu-smsd-pgsql` for
+ details.
- Can be either one of native drivers (``odbc``, ``native_mysql`` or
- ``native_pgsql``) or :ref:`gammu-smsd-dbi` driver.
+ ``db2``, ``firebird``, ``freetds``, ``ingres``, ``msql``, ``mysql``, ``oracle``, ``pgsql``, ``sqlite``, ``sqlite3``
- 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.
+ Stores messages using DBI library in given backend. You need to have
+ installed appropriate DBI driver to make it work. See
+ :ref:`gammu-smsd-dbi` for details.
.. config:option:: SQL
diff --git a/docs/manual/smsd/files.rst b/docs/manual/smsd/files.rst
index 4c48b81..64eef77 100644
--- a/docs/manual/smsd/files.rst
+++ b/docs/manual/smsd/files.rst
@@ -14,7 +14,7 @@ Receiving of messages
Received messages are stored in a folder defined by configuration. The
filename will be ``IN<date>_<time>_<serial>_<sender>_<sequence>.<ext>``,
-for example ``NN20021130_021531_00_+45409000931640979_00.txt``.
+for example ``IN20021130_021531_00_+45409000931640979_00.txt``.
Explanation of fields:
diff --git a/docs/manual/smsd/inject.rst b/docs/manual/smsd/inject.rst
index 5e54c5e..e844fc7 100644
--- a/docs/manual/smsd/inject.rst
+++ b/docs/manual/smsd/inject.rst
@@ -50,6 +50,8 @@ accepted on some platforms):
For description of message types and their parameters, please check documentation
for :option:`gammu savesms`.
+.. _smsd-inject-examples:
+
Examples
--------
@@ -68,6 +70,12 @@ or
gammu-smsd-inject TEXT 123456 -text "All your base are belong to us"
+Inject unicode text message:
+
+.. code-block:: sh
+
+ gammu-smsd-inject TEXT 123456 -unicode -text "Zkouška sirén"
+
Inject long text message:
.. code-block:: sh
diff --git a/docs/manual/smsd/mysql.rst b/docs/manual/smsd/mysql.rst
index b54a57b..ca5308b 100644
--- a/docs/manual/smsd/mysql.rst
+++ b/docs/manual/smsd/mysql.rst
@@ -35,7 +35,7 @@ Privileges
----------
The user accessing the database does not need much privileges, the following
-privleges should be enough:
+privileges should be enough:
.. code-block:: sql
@@ -43,6 +43,8 @@ privleges should be enough:
GRANT SELECT, INSERT, UPDATE, DELETE ON `smsd`.* TO 'smsd'@'localhost';
+ CREATE DATABASE smsd;
+
.. note::
For creating the SQL tables you need more privileges, especially for
@@ -50,6 +52,8 @@ privleges should be enough:
.. _MySQL: http://www.mysql.com/
+.. _mysql-create:
+
Creating tables
---------------
diff --git a/gammu.spec b/gammu.spec
index 7bf87d4..04419e5 100644
--- a/gammu.spec
+++ b/gammu.spec
@@ -1,12 +1,26 @@
-Name: gammu
-Version: 1.36.5
-Release: 1
-# Set to 0 to disable bluetooth support
-%if 0%{?opensuse_bs} && 0%{?sles_version} == 9
-%define bluetooth 0
+#
+# spec file for package gammu
+#
+
+
+%define so_ver 7
+
+# Change if using tar.gz sources
+%define extension bz2
+
+Name: gammu
+Version: 1.36.6
+Release: 0
+Summary: Mobile phone management utility
+License: GPL-2.0
+%if 0%{?suse_version}
+Group: Hardware/Mobile
%else
-%define bluetooth 1
+Group: Applications/Communications
%endif
+Url: http://wammu.eu/gammu/
+Source0: http://dl.cihar.com/gammu/releases/%{name}-%{version}.tar.%{extension}
+
# Set to 0 to disable PostgreSQL support
%define pqsql 1
# Set to 0 to disable MySQL support
@@ -17,74 +31,48 @@ Release: 1
%define odbc 1
# Set to 0 to disable USB support
%define usb 1
-# Change if using tar.gz sources
-%define extension bz2
-
-%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
-%define gammu_docdir %_docdir/%{name}-%{version}
+# Set to 0 to disable bluetooth support
+%if 0%{?opensuse_bs} && 0%{?sles_version} == 9
+%define bluetooth 0
%else
-%define gammu_docdir %_docdir/%{name}
+%define bluetooth 1
%endif
-
-Summary: Mobile phone management utility
-License: GPL-2.0
-%if 0%{?suse_version}
-Group: Hardware/Mobile
+# Docdir
+%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
+%define gammu_docdir %{_docdir}/%{name}-%{version}
%else
-Group: Applications/Communications
+%define gammu_docdir %{_docdir}/%{name}
%endif
-Vendor: Michal Čihař <michal@cihar.com>
-
-# Detect build requires, I really hate this crap
-
+# Detect build requires
# SUSE
%if 0%{?suse_version}
-
%define dist_usb_libs libusb-1_0-devel
-%define dist_dbi_libs libdbi-devel libdbi-drivers-dbd-sqlite3 sqlite
-
-# 11.1 changed name of devel package for Bluetooth
-%if 0%{?suse_version} >= 1110
+%define dist_dbi_libs libdbi-devel libdbi-drivers-dbd-sqlite3 sqlite3
%define dist_bluez_libs bluez-devel
-%else
-%define dist_bluez_libs bluez-libs >= 2.0
-%endif
-
%define dist_postgres_libs postgresql-devel
-
%else
-
# Mandriva
%if 0%{?mandriva_version}
-
-%define dist_usb_libs libusb-1.0-devel
-%define dist_dbi_libs libdbi-devel libdbi-drivers-dbd-sqlite3 sqlite3-tools
-
# 64-bit Mandriva has 64 in package name
%ifarch x86_64
%define mandriva_hack 64
%endif
-
-# Bluetooth things got renamed several times
-%if 0%{?mandriva_version} > 2007
-%define dist_bluez_libs lib%{?mandriva_hack}bluez-devel
-%else
-%if 0%{?mandriva_version} > 2006
-%define dist_bluez_libs lib%{?mandriva_hack}bluez2-devel
+%if 0%{?mandriva_version} > 200910
+%define dist_usb_libs lib%{?mandriva_hack}usb1.0-devel
%else
-%define dist_bluez_libs libbluez1-devel >= 2.0
+%define dist_usb_libs lib%{?mandriva_hack}usb-devel
%endif
+%if 0%{?mandriva_version} > 2010
+%define dist_dbi_libs lib%{?mandriva_hack}dbi-devel libdbi-drivers-dbd-sqlite3 sqlite3-tools
%endif
-
+%define dist_bluez_libs lib%{?mandriva_hack}bluez-devel
# postgresql-devel does not work for whatever reason in buildservice
%if 0%{?mandriva_version} == 2009
%define dist_postgres_libs postgresql8.3-devel
%else
%define dist_postgres_libs postgresql-devel
%endif
-
%else
-
# Fedora / Redhat / Centos
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
%if 0%{?opensuse_bs}
@@ -95,69 +83,59 @@ Vendor: Michal Čihař <michal@cihar.com>
%define dist_dbi_libs libdbi-devel libdbi-dbd-sqlite sqlite
%define dist_bluez_libs bluez-libs-devel >= 2.0
%define dist_postgres_libs postgresql-devel
-
%else
-
-#Defaults for not know distributions
+# Defaults for not known distributions
%define dist_usb_libs libusb1-devel
%define dist_dbi_libs libdbi-devel libdbi-dbd-sqlite sqlite
%define dist_bluez_libs bluez-libs-devel >= 2.0
%define dist_postgres_libs postgresql-devel
-
%endif
%endif
%endif
-
-%if %bluetooth
-BuildRequires: %{dist_bluez_libs}
+BuildRequires: cmake >= 2.8
+BuildRequires: gcc
+BuildRequires: gettext
+BuildRequires: pkgconfig
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+%if %{bluetooth}
+BuildRequires: %{dist_bluez_libs}
%endif
-
-%if %pqsql
-BuildRequires: %{dist_postgres_libs}
+%if %{pqsql}
+BuildRequires: %{dist_postgres_libs}
%endif
-
-%if %mysql
-BuildRequires: mysql-devel
+%if %{mysql}
+BuildRequires: mysql-devel
%endif
-
-%if %dbi
-BuildRequires: %{dist_dbi_libs}
+%if %{dbi}
+BuildRequires: %{dist_dbi_libs}
%endif
-
-%if %odbc
-BuildRequires: unixODBC-devel
+%if %{odbc}
+BuildRequires: unixODBC-devel
%endif
-
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
-BuildRequires: libgudev1-devel glib2-devel
+BuildRequires: glib2-devel
+BuildRequires: libgudev1-devel
%else
%if 0%{?mandriva_version}
-BuildRequires: libgudev1.0-devel glib2-devel
+BuildRequires: glib2-devel
+BuildRequires: libgudev1.0-devel
%else
-BuildRequires: libgudev-1_0-devel glib2-devel
+BuildRequires: glib2-devel
+BuildRequires: libgudev-1_0-devel
%endif
%endif
-
%if 0%{?suse_version} > 1310 || 0%{?fedora_version} >= 15 || 0%{?centos_version} >= 700 || 0%{?rhel_version} >= 700 || 0%{?scientificlinux_version} >= 600
-BuildRequires: systemd
+BuildRequires: systemd
%endif
-
%if 0%{?centos_version} || 0%{?rhel_version} || 0%{?rhel} || 0%{?suse_version} < 1100
-BuildRequires: curl-devel
+BuildRequires: curl-devel
%else
-BuildRequires: libcurl-devel
+BuildRequires: libcurl-devel
%endif
-
-%if %usb
-BuildRequires: %{dist_usb_libs}
+%if %{usb}
+BuildRequires: %{dist_usb_libs}
%endif
-BuildRequires: gettext cmake pkgconfig gcc
-
-Source: http://dl.cihar.com/gammu/releases/gammu-%{version}.tar.%{extension}
-URL: http://wammu.eu/gammu/
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
-
%description
Gammu is command line utility and library to work with mobile phones
from many vendors. Support for different models differs, but basic
@@ -177,13 +155,14 @@ Currently supported phones include:
This package contains Gammu binary as well as some examples.
%package devel
-Summary: Development files for Gammu
+Summary: Development files for Gammu
%if 0%{?suse_version}
-Group: Development/Libraries/C and C++
+Group: Development/Libraries/C and C++
%else
-Group: Development/Libraries
+Group: Development/Libraries
%endif
-Requires: %{name} = %{version}-%{release} pkgconfig
+Requires: libGammu%{so_ver} = %{version}
+Requires: libgsmsd%{so_ver} = %{version}
%description devel
Gammu is command line utility and library to work with mobile phones
@@ -204,9 +183,10 @@ Currently supported phones include:
This package contain files needed for development.
%package smsd
-Summary: SMS message daemon
+Summary: SMS message daemon
%if 0%{?suse_version}
-PreReq: %insserv_prereq %fillup_prereq
+# FIXME: use proper Requires(pre/post/preun/...)
+PreReq: %insserv_prereq %fillup_prereq
%endif
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
Requires(post): chkconfig
@@ -214,9 +194,9 @@ Requires(preun): chkconfig
Requires(preun): initscripts
%endif
%if 0%{?suse_version}
-Group: Hardware/Mobile
+Group: Hardware/Mobile
%else
-Group: Applications/Communications
+Group: Applications/Communications
%endif
%description smsd
@@ -235,14 +215,14 @@ Currently supported phones include:
* OBEX and IrMC capable phones (Sony-Ericsson, Motorola).
* Symbian phones through gnapplet.
-This package contains Gammu SMS Daemon and tool to inject messages
+This package contains the Gammu SMS Daemon and tool to inject messages
into the queue.
-%package -n libGammu7
-Summary: Mobile phone management library
-Group: System/Libraries
+%package -n libGammu%{so_ver}
+Summary: Mobile phone management library
+Group: System/Libraries
-%description -n libGammu7
+%description -n libGammu%{so_ver}
Gammu is command line utility and library to work with mobile phones
from many vendors. Support for different models differs, but basic
functions should work with majority of them. Program can work with
@@ -258,13 +238,13 @@ Currently supported phones include:
* OBEX and IrMC capable phones (Sony-Ericsson, Motorola).
* Symbian phones through gnapplet.
-This package contains Gammu shared library.
+This package contains the Gammu shared library.
-%package -n libgsmsd7
-Summary: SMS daemon helper library
-Group: System/Libraries
+%package -n libgsmsd%{so_ver}
+Summary: SMS daemon helper library
+Group: System/Libraries
-%description -n libgsmsd7
+%description -n libgsmsd%{so_ver}
Gammu is command line utility and library to work with mobile phones
from many vendors. Support for different models differs, but basic
functions should work with majority of them. Program can work with
@@ -280,49 +260,60 @@ Currently supported phones include:
* OBEX and IrMC capable phones (Sony-Ericsson, Motorola).
* Symbian phones through gnapplet.
-This package contains Gammu SMS daemon shared library.
+This package contains the Gammu SMS daemon shared library.
%prep
%setup -q
%build
-mkdir build-dir
-cd build-dir
+mkdir build
+cd build
+export CFLAGS="%{optflags}"
+export CXXFLAGS="%{optflags}"
cmake ../ \
-DBUILD_SHARED_LIBS=ON \
+ -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+ -DINSTALL_DOC_DIR=%{gammu_docdir} \
+ -DINSTALL_LIB_DIR=%{_lib} \
+ -DINSTALL_LIBDATA_DIR=%{_lib} \
-DINSTALL_LSB_INIT=ON \
- -DCMAKE_INSTALL_PREFIX=%_prefix \
- -DINSTALL_DOC_DIR=%gammu_docdir \
- -DINSTALL_LIB_DIR=%_lib \
- -DINSTALL_LIBDATA_DIR=%_lib
-make %{?_smp_mflags} %{!?_smp_mflags:%{?jobs:-j %jobs}}
+ -DINSTALL_UDEV_RULES=ON \
+ -DSYSTEMD_FOUND=ON \
+ -DWITH_SYSTEMD=ON \
+ -DSYSTEMD_SERVICES_INSTALL_DIR=%{_libexecdir}/systemd/system
+make %{?_smp_mflags} VERBOSE=1
%check
-cd build-dir
+cd build
ctest -V
+cd ..
%install
-%if 0%{?suse_version} == 0
-rm -rf %buildroot
-mkdir %buildroot
-%endif
-make -C build-dir install DESTDIR=%buildroot
+make -C build install DESTDIR=%{buildroot}
+
+# Install config file
+install -pm 0644 docs/config/smsdrc %{buildroot}%{_sysconfdir}/gammu-smsdrc
+
+# Move init script to correct location
+if [ /etc/init.d != %{_initddir} ] ; then
+ install -d -m 0755 %{buildroot}%{_initddir}
+ mv %{buildroot}/etc/init.d/gammu-smsd %{buildroot}%{_initddir}
+fi
+
%find_lang %{name}
%find_lang libgammu
-cat libgammu.lang >> %{name}.lang
-install -m644 docs/config/smsdrc %buildroot/etc/gammu-smsdrc
-%post -n libGammu7 -p /sbin/ldconfig
+%post -n libGammu%{so_ver} -p /sbin/ldconfig
-%post -n libgsmsd7 -p /sbin/ldconfig
+%postun -n libGammu%{so_ver} -p /sbin/ldconfig
-%postun -n libGammu7 -p /sbin/ldconfig
+%post -n libgsmsd%{so_ver} -p /sbin/ldconfig
-%postun -n libgsmsd7 -p /sbin/ldconfig
+%postun -n libgsmsd%{so_ver} -p /sbin/ldconfig
%post smsd
%if 0%{?mandriva_version}
-%_post_service gammu-smsd
+%{_post_service} gammu-smsd
%endif
%if 0%{?suse_version}
%fillup_and_insserv gammu-smsd
@@ -336,7 +327,7 @@ install -m644 docs/config/smsdrc %buildroot/etc/gammu-smsdrc
%stop_on_removal gammu-smsd
%endif
%if 0%{?mandriva_version}
-%_preun_service gammu-smsd
+%{_preun_service} gammu-smsd
%endif
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
if [ $1 = 0 ] ; then
@@ -353,53 +344,59 @@ fi
%endif
-%files -f %name.lang
-%defattr(-,root,root)
-%doc %gammu_docdir
-%config /etc/bash_completion.d/gammu
-%_bindir/gammu
-%_bindir/gammu-config
-%_bindir/gammu-detect
-%_bindir/jadmaker
-%_mandir/man1/gammu.1*
-%_mandir/man1/gammu-config.1*
-%_mandir/man1/gammu-detect.1*
-%_mandir/man1/jadmaker.1*
-%_mandir/man5/gammurc.5*
-%_mandir/man5/gammu-backup.5*
-%_mandir/man5/gammu-smsbackup.5*
-
-%files smsd
-%defattr(-,root,root)
-%_bindir/gammu-smsd
-%_bindir/gammu-smsd-inject
-%_bindir/gammu-smsd-monitor
-%_mandir/man1/gammu-smsd*
-%_mandir/man7/gammu-smsd*
-%_mandir/man5/gammu-smsd*
-%if 0%{?suse_version} > 1310 || 0%{?fedora_version} >= 15 || 0%{?centos_version} >= 700 || 0%{?rhel_version} >= 700 || 0%{?scientificlinux_version} >= 600
-/usr/lib/systemd/system/gammu-smsd.service
-%endif
-%attr(755,root,root) %config /etc/init.d/gammu-smsd
-%config /etc/gammu-smsdrc
-
-%files -n libGammu7
-%defattr(-,root,root)
-%_libdir/libGammu*.so.*
-%_datadir/gammu/
-
-%files -n libgsmsd7
-%defattr(-,root,root)
-%_libdir/libgsmsd*.so.*
+%files -f %{name}.lang
+%defattr(-,root,root,-)
+%config %{_sysconfdir}/bash_completion.d/gammu
+%{_bindir}/gammu
+%{_bindir}/gammu-config
+%{_bindir}/gammu-detect
+%{_bindir}/jadmaker
+%doc %{gammu_docdir}
+%doc %{_mandir}/man1/gammu-config.1*
+%doc %{_mandir}/man1/gammu-detect.1*
+%doc %{_mandir}/man1/gammu.1*
+%doc %{_mandir}/man1/jadmaker.1*
+%doc %{_mandir}/man5/gammu-backup.5*
+%doc %{_mandir}/man5/gammu-smsbackup.5*
+%doc %{_mandir}/man5/gammurc.5*
%files devel
-%defattr(-,root,root)
-%_includedir/%name
-%_libdir/pkgconfig/%name.pc
-%_libdir/pkgconfig/%name-smsd.pc
-%_libdir/*.so
+%defattr(-,root,root,-)
+%{_includedir}/gammu/
+%{_libdir}/*.so
+%{_libdir}/pkgconfig/gammu-smsd.pc
+%{_libdir}/pkgconfig/gammu.pc
-%clean
-rm -rf %buildroot
+%files smsd
+%defattr(-,root,root)
+%attr(755,root,root) %config %{_initddir}/gammu-smsd
+%config %{_sysconfdir}/gammu-smsdrc
+%{_bindir}/gammu-smsd
+%{_bindir}/gammu-smsd-inject
+%{_bindir}/gammu-smsd-monitor
+%doc %{_mandir}/man1/gammu-smsd-inject.1*
+%doc %{_mandir}/man1/gammu-smsd-monitor.1*
+%doc %{_mandir}/man1/gammu-smsd.1*
+%doc %{_mandir}/man5/gammu-smsdrc.5*
+%doc %{_mandir}/man7/gammu-smsd-dbi.7*
+%doc %{_mandir}/man7/gammu-smsd-files.7*
+%doc %{_mandir}/man7/gammu-smsd-mysql.7*
+%doc %{_mandir}/man7/gammu-smsd-null.7*
+%doc %{_mandir}/man7/gammu-smsd-odbc.7*
+%doc %{_mandir}/man7/gammu-smsd-pgsql.7*
+%doc %{_mandir}/man7/gammu-smsd-run.7*
+%doc %{_mandir}/man7/gammu-smsd-sql.7*
+%doc %{_mandir}/man7/gammu-smsd-tables.7*
+%{_libexecdir}/systemd/system/gammu-smsd.service
+
+%files -n libGammu%{so_ver} -f libgammu.lang
+%defattr(-,root,root,-)
+%{_libdir}/libGammu.so.%{so_ver}*
+%{_datadir}/gammu/
+/etc/udev/rules.d/69-gammu-acl.rules
+
+%files -n libgsmsd%{so_ver}
+%defattr(-,root,root,-)
+%{_libdir}/libgsmsd.so.%{so_ver}*
%changelog
diff --git a/helper/win32-dirent.c b/helper/win32-dirent.c
index 527c015..c86a73c 100644
--- a/helper/win32-dirent.c
+++ b/helper/win32-dirent.c
@@ -4,7 +4,7 @@
*
* w32lib is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
+ * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* w32lib is distributed in the hope that it will be useful,
@@ -13,24 +13,28 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
*
* For more information and a list of changes, see w32lib.h
*/
-#include <io.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
-#include "win32-dirent.h"
+#include <dirent.h>
+
+#include "w32lib.h"
+
+
DIR *
opendir ( const char *name )
{
DIR *dir;
-
+
dir = calloc (1, sizeof *dir + strlen (name));
if (!dir)
return NULL;
@@ -38,7 +42,7 @@ opendir ( const char *name )
return dir;
}
-int
+int
closedir (DIR *dir)
{
FindClose( (HANDLE)dir->dd_handle );
@@ -52,12 +56,12 @@ readdir( DIR *dir )
WIN32_FIND_DATA fInfo;
struct dirent *xdirent;
int ret;
-
+
if ( !dir->dd_handle )
{
char *dirname;
-
- if (*dir->dd_name)
+
+ if (*dir->dd_name)
{
size_t n = strlen (dir->dd_name);
dirname = malloc (n + 4 + 1);
@@ -77,23 +81,22 @@ readdir( DIR *dir )
ret = 0;
else
ret = 1;
- }
+ }
else if ( dir->dd_handle != -1l )
{
ret = FindNextFile ((HANDLE)dir->dd_handle, &fInfo);
}
else
ret = 0;
- if ( !ret )
+ if ( !ret )
return NULL;
xdirent = calloc ( 1, sizeof *xdirent);
if (xdirent)
{
- strncpy (xdirent->d_name, fInfo.cFileName, FILENAME_MAX - 1 );
- xdirent->d_name[FILENAME_MAX - 1] = 0;
+ strncpy (xdirent->d_name, fInfo.cFileName, FILENAME_MAX -1 );
+ xdirent->d_name[FILENAME_MAX-1] = 0;
xdirent->d_namlen = strlen( xdirent->d_name );
}
return xdirent;
}
-
diff --git a/helper/win32-dirent.h b/helper/win32-dirent.h
index 7c461e3..59f0dc8 100644
--- a/helper/win32-dirent.h
+++ b/helper/win32-dirent.h
@@ -4,7 +4,7 @@
*
* w32lib is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
+ * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* w32lib is distributed in the hope that it will be useful,
@@ -13,7 +13,9 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
*
* For more information and a list of changes, see w32lib.h
*/
diff --git a/libgammu/debug.c b/libgammu/debug.c
index 9e1fb66..40d270f 100644
--- a/libgammu/debug.c
+++ b/libgammu/debug.c
@@ -189,35 +189,35 @@ gboolean GSM_SetDebugLevel(const char *info, GSM_Debug_Info *privdi)
privdi->dl = DL_NONE;
return TRUE;
}
- if (!strcasecmp(info, "nothing")) {
+ if (strcasecmp(info, "nothing") == 0) {
privdi->dl = DL_NONE;
return TRUE;
}
- if (!strcasecmp(info, "text")) {
+ if (strcasecmp(info, "text") == 0) {
privdi->dl = DL_TEXT;
return TRUE;
}
- if (!strcasecmp(info, "textall")) {
+ if (strcasecmp(info, "textall") == 0) {
privdi->dl = DL_TEXTALL;
return TRUE;
}
- if (!strcasecmp(info, "binary")) {
+ if (strcasecmp(info, "binary") == 0) {
privdi->dl = DL_BINARY;
return TRUE;
}
- if (!strcasecmp(info, "errors")) {
+ if (strcasecmp(info, "errors") == 0) {
privdi->dl = DL_TEXTERROR;
return TRUE;
}
- if (!strcasecmp(info, "textdate")) {
+ if (strcasecmp(info, "textdate") == 0) {
privdi->dl = DL_TEXTDATE;
return TRUE;
}
- if (!strcasecmp(info, "textalldate")) {
+ if (strcasecmp(info, "textalldate") == 0) {
privdi->dl = DL_TEXTALLDATE;
return TRUE;
}
- if (!strcasecmp(info, "errorsdate")) {
+ if (strcasecmp(info, "errorsdate") == 0) {
privdi->dl = DL_TEXTERRORDATE;
return TRUE;
}
diff --git a/libgammu/device/serial/ser_unx.c b/libgammu/device/serial/ser_unx.c
index 6755bf1..845e5b1 100644
--- a/libgammu/device/serial/ser_unx.c
+++ b/libgammu/device/serial/ser_unx.c
@@ -56,7 +56,9 @@ typedef struct {
int value;
} baud_record;
-#ifdef B19200
+#ifdef B115200
+# define SERIAL_DEFAULT_SPEED 115200
+#elif defined(B19200)
# define SERIAL_DEFAULT_SPEED 19200
#else
# define SERIAL_DEFAULT_SPEED 9600
diff --git a/libgammu/gsmstate.c b/libgammu/gsmstate.c
index 2742eaa..542948c 100644
--- a/libgammu/gsmstate.c
+++ b/libgammu/gsmstate.c
@@ -944,9 +944,6 @@ GSM_Error GSM_WaitForOnce(GSM_StateMachine *s, unsigned const char *buffer,
if (GSM_ReadDevice(s, TRUE) > 0) {
i = 0;
} else {
- if (s->Abort) {
- return ERR_ABORTED;
- }
usleep(10000);
}
@@ -956,6 +953,10 @@ GSM_Error GSM_WaitForOnce(GSM_StateMachine *s, unsigned const char *buffer,
Phone->SentMsg = NULL;
}
+ if (s->Abort) {
+ return ERR_ABORTED;
+ }
+
/* Request completed */
if (Phone->RequestID == ID_None) {
return Phone->DispatchError;
@@ -977,7 +978,9 @@ GSM_Error GSM_WaitFor (GSM_StateMachine *s, unsigned const char *buffer,
if (s->CurrentConfig->StartInfo) {
if (Phone->StartInfoCounter > 0) {
Phone->StartInfoCounter--;
- if (Phone->StartInfoCounter == 0) s->Phone.Functions->ShowStartInfo(s,FALSE);
+ if (Phone->StartInfoCounter == 0) {
+ s->Phone.Functions->ShowStartInfo(s,FALSE);
+ }
}
}
@@ -1020,8 +1023,8 @@ static GSM_Error CheckReplyFunctions(GSM_StateMachine *s, GSM_Reply_Function *Re
gboolean available = FALSE;
int i = 0;
- while (Reply[i].requestID!=ID_None) {
- execute=FALSE;
+ while (Reply[i].requestID != ID_None) {
+ execute = FALSE;
/* Long ID frames like S60 */
if (Reply[i].msgtype[0] == 0 && Reply[i].subtypechar == 0) {
if (Reply[i].subtype == msg->Type) {
@@ -1035,7 +1038,9 @@ static GSM_Error CheckReplyFunctions(GSM_StateMachine *s, GSM_Reply_Function *Re
if (msg->Buffer[Reply[i].subtypechar]==Reply[i].subtype)
execute=TRUE;
}
- } else execute=TRUE;
+ } else {
+ execute=TRUE;
+ }
}
} else {
if (strlen(Reply[i].msgtype) < msg->Length) {
@@ -1046,13 +1051,13 @@ static GSM_Error CheckReplyFunctions(GSM_StateMachine *s, GSM_Reply_Function *Re
}
if (execute) {
- *reply=i;
+ *reply = i;
if (Reply[i].requestID == ID_IncomingFrame ||
Reply[i].requestID == Data->RequestID ||
Data->RequestID == ID_EachFrame) {
return ERR_NONE;
}
- available=TRUE;
+ available = TRUE;
}
i++;
}
@@ -1073,26 +1078,26 @@ GSM_Error GSM_DispatchMessage(GSM_StateMachine *s)
GSM_Reply_Function *Reply;
int reply;
- GSM_DumpMessageLevel2Recv(s, msg->Buffer, msg->Length, msg->Type);
- GSM_DumpMessageLevel3Recv(s, msg->Buffer, msg->Length, msg->Type);
+ GSM_DumpMessageTextRecv(s, msg->Buffer, msg->Length, msg->Type);
+ GSM_DumpMessageBinaryRecv(s, msg->Buffer, msg->Length, msg->Type);
Reply = s->User.UserReplyFunctions;
if (Reply != NULL) {
- error = CheckReplyFunctions(s,Reply,&reply);
+ error = CheckReplyFunctions(s, Reply, &reply);
}
if (error == ERR_UNKNOWNFRAME) {
Reply = s->Phone.Functions->ReplyFunctions;
- error = CheckReplyFunctions(s,Reply,&reply);
+ error = CheckReplyFunctions(s, Reply, &reply);
}
- if (error==ERR_NONE) {
- error=Reply[reply].Function(msg, s);
- if (Reply[reply].requestID==Phone->RequestID) {
+ if (error == ERR_NONE) {
+ error = Reply[reply].Function(msg, s);
+ if (Reply[reply].requestID == Phone->RequestID) {
if (error == ERR_NEEDANOTHERANSWER) {
error = ERR_NONE;
} else {
- Phone->RequestID=ID_None;
+ Phone->RequestID = ID_None;
}
}
}
@@ -1484,7 +1489,7 @@ fail:
return error;
}
-void GSM_DumpMessageLevel2_Text(GSM_StateMachine *s, unsigned const char *message, int messagesize, int type, const char *text)
+void GSM_DumpMessageText_Custom(GSM_StateMachine *s, unsigned const char *message, int messagesize, int type, const char *text)
{
GSM_Debug_Info *curdi;
@@ -1494,24 +1499,24 @@ void GSM_DumpMessageLevel2_Text(GSM_StateMachine *s, unsigned const char *messag
curdi->dl == DL_TEXTALL ||
curdi->dl == DL_TEXTDATE ||
curdi->dl == DL_TEXTALLDATE) {
- smprintf(s, "%s", text);
+ smprintf(s, "%s ", text);
smprintf(s, "type 0x%02X/length 0x%02X/%i",
type, messagesize, messagesize);
DumpMessage(curdi, message, messagesize);
}
}
-void GSM_DumpMessageLevel2(GSM_StateMachine *s, unsigned const char *message, int messagesize, int type)
+void GSM_DumpMessageText(GSM_StateMachine *s, unsigned const char *message, int messagesize, int type)
{
- GSM_DumpMessageLevel2_Text(s, message, messagesize, type, "SENDING frame");
+ GSM_DumpMessageText_Custom(s, message, messagesize, type, "SENDING frame");
}
-void GSM_DumpMessageLevel2Recv(GSM_StateMachine *s, unsigned const char *message, int messagesize, int type)
+void GSM_DumpMessageTextRecv(GSM_StateMachine *s, unsigned const char *message, int messagesize, int type)
{
- GSM_DumpMessageLevel2_Text(s, message, messagesize, type, "RECEIVED frame");
+ GSM_DumpMessageText_Custom(s, message, messagesize, type, "RECEIVED frame");
}
-void GSM_DumpMessageLevel3_Custom(GSM_StateMachine *s, unsigned const char *message, int messagesize, int type, int direction)
+void GSM_DumpMessageBinary_Custom(GSM_StateMachine *s, unsigned const char *message, int messagesize, int type, int direction)
{
int i=0;
GSM_Debug_Info *curdi;
@@ -1529,14 +1534,14 @@ void GSM_DumpMessageLevel3_Custom(GSM_StateMachine *s, unsigned const char *mess
}
}
}
-void GSM_DumpMessageLevel3(GSM_StateMachine *s, unsigned const char *message, int messagesize, int type)
+void GSM_DumpMessageBinary(GSM_StateMachine *s, unsigned const char *message, int messagesize, int type)
{
- GSM_DumpMessageLevel3_Custom(s, message, messagesize, type, 0x01);
+ GSM_DumpMessageBinary_Custom(s, message, messagesize, type, 0x01);
}
-void GSM_DumpMessageLevel3Recv(GSM_StateMachine *s, unsigned const char *message, int messagesize, int type)
+void GSM_DumpMessageBinaryRecv(GSM_StateMachine *s, unsigned const char *message, int messagesize, int type)
{
- GSM_DumpMessageLevel3_Custom(s, message, messagesize, type, 0x02);
+ GSM_DumpMessageBinary_Custom(s, message, messagesize, type, 0x02);
}
void GSM_OSErrorInfo(GSM_StateMachine *s, const char *description)
diff --git a/libgammu/gsmstate.h b/libgammu/gsmstate.h
index 038b27f..09773f1 100644
--- a/libgammu/gsmstate.h
+++ b/libgammu/gsmstate.h
@@ -1453,10 +1453,10 @@ GSM_Error GSM_WaitFor (GSM_StateMachine *s, unsigned const char *buffer,
GSM_Error GSM_DispatchMessage (GSM_StateMachine *s);
-void GSM_DumpMessageLevel2 (GSM_StateMachine *s, unsigned const char *message, int messagesize, int type);
-void GSM_DumpMessageLevel2Recv (GSM_StateMachine *s, unsigned const char *message, int messagesize, int type);
-void GSM_DumpMessageLevel3 (GSM_StateMachine *s, unsigned const char *message, int messagesize, int type);
-void GSM_DumpMessageLevel3Recv(GSM_StateMachine *s, unsigned const char *message, int messagesize, int type);
+void GSM_DumpMessageText (GSM_StateMachine *s, unsigned const char *message, int messagesize, int type);
+void GSM_DumpMessageTextRecv (GSM_StateMachine *s, unsigned const char *message, int messagesize, int type);
+void GSM_DumpMessageBinary (GSM_StateMachine *s, unsigned const char *message, int messagesize, int type);
+void GSM_DumpMessageBinaryRecv(GSM_StateMachine *s, unsigned const char *message, int messagesize, int type);
void GSM_OSErrorInfo(GSM_StateMachine *s, const char *description);
diff --git a/libgammu/misc/misc.c b/libgammu/misc/misc.c
index 887df53..1438284 100644
--- a/libgammu/misc/misc.c
+++ b/libgammu/misc/misc.c
@@ -142,12 +142,12 @@ char *DayOfWeek (unsigned int year, unsigned int month, unsigned int day)
}
int GSM_GetLocalTimezoneOffset() {
- struct tm *tg, *tl;
+ struct tm tg, tl;
time_t now = time(NULL);
- tg = gmtime(&now);
- tl = localtime(&now);
+ gmtime_r(&now, &tg);
+ localtime_r(&now, &tl);
// Returns offset including daylight saving (found as boolean in tl.tm_isdst).
- return (tl->tm_hour - tg->tm_hour) * 3600 + (tl->tm_min - tg->tm_min) * 60 + (tl->tm_sec - tg->tm_sec);
+ return mktime(&tl) - mktime(&tg);
}
void GSM_DateTimeToTimestamp(GSM_DateTime *Date, char *str)
diff --git a/libgammu/phone/at/at-sms.c b/libgammu/phone/at/at-sms.c
index 4fe2c23..dd3ea1d 100644
--- a/libgammu/phone/at/at-sms.c
+++ b/libgammu/phone/at/at-sms.c
@@ -2637,7 +2637,7 @@ GSM_Error ATGEN_SetIncomingCB(GSM_StateMachine *s, gboolean enable)
#ifdef GSM_ENABLE_CELLBROADCAST
GSM_Error error = ERR_NONE;
GSM_Phone_ATGENData *Priv = &s->Phone.Data.Priv.ATGEN;
- char buffer[100] = {'\0'};
+ char buffer[100];
int length = 0;
if (Priv->CNMIMode == -1) {
diff --git a/libgammu/phone/at/atgen.c b/libgammu/phone/at/atgen.c
index 773f56e..fb46f13 100644
--- a/libgammu/phone/at/atgen.c
+++ b/libgammu/phone/at/atgen.c
@@ -2225,7 +2225,6 @@ GSM_Error ATGEN_Initialise(GSM_StateMachine *s)
/* We don't care about error here */
error = ATGEN_WaitForAutoLen(s, "AT+SYNCML=?\r", 0x00, 20, ID_SetOBEX);
error = ERR_NONE;
- smprintf(s, "Checking for SYNCML/OBEX support\n");
/* We don't care about error here */
error = ATGEN_WaitForAutoLen(s, "AT$TSSPCSW=?\r", 0x00, 20, ID_SetOBEX);
error = ERR_NONE;
@@ -5911,7 +5910,6 @@ GSM_Error ATGEN_ReplyCheckProt(GSM_Protocol_Message *msg, GSM_StateMachine *s)
}
GSM_Reply_Function ATGENReplyFunctions[] = {
-{ATGEN_GenericReply, "AT\r" ,0x00,0x00,ID_IncomingFrame },
{ATGEN_GenericReply, "ATE1" ,0x00,0x00,ID_EnableEcho },
{ATGEN_GenericReply, "ERROR" ,0x00,0x00,ID_EnableEcho },
{ATGEN_GenericReply, "OK" ,0x00,0x00,ID_EnableEcho },
@@ -6081,8 +6079,13 @@ GSM_Reply_Function ATGENReplyFunctions[] = {
{ATGEN_GenericReplyIgnore, "^BOOT:" ,0x00,0x00,ID_IncomingFrame },
{ATGEN_GenericReplyIgnore, "^MODE:" ,0x00,0x00,ID_IncomingFrame },
{ATGEN_GenericReplyIgnore, "^DSFLOWRPT:" ,0x00,0x00,ID_IncomingFrame },
+{ATGEN_GenericReplyIgnore, "^CSNR:" ,0x00,0x00,ID_IncomingFrame },
+{ATGEN_GenericReplyIgnore, "^HCSQ:" ,0x00,0x00,ID_IncomingFrame },
+{ATGEN_GenericReplyIgnore, "^SRVST:" ,0x00,0x00,ID_IncomingFrame },
+{ATGEN_GenericReplyIgnore, "^SIMST:" ,0x00,0x00,ID_IncomingFrame },
{ATGEN_GenericReplyIgnore, "+ZUSIMR:" ,0x00,0x00,ID_IncomingFrame },
{ATGEN_GenericReplyIgnore, "+ZEND" ,0x00,0x00,ID_IncomingFrame },
+{ATGEN_GenericReplyIgnore, "+CDSI:" ,0x00,0x00,ID_IncomingFrame },
/* Sony Ericsson screenshot */
{SONYERICSSON_Reply_Screenshot, "AT*ZISI=?\r", 0x00,0x00,ID_Screenshot },
@@ -6121,8 +6124,11 @@ GSM_Reply_Function ATGENReplyFunctions[] = {
{ALCATEL_ProtocolVersionReply, "AT+CPROT=?" ,0x00,0x00,ID_AlcatelProtocol },
{ATGEN_GenericReply, "AT+CPROT=16" ,0x00,0x00,ID_AlcatelConnect },
#endif
-{ATGEN_GenericReply, "OK" ,0x00,0x00,ID_Initialise },
{ATGEN_GenericReply, "AT+CFUN=" ,0x00,0x00,ID_SetPower },
+{ATGEN_GenericReply, "AT\r" ,0x00,0x00,ID_Initialise },
+{ATGEN_GenericReply, "AT\n" ,0x00,0x00,ID_Initialise },
+{ATGEN_GenericReply, "OK" ,0x00,0x00,ID_Initialise },
+{ATGEN_GenericReply, "AT\r" ,0x00,0x00,ID_IncomingFrame },
{NULL, "\x00" ,0x00,0x00,ID_None }
};
diff --git a/libgammu/protocol/alcatel/alcabus.c b/libgammu/protocol/alcatel/alcabus.c
index 6ee418b..542dd36 100644
--- a/libgammu/protocol/alcatel/alcabus.c
+++ b/libgammu/protocol/alcatel/alcabus.c
@@ -73,8 +73,8 @@ static GSM_Error ALCABUS_WriteMessage (GSM_StateMachine *s, unsigned const char
buffer[size] = checksum;
size ++;
- GSM_DumpMessageLevel2(s, buffer, size, type);
- GSM_DumpMessageLevel3(s, buffer, size, type);
+ GSM_DumpMessageText(s, buffer, size, type);
+ GSM_DumpMessageBinary(s, buffer, size, type);
while (sent != size ) {
i = s->Device.Functions->WriteDevice(s,buffer + sent, size - sent);
diff --git a/libgammu/protocol/at/at.c b/libgammu/protocol/at/at.c
index 3eb0e18..d79204d 100644
--- a/libgammu/protocol/at/at.c
+++ b/libgammu/protocol/at/at.c
@@ -16,8 +16,8 @@ static GSM_Error AT_WriteMessage (GSM_StateMachine *s, unsigned const char *buff
{
int sent=0, write_data=0, i=0;
- GSM_DumpMessageLevel2(s, buffer, length, type);
- GSM_DumpMessageLevel3(s, buffer, length, type);
+ GSM_DumpMessageText(s, buffer, length, type);
+ GSM_DumpMessageBinary(s, buffer, length, type);
if (s->Protocol.Data.AT.FastWrite) {
while (sent != length) {
@@ -133,6 +133,7 @@ static GSM_Error AT_StateMachine(GSM_StateMachine *s, unsigned char rx_char)
{"^CSNR:" ,1, ID_None}, /* ^CSNR:-93,-23 */
{"^HCSQ:" ,1, ID_None}, /* ^HCSQ:"LTE",59,50,161,24 */
{"^SRVST:" ,1, ID_None}, /* ^SRVST:0 */
+ {"^SIMST:" ,1, ID_None}, /* ^SIMST:1 */
/* ONDA */
{"+ZUSIMR:" ,1, ID_None}, /* +ZUSIMR:2 */
diff --git a/libgammu/protocol/nokia/fbus2.c b/libgammu/protocol/nokia/fbus2.c
index 541e2de..18cab9a 100644
--- a/libgammu/protocol/nokia/fbus2.c
+++ b/libgammu/protocol/nokia/fbus2.c
@@ -85,7 +85,7 @@ static GSM_Error FBUS2_WriteMessage (GSM_StateMachine *s,
GSM_Protocol_FBUS2Data *d = &s->Protocol.Data.FBUS2;
GSM_Error error;
- GSM_DumpMessageLevel3(s, MsgBuffer, MsgLength, MsgType);
+ GSM_DumpMessageBinary(s, MsgBuffer, MsgLength, MsgType);
nom = (MsgLength + FBUS2_MAX_TRANSMIT_LENGTH - 1) / FBUS2_MAX_TRANSMIT_LENGTH;
togo = MsgLength;
@@ -108,7 +108,7 @@ static GSM_Error FBUS2_WriteMessage (GSM_StateMachine *s,
buffer[thislength + 1] = seqnum;
togo = togo - thislength;
- GSM_DumpMessageLevel2(s, buffer, thislength, MsgType);
+ GSM_DumpMessageText(s, buffer, thislength, MsgType);
error = FBUS2_WriteFrame(s, buffer, thislength + 2, MsgType);
@@ -323,7 +323,7 @@ static void FBUS2_WriteDLR3(GSM_StateMachine *s, const char *command, int length
int w = 0,recvlen=0;
gboolean wassomething = FALSE;
- GSM_DumpMessageLevel2(s, command, length, 0xff);
+ GSM_DumpMessageText(s, command, length, 0xff);
s->Device.Functions->WriteDevice(s, command, length);
for (w = 0; w < timeout; w++) {
@@ -332,7 +332,7 @@ static void FBUS2_WriteDLR3(GSM_StateMachine *s, const char *command, int length
if (wassomething && recvlen == 0) {
return;
} else if (recvlen > 0) {
- GSM_DumpMessageLevel2Recv(s, buff, recvlen, 0xff);
+ GSM_DumpMessageTextRecv(s, buff, recvlen, 0xff);
wassomething = TRUE;
}
usleep(50000);
diff --git a/libgammu/protocol/nokia/mbus2.c b/libgammu/protocol/nokia/mbus2.c
index eb51748..da399a8 100644
--- a/libgammu/protocol/nokia/mbus2.c
+++ b/libgammu/protocol/nokia/mbus2.c
@@ -21,7 +21,7 @@ static GSM_Error MBUS2_WriteMessage (GSM_StateMachine *s,
GSM_Protocol_MBUS2Data *d = &s->Protocol.Data.MBUS2;
int i=0, sent=0, length=0;
- GSM_DumpMessageLevel3(s, MsgBuffer, MsgLength, MsgType);
+ GSM_DumpMessageBinary(s, MsgBuffer, MsgLength, MsgType);
buffer = (unsigned char *)malloc(MsgLength + 8);
@@ -56,7 +56,7 @@ static GSM_Error MBUS2_WriteMessage (GSM_StateMachine *s,
buffer[length++] = d->MsgSequenceNumber;
buffer[length++] = checksum;
- GSM_DumpMessageLevel2(s, buffer+6, MsgLength, MsgType);
+ GSM_DumpMessageText(s, buffer+6, MsgLength, MsgType);
/* Sending to phone */
sent=s->Device.Functions->WriteDevice(s,buffer,length);
diff --git a/libgammu/protocol/nokia/phonet.c b/libgammu/protocol/nokia/phonet.c
index cfa73df..e8efc34 100644
--- a/libgammu/protocol/nokia/phonet.c
+++ b/libgammu/protocol/nokia/phonet.c
@@ -33,7 +33,7 @@ static GSM_Error PHONET_WriteMessage (GSM_StateMachine *s,
int sent=0,length=0;
GSM_Protocol_PHONETData *d = &s->Protocol.Data.PHONET;
- GSM_DumpMessageLevel3(s, MsgBuffer, MsgLength, MsgType);
+ GSM_DumpMessageBinary(s, MsgBuffer, MsgLength, MsgType);
length=MsgLength + 6;
buffer = (unsigned char *)malloc(length);
@@ -50,7 +50,7 @@ static GSM_Error PHONET_WriteMessage (GSM_StateMachine *s,
memcpy(buffer + 6, MsgBuffer, MsgLength);
- GSM_DumpMessageLevel2(s, buffer + 6, MsgLength, MsgType);
+ GSM_DumpMessageText(s, buffer + 6, MsgLength, MsgType);
/* Sending to phone */
sent = s->Device.Functions->WriteDevice(s, buffer, length);
diff --git a/libgammu/protocol/obex/obex.c b/libgammu/protocol/obex/obex.c
index 144df07..feff665 100644
--- a/libgammu/protocol/obex/obex.c
+++ b/libgammu/protocol/obex/obex.c
@@ -23,8 +23,8 @@ static GSM_Error OBEX_WriteMessage (GSM_StateMachine *s, unsigned const char *Ms
OBEXAddBlock(buffer, &length, type, MsgBuffer, MsgLength);
- GSM_DumpMessageLevel2(s, buffer+3, MsgLength, type);
- GSM_DumpMessageLevel3(s, buffer+3, MsgLength, type);
+ GSM_DumpMessageText(s, buffer+3, MsgLength, type);
+ GSM_DumpMessageBinary(s, buffer+3, MsgLength, type);
/* Send it out... */
sent = s->Device.Functions->WriteDevice(s,buffer,length);
diff --git a/libgammu/protocol/s60/s60.c b/libgammu/protocol/s60/s60.c
index 3b85664..f933a3d 100644
--- a/libgammu/protocol/s60/s60.c
+++ b/libgammu/protocol/s60/s60.c
@@ -66,8 +66,8 @@ static GSM_Error S60_WriteMessage (GSM_StateMachine *s, unsigned const char *Msg
length += bufpos + 1;
/* Debugging */
- GSM_DumpMessageLevel3(s, buffer, length, MsgType);
- GSM_DumpMessageLevel2(s, buffer, length, MsgType);
+ GSM_DumpMessageBinary(s, buffer, length, MsgType);
+ GSM_DumpMessageText(s, buffer, length, MsgType);
sent = s->Device.Functions->WriteDevice(s, buffer, length);
free(buffer);
diff --git a/libgammu/protocol/symbian/gnapbus.c b/libgammu/protocol/symbian/gnapbus.c
index 3bb0999..c423bc4 100644
--- a/libgammu/protocol/symbian/gnapbus.c
+++ b/libgammu/protocol/symbian/gnapbus.c
@@ -18,7 +18,7 @@ static GSM_Error GNAPBUS_WriteMessage (GSM_StateMachine *s, unsigned const char
int sent=0,length=0,i=0;
unsigned char checksum=0;
- GSM_DumpMessageLevel3(s, MsgBuffer, MsgLength, MsgType);
+ GSM_DumpMessageBinary(s, MsgBuffer, MsgLength, MsgType);
buffer = (unsigned char *)malloc(MsgLength + 10);
@@ -43,8 +43,8 @@ static GSM_Error GNAPBUS_WriteMessage (GSM_StateMachine *s, unsigned const char
for (i = 1; i < length; i+=2) checksum ^= buffer[i];
buffer[length++] = checksum;
-/* GSM_DumpMessageLevel2(s, buffer, length, MsgType); */
- GSM_DumpMessageLevel2(s, MsgBuffer, MsgLength, MsgType);
+/* GSM_DumpMessageText(s, buffer, length, MsgType); */
+ GSM_DumpMessageText(s, MsgBuffer, MsgLength, MsgType);
/* Sending to phone */
sent = s->Device.Functions->WriteDevice(s,buffer,length);
@@ -101,7 +101,7 @@ static GSM_Error GNAPBUS_StateMachine(GSM_StateMachine *s, unsigned char rx_char
if (d->Msg.Count != ((d->Msg.Length+3)& ~1)) return ERR_NONE;
-/* GSM_DumpMessageLevel2(s, d->Msg.Buffer, d->Msg.Count, d->Msg.Type); */
+/* GSM_DumpMessageText(s, d->Msg.Buffer, d->Msg.Count, d->Msg.Type); */
/* printf("\n%02x %02x\n",d->Msg.CheckSum[0],d->Msg.CheckSum[1]); */
/* Checksum is incorrect */
if (d->Msg.CheckSum[0] != d->Msg.CheckSum[1]) {
diff --git a/locale/es/gammu.po b/locale/es/gammu.po
index dc071f5..1532c3c 100644
--- a/locale/es/gammu.po
+++ b/locale/es/gammu.po
@@ -11,16 +11,16 @@ msgstr ""
"Project-Id-Version: gammu\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2015-03-20 16:53+0100\n"
-"PO-Revision-Date: 2014-05-28 18:02+0200\n"
-"Last-Translator: Matías Bellone <matiasbellone+weblate@gmail.com>\n"
-"Language-Team: Spanish <https://hosted.weblate.org/projects/gammu/gammu/es/"
-">\n"
+"PO-Revision-Date: 2015-09-16 22:56+0200\n"
+"Last-Translator: Ronnie Simon <ronniesimonf@gmail.com>\n"
+"Language-Team: Spanish <https://hosted.weblate.org/projects/gammu/gammu/es/>"
+"\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 1.9-dev\n"
+"X-Generator: Weblate 2.4-dev\n"
#: gammu/backup.c:49 gammu/backup.c:72 gammu/backup.c:95 gammu/backup.c:116
#: helper/message-cmdline.c:373 helper/message-cmdline.c:397
@@ -1557,14 +1557,11 @@ msgstr ""
"autores."
#: gammu-detect/main.c:87 gammu/gammu.c:333
-#, fuzzy
#| msgid ""
#| "License GPLv2: GNU GPL version 2 <http://creativecommons.org/licenses/"
#| "GPL/2.0/>."
msgid "License GPLv2: GNU GPL version 2 <https://spdx.org/licenses/GPL-2.0>."
-msgstr ""
-"Licencia GPLv2: GNU GPL versión 2 <http://creativecommons.org/licenses/"
-"GPL/2.0/>."
+msgstr "Licencia GPLv2: GNU GPL versión 2 <https://spdx.org/licenses/GPL-2.0>."
#: gammu-detect/main.c:88 gammu/gammu.c:335
msgid "This is free software: you are free to change and redistribute it."
@@ -1791,9 +1788,9 @@ msgid "Name"
msgstr "Nombre"
#: gammu/gammu.c:91
-#, fuzzy, c-format
+#, c-format
msgid "[Gammu version %s]"
-msgstr "Versión de Gammu"
+msgstr "[Versión de Gammu %s]"
#: gammu/gammu.c:101
msgid "Protocols"
diff --git a/locale/es/libgammu.po b/locale/es/libgammu.po
index e807318..e3d5c61 100644
--- a/locale/es/libgammu.po
+++ b/locale/es/libgammu.po
@@ -11,15 +11,16 @@ msgstr ""
"Project-Id-Version: gammu\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2015-03-03 10:40+0100\n"
-"PO-Revision-Date: 2012-03-28 20:58+0200\n"
-"Last-Translator: Matías Bellone <matiasbellone@gmail.com>\n"
-"Language-Team: Español\n"
+"PO-Revision-Date: 2015-09-16 23:30+0200\n"
+"Last-Translator: Ronnie Simon <ronniesimonf@gmail.com>\n"
+"Language-Team: Spanish "
+"<https://hosted.weblate.org/projects/gammu/libgammu/es/>\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Weblate 0.8\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 2.4-dev\n"
#: libgammu/gsmcomon.c:84
msgid "No error."
@@ -357,9 +358,8 @@ msgid "Entry is read only."
msgstr "La entrada es sólo de lectura."
#: libgammu/gsmcomon.c:156
-#, fuzzy
msgid "Network error."
-msgstr "Sin error."
+msgstr "Error de red."
#: libgammu/gsmcomon.c:189
msgid "Unknown error description."