forked from sailfishos/ofono
Compare commits
1 Commits
1.29+git2
...
upgrade-2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cbd32e5aaa |
61
.gitignore
vendored
Normal file
61
.gitignore
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
*.o
|
||||
*.lo
|
||||
*.la
|
||||
.deps
|
||||
.libs
|
||||
.dirstamp
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
config.guess
|
||||
config.h
|
||||
config.h.in
|
||||
config.log
|
||||
config.status
|
||||
config.sub
|
||||
configure
|
||||
depcomp
|
||||
compile
|
||||
install-sh
|
||||
libtool
|
||||
ltmain.sh
|
||||
missing
|
||||
stamp-h1
|
||||
autom4te.cache
|
||||
test-driver
|
||||
test-suite.log
|
||||
|
||||
ofono.pc
|
||||
include/ofono
|
||||
include/version.h
|
||||
src/builtin.h
|
||||
src/ofonod
|
||||
src/ofono.service
|
||||
dundee/dundee
|
||||
dundee/dundee.service
|
||||
|
||||
unit/test-common
|
||||
unit/test-util
|
||||
unit/test-idmap
|
||||
unit/test-sms
|
||||
unit/test-sms-root
|
||||
unit/test-simutil
|
||||
unit/test-mux
|
||||
unit/test-caif
|
||||
unit/test-stkutil
|
||||
unit/test-cdmasms
|
||||
unit/test-*.log
|
||||
unit/test-*.trs
|
||||
|
||||
tools/huawei-audio
|
||||
tools/auto-enable
|
||||
tools/get-location
|
||||
tools/lookup-apn
|
||||
tools/lookup-provider-name
|
||||
tools/tty-redirector
|
||||
tools/qmi
|
||||
tools/stktest
|
||||
|
||||
gatchat/gsmdial
|
||||
gatchat/test-server
|
||||
gatchat/test-qcdm
|
||||
7
.mailmap
Normal file
7
.mailmap
Normal file
@@ -0,0 +1,7 @@
|
||||
Luiz Augusto von Dentz <luiz.dentz-von@nokia.com> <luiz.dentz-von@nokia.com>
|
||||
Zhenhua Zhang <zhenhua.zhang@intel.com> <zhenhua.zhang@intel.com>
|
||||
Pekka Pessi <pekka.pessi@nokia.com> <Pekka.Pessi@nokia.com>
|
||||
Pekka Pessi <pekka.pessi@nokia.com> <ppessi@hamsa.research.nokia.com>
|
||||
Lasse Kunnasluoto <lasse.kunnasluoto@tieto.com> <Lasse.Kunnasluoto@tieto.com>
|
||||
Syam Sidhardhan <s.syam@samsung.com> <syamsidhardh@gmail.com>
|
||||
Michael Dietrich <mdt@emdete.de> <mdt@emdete.de>
|
||||
49
ofono/.gitignore
vendored
49
ofono/.gitignore
vendored
@@ -9,7 +9,7 @@ Makefile.in
|
||||
aclocal.m4
|
||||
config.guess
|
||||
config.h
|
||||
config.h.in*
|
||||
config.h.in
|
||||
config.log
|
||||
config.status
|
||||
config.sub
|
||||
@@ -32,8 +32,6 @@ src/ofono.service
|
||||
dundee/dundee
|
||||
dundee/dundee.service
|
||||
|
||||
test-driver
|
||||
test-suite.log
|
||||
unit/test-common
|
||||
unit/test-util
|
||||
unit/test-idmap
|
||||
@@ -42,53 +40,8 @@ unit/test-sms-root
|
||||
unit/test-simutil
|
||||
unit/test-mux
|
||||
unit/test-caif
|
||||
unit/test-cell-info
|
||||
unit/test-cell-info-control
|
||||
unit/test-cell-info-dbus
|
||||
unit/test-stkutil
|
||||
unit/test-cdmasms
|
||||
unit/test-conf
|
||||
unit/test-dbus-access
|
||||
unit/test-dbus-clients
|
||||
unit/test-dbus-queue
|
||||
unit/test-gprs-filter
|
||||
unit/test-ril_config
|
||||
unit/test-ril_ecclist
|
||||
unit/test-ril_util
|
||||
unit/test-ril_vendor
|
||||
unit/test-ril-transport
|
||||
unit/test-rilmodem-cb
|
||||
unit/test-rilmodem-cs
|
||||
unit/test-rilmodem-gprs
|
||||
unit/test-rilmodem-sms
|
||||
unit/test-sailfish_access
|
||||
unit/test-slot-manager
|
||||
unit/test-watch
|
||||
unit/test-sim-info
|
||||
unit/test-sim-info-dbus
|
||||
unit/test-sms-filter
|
||||
unit/test-voicecall-filter
|
||||
unit/test-*.log
|
||||
unit/test-*.trs
|
||||
unit/test-mbim
|
||||
|
||||
unit/test-grilreply
|
||||
unit/test-grilrequest
|
||||
unit/test-grilunsol
|
||||
unit/test-provision
|
||||
unit/html
|
||||
|
||||
plugins/sailfish_manager/*.gcda
|
||||
plugins/sailfish_manager/*.gcno
|
||||
drivers/*/*.gcda
|
||||
drivers/*/*.gcno
|
||||
drivers/*/*.gcov
|
||||
plugins/*/*.gcda
|
||||
plugins/*/*.gcno
|
||||
plugins/*/*.gcov
|
||||
*/*.gcda
|
||||
*/*.gcno
|
||||
*/*.gcov
|
||||
|
||||
tools/huawei-audio
|
||||
tools/auto-enable
|
||||
|
||||
@@ -104,40 +104,3 @@ Alex J Lennon <ajlennon@dynamicdevices.co.uk>
|
||||
Sergey Alirzaev <zl29ah@gmail.com>
|
||||
Marko Sulejic <marko.sulejic@hale.at>
|
||||
Johannes 'josch' Schauer <josch@mister-muffin.de>
|
||||
Simon Fels <simon.fels@canonical.com>
|
||||
John Ernberg <john.ernberg@actia.se>
|
||||
Dongsu Park <dongsu@endocode.com>
|
||||
Dragos Tatulea <dragos@endocode.com>
|
||||
Samrat Guha Niyogi <samrat.guha.niyogi@intel.com>
|
||||
Anirudh Gargi <anirudh.gargi@intel.com>
|
||||
Nishanth V <nishanth.v@intel.com>
|
||||
Antara Borwankar <antara.borwankar@gmail.com>
|
||||
Martin Chaplet <m.chaplet@kerlink.fr>
|
||||
Suman Mallela <suman.m@intel.com>
|
||||
Rajagopal Aravindan <rajagopalx.aravindan@intel.com>
|
||||
Ankit Navik <ankit.p.navik@intel.com>
|
||||
Antoine Aubert <a.aubert@overkiz.com>
|
||||
Djalal Harouni <djalal@endocode.com>
|
||||
Christophe Ronco <c.ronco@kerlink.fr>
|
||||
Vincent Cesson <vincent.cesson@smile.fr>
|
||||
Piotr Haber <gluedig@gmail.com>
|
||||
André Draszik <git@andred.net>
|
||||
Lukasz Nowak <lnowak@tycoint.com>
|
||||
Jonas Bonn <jonas@southpole.se>
|
||||
Matthijs Kooijman <matthijs@stdin.nl>
|
||||
Clayton Craft <clayton@craftyguy.net>
|
||||
Joey Hewitt <joey@joeyhewitt.com>
|
||||
Richard Röjfors <richard.rojfors@gmail.com>
|
||||
Philippe De Swert <philippe.deswert@nomovok.com>
|
||||
Gabriel Lucas <gabriel.lucas@smile.fr>
|
||||
Mariem Cherif <mariem.cherif@ardia.com.tn>
|
||||
Bassem Boubaker <bassem.boubaker@actia.fr>
|
||||
Bob Ham <bob.ham@puri.sm>
|
||||
Varun Gargi <varun.gargi@intel.com>
|
||||
Florent Beillonnet <florent.beillonnet@gmail.com>
|
||||
Martin Hundebøll <martin@geanix.com>
|
||||
Julien Tournier <tournier.julien@gmail.com>
|
||||
Nandini Rebello <nandini.rebello@intel.com>
|
||||
Giacinto Cifelli <gciofono@gmail.com>
|
||||
Khaled Romdhani <khaledromdhani216@gmail.com>
|
||||
Pavel Machek <pavel@ucw.cz>
|
||||
|
||||
129
ofono/ChangeLog
129
ofono/ChangeLog
@@ -1,132 +1,3 @@
|
||||
ver 1.29:
|
||||
Fix issue with QMI and SIM initialized notification.
|
||||
Add support for multiple PDP contexts and xmm7xxx modems.
|
||||
Add support for handling Dual SIM Single Active feature
|
||||
Add support for SIM PIN caching feature.
|
||||
|
||||
ver 1.28:
|
||||
Fix issue with SIM initialization and Gemalto modems.
|
||||
|
||||
ver 1.27:
|
||||
Add support for handling SIMCom based SIM800 modems.
|
||||
Add support for SIM lock state with xmm7xxx modems.
|
||||
Add support for coexistence feature with xmm7xxx modems.
|
||||
|
||||
ver 1.26:
|
||||
Fix issue with AT callback handler and GPRS.
|
||||
Fix issue with handling EUTRAN SMS only states.
|
||||
Fix issue with handling MBIM strings on big endian.
|
||||
Fix issue with missing char and SMS national language.
|
||||
Fix issue with unsolicited notifications of +CGAUTH/+CGDCONT.
|
||||
Add support for setting "none" authentication method.
|
||||
Add support for SMS and phonebook with xmm7xxx modems.
|
||||
Add support for voice features and Gemalto modems.
|
||||
Add support for Bengali and Gujrati SMS alphabets.
|
||||
Add support for 8 additional languages for GSM 7 bit
|
||||
Add support for using internal Embedded Linux library.
|
||||
|
||||
ver 1.25:
|
||||
Fix issue with handling GPRS context release.
|
||||
Fix issue with GPRS context shutdown and Huawei modems.
|
||||
Fix issue with roaming status report and QMI devices.
|
||||
Add support for voice call handling of U-Blox modems
|
||||
Add support for EUTRAN technology reporting.
|
||||
|
||||
ver 1.24:
|
||||
Fix issue with property changed signals and CDMA networks.
|
||||
Fix issue with handling SIM filesystem and SIM removal.
|
||||
Fix issue with handling PIN state and incorrect codes.
|
||||
Fix issue with handling of parsing AID type.
|
||||
Fix issue with SIM detection and QMI devices.
|
||||
Fix issue with PIN handling and QMI devices.
|
||||
Fix issue with USSD handling and QMI devices.
|
||||
Fix issue with handling USSD TERMINATED response.
|
||||
Fix issue with handling USSD reset and STK REFRESH.
|
||||
Add support for detecting Gemalto ALS3 modems.
|
||||
Add support for SIMCom based SIM7100E modems.
|
||||
|
||||
ver 1.23:
|
||||
Fix issue with handling SIM AID sessions.
|
||||
Add support for QMI LTE bearer handling.
|
||||
Add support for memory location dialing.
|
||||
|
||||
ver 1.22:
|
||||
Fix issue with GPIO handling and Nokia modems.
|
||||
Fix issue with SIM state callback and AT modems.
|
||||
Fix issue with data mode and DCD for U-Blox modems.
|
||||
Fix issue with SMS receive on QMI based Quectel EC21.
|
||||
Fix issue with HFP support and last call dialed request.
|
||||
Fix issue with PIM retires handling and Gemalto modems.
|
||||
Fix issue with atom registration and SIM state handling.
|
||||
Add support for handling SIM card AID session management.
|
||||
Add support for handling GSM/UMTS and IMS authentication.
|
||||
Add support for IP Multimedia Subsystem (IMS) atom.
|
||||
Add support for MBIM based modems.
|
||||
|
||||
ver 1.21:
|
||||
Fix issue with USSD notification received handling.
|
||||
Fix issue with crashing SIM filesystem notifications.
|
||||
Fix issue with LTE bearer reporting and Huawei modems.
|
||||
Fix issue with invalid memory access and QMI.
|
||||
Add support for QMI SIM writing functionality.
|
||||
Add support for RAT selection for QMI modems.
|
||||
Add support for network monitor agent interface.
|
||||
Add support for Cinterion Hardware Monitor interface.
|
||||
Add support for LTE atom driver for Huawei modems.
|
||||
Add support for LTE atom driver for AT modems.
|
||||
Add support for Intel xmm7xxx series modems.
|
||||
|
||||
ver 1.20:
|
||||
Fix issue with context removal before activation.
|
||||
Fix issue with update during GPRS context activation.
|
||||
Fix issue with receiving UTF-16 encoded messages.
|
||||
Fix issue with invalid access in CBS decoding.
|
||||
Fix issue with signal strength on QMI modems.
|
||||
Fix issue with PIN handling with QMI modems.
|
||||
Fix issue with QMI notification message handling.
|
||||
Fix issue with facility lock query on SIM removal.
|
||||
Fix issue with parsing +CLCC and +CCWA fields.
|
||||
Add support for obtaining IMSI via EF reading.
|
||||
Add support for additional netmon info types.
|
||||
Add support for provisioning via configuration files.
|
||||
Add support for Gemalto P-family series of modems.
|
||||
Add support for Telit HE910 and UE910 variants.
|
||||
Add support for Intel SoFIA SIM Toolkit interfaces.
|
||||
Add support for Intel SoFIA LTE features.
|
||||
Add support for U-Blox TOBY-L2 LTE feature.
|
||||
Add support for dedicated LTE atom.
|
||||
|
||||
ver 1.19:
|
||||
Fix issue with DHCP parsing and Huawei modems.
|
||||
Fix issue with detecting Huawei E3372 modem.
|
||||
Fix issue with handling serving cell info.
|
||||
Fix issue with handling SIM SC facility lock.
|
||||
Fix issue with Android RIL PIN retry logic.
|
||||
Fix issue with Android RIL and RAT handling.
|
||||
Add support for Android RIL cell broadcast.
|
||||
Add support for SoFIA 3GR thermal management.
|
||||
|
||||
ver 1.18:
|
||||
Fix issue with cell broadcast and use-after-fee.
|
||||
Fix issue with repeated held call indicator.
|
||||
Fix issue with +CCWA and connection setup.
|
||||
Fix issue with empty operator scan results.
|
||||
Fix issue with persistent RAT mode handling.
|
||||
Fix issue with multiparty call introspection.
|
||||
Fix issue with GRPS context introspection.
|
||||
Fix issue with stale context deactivation.
|
||||
Add support for automatic context activation.
|
||||
Add support for SIM service provider names.
|
||||
Add support for handling allowed APN lists.
|
||||
Add support for network monitoring interface.
|
||||
Add support for U-Blox TOBY-L2 modem series.
|
||||
Add support for Sierra MC73xx QMI modems.
|
||||
Add support for SoFIA 3GR modem series.
|
||||
Add support for upower battery monitoring.
|
||||
Add support for gateway audio card types.
|
||||
Add support for Handsfree audio driver.
|
||||
Add support for Android RIL integration.
|
||||
|
||||
ver 1.17:
|
||||
Fix issue with alphanumeric TP-OA handling.
|
||||
Fix issue with push notification origin port.
|
||||
|
||||
@@ -113,5 +113,3 @@ doc/coding-style.txt.
|
||||
a feature that touches files under 'include/', 'src/' and 'drivers/'
|
||||
directories, split in three separated patches, taking care not to
|
||||
break compilation.
|
||||
|
||||
4) Submit patches using git send-email to ofono@ofono.org
|
||||
|
||||
@@ -21,16 +21,9 @@ pkginclude_HEADERS = include/log.h include/plugin.h include/history.h \
|
||||
include/cdma-connman.h include/gnss.h \
|
||||
include/private-network.h include/cdma-netreg.h \
|
||||
include/cdma-provision.h include/handsfree.h \
|
||||
include/handsfree-audio.h \
|
||||
include/sim-mnclength.h \
|
||||
include/handsfree-audio.h include/siri.h \
|
||||
include/sms-filter.h include/gprs-filter.h \
|
||||
include/voicecall-filter.h include/dbus-access.h \
|
||||
include/ril-constants.h include/ril-transport.h \
|
||||
include/watch.h gdbus/gdbus.h include/dbus-clients.h \
|
||||
include/netmon.h include/lte.h include/ims.h \
|
||||
include/slot.h include/cell-info.h \
|
||||
include/storage.h include/conf.h include/misc.h \
|
||||
include/mtu-limit.h
|
||||
include/siri.h
|
||||
|
||||
nodist_pkginclude_HEADERS = include/version.h
|
||||
|
||||
@@ -65,7 +58,7 @@ endif
|
||||
builtin_modules =
|
||||
builtin_sources =
|
||||
builtin_libadd =
|
||||
builtin_cflags = -DSAILFISH_OS
|
||||
builtin_cflags =
|
||||
|
||||
noinst_LTLIBRARIES += gdbus/libgdbus-internal.la
|
||||
|
||||
@@ -104,19 +97,20 @@ gisi_sources = gisi/client.c gisi/client.h gisi/common.h \
|
||||
gisi/server.c gisi/server.h \
|
||||
gisi/socket.c gisi/socket.h
|
||||
|
||||
gril_sources = gril/gril.h gril/gril.c \
|
||||
gril/grilio.h gril/grilio.c \
|
||||
gril/grilutil.h gril/grilutil.c \
|
||||
gril/gfunc.h gril/gril.h \
|
||||
gril_sources = gril/gril.h gril/gril.c gril/grilio.h \
|
||||
gril/grilio.c gril/grilutil.h \
|
||||
gril/grilutil.c gril/ringbuffer.h \
|
||||
gril/gfunc.h gril/ril.h \
|
||||
gril/parcel.c gril/parcel.h \
|
||||
gril/ril_constants.h
|
||||
gril/grilreply.c gril/grilreply.h \
|
||||
gril/grilrequest.c gril/grilrequest.h \
|
||||
gril/grilunsol.c gril/grilunsol.h
|
||||
|
||||
btio_sources = btio/btio.h btio/btio.c
|
||||
|
||||
builtin_modules += cellinfo_netmon generic_phonebook
|
||||
builtin_sources += plugins/cellinfo-netmon.c plugins/generic-phonebook.c
|
||||
|
||||
if UDEV
|
||||
builtin_modules += udev
|
||||
builtin_sources += plugins/udev.c
|
||||
builtin_cflags += @UDEV_CFLAGS@
|
||||
builtin_libadd += @UDEV_LIBS@
|
||||
|
||||
@@ -124,34 +118,63 @@ builtin_modules += udevng
|
||||
builtin_sources += plugins/udevng.c
|
||||
endif
|
||||
|
||||
if SAILFISH_ACCESS
|
||||
builtin_modules += sailfish_access
|
||||
builtin_sources += plugins/sailfish_access.c
|
||||
if RILMODEM
|
||||
if JOLLA_RILMODEM
|
||||
builtin_modules += ril
|
||||
builtin_sources += drivers/ril/ril_call_barring.c \
|
||||
drivers/ril/ril_call_forward.c \
|
||||
drivers/ril/ril_call_settings.c \
|
||||
drivers/ril/ril_call_volume.c \
|
||||
drivers/ril/ril_cell_info.c \
|
||||
drivers/ril/ril_cell_info_dbus.c \
|
||||
drivers/ril/ril_config.c \
|
||||
drivers/ril/ril_cbs.c \
|
||||
drivers/ril/ril_data.c \
|
||||
drivers/ril/ril_devinfo.c \
|
||||
drivers/ril/ril_ecclist.c \
|
||||
drivers/ril/ril_gprs.c \
|
||||
drivers/ril/ril_gprs_context.c \
|
||||
drivers/ril/ril_mce.c \
|
||||
drivers/ril/ril_modem.c \
|
||||
drivers/ril/ril_mtu.c \
|
||||
drivers/ril/ril_netreg.c \
|
||||
drivers/ril/ril_network.c \
|
||||
drivers/ril/ril_oem_raw.c \
|
||||
drivers/ril/ril_phonebook.c \
|
||||
drivers/ril/ril_plugin.c \
|
||||
drivers/ril/ril_plugin_dbus.c \
|
||||
drivers/ril/ril_radio.c \
|
||||
drivers/ril/ril_radio_settings.c \
|
||||
drivers/ril/ril_sim.c \
|
||||
drivers/ril/ril_sim_card.c \
|
||||
drivers/ril/ril_sim_info.c \
|
||||
drivers/ril/ril_sim_info_dbus.c \
|
||||
drivers/ril/ril_sim_settings.c \
|
||||
drivers/ril/ril_sms.c \
|
||||
drivers/ril/ril_stk.c \
|
||||
drivers/ril/ril_ussd.c \
|
||||
drivers/ril/ril_util.c \
|
||||
drivers/ril/ril_voicecall.c
|
||||
|
||||
if DATAFILES
|
||||
dist_conf_DATA += drivers/ril/ril_subscription.conf
|
||||
endif
|
||||
|
||||
if RILMODEM
|
||||
else
|
||||
builtin_sources += $(gril_sources)
|
||||
|
||||
builtin_modules += rildev
|
||||
builtin_sources += plugins/rildev.c
|
||||
|
||||
builtin_modules += ril
|
||||
builtin_sources += plugins/ril.c plugins/ril.h
|
||||
|
||||
builtin_modules += infineon
|
||||
builtin_sources += plugins/infineon.c
|
||||
|
||||
builtin_modules += ril_intel
|
||||
builtin_sources += plugins/ril_intel.c
|
||||
builtin_sources += plugins/ril.c
|
||||
|
||||
builtin_modules += rilmodem
|
||||
builtin_sources += drivers/rilmodem/rilmodem.h \
|
||||
drivers/rilmodem/vendor.h \
|
||||
drivers/rilmodem/rilmodem.c \
|
||||
drivers/rilmodem/devinfo.c \
|
||||
drivers/rilmodem/network-registration.c \
|
||||
drivers/rilmodem/voicecall.c \
|
||||
drivers/rilmodem/voicecall.h \
|
||||
drivers/rilmodem/call-volume.c \
|
||||
drivers/rilmodem/gprs.c \
|
||||
drivers/rilmodem/gprs-context.c \
|
||||
@@ -159,16 +182,21 @@ builtin_sources += drivers/rilmodem/rilmodem.h \
|
||||
drivers/rilmodem/sms.c \
|
||||
drivers/rilmodem/rilutil.c \
|
||||
drivers/rilmodem/rilutil.h \
|
||||
drivers/rilmodem/radio-settings.c \
|
||||
drivers/rilmodem/phonebook.c \
|
||||
drivers/rilmodem/ussd.c \
|
||||
drivers/rilmodem/call-settings.c \
|
||||
drivers/rilmodem/call-forwarding.c \
|
||||
drivers/rilmodem/radio-settings.c \
|
||||
drivers/rilmodem/call-barring.c \
|
||||
drivers/rilmodem/netmon.c \
|
||||
drivers/rilmodem/stk.c \
|
||||
drivers/rilmodem/cbs.c \
|
||||
drivers/infineonmodem/infineon_constants.h \
|
||||
drivers/rilmodem/lte.c
|
||||
drivers/rilmodem/oemraw-messages.c \
|
||||
drivers/rilmodem/call-barring.c \
|
||||
drivers/rilmodem/stk.c
|
||||
|
||||
if DATAFILES
|
||||
dist_conf_DATA += gril/ril_subscription.conf
|
||||
endif
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
if ISIMODEM
|
||||
@@ -226,14 +254,11 @@ qmi_sources = drivers/qmimodem/qmi.h drivers/qmimodem/qmi.c \
|
||||
drivers/qmimodem/ctl.h \
|
||||
drivers/qmimodem/dms.h \
|
||||
drivers/qmimodem/nas.h \
|
||||
drivers/qmimodem/nas.c \
|
||||
drivers/qmimodem/uim.h \
|
||||
drivers/qmimodem/wms.h \
|
||||
drivers/qmimodem/wds.h \
|
||||
drivers/qmimodem/pds.h \
|
||||
drivers/qmimodem/common.h \
|
||||
drivers/qmimodem/wda.h \
|
||||
drivers/qmimodem/voice.h
|
||||
drivers/qmimodem/common.h
|
||||
|
||||
builtin_modules += qmimodem
|
||||
builtin_sources += $(qmi_sources) \
|
||||
@@ -249,10 +274,8 @@ builtin_sources += $(qmi_sources) \
|
||||
drivers/qmimodem/ussd.c \
|
||||
drivers/qmimodem/gprs.c \
|
||||
drivers/qmimodem/gprs-context.c \
|
||||
drivers/qmimodem/lte.c \
|
||||
drivers/qmimodem/radio-settings.c \
|
||||
drivers/qmimodem/location-reporting.c \
|
||||
drivers/qmimodem/netmon.c
|
||||
drivers/qmimodem/location-reporting.c
|
||||
|
||||
builtin_modules += gobi
|
||||
builtin_sources += plugins/gobi.c
|
||||
@@ -260,7 +283,8 @@ endif
|
||||
|
||||
if ATMODEM
|
||||
builtin_modules += atmodem
|
||||
builtin_sources += drivers/atmodem/atmodem.h \
|
||||
builtin_sources += $(gatchat_sources) \
|
||||
drivers/atmodem/atmodem.h \
|
||||
drivers/atmodem/atmodem.c \
|
||||
drivers/atmodem/call-settings.c \
|
||||
drivers/atmodem/sms.c \
|
||||
@@ -282,8 +306,8 @@ builtin_sources += drivers/atmodem/atmodem.h \
|
||||
drivers/atmodem/atutil.c \
|
||||
drivers/atmodem/gprs.c \
|
||||
drivers/atmodem/gprs-context.c \
|
||||
drivers/atmodem/gnss.c \
|
||||
drivers/atmodem/lte.c
|
||||
drivers/atmodem/sim-auth.c \
|
||||
drivers/atmodem/gnss.c
|
||||
|
||||
builtin_modules += nwmodem
|
||||
builtin_sources += drivers/atmodem/atutil.h \
|
||||
@@ -340,8 +364,7 @@ builtin_modules += telitmodem
|
||||
builtin_sources += drivers/atmodem/atutil.h \
|
||||
drivers/telitmodem/telitmodem.h \
|
||||
drivers/telitmodem/telitmodem.c \
|
||||
drivers/telitmodem/location-reporting.c \
|
||||
drivers/telitmodem/gprs-context-ncm.c
|
||||
drivers/telitmodem/location-reporting.c
|
||||
|
||||
builtin_modules += hsomodem
|
||||
builtin_sources += drivers/atmodem/atutil.h \
|
||||
@@ -399,30 +422,6 @@ builtin_sources += drivers/atmodem/atutil.h \
|
||||
drivers/speedupmodem/speedupmodem.c \
|
||||
drivers/speedupmodem/ussd.c
|
||||
|
||||
builtin_modules += ubloxmodem
|
||||
builtin_sources += drivers/atmodem/atutil.h \
|
||||
drivers/ubloxmodem/ubloxmodem.h \
|
||||
drivers/ubloxmodem/ubloxmodem.c \
|
||||
drivers/ubloxmodem/gprs-context.c \
|
||||
drivers/ubloxmodem/netmon.c \
|
||||
drivers/ubloxmodem/lte.c
|
||||
|
||||
|
||||
builtin_modules += gemaltomodem
|
||||
builtin_sources += drivers/atmodem/atutil.h \
|
||||
drivers/gemaltomodem/gemaltomodem.h \
|
||||
drivers/gemaltomodem/gemaltomodem.c \
|
||||
drivers/gemaltomodem/location-reporting.c \
|
||||
drivers/gemaltomodem/voicecall.c
|
||||
|
||||
builtin_modules += xmm7modem
|
||||
builtin_sources += drivers/atmodem/atutil.h \
|
||||
drivers/xmm7modem/xmm7modem.h \
|
||||
drivers/xmm7modem/xmm7modem.c \
|
||||
drivers/xmm7modem/radio-settings.c \
|
||||
drivers/xmm7modem/ims.c \
|
||||
drivers/xmm7modem/netmon.c
|
||||
|
||||
if PHONESIM
|
||||
builtin_modules += phonesim
|
||||
builtin_sources += plugins/phonesim.c
|
||||
@@ -441,7 +440,7 @@ builtin_sources += drivers/cdmamodem/cdmamodem.h \
|
||||
drivers/cdmamodem/connman.c
|
||||
endif
|
||||
|
||||
if EXTRA_MODEMS
|
||||
if !RILMODEM
|
||||
builtin_modules += g1
|
||||
builtin_sources += plugins/g1.c
|
||||
|
||||
@@ -487,9 +486,6 @@ builtin_sources += plugins/caif.c
|
||||
builtin_modules += cinterion
|
||||
builtin_sources += plugins/cinterion.c
|
||||
|
||||
builtin_modules += gemalto
|
||||
builtin_sources += plugins/gemalto.c
|
||||
|
||||
builtin_modules += nokia
|
||||
builtin_sources += plugins/nokia.c
|
||||
|
||||
@@ -517,56 +513,39 @@ builtin_sources += plugins/samsung.c
|
||||
builtin_modules += sim900
|
||||
builtin_sources += plugins/sim900.c
|
||||
|
||||
builtin_modules += sim7100
|
||||
builtin_sources += plugins/sim7100.c
|
||||
|
||||
builtin_modules += telit
|
||||
builtin_sources += plugins/telit.c
|
||||
|
||||
builtin_modules += quectel
|
||||
builtin_sources += plugins/quectel.c
|
||||
|
||||
builtin_modules += ublox
|
||||
builtin_sources += plugins/ublox.c
|
||||
|
||||
builtin_modules += xmm7xxx
|
||||
builtin_sources += plugins/xmm7xxx.c
|
||||
builtin_modules += he910
|
||||
builtin_sources += plugins/he910.c
|
||||
endif
|
||||
|
||||
builtin_modules += connman
|
||||
builtin_sources += plugins/connman.c
|
||||
|
||||
builtin_modules += mnclength
|
||||
builtin_sources += plugins/mnclength.c
|
||||
|
||||
if BLUETOOTH
|
||||
if BLUEZ4
|
||||
builtin_modules += sap
|
||||
builtin_sources += plugins/sap.c plugins/bluez4.h
|
||||
|
||||
builtin_modules += hfp_bluez4
|
||||
builtin_sources += plugins/hfp_hf_bluez4.c plugins/bluez4.h
|
||||
|
||||
builtin_modules += dun_gw_bluez4
|
||||
builtin_sources += plugins/dun_gw_bluez4.c plugins/bluez4.h
|
||||
else
|
||||
builtin_modules += hfp_bluez5
|
||||
builtin_sources += plugins/hfp_hf_bluez5.c plugins/bluez5.h
|
||||
|
||||
builtin_modules += dun_gw_bluez5
|
||||
builtin_sources += plugins/dun_gw_bluez5.c plugins/bluez5.h
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if BLUETOOTH
|
||||
if BLUEZ4
|
||||
builtin_modules += bluez4
|
||||
builtin_sources += plugins/bluez4.c plugins/bluez4.h
|
||||
|
||||
builtin_modules += telit
|
||||
builtin_sources += plugins/telit.c plugins/bluez4.h
|
||||
|
||||
builtin_modules += sap
|
||||
builtin_sources += plugins/sap.c plugins/bluez4.h
|
||||
|
||||
builtin_modules += hfp_bluez4
|
||||
builtin_sources += plugins/hfp_hf_bluez4.c plugins/bluez4.h
|
||||
|
||||
builtin_modules += hfp_ag_bluez4
|
||||
builtin_sources += plugins/hfp_ag_bluez4.c plugins/bluez4.h
|
||||
|
||||
builtin_modules += dun_gw_bluez4
|
||||
builtin_sources += plugins/dun_gw_bluez4.c plugins/bluez4.h
|
||||
|
||||
builtin_sources += $(btio_sources)
|
||||
builtin_cflags += @BLUEZ_CFLAGS@
|
||||
builtin_libadd += @BLUEZ_LIBS@
|
||||
@@ -574,19 +553,16 @@ else
|
||||
builtin_modules += bluez5
|
||||
builtin_sources += plugins/bluez5.c plugins/bluez5.h
|
||||
|
||||
builtin_modules += hfp_bluez5
|
||||
builtin_sources += plugins/hfp_hf_bluez5.c plugins/bluez5.h
|
||||
|
||||
builtin_modules += hfp_ag_bluez5
|
||||
builtin_sources += plugins/hfp_ag_bluez5.c plugins/bluez5.h
|
||||
|
||||
if SAILFISH_BT
|
||||
builtin_modules += sfos_bt
|
||||
builtin_sources += plugins/sailfish_bt.c
|
||||
builtin_modules += dun_gw_bluez5
|
||||
builtin_sources += plugins/dun_gw_bluez5.c plugins/bluez5.h
|
||||
endif
|
||||
endif
|
||||
|
||||
if UPOWER
|
||||
builtin_modules += upower
|
||||
builtin_sources += plugins/upower.c
|
||||
endif
|
||||
endif
|
||||
|
||||
if NETTIME
|
||||
@@ -594,32 +570,17 @@ builtin_modules += nettime
|
||||
builtin_sources += plugins/nettime.c
|
||||
endif
|
||||
|
||||
if SAILFISH_DEBUGLOG
|
||||
builtin_modules += debuglog
|
||||
builtin_sources += plugins/sailfish_debuglog.c
|
||||
endif
|
||||
|
||||
if SAILFISH_PROVISION
|
||||
builtin_sources += plugins/sailfish_provision.c
|
||||
PROVISION = 1
|
||||
else
|
||||
if PROVISION
|
||||
builtin_sources += plugins/provision.c
|
||||
endif
|
||||
endif
|
||||
|
||||
if PROVISION
|
||||
builtin_sources += plugins/mbpi.h plugins/mbpi.c
|
||||
|
||||
builtin_modules += provision
|
||||
builtin_sources += plugins/provision.h
|
||||
builtin_sources += plugins/provision.h plugins/provision.c
|
||||
|
||||
builtin_modules += cdma_provision
|
||||
builtin_sources += plugins/cdma-provision.c
|
||||
|
||||
builtin_modules += file_provision
|
||||
builtin_sources += plugins/file-provision.c
|
||||
|
||||
builtin_modules += mnclength
|
||||
builtin_sources += plugins/mnclength.c
|
||||
endif
|
||||
|
||||
if MAINTAINER_MODE
|
||||
@@ -651,51 +612,24 @@ builtin_sources += plugins/smart-messaging.c
|
||||
builtin_modules += push_notification
|
||||
builtin_sources += plugins/push-notification.c
|
||||
|
||||
if SAILFISH_PUSHFORWARDER
|
||||
builtin_modules += pushforwarder
|
||||
builtin_sources += plugins/sailfish_pushforwarder.c
|
||||
if PUSHFORWARDER
|
||||
builtin_modules += push_forwarder
|
||||
builtin_sources += plugins/push-forwarder.c
|
||||
builtin_cflags += @WSPCODEC_CFLAGS@
|
||||
builtin_libadd += @WSPCODEC_LIBS@
|
||||
endif
|
||||
|
||||
if DEBUGLOG
|
||||
builtin_modules += debuglog
|
||||
builtin_sources += plugins/debuglog.c
|
||||
endif
|
||||
|
||||
builtin_modules += sms_history
|
||||
builtin_sources += plugins/smshistory.c
|
||||
|
||||
builtin_modules += allowed_apns
|
||||
builtin_sources += plugins/allowed-apns.c
|
||||
|
||||
if ELL
|
||||
builtin_cflags += @ELL_CFLAGS@
|
||||
builtin_libadd += @ELL_LIBS@
|
||||
|
||||
if MBIMMODEM
|
||||
mbim_sources = drivers/mbimmodem/mbim.h \
|
||||
drivers/mbimmodem/mbim.c \
|
||||
drivers/mbimmodem/mbim-private.h \
|
||||
drivers/mbimmodem/mbim-desc.h \
|
||||
drivers/mbimmodem/mbim-desc.c \
|
||||
drivers/mbimmodem/mbim-message.h \
|
||||
drivers/mbimmodem/mbim-message.c
|
||||
|
||||
builtin_modules += mbimmodem
|
||||
builtin_sources += $(mbim_sources) \
|
||||
drivers/mbimmodem/util.h \
|
||||
drivers/mbimmodem/util.c \
|
||||
drivers/mbimmodem/mbimmodem.h \
|
||||
drivers/mbimmodem/mbimmodem.c \
|
||||
drivers/mbimmodem/devinfo.c \
|
||||
drivers/mbimmodem/sim.c \
|
||||
drivers/mbimmodem/network-registration.c \
|
||||
drivers/mbimmodem/sms.c \
|
||||
drivers/mbimmodem/gprs.c \
|
||||
drivers/mbimmodem/gprs-context.c
|
||||
|
||||
builtin_modules += mbim
|
||||
builtin_sources += plugins/mbim.c
|
||||
endif
|
||||
endif
|
||||
|
||||
sbin_PROGRAMS = src/ofonod
|
||||
|
||||
src_ofonod_SOURCES = $(builtin_sources) $(gatchat_sources) src/ofono.ver \
|
||||
src_ofonod_SOURCES = $(builtin_sources) src/ofono.ver \
|
||||
src/main.c src/ofono.h src/log.c src/plugin.c \
|
||||
src/modem.c src/common.h src/common.c \
|
||||
src/manager.c src/dbus.c src/util.h src/util.c \
|
||||
@@ -721,17 +655,7 @@ src_ofonod_SOURCES = $(builtin_sources) $(gatchat_sources) src/ofono.ver \
|
||||
src/cdma-provision.c src/handsfree.c \
|
||||
src/handsfree-audio.c src/bluetooth.h \
|
||||
src/sim-mnclength.c src/voicecallagent.c \
|
||||
src/sms-filter.c src/gprs-filter.c \
|
||||
src/dbus-clients.c src/dbus-queue.c src/dbus-access.c \
|
||||
src/voicecall-filter.c src/ril-transport.c \
|
||||
src/hfp.h src/siri.c src/watchlist.c \
|
||||
src/netmon.c src/lte.c src/ims.c \
|
||||
src/netmonagent.c src/netmonagent.h \
|
||||
src/slot-manager.c src/slot-manager-dbus.c \
|
||||
src/cell-info.c src/cell-info-dbus.c \
|
||||
src/cell-info-control.c \
|
||||
src/sim-info.c src/sim-info-dbus.c \
|
||||
src/conf.c src/mtu-limit.c
|
||||
src/hfp.h src/siri.c
|
||||
|
||||
src_ofonod_LDADD = gdbus/libgdbus-internal.la $(builtin_libadd) \
|
||||
@GLIB_LIBS@ @DBUS_LIBS@ -ldl
|
||||
@@ -741,8 +665,7 @@ src_ofonod_LDFLAGS = -Wl,--export-dynamic \
|
||||
|
||||
BUILT_SOURCES = $(local_headers) src/builtin.h
|
||||
|
||||
CLEANFILES = $(BUILT_SOURCES) $(rules_DATA) \
|
||||
$(shell find . -name "*.gcda") $(shell find . -name "*.gcno")
|
||||
CLEANFILES = $(BUILT_SOURCES) $(rules_DATA)
|
||||
|
||||
plugindir = $(pkglibdir)/plugins
|
||||
|
||||
@@ -778,12 +701,7 @@ doc_files = doc/overview.txt doc/ofono-paper.txt doc/release-faq.txt \
|
||||
doc/location-reporting-api.txt \
|
||||
doc/smshistory-api.txt doc/oemraw-api.txt \
|
||||
doc/certification.txt doc/siri-api.txt \
|
||||
doc/telit-modem.txt \
|
||||
doc/networkmonitor-api.txt \
|
||||
doc/allowed-apns-api.txt \
|
||||
doc/lte-api.txt \
|
||||
doc/cinterion-hardware-monitor-api.txt \
|
||||
doc/ims-api.txt
|
||||
doc/telit-modem.txt
|
||||
|
||||
|
||||
test_scripts = test/backtrace \
|
||||
@@ -817,7 +735,6 @@ test_scripts = test/backtrace \
|
||||
test/receive-sms \
|
||||
test/remove-contexts \
|
||||
test/send-sms \
|
||||
test/cancel-sms \
|
||||
test/set-mic-volume \
|
||||
test/set-speaker-volume \
|
||||
test/test-stk-menu \
|
||||
@@ -882,22 +799,7 @@ test_scripts = test/backtrace \
|
||||
test/set-msisdn \
|
||||
test/test-voicecallagent \
|
||||
test/get-network-time \
|
||||
test/set-ddr \
|
||||
test/register-auto \
|
||||
test/register-operator \
|
||||
test/set-sms-smsc \
|
||||
test/set-sms-bearer \
|
||||
test/get-serving-cell-info \
|
||||
test/list-allowed-access-points \
|
||||
test/enable-throttling \
|
||||
test/disable-throttling \
|
||||
test/set-lte-property \
|
||||
test/test-serving-cell-info \
|
||||
test/ims-register \
|
||||
test/ims-unregister \
|
||||
test/list-applications \
|
||||
test/set-sms-alphabet
|
||||
|
||||
test/set-ddr
|
||||
|
||||
if TEST
|
||||
testdir = $(pkglibdir)/test
|
||||
@@ -909,138 +811,35 @@ EXTRA_DIST = src/genbuiltin plugins/ofono.rules plugins/ofono-speedup.rules \
|
||||
|
||||
dist_man_MANS = doc/ofonod.8
|
||||
|
||||
if TEST_COVERAGE
|
||||
COVERAGE_OPT = --coverage
|
||||
endif
|
||||
|
||||
unit_objects =
|
||||
|
||||
unit_tests = unit/test-common unit/test-util unit/test-idmap \
|
||||
unit/test-simutil unit/test-stkutil \
|
||||
unit/test-sms unit/test-cdmasms
|
||||
|
||||
unit_test_conf_SOURCES = unit/test-conf.c src/conf.c src/log.c
|
||||
unit_test_conf_CFLAGS = $(AM_CFLAGS) $(COVERAGE_OPT)
|
||||
unit_test_conf_LDADD = @GLIB_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_conf_OBJECTS)
|
||||
unit_tests += unit/test-conf
|
||||
|
||||
unit_test_cell_info_SOURCES = unit/test-cell-info.c src/cell-info.c src/log.c
|
||||
unit_test_cell_info_CFLAGS = $(AM_CFLAGS) $(COVERAGE_OPT)
|
||||
unit_test_cell_info_LDADD = @GLIB_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_cell_info_OBJECTS)
|
||||
unit_tests += unit/test-cell-info
|
||||
|
||||
unit_test_cell_info_control_SOURCES = unit/test-cell-info-control.c \
|
||||
unit/fake_cell_info.c src/cell-info.c \
|
||||
src/cell-info-control.c src/log.c
|
||||
unit_test_cell_info_control_CFLAGS = $(AM_CFLAGS) $(COVERAGE_OPT)
|
||||
unit_test_cell_info_control_LDADD = @GLIB_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_cell_info_control_OBJECTS)
|
||||
unit_tests += unit/test-cell-info-control
|
||||
|
||||
unit_test_cell_info_dbus_SOURCES = unit/test-dbus.c \
|
||||
unit/test-cell-info-dbus.c unit/fake_cell_info.c \
|
||||
src/cell-info.c src/cell-info-dbus.c \
|
||||
src/cell-info-control.c gdbus/object.c \
|
||||
src/dbus-clients.c src/dbus.c src/log.c
|
||||
unit_test_cell_info_dbus_CFLAGS = $(AM_CFLAGS) $(COVERAGE_OPT) \
|
||||
@DBUS_GLIB_CFLAGS@
|
||||
unit_test_cell_info_dbus_LDADD = @DBUS_GLIB_LIBS@ @GLIB_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_cell_info_dbus_OBJECTS)
|
||||
unit_tests += unit/test-cell-info-dbus
|
||||
|
||||
unit_test_sim_info_SOURCES = unit/test-sim-info.c unit/fake_watch.c \
|
||||
src/sim-info.c src/storage.c src/watchlist.c src/log.c
|
||||
unit_test_sim_info_CFLAGS = $(COVERAGE_OPT) $(AM_CFLAGS) \
|
||||
-DSTORAGEDIR='"/tmp/ofono"'
|
||||
unit_test_sim_info_LDADD = @GLIB_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_sim_info_OBJECTS)
|
||||
unit_tests += unit/test-sim-info
|
||||
|
||||
unit_test_sim_info_dbus_SOURCES = unit/test-sim-info-dbus.c \
|
||||
unit/test-dbus.c unit/fake_watch.c \
|
||||
src/sim-info.c src/sim-info-dbus.c \
|
||||
gdbus/object.c \
|
||||
src/dbus.c src/storage.c src/watchlist.c src/log.c
|
||||
unit_test_sim_info_dbus_CFLAGS = $(COVERAGE_OPT) $(AM_CFLAGS) \
|
||||
@DBUS_GLIB_CFLAGS@ -DSTORAGEDIR='"/tmp/ofono"'
|
||||
unit_test_sim_info_dbus_LDADD = @DBUS_GLIB_LIBS@ @GLIB_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_sim_info_dbus_OBJECTS)
|
||||
unit_tests += unit/test-sim-info-dbus
|
||||
|
||||
unit_test_slot_manager_SOURCES = unit/test-slot-manager.c unit/fake_watch.c \
|
||||
unit/fake_cell_info.c src/slot-manager.c \
|
||||
src/cell-info.c src/cell-info-control.c \
|
||||
src/sim-info.c src/storage.c src/log.c
|
||||
unit_test_slot_manager_CFLAGS = $(AM_CFLAGS) $(COVERAGE_OPT) \
|
||||
-DSTORAGEDIR='"/tmp/ofono"'
|
||||
unit_test_slot_manager_LDADD = @GLIB_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_slot_manager_OBJECTS)
|
||||
unit_tests += unit/test-slot-manager
|
||||
|
||||
unit_test_watch_SOURCES = unit/test-watch.c src/watch.c \
|
||||
src/cell-info.c src/cell-info-control.c \
|
||||
src/log.c src/watchlist.c
|
||||
unit_test_watch_CFLAGS = $(AM_CFLAGS) $(COVERAGE_OPT) \
|
||||
-DSTORAGEDIR='"/tmp/ofono"'
|
||||
unit_test_watch_LDADD = @GLIB_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_watch_OBJECTS)
|
||||
unit_tests += unit/test-watch
|
||||
|
||||
if SAILFISH_ACCESS
|
||||
unit_test_sailfish_access_SOURCES = unit/test-sailfish_access.c \
|
||||
plugins/sailfish_access.c src/dbus-access.c src/log.c
|
||||
unit_test_sailfish_access_CFLAGS = $(AM_CFLAGS) $(COVERAGE_OPT)
|
||||
unit_test_sailfish_access_LDADD = @GLIB_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_sailfish_access_OBJECTS)
|
||||
unit_tests += unit/test-sailfish_access
|
||||
endif
|
||||
|
||||
unit_test_dbus_access_SOURCES = unit/test-dbus-access.c src/dbus-access.c \
|
||||
src/log.c
|
||||
unit_test_dbus_access_CFLAGS = $(AM_CFLAGS) $(COVERAGE_OPT)
|
||||
unit_test_dbus_access_LDADD = @GLIB_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_dbus_access_OBJECTS)
|
||||
unit_tests += unit/test-dbus-access
|
||||
|
||||
if RILMODEM
|
||||
unit_tests += unit/test-rilmodem-cs \
|
||||
unit/test-rilmodem-cs \
|
||||
unit/test-rilmodem-sms \
|
||||
unit/test-rilmodem-cb \
|
||||
unit/test-rilmodem-gprs
|
||||
|
||||
endif
|
||||
|
||||
if ELL
|
||||
if MBIMMODEM
|
||||
unit_tests += unit/test-mbim
|
||||
endif
|
||||
endif
|
||||
|
||||
unit/test-sms unit/test-cdmasms \
|
||||
unit/test-grilrequest \
|
||||
unit/test-grilreply \
|
||||
unit/test-grilunsol \
|
||||
unit/test-sms unit/test-cdmasms \
|
||||
unit/test-provision
|
||||
|
||||
noinst_PROGRAMS = $(unit_tests) \
|
||||
unit/test-sms-root unit/test-mux unit/test-caif
|
||||
|
||||
unit_test_common_SOURCES = unit/test-common.c src/common.c src/util.c
|
||||
unit_test_common_CFLAGS = $(COVERAGE_OPT) $(AM_CFLAGS)
|
||||
unit_test_common_LDADD = @GLIB_LIBS@
|
||||
unit_objects += $(unit_test_common_OBJECTS)
|
||||
|
||||
unit_test_util_SOURCES = unit/test-util.c src/util.c
|
||||
unit_test_util_CFLAGS = $(COVERAGE_OPT) $(AM_CFLAGS)
|
||||
unit_test_util_LDADD = @GLIB_LIBS@
|
||||
unit_objects += $(unit_test_utils_OBJECTS)
|
||||
|
||||
unit_test_idmap_SOURCES = unit/test-idmap.c src/idmap.c
|
||||
unit_test_idmap_CFLAGS = $(COVERAGE_OPT) $(AM_CFLAGS)
|
||||
unit_test_idmap_LDADD = @GLIB_LIBS@
|
||||
unit_objects += $(unit_test_idmap_OBJECTS)
|
||||
|
||||
unit_test_simutil_SOURCES = unit/test-simutil.c src/util.c \
|
||||
src/simutil.c src/smsutil.c src/storage.c
|
||||
unit_test_simutil_CFLAGS = $(COVERAGE_OPT) $(AM_CFLAGS)
|
||||
unit_test_simutil_LDADD = @GLIB_LIBS@
|
||||
unit_objects += $(unit_test_simutil_OBJECTS)
|
||||
|
||||
@@ -1048,23 +847,19 @@ unit_test_stkutil_SOURCES = unit/test-stkutil.c unit/stk-test-data.h \
|
||||
src/util.c \
|
||||
src/storage.c src/smsutil.c \
|
||||
src/simutil.c src/stkutil.c
|
||||
unit_test_stkutil_CFLAGS = $(COVERAGE_OPT) $(AM_CFLAGS)
|
||||
unit_test_stkutil_LDADD = @GLIB_LIBS@
|
||||
unit_objects += $(unit_test_stkutil_OBJECTS)
|
||||
|
||||
unit_test_sms_SOURCES = unit/test-sms.c src/util.c src/smsutil.c src/storage.c
|
||||
unit_test_sms_CFLAGS = $(COVERAGE_OPT) $(AM_CFLAGS)
|
||||
unit_test_sms_LDADD = @GLIB_LIBS@
|
||||
unit_objects += $(unit_test_sms_OBJECTS)
|
||||
|
||||
unit_test_cdmasms_SOURCES = unit/test-cdmasms.c src/cdma-smsutil.c
|
||||
unit_test_cdmasms_CFLAGS = $(COVERAGE_OPT) $(AM_CFLAGS)
|
||||
unit_test_cdmasms_LDADD = @GLIB_LIBS@
|
||||
unit_objects += $(unit_test_cdmasms_OBJECTS)
|
||||
|
||||
unit_test_sms_root_SOURCES = unit/test-sms-root.c \
|
||||
src/util.c src/smsutil.c src/storage.c
|
||||
unit_test_sms_root_CFLAGS = -DSTORAGEDIR='"/tmp/ofono"' $(COVERAGE_OPT) $(AM_CFLAGS)
|
||||
unit_test_sms_root_LDADD = @GLIB_LIBS@
|
||||
unit_objects += $(unit_test_sms_root_OBJECTS)
|
||||
|
||||
@@ -1075,106 +870,30 @@ unit_objects += $(unit_test_mux_OBJECTS)
|
||||
unit_test_caif_SOURCES = unit/test-caif.c $(gatchat_sources) \
|
||||
drivers/stemodem/caif_socket.h \
|
||||
drivers/stemodem/if_caif.h
|
||||
unit_test_caif_CFLAGS = $(COVERAGE_OPT) $(AM_CFLAGS)
|
||||
unit_test_caif_LDADD = @GLIB_LIBS@
|
||||
unit_objects += $(unit_test_caif_OBJECTS)
|
||||
|
||||
unit_test_dbus_clients_SOURCES = unit/test-dbus-clients.c unit/test-dbus.c \
|
||||
src/dbus-clients.c gdbus/object.c \
|
||||
src/dbus.c src/log.c
|
||||
unit_test_dbus_clients_CFLAGS = @DBUS_GLIB_CFLAGS@ $(COVERAGE_OPT) $(AM_CFLAGS)
|
||||
unit_test_dbus_clients_LDADD = @DBUS_GLIB_LIBS@ @GLIB_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_dbus_clients_OBJECTS)
|
||||
unit_tests += unit/test-dbus-clients
|
||||
unit_test_grilrequest_SOURCES = unit/test-grilrequest.c $(gril_sources) \
|
||||
src/log.c gatchat/ringbuffer.c
|
||||
unit_test_grilrequest_LDADD = @GLIB_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_grilrequest_OBJECTS)
|
||||
|
||||
unit_test_dbus_queue_SOURCES = unit/test-dbus-queue.c unit/test-dbus.c \
|
||||
src/dbus-queue.c gdbus/object.c \
|
||||
src/dbus.c src/log.c
|
||||
unit_test_dbus_queue_CFLAGS = @DBUS_GLIB_CFLAGS@ $(COVERAGE_OPT) $(AM_CFLAGS)
|
||||
unit_test_dbus_queue_LDADD = @DBUS_GLIB_LIBS@ @GLIB_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_dbus_queue_OBJECTS)
|
||||
unit_tests += unit/test-dbus-queue
|
||||
unit_test_grilreply_SOURCES = unit/test-grilreply.c $(gril_sources) \
|
||||
src/log.c gatchat/ringbuffer.c
|
||||
unit_test_grilreply_LDADD = @GLIB_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_grilreply_OBJECTS)
|
||||
|
||||
unit_test_grilunsol_SOURCES = unit/test-grilunsol.c $(gril_sources) \
|
||||
src/log.c gatchat/ringbuffer.c
|
||||
unit_test_grilunsol_LDADD = @GLIB_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_grilunsol_OBJECTS)
|
||||
|
||||
unit_test_provision_SOURCES = unit/test-provision.c \
|
||||
plugins/provision.h plugins/mbpi.c \
|
||||
plugins/sailfish_provision.c \
|
||||
src/gprs-provision.c src/log.c
|
||||
unit_test_provision_CFLAGS = $(COVERAGE_OPT) $(AM_CFLAGS)
|
||||
plugins/provision.h plugins/provision.c \
|
||||
plugins/mbpi.c src/gprs-provision.c \
|
||||
src/log.c
|
||||
unit_test_provision_LDADD = @GLIB_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_provision_OBJECTS)
|
||||
unit_tests += unit/test-provision
|
||||
|
||||
unit_test_ril_transport_SOURCES = unit/test-ril-transport.c \
|
||||
src/ril-transport.c src/log.c
|
||||
unit_test_ril_transport_CFLAGS = $(COVERAGE_OPT) $(AM_CFLAGS)
|
||||
unit_test_ril_transport_LDADD = @GLIB_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_ril_transport_OBJECTS)
|
||||
unit_tests += unit/test-ril-transport
|
||||
|
||||
unit_test_sms_filter_SOURCES = unit/test-sms-filter.c \
|
||||
src/sms-filter.c src/log.c
|
||||
unit_test_sms_filter_CFLAGS = $(COVERAGE_OPT) $(AM_CFLAGS)
|
||||
unit_test_sms_filter_LDADD = @GLIB_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_sms_filter_OBJECTS)
|
||||
unit_tests += unit/test-sms-filter
|
||||
|
||||
unit_test_gprs_filter_SOURCES = unit/test-gprs-filter.c \
|
||||
src/gprs-filter.c src/log.c
|
||||
unit_test_gprs_filter_CFLAGS = $(COVERAGE_OPT) $(AM_CFLAGS)
|
||||
unit_test_gprs_filter_LDADD = @GLIB_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_gprs_filter_OBJECTS)
|
||||
unit_tests += unit/test-gprs-filter
|
||||
|
||||
unit_test_voicecall_filter_SOURCES = unit/test-voicecall-filter.c \
|
||||
src/voicecall-filter.c src/log.c \
|
||||
src/common.c src/util.c
|
||||
unit_test_voicecall_filter_CFLAGS = $(COVERAGE_OPT) $(AM_CFLAGS)
|
||||
unit_test_voicecall_filter_LDADD = @GLIB_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_voicecall_filter_OBJECTS)
|
||||
unit_tests += unit/test-voicecall-filter
|
||||
|
||||
test_rilmodem_sources = $(gril_sources) src/log.c src/common.c src/util.c \
|
||||
gatchat/ringbuffer.h gatchat/ringbuffer.c \
|
||||
unit/rilmodem-test-server.h \
|
||||
unit/rilmodem-test-server.c \
|
||||
unit/rilmodem-test-engine.h \
|
||||
unit/rilmodem-test-engine.c \
|
||||
src/simutil.c \
|
||||
drivers/rilmodem/rilutil.c
|
||||
|
||||
unit_test_rilmodem_cs_SOURCES = $(test_rilmodem_sources) \
|
||||
unit/test-rilmodem-cs.c \
|
||||
drivers/rilmodem/call-settings.c
|
||||
unit_test_rilmodem_cs_LDADD = gdbus/libgdbus-internal.la $(builtin_libadd) \
|
||||
@GLIB_LIBS@ @DBUS_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_rilmodem_cs_OBJECTS)
|
||||
|
||||
unit_test_rilmodem_sms_SOURCES = $(test_rilmodem_sources) \
|
||||
unit/test-rilmodem-sms.c \
|
||||
drivers/rilmodem/sms.c
|
||||
unit_test_rilmodem_sms_LDADD = gdbus/libgdbus-internal.la $(builtin_libadd) \
|
||||
@GLIB_LIBS@ @DBUS_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_rilmodem_sms_OBJECTS)
|
||||
|
||||
unit_test_rilmodem_cb_SOURCES = $(test_rilmodem_sources) \
|
||||
unit/test-rilmodem-cb.c \
|
||||
drivers/rilmodem/call-barring.c
|
||||
unit_test_rilmodem_cb_LDADD = gdbus/libgdbus-internal.la $(builtin_libadd) \
|
||||
@GLIB_LIBS@ @DBUS_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_rilmodem_cb_OBJECTS)
|
||||
|
||||
unit_test_rilmodem_gprs_SOURCES = $(test_rilmodem_sources) \
|
||||
unit/test-rilmodem-gprs.c \
|
||||
drivers/rilmodem/gprs.c
|
||||
unit_test_rilmodem_gprs_LDADD = gdbus/libgdbus-internal.la $(builtin_libadd) \
|
||||
@GLIB_LIBS@ @DBUS_LIBS@ -ldl
|
||||
unit_objects += $(unit_test_rilmodem_gprs_OBJECTS)
|
||||
|
||||
unit_test_mbim_SOURCES = unit/test-mbim.c \
|
||||
drivers/mbimmodem/mbim-message.c \
|
||||
drivers/mbimmodem/mbim.c
|
||||
unit_test_mbim_LDADD = @ELL_LIBS@
|
||||
unit_objects += $(unit_test_mbim_OBJECTS)
|
||||
|
||||
TESTS = $(unit_tests)
|
||||
|
||||
@@ -1202,6 +921,13 @@ tools_lookup_provider_name_LDADD = @GLIB_LIBS@
|
||||
tools_tty_redirector_SOURCES = tools/tty-redirector.c
|
||||
tools_tty_redirector_LDADD = @GLIB_LIBS@
|
||||
|
||||
if QMIMODEM
|
||||
noinst_PROGRAMS += tools/qmi
|
||||
|
||||
tools_qmi_SOURCES = $(qmi_sources) tools/qmi.c
|
||||
tools_qmi_LDADD = @GLIB_LIBS@
|
||||
endif
|
||||
|
||||
if MAINTAINER_MODE
|
||||
noinst_PROGRAMS += tools/stktest
|
||||
|
||||
@@ -1270,10 +996,6 @@ include/ofono/version.h: include/version.h
|
||||
$(AM_V_at)$(MKDIR_P) include/ofono
|
||||
$(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
|
||||
|
||||
include/ofono/gdbus.h: $(abs_top_srcdir)/gdbus/gdbus.h
|
||||
$(AM_V_at)$(MKDIR_P) include/ofono
|
||||
$(AM_V_GEN)$(LN_S) $< $@
|
||||
|
||||
include/ofono/%.h: $(abs_top_srcdir)/include/%.h
|
||||
$(AM_V_at)$(MKDIR_P) include/ofono
|
||||
$(AM_V_GEN)$(LN_S) $< $@
|
||||
|
||||
10
ofono/TODO
10
ofono/TODO
@@ -256,16 +256,6 @@ Voicecall
|
||||
Priority: Medium
|
||||
Complexity: C1
|
||||
|
||||
- DTMF Driver hints
|
||||
|
||||
Currently multiple DTMF tones are sent to the driver in batches of up to 8
|
||||
characters. For those drivers that can only accept a limited set of DTMF
|
||||
characters at a time (e.g. one), add a setting to the core that will change
|
||||
this batch size limit.
|
||||
|
||||
Priority: Medium
|
||||
Complexity: C1
|
||||
|
||||
|
||||
Sim Toolkit
|
||||
===========
|
||||
|
||||
@@ -12,8 +12,7 @@ AC_DEFUN([AC_PROG_CC_PIE], [
|
||||
|
||||
AC_DEFUN([COMPILER_FLAGS], [
|
||||
if (test "${CFLAGS}" = ""); then
|
||||
CFLAGS="-Wall -O2 -fsigned-char -fno-exceptions"
|
||||
CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
|
||||
CFLAGS="-Wall -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
|
||||
fi
|
||||
if (test "$USE_MAINTAINER_MODE" = "yes"); then
|
||||
CFLAGS="$CFLAGS -Werror -Wextra"
|
||||
@@ -23,7 +22,6 @@ AC_DEFUN([COMPILER_FLAGS], [
|
||||
CFLAGS="$CFLAGS -Wmissing-declarations"
|
||||
CFLAGS="$CFLAGS -Wredundant-decls"
|
||||
CFLAGS="$CFLAGS -Wcast-align"
|
||||
CFLAGS="$CFLAGS -Wno-format-truncation"
|
||||
CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED"
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
AC_PREREQ(2.60)
|
||||
AC_INIT(ofono, 1.29)
|
||||
AC_INIT(ofono, 1.17)
|
||||
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects color-tests])
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
@@ -33,7 +33,7 @@ AC_PROG_LIBTOOL
|
||||
AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
|
||||
[disable code optimization through compiler]), [
|
||||
if (test "${enableval}" = "no"); then
|
||||
CFLAGS="$CFLAGS -O0 -U_FORTIFY_SOURCE"
|
||||
CFLAGS="$CFLAGS -O0"
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -55,26 +55,27 @@ AC_ARG_ENABLE(pie, AC_HELP_STRING([--enable-pie],
|
||||
fi
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE(threads, AC_HELP_STRING([--enable-threads],
|
||||
[enable threading support]), [enable_threads=${enableval}])
|
||||
|
||||
AC_CHECK_FUNC(signalfd, dummy=yes,
|
||||
AC_MSG_ERROR(signalfd support is required))
|
||||
|
||||
AC_CHECK_LIB(dl, dlopen, dummy=yes,
|
||||
AC_MSG_ERROR(dynamic linking loader is required))
|
||||
|
||||
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32, dummy=yes,
|
||||
AC_MSG_ERROR(GLib >= 2.32 is required))
|
||||
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28, dummy=yes,
|
||||
AC_MSG_ERROR(GLib >= 2.28 is required))
|
||||
AC_SUBST(GLIB_CFLAGS)
|
||||
AC_SUBST(GLIB_LIBS)
|
||||
|
||||
PKG_CHECK_MODULES(GOBJECT, gobject-2.0, dummy=yes,
|
||||
AC_MSG_ERROR(GObject is required))
|
||||
GLIB_CFLAGS="$GLIB_CFLAGS $GOBJECT_CFLAGS"
|
||||
GLIB_LIBS="$GLIB_LIBS $GOBJECT_LIBS"
|
||||
|
||||
PKG_CHECK_MODULES(GIO, gio-2.0, dummy=yes,
|
||||
AC_MSG_ERROR(GIO is required))
|
||||
GLIB_CFLAGS="$GLIB_CFLAGS $GIO_CFLAGS"
|
||||
GLIB_LIBS="$GLIB_LIBS $GIO_LIBS"
|
||||
if (test "${enable_threads}" = "yes"); then
|
||||
AC_DEFINE(NEED_THREADS, 1, [Define if threading support is required])
|
||||
PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes,
|
||||
AC_MSG_ERROR(GThread >= 2.16 is required))
|
||||
GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS"
|
||||
GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS"
|
||||
fi
|
||||
|
||||
PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.4, dummy=yes,
|
||||
AC_MSG_ERROR(D-Bus >= 1.4 is required))
|
||||
@@ -166,34 +167,19 @@ AC_ARG_ENABLE(rilmodem, AC_HELP_STRING([--disable-rilmodem],
|
||||
[enable_rilmodem=${enableval}])
|
||||
AM_CONDITIONAL(RILMODEM, test "${enable_rilmodem}" != "no")
|
||||
|
||||
AC_ARG_ENABLE(extra-modems,
|
||||
AC_HELP_STRING([--enable-extra-modems],
|
||||
[enable modems not used by Sailfish OS]),
|
||||
[enable_extra_modems=${enableval}])
|
||||
AM_CONDITIONAL(EXTRA_MODEMS, test "${enable_extra_modems}" = "yes")
|
||||
AC_ARG_ENABLE(jolla-rilmodem,
|
||||
AC_HELP_STRING([--enable-jolla-rilmodem], [enable Jolla RIL modem]),
|
||||
[enable_jolla_rilmodem=${enableval}], [enable_jolla_rilmodem="no"])
|
||||
AM_CONDITIONAL(JOLLA_RILMODEM, test "${enable_jolla_rilmodem}" != "no")
|
||||
|
||||
PKG_CHECK_MODULES(GLIBUTIL, libglibutil >= 1.0.51, dummy=yes,
|
||||
AC_MSG_ERROR(libglibutil >= 1.0.51 is required))
|
||||
CFLAGS="$CFLAGS $GLIBUTIL_CFLAGS"
|
||||
LIBS="$LIBS $GLIBUTIL_LIBS"
|
||||
|
||||
PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1, dummy=yes,
|
||||
AC_MSG_ERROR(dbus-glib is required by unit tests))
|
||||
AC_SUBST(DBUS_GLIB_CFLAGS)
|
||||
AC_SUBST(DBUS_GLIB_LIBS)
|
||||
|
||||
AC_ARG_ENABLE(add-remove-context, AC_HELP_STRING([--disable-add-remove-context],
|
||||
[don't allow to add or remove connection context over D-Bus]), [
|
||||
if (test "${enableval}" = "no"); then
|
||||
CFLAGS="$CFLAGS -DDISABLE_ADD_REMOVE_CONTEXT"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE(test-coverage,
|
||||
AC_HELP_STRING([--enable-test-coverage], [enable test code coverage]),
|
||||
[enable_test_coverage=${enableval}],
|
||||
[enable_test_coverage="no"])
|
||||
AM_CONDITIONAL(TEST_COVERAGE, test "${enable_test_coverage}" != "no")
|
||||
if (test "${enable_jolla_rilmodem}" = "yes"); then
|
||||
PKG_CHECK_MODULES(GRILIO, libgrilio >= 1.0.6, dummy=yes,
|
||||
AC_MSG_ERROR(libgrilio >= 1.0.6 is required))
|
||||
PKG_CHECK_MODULES(GLIBUTIL, libglibutil >= 1.0.5, dummy=yes,
|
||||
AC_MSG_ERROR(libglibutil >= 1.0.5 is required))
|
||||
CFLAGS="$CFLAGS $GRILIO_CFLAGS $GLIBUTIL_CFLAGS"
|
||||
LIBS="$LIBS $GRILIO_LIBS $GLIBUTIL_LIBS"
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(qmimodem, AC_HELP_STRING([--disable-qmimodem],
|
||||
[disable Qualcomm QMI modem support]),
|
||||
@@ -218,16 +204,6 @@ fi
|
||||
AM_CONDITIONAL(BLUEZ4, test "${enable_bluetooth}" != "no" && test "${enable_bluez4}" = "yes")
|
||||
AM_CONDITIONAL(BLUETOOTH, test "${enable_bluetooth}" != "no")
|
||||
|
||||
AC_ARG_ENABLE(sailfish-bt, AC_HELP_STRING([--enable-sailfish-bt],
|
||||
[enable Sailfish OS Bluetooth plugin]),
|
||||
[enable_sailfish_bt=${enableval}])
|
||||
AM_CONDITIONAL(SAILFISH_BT, test "${enable_sailfish_bt}" = "yes")
|
||||
|
||||
AC_ARG_ENABLE(sailfish-provision, AC_HELP_STRING([--enable-sailfish-provision],
|
||||
[enable Sailfish OS provisioning plugin]),
|
||||
[enable_sailfish_provision=${enableval}])
|
||||
AM_CONDITIONAL(SAILFISH_PROVISION, test "${enable_sailfish_provision=$}" = "yes")
|
||||
|
||||
AC_ARG_ENABLE(nettime, AC_HELP_STRING([--disable-nettime],
|
||||
[disable Nettime plugin]),
|
||||
[enable_nettime=${enableval}])
|
||||
@@ -260,66 +236,27 @@ if (test "${enable_provision}" != "no"); then
|
||||
fi
|
||||
AM_CONDITIONAL(PROVISION, test "${enable_provision}" != "no")
|
||||
|
||||
AC_ARG_ENABLE(upower, AC_HELP_STRING([--disable-upower],
|
||||
[disable UPower plugin]),
|
||||
[enable_upower=${enableval}])
|
||||
AM_CONDITIONAL(UPOWER, test "${enable_power}" != "no")
|
||||
|
||||
AC_ARG_ENABLE(mbimmodem, AC_HELP_STRING([--enable-mbimmodem],
|
||||
[enable MBIM based modem support]),
|
||||
[enable_mbimmodem=${enableval}])
|
||||
|
||||
AC_ARG_ENABLE(ell, AC_HELP_STRING([--enable-ell],
|
||||
[enable support for ell]),
|
||||
[enable_ell=${enableval}])
|
||||
|
||||
if (test "${enable_ell}" = "yes"); then
|
||||
AC_DEFINE(HAVE_ELL, 1, [Defined if Ell is enabled])
|
||||
PKG_CHECK_MODULES(ELL, ell >= 0.2, dummy=yes,
|
||||
AC_MSG_ERROR(ell library >= 0.2 is required))
|
||||
AC_SUBST(ELL_CFLAGS)
|
||||
AC_SUBST(ELL_LIBS)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(MBIMMODEM, test "${enable_ell}" != "no" && test "${enable_mbimmodem}" = "yes")
|
||||
AM_CONDITIONAL(ELL, test "${enable_ell}" != "no")
|
||||
|
||||
AC_ARG_ENABLE(datafiles, AC_HELP_STRING([--disable-datafiles],
|
||||
[do not install configuration and data files]),
|
||||
[enable_datafiles=${enableval}])
|
||||
AM_CONDITIONAL(DATAFILES, test "${enable_datafiles}" != "no")
|
||||
|
||||
AC_ARG_ENABLE(sailfish-pushforwarder, AC_HELP_STRING([--enable-sailfish-pushforwarder],
|
||||
[enable Sailfish OS push forwarder plugin]),
|
||||
[enable_sailfish_pushforwarder=${enableval}],
|
||||
[enable_sailfish_pushforwarder="no"])
|
||||
AM_CONDITIONAL(SAILFISH_PUSHFORWARDER, test "${enable_sailfish_pushforwarder}" != "no")
|
||||
if (test "${enable_sailfish_pushforwarder}" != "no"); then
|
||||
AC_ARG_ENABLE(pushforwarder, AC_HELP_STRING([--disable-pushforwarder],
|
||||
[disable Push Forwarder plugin]),
|
||||
[enable_pushforwarder=${enableval}])
|
||||
AM_CONDITIONAL(PUSHFORWARDER, test "${enable_pushforwarder}" != "no")
|
||||
if (test "${enable_pushforwarder}" != "no"); then
|
||||
PKG_CHECK_MODULES(WSPCODEC, libwspcodec >= 2.0, dummy=yes,
|
||||
AC_MSG_ERROR(WSP decoder is required))
|
||||
CFLAGS="$CFLAGS $WSPCODEC_CFLAGS"
|
||||
LIBS="$LIBS $WSPCODEC_LIBS"
|
||||
AC_MSG_ERROR(WSP decoder is required))
|
||||
AC_SUBST(WSPCODEC_CFLAGS)
|
||||
AC_SUBST(WSPCODEC_LIBS)
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(sailfish-access, AC_HELP_STRING([--enable-sailfish-access],
|
||||
[enable Sailfish OS access plugin]),
|
||||
[enable_sailfish_access=${enableval}],
|
||||
[enable_sailfish_access="no"])
|
||||
|
||||
AM_CONDITIONAL(SAILFISH_ACCESS, test "${enable_sailfish_access}" != "no")
|
||||
if (test "${enable_sailfish_access}" == "yes"); then
|
||||
PKG_CHECK_MODULES(DBUSACCESS, libdbusaccess, dummy=yes,
|
||||
AC_MSG_ERROR(libdbusaccess is required))
|
||||
CFLAGS="$CFLAGS $DBUSACCESS_CFLAGS"
|
||||
LIBS="$LIBS $DBUSACCESS_LIBS"
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(sailfish-debuglog, AC_HELP_STRING([--enable-sailfish-debuglog],
|
||||
[enable Sailfish OS debug log plugin]),
|
||||
[enable_sailfish_debuglog=${enableval}],
|
||||
[enable_sailfish_debuglog="no"])
|
||||
AM_CONDITIONAL(SAILFISH_DEBUGLOG, test "${enable_sailfish_debuglog}" != "no")
|
||||
if (test "${enable_sailfish_debuglog}" = "yes"); then
|
||||
AC_ARG_ENABLE(debuglog,
|
||||
AC_HELP_STRING([--enable-debuglog], [enable log control plugin]),
|
||||
[enable_debuglog=${enableval}], [enable_debuglog="no"])
|
||||
AM_CONDITIONAL(DEBUGLOG, test "${enable_debuglog}" != "no")
|
||||
if (test "${enable_debuglog}" = "yes"); then
|
||||
PKG_CHECK_MODULES(DBUSLOG, libdbuslogserver-dbus, dummy=yes,
|
||||
AC_MSG_ERROR(libdbuslogserver-dbus is required))
|
||||
CFLAGS="$CFLAGS $DBUSLOG_CFLAGS"
|
||||
@@ -340,7 +277,7 @@ if (test "$localstatedir" = '${prefix}/var'); then
|
||||
else
|
||||
storagedir="${localstatedir}/lib/ofono"
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_STORAGEDIR, "${storagedir}",
|
||||
AC_DEFINE_UNQUOTED(STORAGEDIR, "${storagedir}",
|
||||
[Directory for the storage files])
|
||||
|
||||
if (test "$sysconfdir" = '${prefix}/etc'); then
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
Allowed APNs hierarchy
|
||||
=========================
|
||||
|
||||
Service org.ofono
|
||||
Interface org.ofono.AllowedAccessPoints
|
||||
Object path [variable prefix]/{modem0,modem1,...}
|
||||
|
||||
Methods array{string} GetAllowedAccessPoints()
|
||||
|
||||
Get the list of allowed access points provided
|
||||
in the SIM card.
|
||||
|
||||
This method returns an array of strings which
|
||||
contains a list of Access Point Names supported
|
||||
by network provider. Returns with an error if
|
||||
SIM reading failed or an empty list if there
|
||||
are no access points listed on the SIM.
|
||||
@@ -1,16 +0,0 @@
|
||||
|
||||
HardwareMonitor hierarchy
|
||||
=========================
|
||||
|
||||
Service org.ofono
|
||||
Interface org.ofono.cinterion.HardwareMonitor
|
||||
Object path /{device0,device1,...}
|
||||
|
||||
Methods array{string,variant} GetStatistics
|
||||
|
||||
Returns an array of dict entries representing the
|
||||
current temperature and supply voltage of the modem.
|
||||
|
||||
Units:
|
||||
Temperature: Celsius
|
||||
Voltage: mV
|
||||
@@ -19,7 +19,7 @@ Besides the kernel coding style above, oFono has special flavors for its own.
|
||||
Some of them are mandatory (marked as 'M'), while some others are optional
|
||||
(marked as 'O'), but generally preferred.
|
||||
|
||||
M1: Blank line before and after an if/while/do/for/switch statement
|
||||
M1: Blank line before and after an if/while/do/for statement
|
||||
============================================================
|
||||
There should be a blank line before if statement unless the if is nested and
|
||||
not preceded by an expression or variable declaration.
|
||||
|
||||
@@ -1,164 +0,0 @@
|
||||
Every project has its own recursive patterns, and oFono is not an exception.
|
||||
This document describes the most common ones found in the code.
|
||||
|
||||
Typical flow for atom <-> atom driver operations
|
||||
================================================
|
||||
Most of the time, the core atom for a given request calls a function in
|
||||
the atom driver, which generally executes some commands against the modem,
|
||||
and can then return the results to the core.
|
||||
|
||||
For example:
|
||||
|
||||
dbus call: lte/SetProperty(DefaultAPN)
|
||||
|
|
||||
v
|
||||
core: check APN validity, call the modem atom for execution in the modem
|
||||
|
|
||||
v
|
||||
atom driver: schedules 'AT+CGDCONT=0,"IP","MyNiceAPN"' for execution
|
||||
|
|
||||
[ break in the flow: the functions return back to the core, the dbus request ]
|
||||
[ is not answered at this time ]
|
||||
...
|
||||
[GLibMain event loop schedules the command, it is sent to the modem and the ]
|
||||
[ modem's reply is obtained ]
|
||||
|
|
||||
v
|
||||
atom driver: a callback function, optionally provided when AT command was
|
||||
scheduled is now called
|
||||
|
|
||||
v
|
||||
core: atom driver core callback function is now called. This was passed from
|
||||
the core as an argument, earlier, when the atom driver operation was invoked,
|
||||
along with some context data (opaque info for the atom driver containing core
|
||||
atom owned data)
|
||||
|
|
||||
v
|
||||
the core can now answer the dbus message
|
||||
|
||||
|
||||
In the code, it looks like this:
|
||||
|
||||
//core call:
|
||||
static DBusMessage *lte_set_property(DBusConnection *conn,
|
||||
DBusMessage *msg, void *data)
|
||||
{
|
||||
struct ofono_lte *lte = data;
|
||||
|
||||
/*
|
||||
* a block of code here processes the msg and fills the
|
||||
* lte->pending_info structure
|
||||
*/
|
||||
|
||||
lte->driver->set_default_attach_info(lte, <e->pending_info,
|
||||
lte_set_default_attach_info_cb, lte);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
// lte_set_default_attach_info_cb is the core callback function,
|
||||
// the lte structure is the parameter that it takes
|
||||
|
||||
//atom:
|
||||
static void at_lte_set_default_attach_info(const struct ofono_lte *lte,
|
||||
const struct ofono_lte_default_attach_info *info,
|
||||
ofono_lte_cb_t cb, void *data)
|
||||
{
|
||||
struct lte_driver_data *ldd = ofono_lte_get_data(lte);
|
||||
|
||||
// next line creates a structure for the in-atom callback
|
||||
struct cb_data *cbd = cb_data_new(cb, data);
|
||||
|
||||
if (g_at_chat_send(ldd->chat, "AT", NULL,
|
||||
at_lte_set_default_attach_info_cb,
|
||||
cbd, g_free) > 0)
|
||||
return;
|
||||
|
||||
g_free(cbd);
|
||||
CALLBACK_WITH_FAILURE(cb, data);
|
||||
}
|
||||
// here the structure is allocate dynamically, and since it is quite common,
|
||||
// the function g_at_chat_send accepts the last 3 parameters:
|
||||
// - in-atom callback function
|
||||
// - in-atom callback data
|
||||
// - destroy function for dynamically-allocated callback data
|
||||
// NOTE: if g_at_chat_send fails, it does not free the memory, so it must be
|
||||
// done after the call.
|
||||
// Note also the callback to the core directly here if the g_at_chat_send fails.
|
||||
|
||||
//atom callback:
|
||||
|
||||
static void at_lte_set_default_attach_info_cb(gboolean ok, GAtResult *result,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct cb_data *cbd = user_data;
|
||||
|
||||
if (result == NULL) {
|
||||
CALLBACK_WITH_FAILURE(cbd->cb, cbd->data);
|
||||
return;
|
||||
}
|
||||
|
||||
decode_at_error(&error, g_at_result_final_response(result));
|
||||
cbd->cb(&error, cbd->data);
|
||||
}
|
||||
// note that here cbd must not be released, it will be done by the GAtChat
|
||||
// after invoking the callback (at_lte_set_default_attach_info_cb)
|
||||
// note also that the core function will be executed before cbd is released,
|
||||
// so the last line of the code is ok.
|
||||
|
||||
|
||||
Use of the cb_data in AT command based atom drivers
|
||||
===================================================
|
||||
|
||||
the cb_data can be used by creating the structure with cb_data_new,
|
||||
and then there are two possibilities:
|
||||
- use it in a single callback function, and destroy it with a call to
|
||||
g_free.
|
||||
Example:
|
||||
- calling function:
|
||||
struct cb_data *cbd = cb_data_new(cb, data);
|
||||
if (g_at_chat_send(chat, buf, NULL, at_cgatt_cb, cbd, g_free) > 0)
|
||||
return;
|
||||
g_free(cbd);
|
||||
- called function (here at_cgatt_cb):
|
||||
static void at_cgatt_cb(gboolean ok, GAtResult *result,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct cb_data *cbd = user_data;
|
||||
ofono_gprs_cb_t cb = cbd->cb;
|
||||
struct ofono_error error;
|
||||
|
||||
decode_at_error(&error,
|
||||
g_at_result_final_response(result));
|
||||
|
||||
cb(&error, cbd->data);
|
||||
}
|
||||
note the absence of explicit g_free(cbd);
|
||||
|
||||
- pass it through a train of callback functions, adding a reference at
|
||||
each pass cb_data_ref, and removing it with cb_data_unref.
|
||||
the use of cb_data_ref would replace a new object creation, while the
|
||||
use of cb_data_unref the use of g_free.
|
||||
Example:
|
||||
- calling function:
|
||||
struct cb_data *cbd = cb_data_new(cb, data);
|
||||
// no cb_ref at the creation
|
||||
if (g_at_chat_send(chat, buf, NULL,
|
||||
at_lte_set_default_attach_info_cb,
|
||||
cbd, cb_data_unref) > 0)
|
||||
goto end;
|
||||
cb_data_unref(cbd);
|
||||
- called function 1 (at_lte_set_default_attach_info_cb):
|
||||
static void at_lte_set_default_attach_info_cb(gboolean ok,
|
||||
GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct cb_data *cbd = user_data;
|
||||
|
||||
cbd = cb_data_ref(cbd);
|
||||
if (g_at_chat_send(chat, buf, NULL,
|
||||
at_cgatt_cb, cbd, cb_data_unref) > 0)
|
||||
return;
|
||||
cb_data_unref(cbd);
|
||||
}
|
||||
- called function 2 (at_cgatt_cb):
|
||||
like above. no call to g_free or cb_data_unref. The terminal function
|
||||
doesn't need to know about the reference scheme.
|
||||
@@ -106,7 +106,7 @@ Properties boolean Attached [readonly]
|
||||
GPRS service registration (if known).
|
||||
|
||||
Possible values are:
|
||||
"none", "gprs", "edge", "umts", "hsdpa", "hsupa",
|
||||
"none", "gsm", "edge", "umts", "hsdpa", "hsupa",
|
||||
"hspa" (HSDPA and HSUPA at the same time) and
|
||||
"lte"
|
||||
|
||||
@@ -201,8 +201,7 @@ Properties boolean Active [readwrite]
|
||||
|
||||
string AuthenticationMethod [readwrite]
|
||||
Holds the PPP authentication method to use. Valid
|
||||
values are "pap", "chap" and "none".
|
||||
Defaults to "chap".
|
||||
values are "pap" and "chap". Defaults to "chap".
|
||||
|
||||
string Username [readwrite]
|
||||
|
||||
@@ -279,13 +278,6 @@ Properties boolean Active [readwrite]
|
||||
via this proxy. All other values are left
|
||||
out in this case.
|
||||
|
||||
array{string} ProxyCSCF [readonly, optional]
|
||||
|
||||
Holds the list of P-CSCF (SIP proxy) for this
|
||||
context. Only used by IMS connections.
|
||||
|
||||
This is a Sailfish OS specific extension.
|
||||
|
||||
dict IPv6.Settings [readonly, optional]
|
||||
|
||||
Holds all the IPv6 network settings
|
||||
@@ -312,13 +304,6 @@ Properties boolean Active [readwrite]
|
||||
|
||||
Holds the gateway IP for this connection.
|
||||
|
||||
array{string} ProxyCSCF [readonly, optional]
|
||||
|
||||
Holds the list of P-CSCF (SIP proxy) for this
|
||||
context. Only used by IMS connections.
|
||||
|
||||
This is a Sailfish OS specific extension.
|
||||
|
||||
string MessageProxy [readwrite, MMS only]
|
||||
|
||||
Holds the MMS Proxy setting.
|
||||
|
||||
@@ -14,7 +14,7 @@ What oFono will do:
|
||||
- Post online atoms will be created.
|
||||
- Upon reception of Dial request, Emergency mode is activated.
|
||||
- Once the call is ended, Emergency mode is deactivated.
|
||||
- Modem remains in online mode with full functionality.
|
||||
- Modem remains in online mode with full funcationality.
|
||||
|
||||
Case 2: Call in SIM Present and PIN required state
|
||||
|
||||
|
||||
@@ -76,22 +76,6 @@ Methods dict GetProperties()
|
||||
[service].Error.NotImplemented
|
||||
[service].Error.NotAllowed
|
||||
|
||||
fd, byte Acquire()
|
||||
|
||||
Attempts to establish the SCO audio connection
|
||||
returning the filedescriptor of the connection and the
|
||||
codec in use.
|
||||
|
||||
Note: Contrary to Connect this does not call
|
||||
NewConnection so it can be called in a blocking
|
||||
manner.
|
||||
|
||||
Possible Errors: [service].Error.InProgress
|
||||
[service].Error.Failed
|
||||
[service].Error.NotAvailable
|
||||
[service].Error.NotImplemented
|
||||
[service].Error.NotAllowed
|
||||
|
||||
Signals PropertyChanged(string name, variant value)
|
||||
|
||||
This signal indicates a changed value of the given
|
||||
@@ -105,10 +89,6 @@ Properties string RemoteAddress [readonly]
|
||||
|
||||
Bluetooth address of the local adapter.
|
||||
|
||||
string Type [readonly]
|
||||
|
||||
Type of the card. Valid values are "gateway" or
|
||||
"handsfree".
|
||||
|
||||
Handsfree Audio Agent hierarchy [experimental]
|
||||
===============================
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
IpMultimediaSystem Hierarchy
|
||||
============================
|
||||
|
||||
Service org.ofono
|
||||
Interface org.ofono.IpMultimediaSystem
|
||||
Object path [variable prefix]/{modem0,modem1,...}
|
||||
|
||||
Methods dict GetProperties()
|
||||
|
||||
Returns all IpMultimediaSystem configuration properties.
|
||||
|
||||
void SetProperty(string property, variant value)
|
||||
|
||||
Changes the value of the specified property. Only
|
||||
properties that are listed as readwrite are
|
||||
changeable. On success a PropertyChanged signal
|
||||
will be emitted.
|
||||
|
||||
Possible Errors: [service].Error.InProgress
|
||||
[service].Error.InvalidArguments
|
||||
[service].Error.Failed
|
||||
|
||||
void Register()
|
||||
|
||||
Attempts to register to IMS. A successful method return
|
||||
indicates that the registration process could be
|
||||
initiated successfully. The actual registration state
|
||||
will be reflected by the 'Registered' property.
|
||||
|
||||
Possible Errors: [service].Error.InProgress
|
||||
[service].Error.NotImplemented
|
||||
|
||||
void Unregister()
|
||||
|
||||
Attempts to unregister from IMS. A successful method
|
||||
return indicates that the unregistration process could
|
||||
be initiated successfully. The actual unregistration
|
||||
state will be reflected by the 'Registered' property.
|
||||
|
||||
Possible Errors: [service].Error.InProgress
|
||||
[service].Error.NotImplemented
|
||||
|
||||
Signals PropertyChanged(string property, variant value)
|
||||
|
||||
This signal indicates a changed value of the given
|
||||
property.
|
||||
|
||||
Properties boolean Registered [readonly]
|
||||
|
||||
Contains the current IMS registration state.
|
||||
|
||||
boolean VoiceCapable [readonly, optional]
|
||||
|
||||
Boolean representing whether voice call transfer over
|
||||
RTP (IMS) is available.
|
||||
|
||||
boolean SmsCapable [readonly, optional]
|
||||
|
||||
Boolean representing whether SMS-over-IMS is available.
|
||||
@@ -1,137 +0,0 @@
|
||||
LTE Coexistence hierarchy
|
||||
=========================
|
||||
|
||||
Service org.ofono
|
||||
Interface org.ofono.intel.LteCoexistence
|
||||
Object path [variable prefix]/{modem0,modem1,...}
|
||||
|
||||
Methods dict GetProperties()
|
||||
|
||||
Returns all coexistence configuration properties.
|
||||
|
||||
void SetProperty(string property, variant value)
|
||||
|
||||
Changes the value of the specified property. Only
|
||||
properties that are listed as Read-write are changeable.
|
||||
On success a PropertyChanged signal will be emitted.
|
||||
|
||||
Possible Errors: [service].Error.InProgress
|
||||
[service].Error.InvalidArguments
|
||||
[service].Error.Failed
|
||||
|
||||
void RegisterAgent(object path)
|
||||
|
||||
Registers an agent which will be called whenever the
|
||||
modem initiates LTE Coexistence information.
|
||||
|
||||
Possible Errors: [service].Error.InProgress
|
||||
[service].Error.InvalidArguments
|
||||
[service].Error.InvalidFormat
|
||||
[service].Error.Failed
|
||||
|
||||
void UnregisterAgent(object path)
|
||||
|
||||
Unregisters an agent.
|
||||
|
||||
Possible Errors: [service].Error.InvalidArguments
|
||||
[service].Error.Failed
|
||||
|
||||
a(a{sv}) GetPlmnHistory()
|
||||
Requests for LTE Plmn history list stored in NVM to
|
||||
retrieve geo location history like MobileNetworkCode,
|
||||
MobileCountryCode, LteBandsFDD, LteBandsTDD,
|
||||
ChannelBandwidth.
|
||||
|
||||
Refer to the sections below for which property types
|
||||
are available, their valid value ranges and
|
||||
applicability to different cell types.
|
||||
|
||||
Signals PropertyChanged(string property, variant value)
|
||||
|
||||
This signal indicates a changed value of the given
|
||||
property.
|
||||
|
||||
Properties string Band [readwrite]
|
||||
|
||||
Frequency band in which the modem is operating when
|
||||
using "lte" mode.
|
||||
|
||||
boolean BTActive [readwrite]
|
||||
|
||||
Contains whether BT Coex is activated or not.
|
||||
|
||||
boolean WLANActive [readwrite]
|
||||
|
||||
Contains whether WLAN Coex is activated or not.
|
||||
|
||||
string WLANBandwidth [readwrite]
|
||||
|
||||
Contains the frequency WLAN Coex is activated on, when
|
||||
"CoexWLANActive" is active.
|
||||
|
||||
The possible values are:
|
||||
- "20MHz"
|
||||
- "40MHz"
|
||||
- "80MHz"
|
||||
|
||||
LTECoexistenceAgent Hierarchy [experimental]
|
||||
=============================
|
||||
|
||||
Service unique name
|
||||
Interface org.ofono.intel.LteCoexistenceAgent
|
||||
Object path freely definable
|
||||
|
||||
Methods void ReceiveBluetoothNotification(array{byte} notification,
|
||||
dict info) [noreply]
|
||||
|
||||
Requests the agent to process Bluetooth related LTE
|
||||
Coexistence information. The dictionary info contains
|
||||
vector table with modem recommended Safe Tx/Rx band and
|
||||
range information.The properties involved are
|
||||
'SafeTxMin', 'SafeRxMin', 'SafeTxMax', 'SafeRxMax' and
|
||||
'SafeVector'.
|
||||
|
||||
Possible Errors: None
|
||||
|
||||
void ReceiveWiFiNotification(array{byte} notification,
|
||||
dict info) [noreply]
|
||||
|
||||
Requests the agent to process WiFi related LTE
|
||||
Coexistence information. The dictionary info contains
|
||||
vector table with modem recommended SafeTx/Rx band and
|
||||
range information. The properties involved are
|
||||
'SafeTxMin', 'SafeRxMin', 'SafeTxMax', 'SafeRxMax' and
|
||||
'SafeVector'.
|
||||
|
||||
Possible Errors: None
|
||||
|
||||
void Release() [noreply]
|
||||
|
||||
Agent is being released, possibly because of oFono
|
||||
terminating, Coex interface is being torn down or modem
|
||||
off. No UnregisterAgent call is needed.
|
||||
|
||||
LTE Plmn history params
|
||||
=======================
|
||||
uint16 MobileNetworkCode [readonly, optional]
|
||||
|
||||
Contains the MNC of the cell.
|
||||
|
||||
uint16 MobileCountryCode [readonly, optional]
|
||||
|
||||
Contains the MCC of the cell.
|
||||
|
||||
uint32 LteBandsFDD [readonly, optional]
|
||||
|
||||
Contains the Lte FDD band. Valid range of values is 1 to 32 as per
|
||||
3GPP 36.101 Section 5.5.
|
||||
|
||||
uint32 LteBandsTDD [readonly, optional]
|
||||
|
||||
Contains the Lte TDD band. Valid range of values is 33 to 64 as per
|
||||
3GPP 36.101 Section 5.5.
|
||||
|
||||
byte ChannelBandwidth [readonly, optional]
|
||||
|
||||
Contains the Channel bandwidth. Valid range of values is 0 to 6 as per
|
||||
3GPP 36.101 Section 5.6.
|
||||
@@ -13,7 +13,7 @@ Methods dict GetProperties()
|
||||
filedescriptor Request()
|
||||
|
||||
Asks to turn ON the NMEA stream and supplies the
|
||||
gps device file descriptor. The external client should
|
||||
gps device file descriptor. The external cliend should
|
||||
use the file descriptor to receive the NMEA data.
|
||||
|
||||
Possible Errors: [service].Error.InProgress
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
LongTermEvolution Hierarchy
|
||||
|
||||
Service org.ofono
|
||||
Interface org.ofono.LongTermEvolution
|
||||
Object path [variable prefix]/{modem0,modem1,...}
|
||||
|
||||
|
||||
Methods dict GetProperties()
|
||||
|
||||
Returns all LongTermEvolution configuration properties.
|
||||
|
||||
void SetProperty(string property, variant value)
|
||||
|
||||
Changes the value of the specified property. Only
|
||||
properties that are listed as readwrite are
|
||||
changeable. On success a PropertyChanged signal
|
||||
will be emitted.
|
||||
|
||||
Possible Errors: [service].Error.InProgress
|
||||
[service].Error.InvalidArguments
|
||||
[service].Error.Failed
|
||||
|
||||
Signals PropertyChanged(string property, variant value)
|
||||
|
||||
This signal indicates a changed value of the given
|
||||
property.
|
||||
|
||||
Properties string DefaultAccessPointName [readwrite]
|
||||
|
||||
On LongTermEvolution, contexts activate automatically.
|
||||
This property allows selection of an APN to be used on
|
||||
next automatic activation.
|
||||
|
||||
Setting this property to an empty string clears the
|
||||
default APN from the modem.
|
||||
|
||||
string Protocol [readwrite, experimental]
|
||||
|
||||
Holds the protocol for this context. Valid values
|
||||
are: "ip", "ipv6" and "dual". Default value is "ip".
|
||||
|
||||
string AuthenticationMethod [readwrite, experimental]
|
||||
|
||||
Sets the Method used for the authentication
|
||||
for the default APN.
|
||||
|
||||
Available values are "none", "pap" and "chap".
|
||||
Default is "none".
|
||||
|
||||
If the AuthenticationMethod is set to 'none',
|
||||
no authentication is performed for the default attach
|
||||
APN. Username and Password properties are ignored,
|
||||
even if containing a valid value. If Username or
|
||||
Password are empty, AuthenticationMethod is implicitly
|
||||
assumed to be set to 'none'.
|
||||
|
||||
If the default APN supports authentication and it
|
||||
fails, then it is up to the network how to proceed.
|
||||
In general LTE access is denied and the modem can
|
||||
fallback to a legacy technology if capable and another
|
||||
radio technology is available.
|
||||
|
||||
string Username [readwrite, experimental]
|
||||
|
||||
Holds the username to be used for authentication
|
||||
purposes.
|
||||
|
||||
string Password [readwrite, experimental]
|
||||
|
||||
Holds the password to be used for authentication
|
||||
purposes.
|
||||
@@ -104,16 +104,6 @@ Properties string ServiceCenterAddress
|
||||
"turkish" - Turkish alphabet
|
||||
"spanish" - Spanish alphabet
|
||||
"portuguese" - Portuguese alphabet
|
||||
"bengali" - Bengali alphabet
|
||||
"gujarati" - Gujarati alphabet
|
||||
"hindi" - Hindi alphabet
|
||||
"kannada" - Kannada alphabet
|
||||
"malayalam" - Malayalam alphabet
|
||||
"oriya" - Oriya alphabet
|
||||
"punjabi"- Punjabi alphabet
|
||||
"tamil" - Tamil alphabet
|
||||
"telugu" - Telugu alphabet
|
||||
"urdu" - Urdu alphabet
|
||||
|
||||
The standard, language-specific alphabets are defined
|
||||
in 3GPP TS23.038, Annex A. By default, oFono uses
|
||||
|
||||
@@ -90,18 +90,6 @@ Properties boolean Powered [readwrite]
|
||||
"hfp") this corresponds to the Bluetooth Device
|
||||
Address of the remote device.
|
||||
|
||||
string SoftwareVersionNumber [readonly, optional]
|
||||
|
||||
String representing the software version number of the
|
||||
modem device.
|
||||
|
||||
string SystemPath [readonly, optional]
|
||||
|
||||
String representing the system path for the modem
|
||||
device.
|
||||
For modems detected by udev events, this corresponds to
|
||||
the modem sysfs path.
|
||||
|
||||
array{string} Features [readonly]
|
||||
|
||||
List of currently enabled features. It uses simple
|
||||
@@ -134,8 +122,6 @@ Properties boolean Powered [readwrite]
|
||||
org.ofono.CallVolume
|
||||
org.ofono.CellBroadcast
|
||||
org.ofono.Handsfree
|
||||
org.ofono.IpMultimediaSystem
|
||||
org.ofono.LongTermEvolution
|
||||
org.ofono.LocationReporting
|
||||
org.ofono.MessageManager
|
||||
org.ofono.MessageWaiting
|
||||
|
||||
@@ -82,9 +82,7 @@ Properties string Mode [readonly]
|
||||
|
||||
string Status [readonly]
|
||||
|
||||
The current registration status of a modem. In case
|
||||
technology is 'lte', 'registered' and 'roaming' may
|
||||
not necessarily mean voice calling available.
|
||||
The current registration status of a modem.
|
||||
|
||||
The possible values are:
|
||||
"unregistered" Not registered to any network
|
||||
|
||||
@@ -1,150 +0,0 @@
|
||||
Network Monitor hierarchy
|
||||
=========================
|
||||
|
||||
Service org.ofono
|
||||
Interface org.ofono.NetworkMonitor
|
||||
Object path [variable prefix]/{modem0,modem1,...}
|
||||
|
||||
Methods a{sv} GetServingCellInformation()
|
||||
|
||||
Requests the latest serving cell information and basic
|
||||
measurements from oFono. The returned value is a
|
||||
dictionary with the possible key / values documented
|
||||
below. The type of cell is given by the 'Technology'
|
||||
property.
|
||||
|
||||
Based on the type of cell, the dictionary will contain
|
||||
additional key/value pairs. If a given key/value pair
|
||||
is not present, then it is not known or unsupported
|
||||
by the underlying driver.
|
||||
|
||||
Refer to the sections below for which property types
|
||||
are available, their valid value ranges and
|
||||
applicability to different cell types.
|
||||
|
||||
void RegisterAgent(object path)
|
||||
|
||||
Registers an agent which will be called whenever the
|
||||
modem registers to or moves to a new cell.
|
||||
|
||||
void UnregisterAgent(object path)
|
||||
|
||||
Unregisters an agent.
|
||||
|
||||
NetworkMonitorAgent Hierarchy [experimental]
|
||||
=============================
|
||||
|
||||
Service unique name
|
||||
Interface org.ofono.NetworkMonitorAgent
|
||||
Object path freely definable
|
||||
|
||||
Methods void ServingCellInformationChanged(a{sv}) [noreply]
|
||||
|
||||
This method is called whenever the serving cell
|
||||
information has been updated.
|
||||
|
||||
Possible Errors: None
|
||||
|
||||
void Release() [noreply]
|
||||
|
||||
Agent is being released, possibly because of oFono
|
||||
terminating, NetworkMonitor interface is being torn
|
||||
down or modem off. No UnregisterAgent call is needed.
|
||||
|
||||
Network Monitor Property Types
|
||||
==============================
|
||||
|
||||
string Technology
|
||||
|
||||
Contains the cell type. Possible values are:
|
||||
"gsm", "umts", "lte"
|
||||
|
||||
uint16 LocationAreaCode [optional, gsm, umts]
|
||||
|
||||
Contains the current location area code. Valid range of values is
|
||||
0-65535.
|
||||
|
||||
uint32 CellId [optional, gsm, umts]
|
||||
|
||||
Contains the current network cell id. Valid range of values is
|
||||
0-65535 for gsm and 0-268435455 in umts.
|
||||
|
||||
string MobileNetworkCode [optional, gsm, umts]
|
||||
|
||||
Contains the MNC of the cell.
|
||||
|
||||
string MobileCountryCode [optional, gsm, umts]
|
||||
|
||||
Contains the MCC of the cell.
|
||||
|
||||
uint16 ARFCN [optional, gsm]
|
||||
|
||||
Contains the Absolute Radio Frequency Channel Number. Valid range of
|
||||
values is 0-1023.
|
||||
|
||||
byte ReceivedSignalStrength [optional, gsm]
|
||||
|
||||
Contains the received signal strength level in dBm. Refer to <rxlev>
|
||||
in 27.007, Section 8.69 for more details. Valid range of values is
|
||||
0-63.
|
||||
|
||||
byte BSIC [optional, gsm]
|
||||
|
||||
Contains the Base Station Identity Code. Valid range of values is 0-63.
|
||||
|
||||
byte BitErrorRate [optional, gsm]
|
||||
|
||||
Contains the bit error rate. Refer to <ber> in 27.007, Section 8.69
|
||||
for more details. Valid range of values is 0-7.
|
||||
|
||||
uint16 PrimaryScramblingCode [optional, umts]
|
||||
|
||||
Contains the scrambling code. Valid range of values is 0-512.
|
||||
|
||||
byte TimingAdvance [optional, gsm]
|
||||
|
||||
Contains the Timing Advance. Valid range of values is 0-219.
|
||||
|
||||
byte Strength [optional, gsm, umts, lte]
|
||||
|
||||
Contains the signal strength. Valid values are 0-31. Refer to <rssi>
|
||||
in 27.007, Section 8.5.
|
||||
|
||||
byte ReceivedSignalCodePower [optional, umts]
|
||||
|
||||
Contains the Received Signal Code Power. Valid range of values
|
||||
is 0-96. Refer to <rscp> in 27.007, Section 8.69 for more details.
|
||||
|
||||
byte ReceivedEnergyRatio [optional, umts]
|
||||
|
||||
Contains the Ratio of received energy per PN chip to the total
|
||||
received power spectral density. Valid range of values is 0-49.
|
||||
Refer to <ecno> in 27.007, Section 8.69 for more details.
|
||||
|
||||
byte ReferenceSignalReceivedQuality [optional, lte]
|
||||
|
||||
Contains the Reference Signal Received Quality. Valid range of
|
||||
values is 0-34. Refer to <rsrq> in 27.007, Section 8.69 for more
|
||||
details.
|
||||
|
||||
byte ReferenceSignalReceivedPower [optional, lte]
|
||||
|
||||
Contains the Reference Signal Received Power. Valid range of values
|
||||
is 0-97. Refer to <rsrp> in 27.007, Section 8.69 for more details.
|
||||
|
||||
uint16 EARFCN [optional, lte]
|
||||
|
||||
Contains E-UTRA Absolute Radio Frequency Channel Number. Valid
|
||||
range of values is 0-65535. Refer to Carrier frequency and
|
||||
EARFCN in 36.101, Section 5.7.3 for more details.
|
||||
|
||||
byte EBand [optional, lte]
|
||||
|
||||
Contains E-UTRA operating Band. Valid range of values is 1-43.
|
||||
Refer to Operating bands in 36.101, Section 5.5 for more
|
||||
details.
|
||||
|
||||
byte ChannelQualityIndicator [optional, lte]
|
||||
|
||||
Contains Channel Quality Indicator. Refer to Channel Quality
|
||||
Indicator definition in 36.213, Section 7.2.3 for more details.
|
||||
@@ -200,20 +200,3 @@ Properties boolean Present [readonly]
|
||||
might have changed the retry counters, i.e. calls to
|
||||
ChangePin(), EnterPin(), ResetPin() LockPin(),
|
||||
UnlockPin().
|
||||
|
||||
string ImsPrivateIdentity [readonly, optional]
|
||||
|
||||
Contains the SIM's ImsPrivateIdentity, read from the
|
||||
ISIM.
|
||||
|
||||
uint32 CardSlotCount [readonly, experimental]
|
||||
|
||||
Contains the count of number of SIM card slots available.
|
||||
|
||||
uint32 ActiveCardSlot [readwrite, experimental]
|
||||
|
||||
Contains the index of the currently active SIM card slot
|
||||
for dual SIM single active mode.
|
||||
|
||||
This property will range from 1 (default) to
|
||||
CardSlotCount (max) value.
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
SimAuthentication heiarchy [experimental]
|
||||
===========================================
|
||||
|
||||
Service org.ofono
|
||||
Interface org.ofono.SimAuthentication
|
||||
Object path [variable prefix]/{modem0,modem1,...}
|
||||
|
||||
Methods array{object,dict} GetApplications()
|
||||
|
||||
Get an array of all SIM applications found during
|
||||
discovery. In the format "a{oa{sv}}" where 'o' is
|
||||
the object path for the application e.g.
|
||||
|
||||
o = "/modem1/A0000000871004FFFFFFFF8906190000"
|
||||
|
||||
Each dictionary will contain 'Type' e.g. 'Ims' and
|
||||
'Name' e.g. 'ISim'
|
||||
|
||||
For each application there will be a corresponding
|
||||
object that matches the path (o). The type will
|
||||
signify which interfaces are under that object (below).
|
||||
|
||||
type = Umts --> org.ofono.USimApplication
|
||||
type = Ims --> org.ofono.ISimApplication
|
||||
|
||||
SimAuth USIM application heiarchy [experimental]
|
||||
===========================================
|
||||
|
||||
Service org.ofono
|
||||
Interface org.ofono.USimApplication
|
||||
Object path [variable prefix]/{modem0,modem1,...}/{AID name}
|
||||
|
||||
Methods dict GetProperties()
|
||||
|
||||
Returns properties for the USimApplication. See
|
||||
properties section for available properties.
|
||||
|
||||
array{dict{string, array{byte}}}
|
||||
GsmAuthenticate(array{array{byte}} rands)
|
||||
|
||||
Run the USIM application GSM AUTHENTICATE algorithm
|
||||
with N random challenges 'rands'. This should be an
|
||||
array of an array of bytes ("aay"). The number of
|
||||
random challenges is limited to a maximum of 3.
|
||||
|
||||
Returns the derived Kc/SRES values as an array of
|
||||
dictionaries. The index of each dictionary matches
|
||||
the index of the rand value in the method call. The
|
||||
keys for each dictionary are "Kc" and "SRES" and both
|
||||
are arrays of bytes.
|
||||
|
||||
Possible Errors:
|
||||
[service].Error.NotSupported
|
||||
[service].Error.Busy
|
||||
|
||||
dict{string, array{byte}}
|
||||
UmtsAuthenticate(array{byte} rand, array{byte} autn)
|
||||
|
||||
Run the UMTS AUTHENTICATE algorithm in the 3G
|
||||
context with 'rand' and 'autn'. A dictionary will be
|
||||
returned containing 'RES', 'CK', 'IK' and possibly
|
||||
'Kc' if service 27 is available. If there was a
|
||||
sync error 'AUTS' will be returned.
|
||||
|
||||
Possible Errors: [service].Error.NotSupported
|
||||
|
||||
Properties string Type [readonly]
|
||||
|
||||
Type of application: 'Umts'
|
||||
|
||||
string Name [readonly]
|
||||
|
||||
Human readable name: 'USim'
|
||||
|
||||
SimAuth ISIM application heiarchy [experimental]
|
||||
===========================================
|
||||
|
||||
Service org.ofono
|
||||
Interface org.ofono.ISimApplication
|
||||
Object [variable prefix]/{modem0,modem1,...}/{AID name}
|
||||
|
||||
Methods dict GetProperties()
|
||||
|
||||
Returns properties for the ISimApplication. See
|
||||
the properties section for available properties.
|
||||
|
||||
dict{string, array{byte}
|
||||
ImsAuthenticate(array{byte} rand, array{byte} autn)
|
||||
|
||||
Run the UMTS AUTHENTICATE algorithm in the IMS
|
||||
context with 'rand' and 'autn'. A dictionary will be
|
||||
returned containing 'RES', 'CK', 'IK' and possibly
|
||||
'Kc' if service 27 is available. If there was a
|
||||
sync error 'AUTS' will be returned.
|
||||
|
||||
Possible Errors: [service].Error.NotSupported
|
||||
|
||||
Properties string Type [readonly]
|
||||
|
||||
Type of application: 'Ims'
|
||||
|
||||
string Name [readonly]
|
||||
|
||||
Human readable name: 'ISim'
|
||||
@@ -10,13 +10,3 @@ On the i-Tetra tracking device, the SIM900 is accessed
|
||||
via N_GSM mux device. We use ofono as SMS message
|
||||
service and incoming voice calls service, so we
|
||||
use /dev/gsmtty1 provided by N_GSM mux.
|
||||
|
||||
SIM800 modem usage
|
||||
==================
|
||||
|
||||
When using sim800 modem, the udev rule is the same as the
|
||||
sim900 rule :
|
||||
|
||||
KERNEL=="ttyS3", ENV{OFONO_DRIVER}="sim900"
|
||||
|
||||
Because the SIM800 and SIM900 code are the merged into one driver.
|
||||
@@ -17,30 +17,3 @@ GPS:
|
||||
After setting the configuration, a power cycle is required.
|
||||
Port Configiuration #8 is available since firmware 12.00.004. Firmware version
|
||||
can be checked using 'AT+CGMR'.
|
||||
|
||||
LE910 V2
|
||||
========
|
||||
|
||||
Default USB composition of LE910V2 uses PID 0x36 (AT#PORTCFG=0)
|
||||
and consists of 6 serial ports (CDC-ACM standard, /dev/ttyACMx)
|
||||
and 1 network adapter using CDC-NCM standard (wwanx or usbx).
|
||||
|
||||
NCM interface configuration follows Telit documentation
|
||||
(both documents available on Telit Download Zone - registration required)
|
||||
"GE/HE/UE910, UL865, LE910 V2 Linux USB Driver - User Guide r0"
|
||||
(document 1VV0301255 Rev.0 - 2016-01-22)
|
||||
and "Telit LE910-V2 NCM SETUP r3"
|
||||
(document 1VV0301246 Rev.3 - 2016-11-29).
|
||||
|
||||
After context is setup, NCM mode activated and PDP context activated
|
||||
connection configuration can be read using
|
||||
AT+CGPADDR=context_id and AT+CGCONTRDP=context_id commands.
|
||||
This is done automatically and results available via
|
||||
org.ofono.ConnectionContext.GetProperties DBus method.
|
||||
|
||||
Then Linux network interface needs to be configured:
|
||||
ifconfig <Interface> <Address> netmask <Netmask> up
|
||||
route add default gw <Gateway>
|
||||
arp -s <Gateway> 11:22:33:44:55:66
|
||||
|
||||
Only after these steps network interface is usable.
|
||||
|
||||
@@ -59,27 +59,6 @@ Methods dict GetProperties()
|
||||
[service].Error.NotImplemented
|
||||
[service].Error.Failed
|
||||
|
||||
object DialLast()
|
||||
|
||||
Initiates a new outgoing call to the last dialled number.
|
||||
|
||||
Possible Errors: [service].Error.InProgress
|
||||
[service].Error.InvalidArguments
|
||||
[service].Error.InvalidFormat
|
||||
[service].Error.NotImplemented
|
||||
[service].Error.Failed
|
||||
|
||||
object DialMemory(string memory position, string hide_callerid)
|
||||
|
||||
Initiates a new outgoing call to the number in the given memory
|
||||
position/favourite. For callerid see the Dial method.
|
||||
|
||||
Possible Errors: [service].Error.InProgress
|
||||
[service].Error.InvalidArguments
|
||||
[service].Error.InvalidFormat
|
||||
[service].Error.NotImplemented
|
||||
[service].Error.Failed
|
||||
|
||||
void Transfer()
|
||||
|
||||
Joins the currently Active (or Outgoing, depending
|
||||
|
||||
@@ -50,14 +50,15 @@ static int atmodem_init(void)
|
||||
at_call_volume_init();
|
||||
at_gprs_init();
|
||||
at_gprs_context_init();
|
||||
at_sim_auth_init();
|
||||
at_gnss_init();
|
||||
at_lte_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void atmodem_exit(void)
|
||||
{
|
||||
at_sim_auth_exit();
|
||||
at_stk_exit();
|
||||
at_sim_exit();
|
||||
at_sms_exit();
|
||||
@@ -75,7 +76,6 @@ static void atmodem_exit(void)
|
||||
at_gprs_exit();
|
||||
at_gprs_context_exit();
|
||||
at_gnss_exit();
|
||||
at_lte_exit();
|
||||
}
|
||||
|
||||
OFONO_PLUGIN_DEFINE(atmodem, "AT modem driver", VERSION,
|
||||
|
||||
@@ -74,6 +74,3 @@ extern void at_sim_auth_exit(void);
|
||||
|
||||
extern void at_gnss_init(void);
|
||||
extern void at_gnss_exit(void);
|
||||
|
||||
extern void at_lte_init(void);
|
||||
extern void at_lte_exit(void);
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
* oFono - Open Source Telephony
|
||||
*
|
||||
* Copyright (C) 2008-2011 Intel Corporation. All rights reserved.
|
||||
* Copyright (C) 2018 Gemalto M2M
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
@@ -28,7 +27,6 @@
|
||||
#include <gatchat.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define OFONO_API_SUBJECT_TO_CHANGE
|
||||
#include <ofono/log.h>
|
||||
@@ -616,85 +614,3 @@ void at_util_sim_state_query_free(struct at_util_sim_state_query *req)
|
||||
|
||||
g_free(req);
|
||||
}
|
||||
|
||||
/*
|
||||
* CGCONTRDP returns addr + netmask in the same string in the form
|
||||
* of "a.b.c.d.m.m.m.m" for IPv4.
|
||||
* address/netmask must be able to hold
|
||||
* 255.255.255.255 + null = 16 characters
|
||||
*/
|
||||
int at_util_get_ipv4_address_and_netmask(const char *addrnetmask,
|
||||
char *address, char *netmask)
|
||||
{
|
||||
const char *s = addrnetmask;
|
||||
const char *net = NULL;
|
||||
|
||||
int ret = -EINVAL;
|
||||
int i;
|
||||
|
||||
/* Count 7 dots for ipv4, less or more means error. */
|
||||
for (i = 0; i < 9; i++, s++) {
|
||||
s = strchr(s, '.');
|
||||
|
||||
if (!s)
|
||||
break;
|
||||
|
||||
if (i == 3) {
|
||||
/* set netmask ptr and break the string */
|
||||
net = s + 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (i == 7) {
|
||||
memcpy(address, addrnetmask, net - addrnetmask);
|
||||
address[net - addrnetmask - 1] = '\0';
|
||||
strcpy(netmask, net);
|
||||
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int at_util_gprs_auth_method_to_auth_prot(
|
||||
enum ofono_gprs_auth_method auth_method)
|
||||
{
|
||||
switch (auth_method) {
|
||||
case OFONO_GPRS_AUTH_METHOD_ANY:
|
||||
case OFONO_GPRS_AUTH_METHOD_PAP:
|
||||
return 1;
|
||||
case OFONO_GPRS_AUTH_METHOD_CHAP:
|
||||
return 2;
|
||||
case OFONO_GPRS_AUTH_METHOD_NONE:
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *at_util_gprs_proto_to_pdp_type(enum ofono_gprs_proto proto)
|
||||
{
|
||||
switch (proto) {
|
||||
case OFONO_GPRS_PROTO_IPV6:
|
||||
return "IPV6";
|
||||
case OFONO_GPRS_PROTO_IPV4V6:
|
||||
return "IPV4V6";
|
||||
break;
|
||||
case OFONO_GPRS_PROTO_IP:
|
||||
return "IP";
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char *at_util_get_cgdcont_command(guint cid, enum ofono_gprs_proto proto,
|
||||
const char *apn)
|
||||
{
|
||||
const char *pdp_type = at_util_gprs_proto_to_pdp_type(proto);
|
||||
|
||||
if (!apn)
|
||||
return g_strdup_printf("AT+CGDCONT=%u", cid);
|
||||
|
||||
return g_strdup_printf("AT+CGDCONT=%u,\"%s\",\"%s\"", cid, pdp_type,
|
||||
apn);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
* oFono - Open Source Telephony
|
||||
*
|
||||
* Copyright (C) 2008-2011 Intel Corporation. All rights reserved.
|
||||
* Copyright (C) 2018 Gemalto M2M
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
@@ -84,27 +83,7 @@ struct at_util_sim_state_query *at_util_sim_state_query_new(GAtChat *chat,
|
||||
GDestroyNotify destroy);
|
||||
void at_util_sim_state_query_free(struct at_util_sim_state_query *req);
|
||||
|
||||
int at_util_get_ipv4_address_and_netmask(const char *addrnetmask,
|
||||
char *address, char *netmask);
|
||||
|
||||
int at_util_gprs_auth_method_to_auth_prot(
|
||||
enum ofono_gprs_auth_method auth_method);
|
||||
|
||||
const char *at_util_gprs_proto_to_pdp_type(enum ofono_gprs_proto proto);
|
||||
|
||||
/*
|
||||
* at_util_get_cgdcont_command
|
||||
* if the apn pointer is NULL, the context will be removed: the resulting
|
||||
* string will be like: AT+CGDCONT=7
|
||||
* but if apn pointer is not NULL and the string is empty, then
|
||||
* this function will create a normal context with empty apn, like:
|
||||
* AT+CGDCONT=4,"IPV6",""
|
||||
*/
|
||||
char *at_util_get_cgdcont_command(guint cid, enum ofono_gprs_proto proto,
|
||||
const char *apn);
|
||||
|
||||
struct cb_data {
|
||||
gint ref_count;
|
||||
void *cb;
|
||||
void *data;
|
||||
void *user;
|
||||
@@ -115,29 +94,12 @@ static inline struct cb_data *cb_data_new(void *cb, void *data)
|
||||
struct cb_data *ret;
|
||||
|
||||
ret = g_new0(struct cb_data, 1);
|
||||
ret->ref_count = 1;
|
||||
ret->cb = cb;
|
||||
ret->data = data;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline struct cb_data *cb_data_ref(struct cb_data *cbd)
|
||||
{
|
||||
cbd->ref_count++;
|
||||
return cbd;
|
||||
}
|
||||
|
||||
static inline void cb_data_unref(gpointer user_data)
|
||||
{
|
||||
struct cb_data *cbd = user_data;
|
||||
|
||||
if (--cbd->ref_count)
|
||||
return;
|
||||
|
||||
g_free(cbd);
|
||||
}
|
||||
|
||||
static inline int at_util_convert_signal_strength(int strength)
|
||||
{
|
||||
int result;
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -211,7 +212,7 @@ static void at_call_barring_remove(struct ofono_call_barring *cb)
|
||||
ofono_call_barring_set_data(cb, NULL);
|
||||
}
|
||||
|
||||
static const struct ofono_call_barring_driver driver = {
|
||||
static struct ofono_call_barring_driver driver = {
|
||||
.name = "atmodem",
|
||||
.probe = at_call_barring_probe,
|
||||
.remove = at_call_barring_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -263,7 +264,7 @@ static void at_ccfc_remove(struct ofono_call_forwarding *cf)
|
||||
ofono_call_forwarding_set_data(cf, NULL);
|
||||
}
|
||||
|
||||
static const struct ofono_call_forwarding_driver driver = {
|
||||
static struct ofono_call_forwarding_driver driver = {
|
||||
.name = "atmodem",
|
||||
.probe = at_ccfc_probe,
|
||||
.remove = at_ccfc_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -330,7 +331,7 @@ static void at_caoc_remove(struct ofono_call_meter *cm)
|
||||
ofono_call_meter_set_data(cm, NULL);
|
||||
}
|
||||
|
||||
static const struct ofono_call_meter_driver driver = {
|
||||
static struct ofono_call_meter_driver driver = {
|
||||
.name = "atmodem",
|
||||
.probe = at_caoc_probe,
|
||||
.remove = at_caoc_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -397,7 +398,7 @@ static void at_call_settings_remove(struct ofono_call_settings *cs)
|
||||
ofono_call_settings_set_data(cs, NULL);
|
||||
}
|
||||
|
||||
static const struct ofono_call_settings_driver driver = {
|
||||
static struct ofono_call_settings_driver driver = {
|
||||
.name = "atmodem",
|
||||
.probe = at_call_settings_probe,
|
||||
.remove = at_call_settings_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -206,7 +207,7 @@ static void at_call_volume_remove(struct ofono_call_volume *cv)
|
||||
g_free(cvd);
|
||||
}
|
||||
|
||||
static const struct ofono_call_volume_driver driver = {
|
||||
static struct ofono_call_volume_driver driver = {
|
||||
.name = "atmodem",
|
||||
.probe = at_call_volume_probe,
|
||||
.remove = at_call_volume_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -47,51 +48,6 @@ struct cbs_data {
|
||||
unsigned int vendor;
|
||||
};
|
||||
|
||||
static void at_xmm_etw_sec_notify(GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct ofono_cbs *cbs = user_data;
|
||||
const char *hexpdu;
|
||||
int pdulen;
|
||||
GAtResultIter iter;
|
||||
unsigned char pdu[88];
|
||||
long hexpdulen;
|
||||
|
||||
DBG("");
|
||||
|
||||
g_at_result_iter_init(&iter, result);
|
||||
|
||||
if (!g_at_result_iter_next(&iter, "+XETWSECWARN:"))
|
||||
return;
|
||||
|
||||
if (!g_at_result_iter_next_number(&iter, &pdulen))
|
||||
return;
|
||||
|
||||
if (pdulen != 88) {
|
||||
ofono_error("Got a CBM message with invalid PDU size!");
|
||||
return;
|
||||
}
|
||||
|
||||
hexpdu = g_at_result_pdu(result);
|
||||
if (hexpdu == NULL) {
|
||||
ofono_error("Got a CBM, but no PDU. Are we in text mode?");
|
||||
return;
|
||||
}
|
||||
|
||||
DBG("Got new Cell Broadcast via XETWSECWARN: %s, %d", hexpdu, pdulen);
|
||||
|
||||
if (decode_hex_own_buf(hexpdu, -1, &hexpdulen, 0, pdu) == NULL) {
|
||||
ofono_error("Unable to hex-decode the PDU");
|
||||
return;
|
||||
}
|
||||
|
||||
if (hexpdulen != pdulen) {
|
||||
ofono_error("hexpdu length not equal to reported pdu length");
|
||||
return;
|
||||
}
|
||||
|
||||
ofono_cbs_notify(cbs, pdu, pdulen);
|
||||
}
|
||||
|
||||
static void at_cbm_notify(GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct ofono_cbs *cbs = user_data;
|
||||
@@ -165,14 +121,9 @@ static void at_cbs_set_topics(struct ofono_cbs *cbs, const char *topics,
|
||||
switch (data->vendor) {
|
||||
case OFONO_VENDOR_GOBI:
|
||||
case OFONO_VENDOR_QUALCOMM_MSM:
|
||||
case OFONO_VENDOR_GEMALTO:
|
||||
g_at_chat_send(data->chat, "AT+CSCB=0", none_prefix,
|
||||
NULL, NULL, NULL);
|
||||
break;
|
||||
case OFONO_VENDOR_XMM:
|
||||
g_at_chat_send(data->chat, "AT+XETWNTFYSTART=2", none_prefix,
|
||||
NULL, NULL, NULL);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -200,10 +151,6 @@ static void at_cbs_clear_topics(struct ofono_cbs *cbs,
|
||||
|
||||
DBG("");
|
||||
|
||||
if (data->vendor == OFONO_VENDOR_XMM)
|
||||
g_at_chat_send(data->chat, "AT+XETWNTFYSTOP=2", none_prefix,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
if (g_at_chat_send(data->chat, "AT+CSCB=0", none_prefix,
|
||||
at_cscb_set_cb, cbd, g_free) > 0)
|
||||
return;
|
||||
@@ -228,10 +175,6 @@ static void at_cbs_register(gboolean ok, GAtResult *result, gpointer user)
|
||||
*/
|
||||
g_at_chat_register(data->chat, "+CBM:", at_cbm_notify, TRUE, cbs, NULL);
|
||||
|
||||
if (data->vendor == OFONO_VENDOR_XMM)
|
||||
g_at_chat_register(data->chat, "+XETWSECWARN:",
|
||||
at_xmm_etw_sec_notify, TRUE, cbs, NULL);
|
||||
|
||||
ofono_cbs_register(cbs);
|
||||
}
|
||||
|
||||
@@ -280,13 +223,6 @@ static int at_cbs_probe(struct ofono_cbs *cbs, unsigned int vendor,
|
||||
|
||||
ofono_cbs_set_data(cbs, data);
|
||||
|
||||
if (vendor == OFONO_VENDOR_XMM) {
|
||||
g_at_chat_send(data->chat, "AT+XCMAS=1", cscb_prefix,
|
||||
NULL, NULL, NULL);
|
||||
g_at_chat_send(data->chat, "AT+XETWCFG=1,1,0,0; ", none_prefix,
|
||||
NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
g_at_chat_send(data->chat, "AT+CSCB=?", cscb_prefix,
|
||||
at_cscb_support_cb, cbs, NULL);
|
||||
|
||||
@@ -303,7 +239,7 @@ static void at_cbs_remove(struct ofono_cbs *cbs)
|
||||
g_free(data);
|
||||
}
|
||||
|
||||
static const struct ofono_cbs_driver driver = {
|
||||
static struct ofono_cbs_driver driver = {
|
||||
.name = "atmodem",
|
||||
.probe = at_cbs_probe,
|
||||
.remove = at_cbs_remove,
|
||||
|
||||
@@ -153,7 +153,7 @@ static void at_devinfo_remove(struct ofono_devinfo *info)
|
||||
g_at_chat_unref(chat);
|
||||
}
|
||||
|
||||
static const struct ofono_devinfo_driver driver = {
|
||||
static struct ofono_devinfo_driver driver = {
|
||||
.name = "atmodem",
|
||||
.probe = at_devinfo_probe,
|
||||
.remove = at_devinfo_remove,
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -262,7 +263,7 @@ static void at_gnss_remove(struct ofono_gnss *gnss)
|
||||
g_free(gd);
|
||||
}
|
||||
|
||||
static const struct ofono_gnss_driver driver = {
|
||||
static struct ofono_gnss_driver driver = {
|
||||
.name = "atmodem",
|
||||
.probe = at_gnss_probe,
|
||||
.remove = at_gnss_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -42,11 +43,10 @@
|
||||
#include "atmodem.h"
|
||||
#include "vendor.h"
|
||||
|
||||
#define TUN_DEV "/dev/net/tun"
|
||||
#define TUN_SYSFS_DIR "/sys/devices/virtual/misc/tun"
|
||||
|
||||
#define STATIC_IP_NETMASK "255.255.255.255"
|
||||
|
||||
static const char *cgdata_prefix[] = { "+CGDATA:", NULL };
|
||||
static const char *none_prefix[] = { NULL };
|
||||
|
||||
enum state {
|
||||
@@ -67,7 +67,6 @@ struct gprs_context_data {
|
||||
ofono_gprs_context_cb_t cb;
|
||||
void *cb_data; /* Callback data */
|
||||
unsigned int vendor;
|
||||
gboolean use_atd99;
|
||||
};
|
||||
|
||||
static void ppp_debug(const char *str, void *data)
|
||||
@@ -211,7 +210,7 @@ static void at_cgdcont_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
return;
|
||||
}
|
||||
|
||||
if (gcd->use_atd99)
|
||||
if (gcd->vendor == OFONO_VENDOR_SIMCOM_SIM900)
|
||||
sprintf(buf, "ATD*99***%u#", gcd->active_context);
|
||||
else
|
||||
sprintf(buf, "AT+CGDATA=\"PPP\",%u", gcd->active_context);
|
||||
@@ -248,8 +247,6 @@ static void at_gprs_activate_primary(struct ofono_gprs_context *gc,
|
||||
|
||||
/* We only support CHAP and PAP */
|
||||
switch (ctx->auth_method) {
|
||||
case OFONO_GPRS_AUTH_METHOD_ANY:
|
||||
case OFONO_GPRS_AUTH_METHOD_NONE:
|
||||
case OFONO_GPRS_AUTH_METHOD_CHAP:
|
||||
gcd->auth_method = G_AT_PPP_AUTH_METHOD_CHAP;
|
||||
break;
|
||||
@@ -297,8 +294,6 @@ static void at_gprs_activate_primary(struct ofono_gprs_context *gc,
|
||||
* prefix, this is the least invasive place to set it.
|
||||
*/
|
||||
switch (ctx->auth_method) {
|
||||
case OFONO_GPRS_AUTH_METHOD_ANY:
|
||||
case OFONO_GPRS_AUTH_METHOD_NONE:
|
||||
case OFONO_GPRS_AUTH_METHOD_CHAP:
|
||||
snprintf(buf + len, sizeof(buf) - len - 3,
|
||||
",\"CHAP:%s\"", ctx->apn);
|
||||
@@ -383,43 +378,6 @@ static void cgev_notify(GAtResult *result, gpointer user_data)
|
||||
g_at_ppp_shutdown(gcd->ppp);
|
||||
}
|
||||
|
||||
static void at_cgdata_test_cb(gboolean ok, GAtResult *result,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct ofono_gprs_context *gc = user_data;
|
||||
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
|
||||
GAtResultIter iter;
|
||||
const char *data_type;
|
||||
gboolean found = FALSE;
|
||||
|
||||
gcd->use_atd99 = TRUE;
|
||||
|
||||
if (!ok) {
|
||||
DBG("not ok");
|
||||
goto error;
|
||||
}
|
||||
|
||||
g_at_result_iter_init(&iter, result);
|
||||
if (!g_at_result_iter_next(&iter, "+CGDATA:")) {
|
||||
DBG("no +CGDATA line");
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (!g_at_result_iter_open_list(&iter)) {
|
||||
DBG("no list found");
|
||||
goto error;
|
||||
}
|
||||
|
||||
while (!found && g_at_result_iter_next_string(&iter, &data_type)) {
|
||||
if (g_str_equal(data_type, "PPP")) {
|
||||
found = TRUE;
|
||||
gcd->use_atd99 = FALSE;
|
||||
}
|
||||
}
|
||||
error:
|
||||
DBG("use_atd99:%d", gcd->use_atd99);
|
||||
}
|
||||
|
||||
static int at_gprs_context_probe(struct ofono_gprs_context *gc,
|
||||
unsigned int vendor, void *data)
|
||||
{
|
||||
@@ -429,7 +387,7 @@ static int at_gprs_context_probe(struct ofono_gprs_context *gc,
|
||||
|
||||
DBG("");
|
||||
|
||||
if (stat(TUN_DEV, &st) < 0) {
|
||||
if (stat(TUN_SYSFS_DIR, &st) < 0) {
|
||||
ofono_error("Missing support for TUN/TAP devices");
|
||||
return -ENODEV;
|
||||
}
|
||||
@@ -447,15 +405,6 @@ static int at_gprs_context_probe(struct ofono_gprs_context *gc,
|
||||
if (chat == NULL)
|
||||
return 0;
|
||||
|
||||
switch (vendor) {
|
||||
case OFONO_VENDOR_SIMCOM_SIM900:
|
||||
gcd->use_atd99 = FALSE;
|
||||
break;
|
||||
default:
|
||||
g_at_chat_send(chat, "AT+CGDATA=?", cgdata_prefix,
|
||||
at_cgdata_test_cb, gc, NULL);
|
||||
}
|
||||
|
||||
g_at_chat_register(chat, "+CGEV:", cgev_notify, FALSE, gc, NULL);
|
||||
|
||||
return 0;
|
||||
@@ -464,19 +413,10 @@ static int at_gprs_context_probe(struct ofono_gprs_context *gc,
|
||||
static void at_gprs_context_remove(struct ofono_gprs_context *gc)
|
||||
{
|
||||
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
|
||||
GAtIO *io;
|
||||
|
||||
DBG("");
|
||||
|
||||
if (gcd->state != STATE_IDLE && gcd->ppp) {
|
||||
if ((gcd->vendor == OFONO_VENDOR_HUAWEI) && gcd->chat) {
|
||||
/* immediately send escape sequence */
|
||||
io = g_at_chat_get_io(gcd->chat);
|
||||
|
||||
if (io)
|
||||
g_at_io_write(io, "+++", 3);
|
||||
}
|
||||
|
||||
g_at_ppp_unref(gcd->ppp);
|
||||
g_at_chat_resume(gcd->chat);
|
||||
}
|
||||
@@ -487,7 +427,7 @@ static void at_gprs_context_remove(struct ofono_gprs_context *gc)
|
||||
g_free(gcd);
|
||||
}
|
||||
|
||||
static const struct ofono_gprs_context_driver driver = {
|
||||
static struct ofono_gprs_context_driver driver = {
|
||||
.name = "atmodem",
|
||||
.probe = at_gprs_context_probe,
|
||||
.remove = at_gprs_context_remove,
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -48,9 +49,6 @@ static const char *none_prefix[] = { NULL };
|
||||
struct gprs_data {
|
||||
GAtChat *chat;
|
||||
unsigned int vendor;
|
||||
unsigned int last_auto_context_id;
|
||||
gboolean telit_try_reattach;
|
||||
int attached;
|
||||
};
|
||||
|
||||
static void at_cgatt_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
@@ -74,10 +72,8 @@ static void at_gprs_set_attached(struct ofono_gprs *gprs, int attached,
|
||||
snprintf(buf, sizeof(buf), "AT+CGATT=%i", attached ? 1 : 0);
|
||||
|
||||
if (g_at_chat_send(gd->chat, buf, none_prefix,
|
||||
at_cgatt_cb, cbd, g_free) > 0) {
|
||||
gd->attached = attached;
|
||||
at_cgatt_cb, cbd, g_free) > 0)
|
||||
return;
|
||||
}
|
||||
|
||||
g_free(cbd);
|
||||
|
||||
@@ -145,48 +141,6 @@ static void at_gprs_registration_status(struct ofono_gprs *gprs,
|
||||
CALLBACK_WITH_FAILURE(cb, -1, data);
|
||||
}
|
||||
|
||||
static void at_cgdcont_read_cb(gboolean ok, GAtResult *result,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct ofono_gprs *gprs = user_data;
|
||||
struct gprs_data *gd = ofono_gprs_get_data(gprs);
|
||||
int activated_cid = gd->last_auto_context_id;
|
||||
const char *apn = NULL;
|
||||
GAtResultIter iter;
|
||||
|
||||
DBG("ok %d", ok);
|
||||
|
||||
if (!ok) {
|
||||
ofono_warn("Can't read CGDCONT contexts.");
|
||||
return;
|
||||
}
|
||||
|
||||
g_at_result_iter_init(&iter, result);
|
||||
|
||||
while (g_at_result_iter_next(&iter, "+CGDCONT:")) {
|
||||
int read_cid;
|
||||
|
||||
if (!g_at_result_iter_next_number(&iter, &read_cid))
|
||||
break;
|
||||
|
||||
if (read_cid != activated_cid)
|
||||
continue;
|
||||
|
||||
/* ignore protocol */
|
||||
g_at_result_iter_skip_next(&iter);
|
||||
|
||||
g_at_result_iter_next_string(&iter, &apn);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (apn)
|
||||
ofono_gprs_cid_activated(gprs, activated_cid, apn);
|
||||
else
|
||||
ofono_warn("cid %u: Received activated but no apn present",
|
||||
activated_cid);
|
||||
}
|
||||
|
||||
static void cgreg_notify(GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct ofono_gprs *gprs = user_data;
|
||||
@@ -197,35 +151,12 @@ static void cgreg_notify(GAtResult *result, gpointer user_data)
|
||||
NULL, NULL, NULL, gd->vendor) == FALSE)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Telit AT modem firmware (tested with UE910-EUR) generates
|
||||
* +CGREG: 0\r\n\r\n+CGEV: NW DETACH
|
||||
* after a context is de-activated and ppp connection closed.
|
||||
* Then, after a random amount of time (observed from a few seconds
|
||||
* to a few hours), an unsolicited +CGREG: 1 arrives.
|
||||
* Attempt to fix the problem, by sending AT+CGATT=1 once.
|
||||
* This does not re-activate the context, but if a network connection
|
||||
* is still correct, will generate an immediate +CGREG: 1.
|
||||
*/
|
||||
if (gd->vendor == OFONO_VENDOR_TELIT) {
|
||||
if (gd->attached && !status && !gd->telit_try_reattach) {
|
||||
DBG("Trying to re-attach gprs network");
|
||||
gd->telit_try_reattach = TRUE;
|
||||
g_at_chat_send(gd->chat, "AT+CGATT=1", none_prefix,
|
||||
NULL, NULL, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
gd->telit_try_reattach = FALSE;
|
||||
}
|
||||
|
||||
ofono_gprs_status_notify(gprs, status);
|
||||
}
|
||||
|
||||
static void cgev_notify(GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct ofono_gprs *gprs = user_data;
|
||||
struct gprs_data *gd = ofono_gprs_get_data(gprs);
|
||||
GAtResultIter iter;
|
||||
const char *event;
|
||||
|
||||
@@ -239,18 +170,8 @@ static void cgev_notify(GAtResult *result, gpointer user_data)
|
||||
|
||||
if (g_str_equal(event, "NW DETACH") ||
|
||||
g_str_equal(event, "ME DETACH")) {
|
||||
if (gd->vendor == OFONO_VENDOR_TELIT &&
|
||||
gd->telit_try_reattach)
|
||||
return;
|
||||
|
||||
gd->attached = FALSE;
|
||||
ofono_gprs_detached_notify(gprs);
|
||||
return;
|
||||
} else if (g_str_has_prefix(event, "ME PDN ACT")) {
|
||||
sscanf(event, "%*s %*s %*s %u", &gd->last_auto_context_id);
|
||||
|
||||
g_at_chat_send(gd->chat, "AT+CGDCONT?", cgdcont_prefix,
|
||||
at_cgdcont_read_cb, gprs, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,26 +247,6 @@ static void huawei_mode_notify(GAtResult *result, gpointer user_data)
|
||||
ofono_gprs_bearer_notify(gprs, bearer);
|
||||
}
|
||||
|
||||
static void huawei_hcsq_notify(GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct ofono_gprs *gprs = user_data;
|
||||
GAtResultIter iter;
|
||||
const char *mode;
|
||||
|
||||
g_at_result_iter_init(&iter, result);
|
||||
|
||||
if (!g_at_result_iter_next(&iter, "^HCSQ:"))
|
||||
return;
|
||||
|
||||
if (!g_at_result_iter_next_string(&iter, &mode))
|
||||
return;
|
||||
|
||||
if (!strcmp("LTE", mode))
|
||||
ofono_gprs_bearer_notify(gprs, 7); /* LTE */
|
||||
|
||||
/* in other modes, notification ^MODE is used */
|
||||
}
|
||||
|
||||
static void telit_mode_notify(GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct ofono_gprs *gprs = user_data;
|
||||
@@ -373,9 +274,6 @@ static void telit_mode_notify(GAtResult *result, gpointer user_data)
|
||||
case 3:
|
||||
bearer = 5; /* HSDPA */
|
||||
break;
|
||||
case 4:
|
||||
bearer = 7; /* LTE */
|
||||
break;
|
||||
default:
|
||||
bearer = 0;
|
||||
break;
|
||||
@@ -405,6 +303,10 @@ static void ublox_ureg_notify(GAtResult *result, gpointer user_data)
|
||||
case 5:
|
||||
bearer = 4;
|
||||
break;
|
||||
case 7:
|
||||
/* XXX: reserved - assume none. */
|
||||
bearer = 0;
|
||||
break;
|
||||
case 8:
|
||||
bearer = 1;
|
||||
break;
|
||||
@@ -451,8 +353,6 @@ static void gprs_initialized(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
case OFONO_VENDOR_HUAWEI:
|
||||
g_at_chat_register(gd->chat, "^MODE:", huawei_mode_notify,
|
||||
FALSE, gprs, NULL);
|
||||
g_at_chat_register(gd->chat, "^HCSQ:", huawei_hcsq_notify,
|
||||
FALSE, gprs, NULL);
|
||||
break;
|
||||
case OFONO_VENDOR_UBLOX:
|
||||
g_at_chat_register(gd->chat, "+UREG:", ublox_ureg_notify,
|
||||
@@ -465,7 +365,6 @@ static void gprs_initialized(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
FALSE, gprs, NULL);
|
||||
g_at_chat_send(gd->chat, "AT#PSNT=1", none_prefix,
|
||||
NULL, NULL, NULL);
|
||||
break;
|
||||
default:
|
||||
g_at_chat_register(gd->chat, "+CPSB:", cpsb_notify,
|
||||
FALSE, gprs, NULL);
|
||||
@@ -577,7 +476,7 @@ static void at_cgdcont_test_cb(gboolean ok, GAtResult *result,
|
||||
if (g_at_result_iter_next_range(&iter, &min, &max) == FALSE)
|
||||
continue;
|
||||
|
||||
if (!g_at_result_iter_skip_next(&iter))
|
||||
if (!g_at_result_iter_close_list(&iter))
|
||||
continue;
|
||||
|
||||
if (g_at_result_iter_open_list(&iter))
|
||||
@@ -640,7 +539,7 @@ static void at_gprs_remove(struct ofono_gprs *gprs)
|
||||
g_free(gd);
|
||||
}
|
||||
|
||||
static const struct ofono_gprs_driver driver = {
|
||||
static struct ofono_gprs_driver driver = {
|
||||
.name = "atmodem",
|
||||
.probe = at_gprs_probe,
|
||||
.remove = at_gprs_remove,
|
||||
|
||||
@@ -1,185 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* oFono - Open Source Telephony
|
||||
*
|
||||
* Copyright (C) 2017 Intel Corporation. All rights reserved.
|
||||
* Copyright (C) 2018 Gemalto M2M
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include <ofono/modem.h>
|
||||
#include <ofono/gprs-context.h>
|
||||
#include <ofono/log.h>
|
||||
#include <ofono/lte.h>
|
||||
|
||||
#include "gatchat.h"
|
||||
#include "gatresult.h"
|
||||
|
||||
#include "atmodem.h"
|
||||
|
||||
static const char *none_prefix[] = { NULL };
|
||||
|
||||
struct lte_driver_data {
|
||||
GAtChat *chat;
|
||||
struct ofono_lte_default_attach_info pending_info;
|
||||
};
|
||||
|
||||
static void at_lte_set_auth_cb(gboolean ok, GAtResult *result,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct cb_data *cbd = user_data;
|
||||
ofono_lte_cb_t cb = cbd->cb;
|
||||
struct ofono_error error;
|
||||
|
||||
decode_at_error(&error, g_at_result_final_response(result));
|
||||
cb(&error, cbd->data);
|
||||
}
|
||||
|
||||
static void at_lte_set_default_attach_info_cb(gboolean ok, GAtResult *result,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct cb_data *cbd = user_data;
|
||||
ofono_lte_cb_t cb = cbd->cb;
|
||||
void *data = cbd->data;
|
||||
struct lte_driver_data *ldd = cbd->user;
|
||||
struct ofono_error error;
|
||||
char buf[32 + OFONO_GPRS_MAX_USERNAME_LENGTH +
|
||||
OFONO_GPRS_MAX_PASSWORD_LENGTH + 1];
|
||||
size_t buflen = sizeof(buf);
|
||||
size_t len;
|
||||
enum ofono_gprs_auth_method auth_method;
|
||||
|
||||
if (!ok) {
|
||||
decode_at_error(&error, g_at_result_final_response(result));
|
||||
cb(&error, data);
|
||||
return;
|
||||
}
|
||||
|
||||
auth_method = ldd->pending_info.auth_method;
|
||||
|
||||
/* change the authentication method if the parameters are invalid */
|
||||
if (!*ldd->pending_info.username || !*ldd->pending_info.password)
|
||||
auth_method = OFONO_GPRS_AUTH_METHOD_NONE;
|
||||
|
||||
len = snprintf(buf, buflen, "AT+CGAUTH=0,%d",
|
||||
at_util_gprs_auth_method_to_auth_prot(auth_method));
|
||||
buflen -= len;
|
||||
|
||||
if (auth_method != OFONO_GPRS_AUTH_METHOD_NONE)
|
||||
snprintf(buf + len, buflen, ",\"%s\",\"%s\"",
|
||||
ldd->pending_info.username,
|
||||
ldd->pending_info.password);
|
||||
|
||||
cbd = cb_data_ref(cbd);
|
||||
if (g_at_chat_send(ldd->chat, buf, none_prefix,
|
||||
at_lte_set_auth_cb, cbd, cb_data_unref) > 0)
|
||||
return;
|
||||
|
||||
cb_data_unref(cbd);
|
||||
CALLBACK_WITH_FAILURE(cb, data);
|
||||
}
|
||||
|
||||
static void at_lte_set_default_attach_info(const struct ofono_lte *lte,
|
||||
const struct ofono_lte_default_attach_info *info,
|
||||
ofono_lte_cb_t cb, void *data)
|
||||
{
|
||||
struct lte_driver_data *ldd = ofono_lte_get_data(lte);
|
||||
struct cb_data *cbd = cb_data_new(cb, data);
|
||||
char *buf = at_util_get_cgdcont_command(0, info->proto, info->apn);
|
||||
|
||||
cbd->user = ldd;
|
||||
memcpy(&ldd->pending_info, info, sizeof(ldd->pending_info));
|
||||
|
||||
if (g_at_chat_send(ldd->chat, buf, none_prefix,
|
||||
at_lte_set_default_attach_info_cb,
|
||||
cbd, cb_data_unref) > 0)
|
||||
goto end;
|
||||
|
||||
cb_data_unref(cbd);
|
||||
CALLBACK_WITH_FAILURE(cb, data);
|
||||
end:
|
||||
g_free(buf);
|
||||
}
|
||||
|
||||
static gboolean lte_delayed_register(gpointer user_data)
|
||||
{
|
||||
struct ofono_lte *lte = user_data;
|
||||
|
||||
ofono_lte_register(lte);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int at_lte_probe(struct ofono_lte *lte, unsigned int vendor, void *data)
|
||||
{
|
||||
GAtChat *chat = data;
|
||||
struct lte_driver_data *ldd;
|
||||
|
||||
DBG("at lte probe");
|
||||
|
||||
ldd = g_try_new0(struct lte_driver_data, 1);
|
||||
if (!ldd)
|
||||
return -ENOMEM;
|
||||
|
||||
ldd->chat = g_at_chat_clone(chat);
|
||||
|
||||
ofono_lte_set_data(lte, ldd);
|
||||
|
||||
g_idle_add(lte_delayed_register, lte);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void at_lte_remove(struct ofono_lte *lte)
|
||||
{
|
||||
struct lte_driver_data *ldd = ofono_lte_get_data(lte);
|
||||
|
||||
DBG("at lte remove");
|
||||
|
||||
g_at_chat_unref(ldd->chat);
|
||||
|
||||
ofono_lte_set_data(lte, NULL);
|
||||
|
||||
g_free(ldd);
|
||||
}
|
||||
|
||||
static const struct ofono_lte_driver driver = {
|
||||
.name = "atmodem",
|
||||
.probe = at_lte_probe,
|
||||
.remove = at_lte_remove,
|
||||
.set_default_attach_info = at_lte_set_default_attach_info,
|
||||
};
|
||||
|
||||
void at_lte_init(void)
|
||||
{
|
||||
ofono_lte_driver_register(&driver);
|
||||
}
|
||||
|
||||
void at_lte_exit(void)
|
||||
{
|
||||
ofono_lte_driver_unregister(&driver);
|
||||
}
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -47,7 +48,6 @@ static const char *cops_prefix[] = { "+COPS:", NULL };
|
||||
static const char *csq_prefix[] = { "+CSQ:", NULL };
|
||||
static const char *cind_prefix[] = { "+CIND:", NULL };
|
||||
static const char *cmer_prefix[] = { "+CMER:", NULL };
|
||||
static const char *smoni_prefix[] = { "^SMONI:", NULL };
|
||||
static const char *zpas_prefix[] = { "+ZPAS:", NULL };
|
||||
static const char *option_tech_prefix[] = { "_OCTI:", "_OUWCTI:", NULL };
|
||||
|
||||
@@ -178,31 +178,6 @@ static int option_parse_tech(GAtResult *result)
|
||||
return tech;
|
||||
}
|
||||
|
||||
static int gemalto_parse_tech(GAtResult *result)
|
||||
{
|
||||
int tech = -1;
|
||||
GAtResultIter iter;
|
||||
const char *technology;
|
||||
|
||||
g_at_result_iter_init(&iter, result);
|
||||
|
||||
if (!g_at_result_iter_next(&iter, "^SMONI: "))
|
||||
return tech;
|
||||
|
||||
if (!g_at_result_iter_next_unquoted_string(&iter, &technology))
|
||||
return tech;
|
||||
|
||||
if (strcmp(technology, "2G") == 0) {
|
||||
tech = ACCESS_TECHNOLOGY_GSM_EGPRS;
|
||||
} else if (strcmp(technology, "3G") == 0) {
|
||||
tech = ACCESS_TECHNOLOGY_UTRAN;
|
||||
} else if (strcmp(technology, "4G") == 0) {
|
||||
tech = ACCESS_TECHNOLOGY_EUTRAN;
|
||||
}
|
||||
|
||||
return tech;
|
||||
}
|
||||
|
||||
static void at_creg_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct cb_data *cbd = user_data;
|
||||
@@ -227,25 +202,9 @@ static void at_creg_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
if ((status == 1 || status == 5) && (tech == -1))
|
||||
tech = nd->tech;
|
||||
|
||||
/* 6-10 is EUTRAN, with 8 being emergency bearer case */
|
||||
if (status > 5 && tech == -1)
|
||||
tech = ACCESS_TECHNOLOGY_EUTRAN;
|
||||
|
||||
cb(&error, status, lac, ci, tech, cbd->data);
|
||||
}
|
||||
|
||||
static void gemalto_query_tech_cb(gboolean ok, GAtResult *result,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct tech_query *tq = user_data;
|
||||
int tech;
|
||||
|
||||
tech = gemalto_parse_tech(result);
|
||||
|
||||
ofono_netreg_status_notify(tq->netreg,
|
||||
tq->status, tq->lac, tq->ci, tech);
|
||||
}
|
||||
|
||||
static void zte_tech_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct cb_data *cbd = user_data;
|
||||
@@ -879,7 +838,7 @@ static void telit_ciev_notify(GAtResult *result, gpointer user_data)
|
||||
ofono_netreg_strength_notify(netreg, strength);
|
||||
}
|
||||
|
||||
static void gemalto_ciev_notify(GAtResult *result, gpointer user_data)
|
||||
static void cinterion_ciev_notify(GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct ofono_netreg *netreg = user_data;
|
||||
struct netreg_data *nd = ofono_netreg_get_data(netreg);
|
||||
@@ -1129,27 +1088,6 @@ static void huawei_mode_notify(GAtResult *result, gpointer user_data)
|
||||
}
|
||||
}
|
||||
|
||||
static void huawei_hcsq_notify(GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct ofono_netreg *netreg = user_data;
|
||||
struct netreg_data *nd = ofono_netreg_get_data(netreg);
|
||||
GAtResultIter iter;
|
||||
const char *mode;
|
||||
|
||||
g_at_result_iter_init(&iter, result);
|
||||
|
||||
if (!g_at_result_iter_next(&iter, "^HCSQ:"))
|
||||
return;
|
||||
|
||||
if (!g_at_result_iter_next_string(&iter, &mode))
|
||||
return;
|
||||
|
||||
if (!strcmp("LTE", mode))
|
||||
nd->tech = ACCESS_TECHNOLOGY_EUTRAN;
|
||||
|
||||
/* for other technologies, notification ^MODE is used */
|
||||
}
|
||||
|
||||
static void huawei_nwtime_notify(GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct ofono_netreg *netreg = user_data;
|
||||
@@ -1559,12 +1497,6 @@ static void creg_notify(GAtResult *result, gpointer user_data)
|
||||
option_query_tech_cb, tq, g_free) > 0)
|
||||
return;
|
||||
break;
|
||||
case OFONO_VENDOR_GEMALTO:
|
||||
if (g_at_chat_send(nd->chat, "AT^SMONI",
|
||||
smoni_prefix,
|
||||
gemalto_query_tech_cb, tq, g_free) > 0)
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
||||
g_free(tq);
|
||||
@@ -1648,31 +1580,17 @@ static inline ofono_bool_t append_cmer_element(char *buf, int *len, int cap,
|
||||
static ofono_bool_t build_cmer_string(char *buf, int *cmer_opts,
|
||||
struct netreg_data *nd)
|
||||
{
|
||||
const char *ind;
|
||||
int len = sprintf(buf, "AT+CMER=");
|
||||
const char *mode;
|
||||
int len = sprintf(buf, "AT+CMER=");
|
||||
|
||||
DBG("");
|
||||
|
||||
switch (nd->vendor) {
|
||||
case OFONO_VENDOR_UBLOX:
|
||||
/* For all u-blox models, mode 3 is equivalent to mode 1;
|
||||
* since some models do not support setting modes 2 nor 3
|
||||
* (see UBX-13002752), we prefer mode 1 for all models.
|
||||
*/
|
||||
mode = "1";
|
||||
break;
|
||||
default:
|
||||
mode = "3";
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Forward unsolicited result codes directly to the TE;
|
||||
* TA‑TE link specific inband technique used to embed result codes and
|
||||
* data when TA is in on‑line data mode
|
||||
*/
|
||||
if (!append_cmer_element(buf, &len, cmer_opts[0], mode, FALSE))
|
||||
if (!append_cmer_element(buf, &len, cmer_opts[0], "3", FALSE))
|
||||
return FALSE;
|
||||
|
||||
/* No keypad event reporting */
|
||||
@@ -1689,14 +1607,14 @@ static ofono_bool_t build_cmer_string(char *buf, int *cmer_opts,
|
||||
* Telit does not support mode 1.
|
||||
* All indicator events shall be directed from TA to TE.
|
||||
*/
|
||||
ind = "2";
|
||||
mode = "2";
|
||||
break;
|
||||
default:
|
||||
/*
|
||||
* Only those indicator events, which are not caused by +CIND
|
||||
* shall be indicated by the TA to the TE.
|
||||
*/
|
||||
ind = "1";
|
||||
mode = "1";
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1705,7 +1623,7 @@ static ofono_bool_t build_cmer_string(char *buf, int *cmer_opts,
|
||||
* <ind> indicates the indicator order number (as specified for +CIND)
|
||||
* and <value> is the new value of indicator.
|
||||
*/
|
||||
if (!append_cmer_element(buf, &len, cmer_opts[3], ind, TRUE))
|
||||
if (!append_cmer_element(buf, &len, cmer_opts[3], mode, TRUE))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
@@ -1967,10 +1885,6 @@ static void at_creg_set_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
g_at_chat_register(nd->chat, "^MODE:", huawei_mode_notify,
|
||||
FALSE, netreg, NULL);
|
||||
|
||||
/* Register for 4G system mode reports */
|
||||
g_at_chat_register(nd->chat, "^HCSQ:", huawei_hcsq_notify,
|
||||
FALSE, netreg, NULL);
|
||||
|
||||
/* Register for network time reports */
|
||||
g_at_chat_register(nd->chat, "^NWTIME:", huawei_nwtime_notify,
|
||||
FALSE, netreg, NULL);
|
||||
@@ -2034,12 +1948,12 @@ static void at_creg_set_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
g_at_chat_send(nd->chat, "AT*TLTS=1", none_prefix,
|
||||
NULL, NULL, NULL);
|
||||
break;
|
||||
case OFONO_VENDOR_GEMALTO:
|
||||
case OFONO_VENDOR_CINTERION:
|
||||
/*
|
||||
* We can't set rssi bounds from Gemalto responses
|
||||
* We can't set rssi bounds from Cinterion responses
|
||||
* so set them up to specified values here
|
||||
*
|
||||
* Gemalto rssi signal strength specified as:
|
||||
* Cinterion rssi signal strength specified as:
|
||||
* 0 <= -112dBm
|
||||
* 1 - 4 signal strengh in 15 dB steps
|
||||
* 5 >= -51 dBm
|
||||
@@ -2053,7 +1967,7 @@ static void at_creg_set_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
g_at_chat_send(nd->chat, "AT^SIND=\"rssi\",1", none_prefix,
|
||||
NULL, NULL, NULL);
|
||||
g_at_chat_register(nd->chat, "+CIEV:",
|
||||
gemalto_ciev_notify, FALSE, netreg, NULL);
|
||||
cinterion_ciev_notify, FALSE, netreg, NULL);
|
||||
break;
|
||||
case OFONO_VENDOR_NOKIA:
|
||||
case OFONO_VENDOR_SAMSUNG:
|
||||
@@ -2157,7 +2071,7 @@ static void at_netreg_remove(struct ofono_netreg *netreg)
|
||||
g_free(nd);
|
||||
}
|
||||
|
||||
static const struct ofono_netreg_driver driver = {
|
||||
static struct ofono_netreg_driver driver = {
|
||||
.name = "atmodem",
|
||||
.probe = at_netreg_probe,
|
||||
.remove = at_netreg_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -592,7 +593,7 @@ static void at_phonebook_remove(struct ofono_phonebook *pb)
|
||||
g_free(pbd);
|
||||
}
|
||||
|
||||
static const struct ofono_phonebook_driver driver = {
|
||||
static struct ofono_phonebook_driver driver = {
|
||||
.name = "atmodem",
|
||||
.probe = at_phonebook_probe,
|
||||
.remove = at_phonebook_remove,
|
||||
|
||||
164
ofono/drivers/atmodem/sim-auth.c
Normal file
164
ofono/drivers/atmodem/sim-auth.c
Normal file
@@ -0,0 +1,164 @@
|
||||
/*
|
||||
*
|
||||
* oFono - Open Source Telephony
|
||||
*
|
||||
* Copyright (C) 2008-2011 Intel Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include <ofono/modem.h>
|
||||
#include <ofono/sim-auth.h>
|
||||
|
||||
#include "gatchat.h"
|
||||
#include "gatresult.h"
|
||||
#include "simutil.h"
|
||||
#include "vendor.h"
|
||||
|
||||
#include "atmodem.h"
|
||||
|
||||
struct sim_auth_data {
|
||||
GAtChat *chat;
|
||||
unsigned int vendor;
|
||||
};
|
||||
|
||||
static const char *cuad_prefix[] = { "+CUAD:", NULL };
|
||||
|
||||
static void at_discover_apps_cb(gboolean ok, GAtResult *result,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct cb_data *cbd = user_data;
|
||||
GAtResultIter iter;
|
||||
ofono_sim_list_apps_cb_t cb = cbd->cb;
|
||||
struct ofono_error error;
|
||||
const unsigned char *dataobj;
|
||||
gint linelen;
|
||||
unsigned char *buffer;
|
||||
int len;
|
||||
|
||||
decode_at_error(&error, g_at_result_final_response(result));
|
||||
|
||||
if (!ok) {
|
||||
cb(&error, NULL, 0, cbd->data);
|
||||
return;
|
||||
}
|
||||
|
||||
g_at_result_iter_init(&iter, result);
|
||||
|
||||
len = 0;
|
||||
while (g_at_result_iter_next(&iter, "+CUAD:")) {
|
||||
if (!g_at_result_iter_next_hexstring(&iter, NULL, &linelen))
|
||||
goto error;
|
||||
|
||||
len += linelen;
|
||||
}
|
||||
|
||||
g_at_result_iter_init(&iter, result);
|
||||
|
||||
buffer = g_malloc(len);
|
||||
len = 0;
|
||||
|
||||
while (g_at_result_iter_next(&iter, "+CUAD:")) {
|
||||
g_at_result_iter_next_hexstring(&iter, &dataobj, &linelen);
|
||||
memcpy(buffer + len, dataobj, linelen);
|
||||
len += linelen;
|
||||
}
|
||||
|
||||
cb(&error, buffer, len, cbd->data);
|
||||
|
||||
g_free(buffer);
|
||||
return;
|
||||
|
||||
error:
|
||||
CALLBACK_WITH_FAILURE(cb, NULL, 0, cbd->data);
|
||||
}
|
||||
|
||||
static void at_discover_apps(struct ofono_sim_auth *sa,
|
||||
ofono_sim_list_apps_cb_t cb,
|
||||
void *data)
|
||||
{
|
||||
struct sim_auth_data *sad = ofono_sim_auth_get_data(sa);
|
||||
struct cb_data *cbd = cb_data_new(cb, data);
|
||||
|
||||
if (g_at_chat_send(sad->chat, "AT+CUAD", cuad_prefix,
|
||||
at_discover_apps_cb, cbd, g_free) > 0)
|
||||
return;
|
||||
|
||||
g_free(cbd);
|
||||
|
||||
CALLBACK_WITH_FAILURE(cb, NULL, 0, data);
|
||||
}
|
||||
|
||||
static gboolean at_sim_auth_register(gpointer user)
|
||||
{
|
||||
struct ofono_sim_auth *sa = user;
|
||||
|
||||
ofono_sim_auth_register(sa);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int at_sim_auth_probe(struct ofono_sim_auth *sa, unsigned int vendor,
|
||||
void *data)
|
||||
{
|
||||
GAtChat *chat = data;
|
||||
struct sim_auth_data *sad;
|
||||
|
||||
sad = g_new0(struct sim_auth_data, 1);
|
||||
sad->chat = g_at_chat_clone(chat);
|
||||
sad->vendor = vendor;
|
||||
|
||||
ofono_sim_auth_set_data(sa, sad);
|
||||
g_idle_add(at_sim_auth_register, sa);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void at_sim_auth_remove(struct ofono_sim_auth *sa)
|
||||
{
|
||||
struct sim_auth_data *sad = ofono_sim_auth_get_data(sa);
|
||||
|
||||
g_idle_remove_by_data(sa);
|
||||
ofono_sim_auth_set_data(sa, NULL);
|
||||
|
||||
g_at_chat_unref(sad->chat);
|
||||
g_free(sad);
|
||||
}
|
||||
|
||||
static struct ofono_sim_auth_driver driver = {
|
||||
.name = "atmodem",
|
||||
.probe = at_sim_auth_probe,
|
||||
.remove = at_sim_auth_remove,
|
||||
.list_apps = at_discover_apps,
|
||||
};
|
||||
|
||||
void at_sim_auth_init(void)
|
||||
{
|
||||
ofono_sim_auth_driver_register(&driver);
|
||||
}
|
||||
|
||||
void at_sim_auth_exit(void)
|
||||
{
|
||||
ofono_sim_auth_driver_unregister(&driver);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -103,7 +104,7 @@ static void at_csca_set(struct ofono_sms *sms,
|
||||
{
|
||||
struct sms_data *data = ofono_sms_get_data(sms);
|
||||
struct cb_data *cbd = cb_data_new(cb, user_data);
|
||||
char buf[128];
|
||||
char buf[64];
|
||||
|
||||
snprintf(buf, sizeof(buf), "AT+CSCA=\"%s\",%d", sca->number, sca->type);
|
||||
|
||||
@@ -219,16 +220,9 @@ static void at_cmgs(struct ofono_sms *sms, const unsigned char *pdu,
|
||||
int len;
|
||||
|
||||
if (mms) {
|
||||
switch (data->vendor) {
|
||||
case OFONO_VENDOR_GEMALTO:
|
||||
/* no mms support */
|
||||
break;
|
||||
default:
|
||||
snprintf(buf, sizeof(buf), "AT+CMMS=%d", mms);
|
||||
g_at_chat_send(data->chat, buf, none_prefix,
|
||||
NULL, NULL, NULL);
|
||||
break;
|
||||
}
|
||||
snprintf(buf, sizeof(buf), "AT+CMMS=%d", mms);
|
||||
g_at_chat_send(data->chat, buf, none_prefix,
|
||||
NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
len = snprintf(buf, sizeof(buf), "AT+CMGS=%d\r", tpdu_len);
|
||||
@@ -325,6 +319,26 @@ static void at_cnma_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
"Further SMS reception is not guaranteed");
|
||||
}
|
||||
|
||||
static gboolean at_parse_cmt(GAtResult *result, const char **pdu, int *pdulen)
|
||||
{
|
||||
GAtResultIter iter;
|
||||
|
||||
g_at_result_iter_init(&iter, result);
|
||||
|
||||
if (!g_at_result_iter_next(&iter, "+CMT:"))
|
||||
return FALSE;
|
||||
|
||||
if (!g_at_result_iter_skip_next(&iter))
|
||||
return FALSE;
|
||||
|
||||
if (!g_at_result_iter_next_number(&iter, pdulen))
|
||||
return FALSE;
|
||||
|
||||
*pdu = g_at_result_pdu(result);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static inline void at_ack_delivery(struct ofono_sms *sms)
|
||||
{
|
||||
struct sms_data *data = ofono_sms_get_data(sms);
|
||||
@@ -333,21 +347,11 @@ static inline void at_ack_delivery(struct ofono_sms *sms)
|
||||
DBG("");
|
||||
|
||||
/* We must acknowledge the PDU using CNMA */
|
||||
if (data->cnma_ack_pdu) {
|
||||
switch (data->vendor) {
|
||||
case OFONO_VENDOR_GEMALTO:
|
||||
snprintf(buf, sizeof(buf), "AT+CNMA=1");
|
||||
break;
|
||||
default:
|
||||
snprintf(buf, sizeof(buf), "AT+CNMA=1,%d\r%s",
|
||||
data->cnma_ack_pdu_len,
|
||||
data->cnma_ack_pdu);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
/* Should be a safe fallback */
|
||||
if (data->cnma_ack_pdu)
|
||||
snprintf(buf, sizeof(buf), "AT+CNMA=1,%d\r%s",
|
||||
data->cnma_ack_pdu_len, data->cnma_ack_pdu);
|
||||
else /* Should be a safe fallback */
|
||||
snprintf(buf, sizeof(buf), "AT+CNMA=0");
|
||||
}
|
||||
|
||||
g_at_chat_send(data->chat, buf, none_prefix, at_cnma_cb, NULL, NULL);
|
||||
}
|
||||
@@ -405,50 +409,16 @@ static void at_cmt_notify(GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct ofono_sms *sms = user_data;
|
||||
struct sms_data *data = ofono_sms_get_data(sms);
|
||||
GAtResultIter iter;
|
||||
const char *hexpdu;
|
||||
unsigned char pdu[176];
|
||||
long pdu_len;
|
||||
int tpdu_len;
|
||||
unsigned char pdu[176];
|
||||
|
||||
g_at_result_iter_init(&iter, result);
|
||||
|
||||
if (!g_at_result_iter_next(&iter, "+CMT:"))
|
||||
goto err;
|
||||
|
||||
switch (data->vendor) {
|
||||
case OFONO_VENDOR_GEMALTO:
|
||||
if (!g_at_result_iter_next_number(&iter, &tpdu_len)) {
|
||||
/*
|
||||
* Some Gemalto modems (ALS3,PLS8...), act in
|
||||
* accordance with 3GPP 27.005. So we need to skip
|
||||
* the first (<alpha>) field
|
||||
* \r\n+CMT: ,23\r\nCAFECAFECAFE... ...\r\n
|
||||
* ^------- PDU length
|
||||
*/
|
||||
DBG("Retrying to find the PDU length");
|
||||
|
||||
if (!g_at_result_iter_skip_next(&iter))
|
||||
goto err;
|
||||
|
||||
/* Next attempt at finding the PDU length. */
|
||||
if (!g_at_result_iter_next_number(&iter, &tpdu_len))
|
||||
goto err;
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
if (!g_at_result_iter_skip_next(&iter))
|
||||
goto err;
|
||||
|
||||
if (!g_at_result_iter_next_number(&iter, &tpdu_len))
|
||||
goto err;
|
||||
|
||||
break;
|
||||
if (!at_parse_cmt(result, &hexpdu, &tpdu_len)) {
|
||||
ofono_error("Unable to parse CMT notification");
|
||||
return;
|
||||
}
|
||||
|
||||
hexpdu = g_at_result_pdu(result);
|
||||
|
||||
if (strlen(hexpdu) > sizeof(pdu) * 2) {
|
||||
ofono_error("Bad PDU length in CMT notification");
|
||||
return;
|
||||
@@ -461,10 +431,6 @@ static void at_cmt_notify(GAtResult *result, gpointer user_data)
|
||||
|
||||
if (data->vendor != OFONO_VENDOR_SIMCOM)
|
||||
at_ack_delivery(sms);
|
||||
return;
|
||||
|
||||
err:
|
||||
ofono_error("Unable to parse CMT notification");
|
||||
}
|
||||
|
||||
static void at_cmgr_notify(GAtResult *result, gpointer user_data)
|
||||
@@ -776,7 +742,7 @@ static void at_sms_initialized(struct ofono_sms *sms)
|
||||
|
||||
static void at_sms_not_supported(struct ofono_sms *sms)
|
||||
{
|
||||
ofono_error("SMS not supported by this modem. If this is an error"
|
||||
ofono_error("SMS not supported by this modem. If this is in error"
|
||||
" please submit patches to support this hardware");
|
||||
|
||||
ofono_sms_remove(sms);
|
||||
@@ -858,18 +824,8 @@ static gboolean build_cnmi_string(char *buf, int *cnmi_opts,
|
||||
data->cnma_enabled ? "21" : "1", FALSE))
|
||||
return FALSE;
|
||||
|
||||
switch (data->vendor) {
|
||||
case OFONO_VENDOR_GEMALTO:
|
||||
mode = "0";
|
||||
break;
|
||||
default:
|
||||
/* Sounds like 2 is the sanest mode */
|
||||
mode = "20";
|
||||
break;
|
||||
}
|
||||
|
||||
/* Always deliver CB via +CBM, otherwise don't deliver at all */
|
||||
if (!append_cnmi_element(buf, &len, cnmi_opts[2], mode, FALSE))
|
||||
if (!append_cnmi_element(buf, &len, cnmi_opts[2], "20", FALSE))
|
||||
return FALSE;
|
||||
|
||||
/*
|
||||
@@ -1329,7 +1285,7 @@ static void at_sms_remove(struct ofono_sms *sms)
|
||||
ofono_sms_set_data(sms, NULL);
|
||||
}
|
||||
|
||||
static const struct ofono_sms_driver driver = {
|
||||
static struct ofono_sms_driver driver = {
|
||||
.name = "atmodem",
|
||||
.probe = at_sms_probe,
|
||||
.remove = at_sms_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -222,7 +223,7 @@ static void at_stk_remove(struct ofono_stk *stk)
|
||||
g_free(sd);
|
||||
}
|
||||
|
||||
static const struct ofono_stk_driver driver = {
|
||||
static struct ofono_stk_driver driver = {
|
||||
.name = "atmodem",
|
||||
.probe = at_stk_probe,
|
||||
.remove = at_stk_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -91,7 +92,7 @@ static const unsigned char *ucs2_gsm_to_packed(const char *content,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
packed = pack_7bit_own_buf(gsm, written, 0, true, msg_len, 0, msg);
|
||||
packed = pack_7bit_own_buf(gsm, written, 0, TRUE, msg_len, 0, msg);
|
||||
g_free(gsm);
|
||||
|
||||
return packed;
|
||||
@@ -136,7 +137,7 @@ static void cusd_parse(GAtResult *result, struct ofono_ussd *ussd)
|
||||
switch (data->charset) {
|
||||
case AT_UTIL_CHARSET_GSM:
|
||||
msg_ptr = pack_7bit_own_buf((const guint8 *) content,
|
||||
-1, 0, true, &msg_len,
|
||||
-1, 0, TRUE, &msg_len,
|
||||
0, msg);
|
||||
break;
|
||||
|
||||
@@ -200,7 +201,7 @@ static void at_ussd_request(struct ofono_ussd *ussd, int dcs,
|
||||
unsigned char unpacked_buf[182];
|
||||
long written;
|
||||
|
||||
unpack_7bit_own_buf(pdu, len, 0, true, sizeof(unpacked_buf),
|
||||
unpack_7bit_own_buf(pdu, len, 0, TRUE, sizeof(unpacked_buf),
|
||||
&written, 0, unpacked_buf);
|
||||
|
||||
if (written < 1)
|
||||
@@ -326,7 +327,7 @@ static void at_ussd_remove(struct ofono_ussd *ussd)
|
||||
g_free(data);
|
||||
}
|
||||
|
||||
static const struct ofono_ussd_driver driver = {
|
||||
static struct ofono_ussd_driver driver = {
|
||||
.name = "atmodem",
|
||||
.probe = at_ussd_probe,
|
||||
.remove = at_ussd_remove,
|
||||
|
||||
@@ -44,8 +44,6 @@ enum ofono_vendor {
|
||||
OFONO_VENDOR_WAVECOM_Q2XXX,
|
||||
OFONO_VENDOR_ALCATEL,
|
||||
OFONO_VENDOR_QUECTEL,
|
||||
OFONO_VENDOR_QUECTEL_M95,
|
||||
OFONO_VENDOR_UBLOX,
|
||||
OFONO_VENDOR_XMM,
|
||||
OFONO_VENDOR_GEMALTO,
|
||||
OFONO_VENDOR_CINTERION,
|
||||
};
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -252,7 +253,8 @@ static void clcc_poll_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
}
|
||||
}
|
||||
|
||||
g_slist_free_full(vd->calls, g_free);
|
||||
g_slist_foreach(vd->calls, (GFunc) g_free, NULL);
|
||||
g_slist_free(vd->calls);
|
||||
|
||||
vd->calls = calls;
|
||||
|
||||
@@ -1119,7 +1121,6 @@ static int at_voicecall_probe(struct ofono_voicecall *vc, unsigned int vendor,
|
||||
|
||||
switch (vd->vendor) {
|
||||
case OFONO_VENDOR_QUALCOMM_MSM:
|
||||
case OFONO_VENDOR_SIMCOM:
|
||||
g_at_chat_send(vd->chat, "AT+COLP=0", NULL, NULL, NULL, NULL);
|
||||
break;
|
||||
default:
|
||||
@@ -1146,7 +1147,8 @@ static void at_voicecall_remove(struct ofono_voicecall *vc)
|
||||
if (vd->vts_source)
|
||||
g_source_remove(vd->vts_source);
|
||||
|
||||
g_slist_free_full(vd->calls, g_free);
|
||||
g_slist_foreach(vd->calls, (GFunc) g_free, NULL);
|
||||
g_slist_free(vd->calls);
|
||||
|
||||
ofono_voicecall_set_data(vc, NULL);
|
||||
|
||||
@@ -1154,7 +1156,7 @@ static void at_voicecall_remove(struct ofono_voicecall *vc)
|
||||
g_free(vd);
|
||||
}
|
||||
|
||||
static const struct ofono_voicecall_driver driver = {
|
||||
static struct ofono_voicecall_driver driver = {
|
||||
.name = "atmodem",
|
||||
.probe = at_voicecall_probe,
|
||||
.remove = at_voicecall_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -291,7 +292,7 @@ static void calypso_stk_remove(struct ofono_stk *stk)
|
||||
g_free(sd);
|
||||
}
|
||||
|
||||
static const struct ofono_stk_driver driver = {
|
||||
static struct ofono_stk_driver driver = {
|
||||
.name = "calypsomodem",
|
||||
.probe = calypso_stk_probe,
|
||||
.remove = calypso_stk_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -401,7 +402,7 @@ static void calypso_voicecall_remove(struct ofono_voicecall *vc)
|
||||
g_free(vd);
|
||||
}
|
||||
|
||||
static const struct ofono_voicecall_driver driver = {
|
||||
static struct ofono_voicecall_driver driver = {
|
||||
.name = "calypsomodem",
|
||||
.probe = calypso_voicecall_probe,
|
||||
.remove = calypso_voicecall_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -42,7 +43,7 @@
|
||||
#include "cdmamodem.h"
|
||||
#include "drivers/atmodem/vendor.h"
|
||||
|
||||
#define TUN_DEV "/dev/net/tun"
|
||||
#define TUN_SYSFS_DIR "/sys/devices/virtual/misc/tun"
|
||||
|
||||
#define STATIC_IP_NETMASK "255.255.255.255"
|
||||
|
||||
@@ -284,7 +285,7 @@ static int cdma_connman_probe(struct ofono_cdma_connman *cm,
|
||||
|
||||
DBG("");
|
||||
|
||||
if (stat(TUN_DEV, &st) < 0) {
|
||||
if (stat(TUN_SYSFS_DIR, &st) < 0) {
|
||||
ofono_error("Missing support for TUN/TAP devices");
|
||||
return -ENODEV;
|
||||
}
|
||||
@@ -322,7 +323,7 @@ static void cdma_connman_remove(struct ofono_cdma_connman *cm)
|
||||
g_free(cd);
|
||||
}
|
||||
|
||||
static const struct ofono_cdma_connman_driver driver = {
|
||||
static struct ofono_cdma_connman_driver driver = {
|
||||
.name = "cdmamodem",
|
||||
.probe = cdma_connman_probe,
|
||||
.remove = cdma_connman_remove,
|
||||
|
||||
@@ -153,7 +153,7 @@ static void cdma_devinfo_remove(struct ofono_devinfo *info)
|
||||
ofono_devinfo_set_data(info, NULL);
|
||||
}
|
||||
|
||||
static const struct ofono_devinfo_driver driver = {
|
||||
static struct ofono_devinfo_driver driver = {
|
||||
.name = "cdmamodem",
|
||||
.probe = cdma_devinfo_probe,
|
||||
.remove = cdma_devinfo_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -142,7 +143,7 @@ static void cdma_voicecall_remove(struct ofono_cdma_voicecall *vc)
|
||||
g_free(vd);
|
||||
}
|
||||
|
||||
static const struct ofono_cdma_voicecall_driver driver = {
|
||||
static struct ofono_cdma_voicecall_driver driver = {
|
||||
.name = "cdmamodem",
|
||||
.probe = cdma_voicecall_probe,
|
||||
.remove = cdma_voicecall_remove,
|
||||
|
||||
@@ -73,7 +73,7 @@ static void dun_gprs_attached_status(struct ofono_gprs *gprs,
|
||||
CALLBACK_WITH_SUCCESS(cb, 1, data);
|
||||
}
|
||||
|
||||
static const struct ofono_gprs_driver driver = {
|
||||
static struct ofono_gprs_driver driver = {
|
||||
.name = "dunmodem",
|
||||
.probe = dun_gprs_probe,
|
||||
.remove = dun_gprs_remove,
|
||||
|
||||
@@ -107,7 +107,7 @@ static void dun_netreg_remove(struct ofono_netreg *netreg)
|
||||
g_free(nd);
|
||||
}
|
||||
|
||||
static const struct ofono_netreg_driver driver = {
|
||||
static struct ofono_netreg_driver driver = {
|
||||
.name = "dunmodem",
|
||||
.probe = dun_netreg_probe,
|
||||
.remove = dun_netreg_remove,
|
||||
|
||||
@@ -1,236 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* oFono - Open Source Telephony
|
||||
*
|
||||
* Copyright (C) 2017 Vincent Cesson. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include <ofono/log.h>
|
||||
#include <ofono/modem.h>
|
||||
#include <ofono/location-reporting.h>
|
||||
|
||||
#include "gatchat.h"
|
||||
#include "gatresult.h"
|
||||
#include "gattty.h"
|
||||
|
||||
#include "gemaltomodem.h"
|
||||
|
||||
static const char *sgpsc_prefix[] = { "^SGPSC:", NULL };
|
||||
|
||||
struct gps_data {
|
||||
GAtChat *chat;
|
||||
};
|
||||
|
||||
static void gemalto_gps_disable_cb(gboolean ok, GAtResult *result,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct cb_data *cbd = user_data;
|
||||
struct ofono_location_reporting *lr = cbd->user;
|
||||
ofono_location_reporting_disable_cb_t cb = cbd->cb;
|
||||
|
||||
DBG("lr=%p, ok=%d", lr, ok);
|
||||
|
||||
if (!ok) {
|
||||
struct ofono_error error;
|
||||
|
||||
decode_at_error(&error, g_at_result_final_response(result));
|
||||
cb(&error, cbd->data);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
CALLBACK_WITH_SUCCESS(cb, cbd->data);
|
||||
}
|
||||
|
||||
static void gemalto_location_reporting_disable(
|
||||
struct ofono_location_reporting *lr,
|
||||
ofono_location_reporting_disable_cb_t cb,
|
||||
void *data)
|
||||
{
|
||||
struct gps_data *gd = ofono_location_reporting_get_data(lr);
|
||||
struct cb_data *cbd = cb_data_new(cb, data);
|
||||
|
||||
DBG("lr=%p", lr);
|
||||
|
||||
cbd->user = lr;
|
||||
|
||||
if (g_at_chat_send(gd->chat, "AT^SGPSC=\"Engine\",0", sgpsc_prefix,
|
||||
gemalto_gps_disable_cb, cbd, g_free) > 0)
|
||||
return;
|
||||
|
||||
CALLBACK_WITH_FAILURE(cb, data);
|
||||
|
||||
g_free(cbd);
|
||||
}
|
||||
|
||||
static int enable_data_stream(struct ofono_location_reporting *lr)
|
||||
{
|
||||
struct ofono_modem *modem;
|
||||
const char *gps_dev;
|
||||
GHashTable *options;
|
||||
GIOChannel *channel;
|
||||
int fd;
|
||||
|
||||
modem = ofono_location_reporting_get_modem(lr);
|
||||
gps_dev = ofono_modem_get_string(modem, "GPS");
|
||||
|
||||
options = g_hash_table_new(g_str_hash, g_str_equal);
|
||||
if (options == NULL)
|
||||
return -1;
|
||||
|
||||
g_hash_table_insert(options, "Baud", "115200");
|
||||
|
||||
channel = g_at_tty_open(gps_dev, options);
|
||||
|
||||
g_hash_table_destroy(options);
|
||||
|
||||
if (channel == NULL)
|
||||
return -1;
|
||||
|
||||
fd = g_io_channel_unix_get_fd(channel);
|
||||
|
||||
g_io_channel_set_close_on_unref(channel, FALSE);
|
||||
g_io_channel_unref(channel);
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
||||
static void gemalto_sgpsc_cb(gboolean ok, GAtResult *result,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct cb_data *cbd = user_data;
|
||||
ofono_location_reporting_enable_cb_t cb = cbd->cb;
|
||||
struct ofono_location_reporting *lr = cbd->user;
|
||||
struct ofono_error error;
|
||||
int fd;
|
||||
|
||||
DBG("lr=%p ok=%d", lr, ok);
|
||||
|
||||
decode_at_error(&error, g_at_result_final_response(result));
|
||||
|
||||
if (!ok) {
|
||||
cb(&error, -1, cbd->data);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
fd = enable_data_stream(lr);
|
||||
|
||||
if (fd < 0) {
|
||||
CALLBACK_WITH_FAILURE(cb, -1, cbd->data);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
cb(&error, fd, cbd->data);
|
||||
close(fd);
|
||||
}
|
||||
|
||||
static void gemalto_location_reporting_enable(struct ofono_location_reporting *lr,
|
||||
ofono_location_reporting_enable_cb_t cb,
|
||||
void *data)
|
||||
{
|
||||
struct gps_data *gd = ofono_location_reporting_get_data(lr);
|
||||
struct cb_data *cbd = cb_data_new(cb, data);
|
||||
|
||||
DBG("lr=%p", lr);
|
||||
|
||||
cbd->user = lr;
|
||||
|
||||
if (g_at_chat_send(gd->chat, "AT^SGPSC=\"Engine\",2", sgpsc_prefix,
|
||||
gemalto_sgpsc_cb, cbd, NULL) > 0)
|
||||
return;
|
||||
|
||||
CALLBACK_WITH_FAILURE(cb, -1, cbd->data);
|
||||
g_free(cbd);
|
||||
}
|
||||
|
||||
static void gemalto_location_reporting_support_cb(gboolean ok, GAtResult *result,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct ofono_location_reporting *lr = user_data;
|
||||
|
||||
if (!ok) {
|
||||
ofono_location_reporting_remove(lr);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
ofono_location_reporting_register(lr);
|
||||
}
|
||||
|
||||
static int gemalto_location_reporting_probe(struct ofono_location_reporting *lr,
|
||||
unsigned int vendor, void *data)
|
||||
{
|
||||
GAtChat *chat = data;
|
||||
struct gps_data *gd;
|
||||
|
||||
gd = g_try_new0(struct gps_data, 1);
|
||||
if (gd == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
gd->chat = g_at_chat_clone(chat);
|
||||
|
||||
ofono_location_reporting_set_data(lr, gd);
|
||||
|
||||
g_at_chat_send(gd->chat, "AT^SGPSC=?", sgpsc_prefix,
|
||||
gemalto_location_reporting_support_cb,
|
||||
lr, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void gemalto_location_reporting_remove(struct ofono_location_reporting *lr)
|
||||
{
|
||||
struct gps_data *gd = ofono_location_reporting_get_data(lr);
|
||||
|
||||
ofono_location_reporting_set_data(lr, NULL);
|
||||
|
||||
g_at_chat_unref(gd->chat);
|
||||
g_free(gd);
|
||||
}
|
||||
|
||||
static const struct ofono_location_reporting_driver driver = {
|
||||
.name = "gemaltomodem",
|
||||
.type = OFONO_LOCATION_REPORTING_TYPE_NMEA,
|
||||
.probe = gemalto_location_reporting_probe,
|
||||
.remove = gemalto_location_reporting_remove,
|
||||
.enable = gemalto_location_reporting_enable,
|
||||
.disable = gemalto_location_reporting_disable,
|
||||
};
|
||||
|
||||
void gemalto_location_reporting_init()
|
||||
{
|
||||
ofono_location_reporting_driver_register(&driver);
|
||||
}
|
||||
|
||||
void gemalto_location_reporting_exit()
|
||||
{
|
||||
ofono_location_reporting_driver_unregister(&driver);
|
||||
}
|
||||
@@ -1,576 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* oFono - Open Source Telephony
|
||||
*
|
||||
* Copyright (C) 2008-2011 Intel Corporation. All rights reserved.
|
||||
* Copyright (C) 2018 Gemalto M2M
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include <ofono/log.h>
|
||||
#include <ofono/modem.h>
|
||||
#include <ofono/voicecall.h>
|
||||
|
||||
#include "gatchat.h"
|
||||
#include "gatresult.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include "gemaltomodem.h"
|
||||
|
||||
static const char *clcc_prefix[] = { "+CLCC:", NULL };
|
||||
static const char *none_prefix[] = { NULL };
|
||||
|
||||
struct voicecall_data {
|
||||
GAtChat *chat;
|
||||
GSList *calls;
|
||||
unsigned int local_release;
|
||||
GSList *new_calls;
|
||||
};
|
||||
|
||||
struct release_id_req {
|
||||
struct ofono_voicecall *vc;
|
||||
ofono_voicecall_cb_t cb;
|
||||
void *data;
|
||||
int id;
|
||||
};
|
||||
|
||||
struct change_state_req {
|
||||
struct ofono_voicecall *vc;
|
||||
ofono_voicecall_cb_t cb;
|
||||
void *data;
|
||||
int affected_types;
|
||||
};
|
||||
|
||||
static void generic_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct change_state_req *req = user_data;
|
||||
struct voicecall_data *vd = ofono_voicecall_get_data(req->vc);
|
||||
struct ofono_error error;
|
||||
|
||||
decode_at_error(&error, g_at_result_final_response(result));
|
||||
|
||||
if (ok && req->affected_types) {
|
||||
GSList *l;
|
||||
struct ofono_call *call;
|
||||
|
||||
for (l = vd->calls; l; l = l->next) {
|
||||
call = l->data;
|
||||
|
||||
if (req->affected_types & (1 << call->status))
|
||||
vd->local_release |= (1 << call->id);
|
||||
}
|
||||
}
|
||||
|
||||
req->cb(&error, req->data);
|
||||
}
|
||||
|
||||
static void gemalto_call_common(const char *cmd, struct ofono_voicecall *vc,
|
||||
GAtResultFunc result_cb,
|
||||
unsigned int affected_types,
|
||||
ofono_voicecall_cb_t cb, void *data)
|
||||
{
|
||||
struct voicecall_data *vd = ofono_voicecall_get_data(vc);
|
||||
struct change_state_req *req = g_new0(struct change_state_req, 1);
|
||||
|
||||
req->vc = vc;
|
||||
req->cb = cb;
|
||||
req->data = data;
|
||||
req->affected_types = affected_types;
|
||||
|
||||
if (g_at_chat_send(vd->chat, cmd, none_prefix,
|
||||
result_cb, req, g_free) > 0)
|
||||
return;
|
||||
|
||||
g_free(req);
|
||||
CALLBACK_WITH_FAILURE(cb, data);
|
||||
}
|
||||
|
||||
static void gemalto_answer(struct ofono_voicecall *vc,
|
||||
ofono_voicecall_cb_t cb, void *data)
|
||||
{
|
||||
gemalto_call_common("ATA", vc, generic_cb, 0, cb, data);
|
||||
}
|
||||
|
||||
static void gemalto_hangup_all(struct ofono_voicecall *vc,
|
||||
ofono_voicecall_cb_t cb, void *data)
|
||||
{
|
||||
unsigned int affected = (1 << CALL_STATUS_INCOMING) |
|
||||
(1 << CALL_STATUS_DIALING) |
|
||||
(1 << CALL_STATUS_ALERTING) |
|
||||
(1 << CALL_STATUS_WAITING) |
|
||||
(1 << CALL_STATUS_HELD) |
|
||||
(1 << CALL_STATUS_ACTIVE);
|
||||
|
||||
/* Hangup all calls */
|
||||
gemalto_call_common("AT+CHUP", vc, generic_cb, affected, cb, data);
|
||||
}
|
||||
|
||||
static void gemalto_hangup(struct ofono_voicecall *vc,
|
||||
ofono_voicecall_cb_t cb, void *data)
|
||||
{
|
||||
unsigned int affected = (1 << CALL_STATUS_ACTIVE);
|
||||
|
||||
/* Hangup current active call */
|
||||
gemalto_call_common("AT+CHLD=1", vc, generic_cb, affected, cb, data);
|
||||
}
|
||||
|
||||
static void gemalto_hold_all_active(struct ofono_voicecall *vc,
|
||||
ofono_voicecall_cb_t cb, void *data)
|
||||
{
|
||||
unsigned int affected = (1 << CALL_STATUS_ACTIVE);
|
||||
gemalto_call_common("AT+CHLD=2", vc, generic_cb, affected, cb, data);
|
||||
}
|
||||
|
||||
static void gemalto_release_all_held(struct ofono_voicecall *vc,
|
||||
ofono_voicecall_cb_t cb, void *data)
|
||||
{
|
||||
unsigned int affected = (1 << CALL_STATUS_INCOMING) |
|
||||
(1 << CALL_STATUS_WAITING);
|
||||
|
||||
gemalto_call_common("AT+CHLD=0", vc, generic_cb, affected, cb, data);
|
||||
}
|
||||
|
||||
static void gemalto_set_udub(struct ofono_voicecall *vc,
|
||||
ofono_voicecall_cb_t cb, void *data)
|
||||
{
|
||||
unsigned int affected = (1 << CALL_STATUS_INCOMING) |
|
||||
(1 << CALL_STATUS_WAITING);
|
||||
|
||||
gemalto_call_common("AT+CHLD=0", vc, generic_cb, affected, cb, data);
|
||||
}
|
||||
|
||||
static void gemalto_release_all_active(struct ofono_voicecall *vc,
|
||||
ofono_voicecall_cb_t cb, void *data)
|
||||
{
|
||||
unsigned int affected = (1 << CALL_STATUS_ACTIVE);
|
||||
|
||||
gemalto_call_common("AT+CHLD=1", vc, generic_cb, affected, cb, data);
|
||||
}
|
||||
|
||||
static void release_id_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct release_id_req *req = user_data;
|
||||
struct voicecall_data *vd = ofono_voicecall_get_data(req->vc);
|
||||
struct ofono_error error;
|
||||
|
||||
decode_at_error(&error, g_at_result_final_response(result));
|
||||
|
||||
if (ok)
|
||||
vd->local_release = 1 << req->id;
|
||||
|
||||
req->cb(&error, req->data);
|
||||
}
|
||||
|
||||
static void gemalto_release_specific(struct ofono_voicecall *vc, int id,
|
||||
ofono_voicecall_cb_t cb, void *data)
|
||||
{
|
||||
struct voicecall_data *vd = ofono_voicecall_get_data(vc);
|
||||
struct release_id_req *req = g_new0(struct release_id_req, 1);
|
||||
char buf[32];
|
||||
|
||||
req->vc = vc;
|
||||
req->cb = cb;
|
||||
req->data = data;
|
||||
req->id = id;
|
||||
|
||||
snprintf(buf, sizeof(buf), "AT+CHLD=1%d", id);
|
||||
|
||||
if (g_at_chat_send(vd->chat, buf, none_prefix,
|
||||
release_id_cb, req, g_free) > 0)
|
||||
return;
|
||||
|
||||
g_free(req);
|
||||
CALLBACK_WITH_FAILURE(cb, data);
|
||||
}
|
||||
|
||||
static void gemalto_private_chat(struct ofono_voicecall *vc, int id,
|
||||
ofono_voicecall_cb_t cb, void *data)
|
||||
{
|
||||
char buf[32];
|
||||
|
||||
snprintf(buf, sizeof(buf), "AT+CHLD=2%d", id);
|
||||
gemalto_call_common(buf, vc, generic_cb, 0, cb, data);
|
||||
}
|
||||
|
||||
static void gemalto_create_multiparty(struct ofono_voicecall *vc,
|
||||
ofono_voicecall_cb_t cb, void *data)
|
||||
{
|
||||
gemalto_call_common("AT+CHLD=3", vc, generic_cb, 0, cb, data);
|
||||
}
|
||||
|
||||
static void gemalto_transfer(struct ofono_voicecall *vc,
|
||||
ofono_voicecall_cb_t cb, void *data)
|
||||
{
|
||||
/* Held & Active */
|
||||
unsigned int affected = (1 << CALL_STATUS_ACTIVE) |
|
||||
(1 << CALL_STATUS_HELD);
|
||||
|
||||
/* Transfer can puts held & active calls together and disconnects
|
||||
* from both. However, some networks support transferring of
|
||||
* dialing/ringing calls as well.
|
||||
*/
|
||||
affected |= (1 << CALL_STATUS_DIALING) |
|
||||
(1 << CALL_STATUS_ALERTING);
|
||||
|
||||
gemalto_call_common("AT+CHLD=4", vc, generic_cb, affected, cb, data);
|
||||
}
|
||||
|
||||
static void gemalto_send_dtmf(struct ofono_voicecall *vc, const char *dtmf,
|
||||
ofono_voicecall_cb_t cb, void *data)
|
||||
{
|
||||
struct ofono_modem *modem = ofono_voicecall_get_modem(vc);
|
||||
int use_quotes = ofono_modem_get_integer(modem, "GemaltoVtsQuotes");
|
||||
int len = strlen(dtmf);
|
||||
int s;
|
||||
int i;
|
||||
char *buf;
|
||||
|
||||
/* strlen("+VTS=\"T\";") = 9 + initial AT + null */
|
||||
buf = (char *)alloca(len * 9 + 3);
|
||||
|
||||
if (use_quotes)
|
||||
s = sprintf(buf, "AT+VTS=\"%c\"", dtmf[0]);
|
||||
else
|
||||
s = sprintf(buf, "AT+VTS=%c", dtmf[0]);
|
||||
|
||||
for (i = 1; i < len; i++) {
|
||||
if (use_quotes)
|
||||
s += sprintf(buf + s, ";+VTS=\"%c\"", dtmf[i]);
|
||||
else
|
||||
s += sprintf(buf + s, ";+VTS=%c", dtmf[i]);
|
||||
}
|
||||
|
||||
gemalto_call_common(buf, vc, generic_cb, 0, cb, data);
|
||||
}
|
||||
|
||||
static void gemalto_dial(struct ofono_voicecall *vc,
|
||||
const struct ofono_phone_number *ph,
|
||||
enum ofono_clir_option clir,
|
||||
ofono_voicecall_cb_t cb, void *data)
|
||||
{
|
||||
struct cb_data *cbd = cb_data_new(cb, data);
|
||||
char buf[256];
|
||||
size_t len;
|
||||
|
||||
cbd->user = vc;
|
||||
|
||||
if (ph->type == 145)
|
||||
len = snprintf(buf, sizeof(buf), "ATD+%s", ph->number);
|
||||
else
|
||||
len = snprintf(buf, sizeof(buf), "ATD%s", ph->number);
|
||||
|
||||
switch (clir) {
|
||||
case OFONO_CLIR_OPTION_INVOCATION:
|
||||
len += snprintf(buf+len, sizeof(buf)-len, "I");
|
||||
break;
|
||||
case OFONO_CLIR_OPTION_SUPPRESSION:
|
||||
len += snprintf(buf+len, sizeof(buf)-len, "i");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
snprintf(buf + len, sizeof(buf) - len, ";");
|
||||
|
||||
gemalto_call_common(buf, vc, generic_cb, 0, cb, data);
|
||||
}
|
||||
|
||||
static void gemalto_parse_slcc(GAtResult *result, GSList **l,
|
||||
ofono_bool_t *ret_mpty, gboolean *last)
|
||||
{
|
||||
GAtResultIter iter;
|
||||
int id, dir, status, type;
|
||||
ofono_bool_t mpty;
|
||||
struct ofono_call *call;
|
||||
const char *str = "";
|
||||
int number_type = 129;
|
||||
|
||||
if (last)
|
||||
*last = TRUE;
|
||||
|
||||
g_at_result_iter_init(&iter, result);
|
||||
|
||||
g_at_result_iter_next(&iter, "^SLCC:");
|
||||
|
||||
if (!g_at_result_iter_next_number(&iter, &id))
|
||||
return;
|
||||
|
||||
if (last)
|
||||
*last = FALSE;
|
||||
|
||||
if (id == 0)
|
||||
return;
|
||||
|
||||
if (!g_at_result_iter_next_number(&iter, &dir))
|
||||
return;
|
||||
|
||||
if (!g_at_result_iter_next_number(&iter, &status))
|
||||
return;
|
||||
|
||||
if (status > 5)
|
||||
return;
|
||||
|
||||
if (!g_at_result_iter_next_number(&iter, &type))
|
||||
return;
|
||||
|
||||
if (!g_at_result_iter_next_number(&iter, &mpty))
|
||||
return;
|
||||
|
||||
/* skip 'Reserved=0' parameter, only difference from CLCC */
|
||||
if (!g_at_result_iter_skip_next(&iter))
|
||||
return;
|
||||
|
||||
if (g_at_result_iter_next_string(&iter, &str))
|
||||
g_at_result_iter_next_number(&iter, &number_type);
|
||||
|
||||
call = g_new0(struct ofono_call, 1);
|
||||
ofono_call_init(call);
|
||||
call->id = id;
|
||||
call->direction = dir;
|
||||
call->status = status;
|
||||
call->type = type;
|
||||
strncpy(call->phone_number.number, str,
|
||||
OFONO_MAX_PHONE_NUMBER_LENGTH);
|
||||
call->phone_number.type = number_type;
|
||||
|
||||
if (strlen(str) > 0)
|
||||
call->clip_validity = 2;
|
||||
else
|
||||
call->clip_validity = 0;
|
||||
|
||||
*l = g_slist_insert_sorted(*l, call, at_util_call_compare);
|
||||
|
||||
if (ret_mpty)
|
||||
*ret_mpty = mpty;
|
||||
}
|
||||
|
||||
static void clcc_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct ofono_voicecall *vc = user_data;
|
||||
struct voicecall_data *vd = ofono_voicecall_get_data(vc);
|
||||
GSList *l;
|
||||
|
||||
if (!ok)
|
||||
return;
|
||||
|
||||
vd->calls = at_util_parse_clcc(result, NULL);
|
||||
|
||||
for (l = vd->calls; l; l = l->next)
|
||||
ofono_voicecall_notify(vc, l->data);
|
||||
}
|
||||
|
||||
/*
|
||||
* ^SLCC, except for one RFU parameter (see above in the parsing), is identical
|
||||
* to +CLCC, but as URC it is parsed line by line, and the last line is
|
||||
* indicated by an empty "^SLCC:" (equivalent to the "OK" for CLCC).
|
||||
*/
|
||||
static void slcc_notify(GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct ofono_voicecall *vc = user_data;
|
||||
struct voicecall_data *vd = ofono_voicecall_get_data(vc);
|
||||
GSList *n, *o;
|
||||
struct ofono_call *nc, *oc;
|
||||
gboolean last;
|
||||
|
||||
gemalto_parse_slcc(result, &vd->new_calls, NULL, &last);
|
||||
|
||||
if (!last)
|
||||
return;
|
||||
|
||||
n = vd->new_calls;
|
||||
o = vd->calls;
|
||||
|
||||
while (n || o) {
|
||||
nc = n ? n->data : NULL;
|
||||
oc = o ? o->data : NULL;
|
||||
|
||||
if (oc && (nc == NULL || (nc->id > oc->id))) {
|
||||
enum ofono_disconnect_reason reason;
|
||||
|
||||
if (vd->local_release & (1 << oc->id))
|
||||
reason = OFONO_DISCONNECT_REASON_LOCAL_HANGUP;
|
||||
else
|
||||
reason = OFONO_DISCONNECT_REASON_REMOTE_HANGUP;
|
||||
|
||||
if (!oc->type)
|
||||
ofono_voicecall_disconnected(vc, oc->id,
|
||||
reason, NULL);
|
||||
|
||||
o = o->next;
|
||||
} else if (nc && (oc == NULL || (nc->id < oc->id))) {
|
||||
|
||||
if (nc->type == 0) /* new call, signal it */
|
||||
ofono_voicecall_notify(vc, nc);
|
||||
|
||||
n = n->next;
|
||||
} else {
|
||||
|
||||
DBG("modify call part");
|
||||
|
||||
/* notify in case of changes */
|
||||
if (memcmp(nc, oc, sizeof(*nc)))
|
||||
ofono_voicecall_notify(vc, nc);
|
||||
|
||||
n = n->next;
|
||||
o = o->next;
|
||||
}
|
||||
}
|
||||
|
||||
g_slist_free_full(vd->calls, g_free);
|
||||
vd->calls = vd->new_calls;
|
||||
vd->new_calls = NULL;
|
||||
vd->local_release = 0;
|
||||
}
|
||||
|
||||
static void cssi_notify(GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct ofono_voicecall *vc = user_data;
|
||||
GAtResultIter iter;
|
||||
int code, index;
|
||||
|
||||
g_at_result_iter_init(&iter, result);
|
||||
|
||||
if (!g_at_result_iter_next(&iter, "+CSSI:"))
|
||||
return;
|
||||
|
||||
if (!g_at_result_iter_next_number(&iter, &code))
|
||||
return;
|
||||
|
||||
if (!g_at_result_iter_next_number(&iter, &index))
|
||||
index = 0;
|
||||
|
||||
ofono_voicecall_ssn_mo_notify(vc, 0, code, index);
|
||||
}
|
||||
|
||||
static void cssu_notify(GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct ofono_voicecall *vc = user_data;
|
||||
GAtResultIter iter;
|
||||
int code;
|
||||
int index;
|
||||
const char *num;
|
||||
struct ofono_phone_number ph;
|
||||
|
||||
ph.number[0] = '\0';
|
||||
ph.type = 129;
|
||||
|
||||
g_at_result_iter_init(&iter, result);
|
||||
|
||||
if (!g_at_result_iter_next(&iter, "+CSSU:"))
|
||||
return;
|
||||
|
||||
if (!g_at_result_iter_next_number(&iter, &code))
|
||||
return;
|
||||
|
||||
if (!g_at_result_iter_next_number_default(&iter, -1, &index))
|
||||
goto out;
|
||||
|
||||
if (!g_at_result_iter_next_string(&iter, &num))
|
||||
goto out;
|
||||
|
||||
strncpy(ph.number, num, OFONO_MAX_PHONE_NUMBER_LENGTH);
|
||||
|
||||
if (!g_at_result_iter_next_number(&iter, &ph.type))
|
||||
return;
|
||||
|
||||
out:
|
||||
ofono_voicecall_ssn_mt_notify(vc, 0, code, index, &ph);
|
||||
}
|
||||
|
||||
static void gemalto_voicecall_initialized(gboolean ok, GAtResult *result,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct ofono_voicecall *vc = user_data;
|
||||
struct voicecall_data *vd = ofono_voicecall_get_data(vc);
|
||||
|
||||
DBG("voicecall_init: registering to notifications");
|
||||
|
||||
/* NO CARRIER, NO ANSWER, BUSY, NO DIALTONE are handled through SLCC */
|
||||
g_at_chat_register(vd->chat, "^SLCC:", slcc_notify, FALSE, vc, NULL);
|
||||
g_at_chat_register(vd->chat, "+CSSI:", cssi_notify, FALSE, vc, NULL);
|
||||
g_at_chat_register(vd->chat, "+CSSU:", cssu_notify, FALSE, vc, NULL);
|
||||
|
||||
ofono_voicecall_register(vc);
|
||||
|
||||
/* Populate the call list */
|
||||
g_at_chat_send(vd->chat, "AT+CLCC", clcc_prefix, clcc_cb, vc, NULL);
|
||||
}
|
||||
|
||||
static int gemalto_voicecall_probe(struct ofono_voicecall *vc,
|
||||
unsigned int vendor, void *data)
|
||||
{
|
||||
GAtChat *chat = data;
|
||||
struct voicecall_data *vd;
|
||||
|
||||
vd = g_new0(struct voicecall_data, 1);
|
||||
vd->chat = g_at_chat_clone(chat);
|
||||
ofono_voicecall_set_data(vc, vd);
|
||||
g_at_chat_send(vd->chat, "AT+CSSN=1,1", NULL, NULL, NULL, NULL);
|
||||
g_at_chat_send(vd->chat, "AT^SLCC=1", NULL,
|
||||
gemalto_voicecall_initialized, vc, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void gemalto_voicecall_remove(struct ofono_voicecall *vc)
|
||||
{
|
||||
struct voicecall_data *vd = ofono_voicecall_get_data(vc);
|
||||
|
||||
ofono_voicecall_set_data(vc, NULL);
|
||||
|
||||
g_at_chat_unref(vd->chat);
|
||||
g_free(vd);
|
||||
}
|
||||
|
||||
static const struct ofono_voicecall_driver driver = {
|
||||
.name = "gemaltomodem",
|
||||
.probe = gemalto_voicecall_probe,
|
||||
.remove = gemalto_voicecall_remove,
|
||||
.dial = gemalto_dial,
|
||||
.answer = gemalto_answer,
|
||||
.hangup_all = gemalto_hangup_all,
|
||||
.hangup_active = gemalto_hangup,
|
||||
.hold_all_active = gemalto_hold_all_active,
|
||||
.release_all_held = gemalto_release_all_held,
|
||||
.set_udub = gemalto_set_udub,
|
||||
.release_all_active = gemalto_release_all_active,
|
||||
.release_specific = gemalto_release_specific,
|
||||
.private_chat = gemalto_private_chat,
|
||||
.create_multiparty = gemalto_create_multiparty,
|
||||
.transfer = gemalto_transfer,
|
||||
.send_tones = gemalto_send_dtmf
|
||||
};
|
||||
|
||||
void gemalto_voicecall_init(void)
|
||||
{
|
||||
ofono_voicecall_driver_register(&driver);
|
||||
}
|
||||
|
||||
void gemalto_voicecall_exit(void)
|
||||
{
|
||||
ofono_voicecall_driver_unregister(&driver);
|
||||
}
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -217,7 +218,7 @@ static void hfp_call_volume_remove(struct ofono_call_volume *cv)
|
||||
g_free(vd);
|
||||
}
|
||||
|
||||
static const struct ofono_call_volume_driver driver = {
|
||||
static struct ofono_call_volume_driver driver = {
|
||||
.name = "hfpmodem",
|
||||
.probe = hfp_call_volume_probe,
|
||||
.remove = hfp_call_volume_remove,
|
||||
|
||||
@@ -91,7 +91,7 @@ static void hfp_devinfo_remove(struct ofono_devinfo *info)
|
||||
g_free(dd);
|
||||
}
|
||||
|
||||
static const struct ofono_devinfo_driver driver = {
|
||||
static struct ofono_devinfo_driver driver = {
|
||||
.name = "hfpmodem",
|
||||
.probe = hfp_devinfo_probe,
|
||||
.remove = hfp_devinfo_remove,
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -410,7 +411,7 @@ static void hfp_hf_indicator(struct ofono_handsfree *hf,
|
||||
CALLBACK_WITH_FAILURE(cb, data);
|
||||
}
|
||||
|
||||
static const struct ofono_handsfree_driver driver = {
|
||||
static struct ofono_handsfree_driver driver = {
|
||||
.name = "hfpmodem",
|
||||
.probe = hfp_handsfree_probe,
|
||||
.remove = hfp_handsfree_remove,
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -342,7 +343,7 @@ static void hfp_netreg_remove(struct ofono_netreg *netreg)
|
||||
g_free(nd);
|
||||
}
|
||||
|
||||
static const struct ofono_netreg_driver driver = {
|
||||
static struct ofono_netreg_driver driver = {
|
||||
.name = "hfpmodem",
|
||||
.probe = hfp_netreg_probe,
|
||||
.remove = hfp_netreg_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -195,7 +196,7 @@ static void hfp_siri_set_eyes_free_mode(struct ofono_siri *siri,
|
||||
CALLBACK_WITH_FAILURE(cb, NULL);
|
||||
}
|
||||
|
||||
static const struct ofono_siri_driver driver = {
|
||||
static struct ofono_siri_driver driver = {
|
||||
.name = "hfpmodem",
|
||||
.probe = hfp_siri_probe,
|
||||
.remove = hfp_siri_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -124,7 +125,6 @@ static struct ofono_call *create_call(struct ofono_voicecall *vc, int type,
|
||||
if (clip != 2) {
|
||||
strncpy(call->phone_number.number, num,
|
||||
OFONO_MAX_PHONE_NUMBER_LENGTH);
|
||||
call->phone_number.number[OFONO_MAX_PHONE_NUMBER_LENGTH] = '\0';
|
||||
call->phone_number.type = num_type;
|
||||
}
|
||||
|
||||
@@ -286,7 +286,8 @@ static void clcc_poll_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
|
||||
ofono_voicecall_mpty_hint(vc, mpty_ids);
|
||||
|
||||
g_slist_free_full(vd->calls, g_free);
|
||||
g_slist_foreach(vd->calls, (GFunc) g_free, NULL);
|
||||
g_slist_free(vd->calls);
|
||||
|
||||
vd->calls = calls;
|
||||
|
||||
@@ -404,45 +405,6 @@ static void hfp_dial(struct ofono_voicecall *vc,
|
||||
CALLBACK_WITH_FAILURE(cb, data);
|
||||
}
|
||||
|
||||
static void hfp_dial_last(struct ofono_voicecall *vc, ofono_voicecall_cb_t cb,
|
||||
void *data)
|
||||
{
|
||||
struct voicecall_data *vd = ofono_voicecall_get_data(vc);
|
||||
struct cb_data *cbd = cb_data_new(cb, data);
|
||||
|
||||
cbd->user = vc;
|
||||
|
||||
if (g_at_chat_send(vd->chat, "AT+BLDN", none_prefix,
|
||||
atd_cb, cbd, g_free) > 0)
|
||||
return;
|
||||
|
||||
g_free(cbd);
|
||||
|
||||
CALLBACK_WITH_FAILURE(cb, data);
|
||||
|
||||
}
|
||||
|
||||
static void hfp_dial_memory(struct ofono_voicecall *vc,
|
||||
unsigned int memory_location,
|
||||
ofono_voicecall_cb_t cb, void *data)
|
||||
{
|
||||
struct voicecall_data *vd = ofono_voicecall_get_data(vc);
|
||||
struct cb_data *cbd = cb_data_new(cb, data);
|
||||
char buf[256];
|
||||
|
||||
cbd->user = vc;
|
||||
DBG("Calling memory location %d\n", memory_location);
|
||||
snprintf(buf, sizeof(buf), "ATD>%d;", memory_location);
|
||||
|
||||
if (g_at_chat_send(vd->chat, buf, none_prefix,
|
||||
atd_cb, cbd, g_free) > 0)
|
||||
return;
|
||||
|
||||
g_free(cbd);
|
||||
DBG("at_chat_failed");
|
||||
CALLBACK_WITH_FAILURE(cb, data);
|
||||
}
|
||||
|
||||
static void hfp_template(const char *cmd, struct ofono_voicecall *vc,
|
||||
GAtResultFunc result_cb, unsigned int affected_types,
|
||||
ofono_voicecall_cb_t cb, void *data)
|
||||
@@ -747,15 +709,6 @@ static void ccwa_notify(GAtResult *result, gpointer user_data)
|
||||
int num_type, validity;
|
||||
struct ofono_call *call;
|
||||
|
||||
/* Waiting call notification makes no sense, when there are
|
||||
* no calls at all. This can happen when a phone already has
|
||||
* waiting and active calls and is being connected over HFP
|
||||
* but it first sends +CCWA before we manage to synchronize
|
||||
* calls with AT+CLCC.
|
||||
*/
|
||||
if (!vd->calls)
|
||||
return;
|
||||
|
||||
/* CCWA can repeat, ignore if we already have an waiting call */
|
||||
if (g_slist_find_custom(vd->calls,
|
||||
GINT_TO_POINTER(CALL_STATUS_WAITING),
|
||||
@@ -1157,17 +1110,6 @@ static void ciev_callheld_notify(struct ofono_voicecall *vc,
|
||||
*/
|
||||
vd->clcc_source = g_timeout_add(POLL_CLCC_DELAY,
|
||||
poll_clcc, vc);
|
||||
} else {
|
||||
if (vd->clcc_source)
|
||||
g_source_remove(vd->clcc_source);
|
||||
|
||||
/*
|
||||
* We got a notification that there is a held call
|
||||
* and no active call but we already are in such state.
|
||||
* Let's schedule a poll to see what happened.
|
||||
*/
|
||||
vd->clcc_source = g_timeout_add(POLL_CLCC_DELAY,
|
||||
poll_clcc, vc);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1294,7 +1236,8 @@ static void hfp_voicecall_remove(struct ofono_voicecall *vc)
|
||||
if (vd->expect_release_source)
|
||||
g_source_remove(vd->expect_release_source);
|
||||
|
||||
g_slist_free_full(vd->calls, g_free);
|
||||
g_slist_foreach(vd->calls, (GFunc) g_free, NULL);
|
||||
g_slist_free(vd->calls);
|
||||
|
||||
ofono_voicecall_set_data(vc, NULL);
|
||||
|
||||
@@ -1302,13 +1245,11 @@ static void hfp_voicecall_remove(struct ofono_voicecall *vc)
|
||||
g_free(vd);
|
||||
}
|
||||
|
||||
static const struct ofono_voicecall_driver driver = {
|
||||
static struct ofono_voicecall_driver driver = {
|
||||
.name = "hfpmodem",
|
||||
.probe = hfp_voicecall_probe,
|
||||
.remove = hfp_voicecall_remove,
|
||||
.dial = hfp_dial,
|
||||
.dial_last = hfp_dial_last,
|
||||
.dial_memory = hfp_dial_memory,
|
||||
.answer = hfp_answer,
|
||||
.hangup_active = hfp_hangup,
|
||||
.hold_all_active = hfp_hold_all_active,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -378,7 +379,7 @@ static void hso_gprs_context_remove(struct ofono_gprs_context *gc)
|
||||
g_free(gcd);
|
||||
}
|
||||
|
||||
static const struct ofono_gprs_context_driver driver = {
|
||||
static struct ofono_gprs_context_driver driver = {
|
||||
.name = "hsomodem",
|
||||
.probe = hso_gprs_context_probe,
|
||||
.remove = hso_gprs_context_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -198,7 +199,7 @@ static void hso_radio_settings_remove(struct ofono_radio_settings *rs)
|
||||
g_free(rsd);
|
||||
}
|
||||
|
||||
static const struct ofono_radio_settings_driver driver = {
|
||||
static struct ofono_radio_settings_driver driver = {
|
||||
.name = "hsomodem",
|
||||
.probe = hso_radio_settings_probe,
|
||||
.remove = hso_radio_settings_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -112,7 +113,7 @@ static void huawei_audio_settings_remove(struct ofono_audio_settings *as)
|
||||
g_free(asd);
|
||||
}
|
||||
|
||||
static const struct ofono_audio_settings_driver driver = {
|
||||
static struct ofono_audio_settings_driver driver = {
|
||||
.name = "huaweimodem",
|
||||
.probe = huawei_audio_settings_probe,
|
||||
.remove = huawei_audio_settings_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <glib.h>
|
||||
#include <errno.h>
|
||||
|
||||
@@ -209,7 +210,7 @@ static void huawei_cdma_netreg_remove(struct ofono_cdma_netreg *netreg)
|
||||
g_at_chat_unref(chat);
|
||||
}
|
||||
|
||||
static const struct ofono_cdma_netreg_driver driver = {
|
||||
static struct ofono_cdma_netreg_driver driver = {
|
||||
.name = "huaweimodem",
|
||||
.probe = huawei_cdma_netreg_probe,
|
||||
.remove = huawei_cdma_netreg_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -79,7 +80,7 @@ static gboolean get_next_addr(GAtResultIter *iter, char **addr)
|
||||
if (g_at_result_iter_next_unquoted_string(iter, &str) == FALSE)
|
||||
return FALSE;
|
||||
|
||||
val = strtoul(str, NULL, 16);
|
||||
val = strtol(str, NULL, 16);
|
||||
|
||||
if (addr)
|
||||
*addr = g_strdup_printf("%u.%u.%u.%u",
|
||||
@@ -338,7 +339,7 @@ static void huawei_gprs_context_remove(struct ofono_gprs_context *gc)
|
||||
g_free(gcd);
|
||||
}
|
||||
|
||||
static const struct ofono_gprs_context_driver driver = {
|
||||
static struct ofono_gprs_context_driver driver = {
|
||||
.name = "huaweimodem",
|
||||
.probe = huawei_gprs_context_probe,
|
||||
.remove = huawei_gprs_context_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -41,13 +42,11 @@
|
||||
|
||||
static const char *none_prefix[] = { NULL };
|
||||
static const char *syscfg_prefix[] = { "^SYSCFG:", NULL };
|
||||
static const char *syscfgex_prefix[] = { "^SYSCFGEX:", NULL };
|
||||
|
||||
#define HUAWEI_BAND_ANY 0x3FFFFFFF
|
||||
|
||||
struct radio_settings_data {
|
||||
GAtChat *chat;
|
||||
ofono_bool_t syscfgex_cap;
|
||||
};
|
||||
|
||||
static const struct huawei_band_gsm_table {
|
||||
@@ -177,76 +176,20 @@ error:
|
||||
CALLBACK_WITH_FAILURE(cb, -1, cbd->data);
|
||||
}
|
||||
|
||||
static void syscfgex_query_mode_cb(gboolean ok, GAtResult *result,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct cb_data *cbd = user_data;
|
||||
ofono_radio_settings_rat_mode_query_cb_t cb = cbd->cb;
|
||||
enum ofono_radio_access_mode mode;
|
||||
struct ofono_error error;
|
||||
GAtResultIter iter;
|
||||
const char *acqorder;
|
||||
|
||||
decode_at_error(&error, g_at_result_final_response(result));
|
||||
|
||||
if (!ok) {
|
||||
cb(&error, -1, cbd->data);
|
||||
return;
|
||||
}
|
||||
|
||||
g_at_result_iter_init(&iter, result);
|
||||
|
||||
if (g_at_result_iter_next(&iter, "^SYSCFGEX:") == FALSE)
|
||||
goto error;
|
||||
|
||||
if (g_at_result_iter_next_string(&iter, &acqorder) == FALSE)
|
||||
goto error;
|
||||
|
||||
if ((strcmp(acqorder, "00") == 0) ||
|
||||
(strstr(acqorder, "01") &&
|
||||
strstr(acqorder, "02") &&
|
||||
strstr(acqorder, "03")))
|
||||
mode = OFONO_RADIO_ACCESS_MODE_ANY;
|
||||
else if (strstr(acqorder, "03"))
|
||||
mode = OFONO_RADIO_ACCESS_MODE_LTE;
|
||||
else if (strstr(acqorder, "02"))
|
||||
mode = OFONO_RADIO_ACCESS_MODE_UMTS;
|
||||
else if (strstr(acqorder, "01"))
|
||||
mode = OFONO_RADIO_ACCESS_MODE_GSM;
|
||||
else
|
||||
goto error;
|
||||
|
||||
cb(&error, mode, cbd->data);
|
||||
|
||||
return;
|
||||
|
||||
error:
|
||||
CALLBACK_WITH_FAILURE(cb, -1, cbd->data);
|
||||
}
|
||||
|
||||
static void huawei_query_rat_mode(struct ofono_radio_settings *rs,
|
||||
ofono_radio_settings_rat_mode_query_cb_t cb, void *data)
|
||||
{
|
||||
struct radio_settings_data *rsd = ofono_radio_settings_get_data(rs);
|
||||
struct cb_data *cbd = cb_data_new(cb, data);
|
||||
|
||||
if (rsd->syscfgex_cap && g_at_chat_send(rsd->chat, "AT^SYSCFGEX?",
|
||||
syscfgex_prefix,
|
||||
syscfgex_query_mode_cb,
|
||||
cbd, g_free) > 0)
|
||||
return;
|
||||
|
||||
if (!rsd->syscfgex_cap && g_at_chat_send(rsd->chat, "AT^SYSCFG?",
|
||||
syscfg_prefix,
|
||||
syscfg_query_mode_cb,
|
||||
cbd, g_free) > 0)
|
||||
return;
|
||||
|
||||
CALLBACK_WITH_FAILURE(cb, -1, data);
|
||||
g_free(cbd);
|
||||
if (g_at_chat_send(rsd->chat, "AT^SYSCFG?", syscfg_prefix,
|
||||
syscfg_query_mode_cb, cbd, g_free) == 0) {
|
||||
CALLBACK_WITH_FAILURE(cb, -1, data);
|
||||
g_free(cbd);
|
||||
}
|
||||
}
|
||||
|
||||
static void syscfgxx_modify_mode_cb(gboolean ok, GAtResult *result,
|
||||
static void syscfg_modify_mode_cb(gboolean ok, GAtResult *result,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct cb_data *cbd = user_data;
|
||||
@@ -257,11 +200,12 @@ static void syscfgxx_modify_mode_cb(gboolean ok, GAtResult *result,
|
||||
cb(&error, cbd->data);
|
||||
}
|
||||
|
||||
static void syscfg_set_rat_mode(struct radio_settings_data *rsd,
|
||||
static void huawei_set_rat_mode(struct ofono_radio_settings *rs,
|
||||
enum ofono_radio_access_mode mode,
|
||||
ofono_radio_settings_rat_mode_set_cb_t cb,
|
||||
void *data)
|
||||
{
|
||||
struct radio_settings_data *rsd = ofono_radio_settings_get_data(rs);
|
||||
struct cb_data *cbd = cb_data_new(cb, data);
|
||||
char buf[40];
|
||||
unsigned int value = 2, acq_order = 0;
|
||||
@@ -287,7 +231,7 @@ static void syscfg_set_rat_mode(struct radio_settings_data *rsd,
|
||||
value, acq_order);
|
||||
|
||||
if (g_at_chat_send(rsd->chat, buf, none_prefix,
|
||||
syscfgxx_modify_mode_cb, cbd, g_free) > 0)
|
||||
syscfg_modify_mode_cb, cbd, g_free) > 0)
|
||||
return;
|
||||
|
||||
error:
|
||||
@@ -295,55 +239,7 @@ error:
|
||||
g_free(cbd);
|
||||
}
|
||||
|
||||
static void syscfgex_set_rat_mode(struct radio_settings_data *rsd,
|
||||
enum ofono_radio_access_mode mode,
|
||||
ofono_radio_settings_rat_mode_set_cb_t cb,
|
||||
void *data)
|
||||
{
|
||||
struct cb_data *cbd = cb_data_new(cb, data);
|
||||
char buf[50];
|
||||
char *atcmd = "AT^SYSCFGEX=\"%s\",40000000,2,4,40000000,,";
|
||||
char *acqorder = "030201";
|
||||
|
||||
switch (mode) {
|
||||
case OFONO_RADIO_ACCESS_MODE_ANY:
|
||||
acqorder = "00";
|
||||
break;
|
||||
case OFONO_RADIO_ACCESS_MODE_GSM:
|
||||
acqorder = "01";
|
||||
break;
|
||||
case OFONO_RADIO_ACCESS_MODE_UMTS:
|
||||
acqorder = "02";
|
||||
break;
|
||||
case OFONO_RADIO_ACCESS_MODE_LTE:
|
||||
acqorder = "03";
|
||||
break;
|
||||
}
|
||||
|
||||
snprintf(buf, sizeof(buf), atcmd, acqorder);
|
||||
|
||||
if (g_at_chat_send(rsd->chat, buf, none_prefix,
|
||||
syscfgxx_modify_mode_cb, cbd, g_free) > 0)
|
||||
return;
|
||||
|
||||
CALLBACK_WITH_FAILURE(cb, data);
|
||||
g_free(cbd);
|
||||
}
|
||||
|
||||
static void huawei_set_rat_mode(struct ofono_radio_settings *rs,
|
||||
enum ofono_radio_access_mode mode,
|
||||
ofono_radio_settings_rat_mode_set_cb_t cb,
|
||||
void *data)
|
||||
{
|
||||
struct radio_settings_data *rsd = ofono_radio_settings_get_data(rs);
|
||||
|
||||
if (rsd->syscfgex_cap)
|
||||
syscfgex_set_rat_mode(rsd, mode, cb, data);
|
||||
else
|
||||
syscfg_set_rat_mode(rsd, mode, cb, data);
|
||||
}
|
||||
|
||||
static void syscfgxx_modify_band_cb(gboolean ok, GAtResult *result,
|
||||
static void syscfg_modify_band_cb(gboolean ok, GAtResult *result,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct cb_data *cbd = user_data;
|
||||
@@ -354,54 +250,13 @@ static void syscfgxx_modify_band_cb(gboolean ok, GAtResult *result,
|
||||
cb(&error, cbd->data);
|
||||
}
|
||||
|
||||
static void syscfgex_set_band(struct radio_settings_data *rsd,
|
||||
enum ofono_radio_band_gsm band_gsm,
|
||||
enum ofono_radio_band_umts band_umts,
|
||||
ofono_radio_settings_band_set_cb_t cb,
|
||||
void *data)
|
||||
{
|
||||
struct cb_data *cbd = cb_data_new(cb, data);
|
||||
char buf[50];
|
||||
char *atcmd = "AT^SYSCFGEX=\"99\",%x,2,4,40000000,,";
|
||||
unsigned int huawei_band;
|
||||
|
||||
if (band_gsm == OFONO_RADIO_BAND_GSM_ANY
|
||||
&& band_umts == OFONO_RADIO_BAND_UMTS_ANY) {
|
||||
huawei_band = HUAWEI_BAND_ANY;
|
||||
} else {
|
||||
unsigned int huawei_band_gsm;
|
||||
unsigned int huawei_band_umts;
|
||||
|
||||
huawei_band_gsm = band_gsm_to_huawei(band_gsm);
|
||||
|
||||
if (!huawei_band_gsm)
|
||||
goto error;
|
||||
|
||||
huawei_band_umts = band_umts_to_huawei(band_umts);
|
||||
|
||||
if (!huawei_band_umts)
|
||||
goto error;
|
||||
|
||||
huawei_band = huawei_band_gsm | huawei_band_umts;
|
||||
}
|
||||
|
||||
snprintf(buf, sizeof(buf), atcmd, huawei_band);
|
||||
|
||||
if (g_at_chat_send(rsd->chat, buf, none_prefix,
|
||||
syscfgxx_modify_band_cb, cbd, g_free) > 0)
|
||||
return;
|
||||
|
||||
error:
|
||||
CALLBACK_WITH_FAILURE(cb, data);
|
||||
g_free(cbd);
|
||||
}
|
||||
|
||||
static void syscfg_set_band(struct radio_settings_data *rsd,
|
||||
static void huawei_set_band(struct ofono_radio_settings *rs,
|
||||
enum ofono_radio_band_gsm band_gsm,
|
||||
enum ofono_radio_band_umts band_umts,
|
||||
ofono_radio_settings_band_set_cb_t cb,
|
||||
void *data)
|
||||
{
|
||||
struct radio_settings_data *rsd = ofono_radio_settings_get_data(rs);
|
||||
struct cb_data *cbd = cb_data_new(cb, data);
|
||||
char buf[40];
|
||||
unsigned int huawei_band;
|
||||
@@ -429,7 +284,7 @@ static void syscfg_set_band(struct radio_settings_data *rsd,
|
||||
snprintf(buf, sizeof(buf), "AT^SYSCFG=16,3,%x,2,4", huawei_band);
|
||||
|
||||
if (g_at_chat_send(rsd->chat, buf, none_prefix,
|
||||
syscfgxx_modify_band_cb, cbd, g_free) > 0)
|
||||
syscfg_modify_band_cb, cbd, g_free) > 0)
|
||||
return;
|
||||
|
||||
error:
|
||||
@@ -437,20 +292,6 @@ error:
|
||||
g_free(cbd);
|
||||
}
|
||||
|
||||
static void huawei_set_band(struct ofono_radio_settings *rs,
|
||||
enum ofono_radio_band_gsm band_gsm,
|
||||
enum ofono_radio_band_umts band_umts,
|
||||
ofono_radio_settings_band_set_cb_t cb,
|
||||
void *data)
|
||||
{
|
||||
struct radio_settings_data *rsd = ofono_radio_settings_get_data(rs);
|
||||
|
||||
if (rsd->syscfgex_cap)
|
||||
syscfgex_set_band(rsd, band_gsm, band_umts, cb, data);
|
||||
else
|
||||
syscfg_set_band(rsd, band_gsm, band_umts, cb, data);
|
||||
}
|
||||
|
||||
static void syscfg_query_band_cb(gboolean ok, GAtResult *result,
|
||||
gpointer user_data)
|
||||
{
|
||||
@@ -523,21 +364,6 @@ static void syscfg_support_cb(gboolean ok, GAtResult *result,
|
||||
ofono_radio_settings_register(rs);
|
||||
}
|
||||
|
||||
static void syscfgex_support_cb(gboolean ok, GAtResult *result,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct ofono_radio_settings *rs = user_data;
|
||||
struct radio_settings_data *rsd = ofono_radio_settings_get_data(rs);
|
||||
|
||||
if (!ok) {
|
||||
g_at_chat_send(rsd->chat, "AT^SYSCFG=?", syscfg_prefix,
|
||||
syscfg_support_cb, rs, NULL);
|
||||
}
|
||||
|
||||
rsd->syscfgex_cap = 1;
|
||||
ofono_radio_settings_register(rs);
|
||||
}
|
||||
|
||||
static int huawei_radio_settings_probe(struct ofono_radio_settings *rs,
|
||||
unsigned int vendor, void *data)
|
||||
{
|
||||
@@ -552,8 +378,8 @@ static int huawei_radio_settings_probe(struct ofono_radio_settings *rs,
|
||||
|
||||
ofono_radio_settings_set_data(rs, rsd);
|
||||
|
||||
g_at_chat_send(rsd->chat, "AT^SYSCFGEX=?", syscfgex_prefix,
|
||||
syscfgex_support_cb, rs, NULL);
|
||||
g_at_chat_send(rsd->chat, "AT^SYSCFG=?", syscfg_prefix,
|
||||
syscfg_support_cb, rs, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -568,14 +394,14 @@ static void huawei_radio_settings_remove(struct ofono_radio_settings *rs)
|
||||
g_free(rsd);
|
||||
}
|
||||
|
||||
static const struct ofono_radio_settings_driver driver = {
|
||||
static struct ofono_radio_settings_driver driver = {
|
||||
.name = "huaweimodem",
|
||||
.probe = huawei_radio_settings_probe,
|
||||
.remove = huawei_radio_settings_remove,
|
||||
.query_rat_mode = huawei_query_rat_mode,
|
||||
.set_rat_mode = huawei_set_rat_mode,
|
||||
.query_band = huawei_query_band,
|
||||
.set_band = huawei_set_band,
|
||||
.query_band = huawei_query_band,
|
||||
.set_band = huawei_set_band,
|
||||
};
|
||||
|
||||
void huawei_radio_settings_init(void)
|
||||
|
||||
@@ -204,7 +204,7 @@ static void huawei_ussd_remove(struct ofono_ussd *ussd)
|
||||
g_free(data);
|
||||
}
|
||||
|
||||
static const struct ofono_ussd_driver driver = {
|
||||
static struct ofono_ussd_driver driver = {
|
||||
.name = "huaweimodem",
|
||||
.probe = huawei_ussd_probe,
|
||||
.remove = huawei_ussd_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -496,7 +497,7 @@ static void huawei_voicecall_remove(struct ofono_voicecall *vc)
|
||||
g_free(vd);
|
||||
}
|
||||
|
||||
static const struct ofono_voicecall_driver driver = {
|
||||
static struct ofono_voicecall_driver driver = {
|
||||
.name = "huaweimodem",
|
||||
.probe = huawei_voicecall_probe,
|
||||
.remove = huawei_voicecall_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -402,7 +403,7 @@ static void icera_gprs_context_remove(struct ofono_gprs_context *gc)
|
||||
g_free(gcd);
|
||||
}
|
||||
|
||||
static const struct ofono_gprs_context_driver driver = {
|
||||
static struct ofono_gprs_context_driver driver = {
|
||||
.name = "iceramodem",
|
||||
.probe = icera_gprs_context_probe,
|
||||
.remove = icera_gprs_context_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -211,7 +212,7 @@ static void icera_radio_settings_remove(struct ofono_radio_settings *rs)
|
||||
g_free(rsd);
|
||||
}
|
||||
|
||||
static const struct ofono_radio_settings_driver driver = {
|
||||
static struct ofono_radio_settings_driver driver = {
|
||||
.name = "iceramodem",
|
||||
.probe = icera_radio_settings_probe,
|
||||
.remove = icera_radio_settings_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -381,7 +382,7 @@ static void ifx_audio_settings_remove(struct ofono_audio_settings *as)
|
||||
g_free(asd);
|
||||
}
|
||||
|
||||
static const struct ofono_audio_settings_driver driver = {
|
||||
static struct ofono_audio_settings_driver driver = {
|
||||
.name = "ifxmodem",
|
||||
.probe = ifx_audio_settings_probe,
|
||||
.remove = ifx_audio_settings_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -166,7 +167,7 @@ static void ifx_ctm_remove(struct ofono_ctm *ctm)
|
||||
g_free(ctmd);
|
||||
}
|
||||
|
||||
static const struct ofono_ctm_driver driver = {
|
||||
static struct ofono_ctm_driver driver = {
|
||||
.name = "ifxmodem",
|
||||
.probe = ifx_ctm_probe,
|
||||
.remove = ifx_ctm_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -41,14 +42,13 @@
|
||||
|
||||
#include "ifxmodem.h"
|
||||
|
||||
#define TUN_DEV "/dev/net/tun"
|
||||
#define TUN_SYSFS_DIR "/sys/devices/virtual/misc/tun"
|
||||
|
||||
#define STATIC_IP_NETMASK "255.255.255.255"
|
||||
|
||||
static const char *none_prefix[] = { NULL };
|
||||
static const char *xdns_prefix[] = { "+XDNS:", NULL };
|
||||
static const char *cgpaddr_prefix[] = { "+CGPADDR:", NULL };
|
||||
static const char *cgcontrdp_prefix[] = { "+CGCONTRDP:", NULL };
|
||||
|
||||
enum state {
|
||||
STATE_IDLE,
|
||||
@@ -59,20 +59,17 @@ enum state {
|
||||
|
||||
struct gprs_context_data {
|
||||
GAtChat *chat;
|
||||
unsigned int vendor;
|
||||
unsigned int active_context;
|
||||
char username[OFONO_GPRS_MAX_USERNAME_LENGTH + 1];
|
||||
char password[OFONO_GPRS_MAX_PASSWORD_LENGTH + 1];
|
||||
GAtRawIP *rawip;
|
||||
enum state state;
|
||||
enum ofono_gprs_proto proto;
|
||||
char address[64];
|
||||
char gateway[64];
|
||||
char netmask[64];
|
||||
char dns1[64];
|
||||
char dns2[64];
|
||||
char address[32];
|
||||
char dns1[32];
|
||||
char dns2[32];
|
||||
ofono_gprs_context_cb_t cb;
|
||||
void *cb_data;
|
||||
void *cb_data; /* Callback data */
|
||||
};
|
||||
|
||||
static void rawip_debug(const char *str, void *data)
|
||||
@@ -260,189 +257,11 @@ error:
|
||||
failed_setup(gc, NULL, TRUE);
|
||||
}
|
||||
|
||||
static void cgdata_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct ofono_gprs_context *gc = user_data;
|
||||
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
|
||||
|
||||
DBG("ok %d", ok);
|
||||
|
||||
if (!ok) {
|
||||
ofono_error("Failed to establish session");
|
||||
failed_setup(gc, result, TRUE);
|
||||
return;
|
||||
}
|
||||
|
||||
CALLBACK_WITH_SUCCESS(gcd->cb, gcd->cb_data);
|
||||
}
|
||||
|
||||
static const char *get_datapath(struct ofono_modem *modem,
|
||||
const char *interface)
|
||||
{
|
||||
static char datapath[256];
|
||||
char n;
|
||||
|
||||
if (!strcmp(interface,
|
||||
ofono_modem_get_string(modem, "NetworkInterface")))
|
||||
n = '0';
|
||||
else if (!strcmp(interface,
|
||||
ofono_modem_get_string(modem, "NetworkInterface2")))
|
||||
n = '1';
|
||||
else if (!strcmp(interface,
|
||||
ofono_modem_get_string(modem, "NetworkInterface3")))
|
||||
n = '2';
|
||||
else
|
||||
return NULL;
|
||||
|
||||
snprintf(datapath, sizeof(datapath), "%s%c",
|
||||
ofono_modem_get_string(modem, "DataPath"), n);
|
||||
return datapath;
|
||||
}
|
||||
|
||||
static void cgcontrdp_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct ofono_gprs_context *gc = user_data;
|
||||
struct ofono_modem *modem = ofono_gprs_context_get_modem(gc);
|
||||
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
|
||||
GAtResultIter iter;
|
||||
|
||||
const char *laddrnetmask = NULL;
|
||||
const char *gw = NULL;
|
||||
const char *dns[3];
|
||||
const char *ctrlpath;
|
||||
const char *datapath;
|
||||
char buf[512];
|
||||
const char *interface;
|
||||
|
||||
DBG("ok %d", ok);
|
||||
|
||||
if (!ok) {
|
||||
struct ofono_error error;
|
||||
|
||||
decode_at_error(&error, g_at_result_final_response(result));
|
||||
gcd->cb(&error, gcd->cb_data);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
g_at_result_iter_init(&iter, result);
|
||||
|
||||
while (g_at_result_iter_next(&iter, "+CGCONTRDP:")) {
|
||||
/* skip cid, bearer_id, apn */
|
||||
g_at_result_iter_skip_next(&iter);
|
||||
g_at_result_iter_skip_next(&iter);
|
||||
g_at_result_iter_skip_next(&iter);
|
||||
|
||||
if (!g_at_result_iter_next_string(&iter, &laddrnetmask))
|
||||
break;
|
||||
|
||||
if (!g_at_result_iter_next_string(&iter, &gw))
|
||||
break;
|
||||
|
||||
if (!g_at_result_iter_next_string(&iter, &dns[0]))
|
||||
break;
|
||||
|
||||
if (!g_at_result_iter_next_string(&iter, &dns[1]))
|
||||
break;
|
||||
}
|
||||
|
||||
strncpy(gcd->dns1, dns[0], sizeof(gcd->dns1));
|
||||
strncpy(gcd->dns2, dns[1], sizeof(gcd->dns2));
|
||||
dns[2] = 0;
|
||||
|
||||
DBG("DNS: %s, %s\n", gcd->dns1, gcd->dns2);
|
||||
|
||||
if (!laddrnetmask || at_util_get_ipv4_address_and_netmask(laddrnetmask,
|
||||
gcd->address, gcd->netmask) < 0) {
|
||||
failed_setup(gc, NULL, TRUE);
|
||||
return;
|
||||
}
|
||||
|
||||
if (gw)
|
||||
strncpy(gcd->gateway, gw, sizeof(gcd->gateway));
|
||||
|
||||
gcd->state = STATE_ACTIVE;
|
||||
|
||||
DBG("address: %s\n", gcd->address);
|
||||
DBG("netmask: %s\n", gcd->netmask);
|
||||
DBG("DNS1: %s\n", gcd->dns1);
|
||||
DBG("DNS2: %s\n", gcd->dns2);
|
||||
DBG("Gateway: %s\n", gcd->gateway);
|
||||
|
||||
ctrlpath = ofono_modem_get_string(modem, "CtrlPath");
|
||||
interface = ofono_gprs_context_get_interface(gc);
|
||||
datapath = get_datapath(modem, interface);
|
||||
|
||||
ofono_gprs_context_set_ipv4_address(gc, gcd->address, TRUE);
|
||||
|
||||
if (gcd->netmask[0])
|
||||
ofono_gprs_context_set_ipv4_netmask(gc, gcd->netmask);
|
||||
|
||||
if (gcd->gateway[0])
|
||||
ofono_gprs_context_set_ipv4_gateway(gc, gcd->gateway);
|
||||
|
||||
ofono_gprs_context_set_ipv4_dns_servers(gc, dns);
|
||||
|
||||
snprintf(buf, sizeof(buf), "AT+XDATACHANNEL=1,1,\"%s\",\"%s\",2,%u",
|
||||
ctrlpath, datapath, gcd->active_context);
|
||||
g_at_chat_send(gcd->chat, buf, none_prefix, NULL, NULL, NULL);
|
||||
snprintf(buf, sizeof(buf), "AT+CGDATA=\"M-RAW_IP\",%u",
|
||||
gcd->active_context);
|
||||
|
||||
if (g_at_chat_send(gcd->chat, buf, none_prefix, cgdata_cb,
|
||||
gc, NULL) > 0)
|
||||
return;
|
||||
|
||||
CALLBACK_WITH_FAILURE(gcd->cb, gcd->cb_data);
|
||||
}
|
||||
|
||||
static void ifx_read_settings(struct ofono_gprs_context *gc)
|
||||
{
|
||||
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
|
||||
char buf[64];
|
||||
|
||||
gcd->address[0] = '\0';
|
||||
gcd->gateway[0] = '\0';
|
||||
gcd->netmask[0] = '\0';
|
||||
gcd->dns1[0] = '\0';
|
||||
gcd->dns2[0] = '\0';
|
||||
|
||||
/* read IP configuration info */
|
||||
if(gcd->vendor == OFONO_VENDOR_XMM) {
|
||||
snprintf(buf, sizeof(buf), "AT+CGCONTRDP=%u",
|
||||
gcd->active_context);
|
||||
|
||||
if (g_at_chat_send(gcd->chat, buf, cgcontrdp_prefix,
|
||||
cgcontrdp_cb, gc, NULL) > 0)
|
||||
return;
|
||||
} else {
|
||||
sprintf(buf, "AT+CGPADDR=%u", gcd->active_context);
|
||||
|
||||
if (g_at_chat_send(gcd->chat, buf, cgpaddr_prefix,
|
||||
address_cb, gc, NULL) > 0)
|
||||
return;
|
||||
}
|
||||
|
||||
failed_setup(gc, NULL, TRUE);
|
||||
}
|
||||
|
||||
static void ifx_gprs_read_settings(struct ofono_gprs_context *gc,
|
||||
unsigned int cid,
|
||||
ofono_gprs_context_cb_t cb, void *data)
|
||||
{
|
||||
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
|
||||
DBG("cid %u", cid);
|
||||
|
||||
gcd->active_context = cid;
|
||||
gcd->cb = cb;
|
||||
gcd->cb_data = data;
|
||||
|
||||
ifx_read_settings(gc);
|
||||
}
|
||||
|
||||
static void activate_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct ofono_gprs_context *gc = user_data;
|
||||
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
|
||||
char buf[64];
|
||||
|
||||
DBG("ok %d", ok);
|
||||
|
||||
@@ -452,14 +271,19 @@ static void activate_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
return;
|
||||
}
|
||||
|
||||
ifx_read_settings(gc);
|
||||
sprintf(buf, "AT+CGPADDR=%u", gcd->active_context);
|
||||
if (g_at_chat_send(gcd->chat, buf, cgpaddr_prefix,
|
||||
address_cb, gc, NULL) > 0)
|
||||
return;
|
||||
|
||||
failed_setup(gc, NULL, TRUE);
|
||||
}
|
||||
|
||||
static void setup_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct ofono_gprs_context *gc = user_data;
|
||||
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
|
||||
char buf[384];
|
||||
char buf[128];
|
||||
|
||||
DBG("ok %d", ok);
|
||||
|
||||
@@ -563,11 +387,7 @@ static void deactivate_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
gcd->active_context = 0;
|
||||
gcd->state = STATE_IDLE;
|
||||
|
||||
if (gcd->vendor != OFONO_VENDOR_XMM)
|
||||
g_at_chat_resume(gcd->chat);
|
||||
|
||||
if (!gcd->cb)
|
||||
return;
|
||||
g_at_chat_resume(gcd->chat);
|
||||
|
||||
CALLBACK_WITH_SUCCESS(gcd->cb, gcd->cb_data);
|
||||
}
|
||||
@@ -589,25 +409,11 @@ static void ifx_gprs_deactivate_primary(struct ofono_gprs_context *gc,
|
||||
g_at_rawip_shutdown(gcd->rawip);
|
||||
|
||||
sprintf(buf, "AT+CGACT=0,%u", gcd->active_context);
|
||||
|
||||
if (gcd->vendor == OFONO_VENDOR_XMM) {
|
||||
if (g_at_chat_send(gcd->chat, buf, none_prefix,
|
||||
if (g_at_chat_send(chat, buf, none_prefix,
|
||||
deactivate_cb, gc, NULL) > 0)
|
||||
return;
|
||||
} else {
|
||||
if (g_at_chat_send(chat, buf, none_prefix,
|
||||
deactivate_cb, gc, NULL) > 0)
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
||||
CALLBACK_WITH_FAILURE(cb, data);
|
||||
}
|
||||
|
||||
static void ifx_gprs_detach_shutdown(struct ofono_gprs_context *gc,
|
||||
unsigned int cid)
|
||||
{
|
||||
DBG("");
|
||||
ifx_gprs_deactivate_primary(gc, cid, NULL, NULL);
|
||||
CALLBACK_WITH_SUCCESS(cb, data);
|
||||
}
|
||||
|
||||
static void cgev_notify(GAtResult *result, gpointer user_data)
|
||||
@@ -645,13 +451,14 @@ static void cgev_notify(GAtResult *result, gpointer user_data)
|
||||
|
||||
g_at_rawip_unref(gcd->rawip);
|
||||
gcd->rawip = NULL;
|
||||
g_at_chat_resume(gcd->chat);
|
||||
}
|
||||
|
||||
ofono_gprs_context_deactivated(gc, gcd->active_context);
|
||||
|
||||
gcd->active_context = 0;
|
||||
gcd->state = STATE_IDLE;
|
||||
|
||||
g_at_chat_resume(gcd->chat);
|
||||
}
|
||||
|
||||
static int ifx_gprs_context_probe(struct ofono_gprs_context *gc,
|
||||
@@ -663,29 +470,23 @@ static int ifx_gprs_context_probe(struct ofono_gprs_context *gc,
|
||||
|
||||
DBG("");
|
||||
|
||||
if (vendor != OFONO_VENDOR_XMM) {
|
||||
if (stat(TUN_DEV, &st) < 0) {
|
||||
ofono_error("Missing support for TUN/TAP devices");
|
||||
return -ENODEV;
|
||||
}
|
||||
if (stat(TUN_SYSFS_DIR, &st) < 0) {
|
||||
ofono_error("Missing support for TUN/TAP devices");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (vendor != OFONO_VENDOR_XMM) {
|
||||
if (g_at_chat_get_slave(chat) == NULL)
|
||||
return -EINVAL;
|
||||
}
|
||||
if (g_at_chat_get_slave(chat) == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
gcd = g_try_new0(struct gprs_context_data, 1);
|
||||
if (gcd == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
gcd->vendor = vendor;
|
||||
gcd->chat = g_at_chat_clone(chat);
|
||||
|
||||
ofono_gprs_context_set_data(gc, gcd);
|
||||
|
||||
if (vendor != OFONO_VENDOR_XMM)
|
||||
chat = g_at_chat_get_slave(gcd->chat);
|
||||
chat = g_at_chat_get_slave(gcd->chat);
|
||||
|
||||
g_at_chat_register(chat, "+CGEV:", cgev_notify, FALSE, gc, NULL);
|
||||
|
||||
@@ -709,14 +510,12 @@ static void ifx_gprs_context_remove(struct ofono_gprs_context *gc)
|
||||
g_free(gcd);
|
||||
}
|
||||
|
||||
static const struct ofono_gprs_context_driver driver = {
|
||||
static struct ofono_gprs_context_driver driver = {
|
||||
.name = "ifxmodem",
|
||||
.probe = ifx_gprs_context_probe,
|
||||
.remove = ifx_gprs_context_remove,
|
||||
.activate_primary = ifx_gprs_activate_primary,
|
||||
.deactivate_primary = ifx_gprs_deactivate_primary,
|
||||
.read_settings = ifx_gprs_read_settings,
|
||||
.detach_shutdown = ifx_gprs_detach_shutdown
|
||||
};
|
||||
|
||||
void ifx_gprs_context_init(void)
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
*/
|
||||
|
||||
#include <drivers/atmodem/atutil.h>
|
||||
#include <drivers/atmodem/vendor.h>
|
||||
|
||||
extern void ifx_voicecall_init(void);
|
||||
extern void ifx_voicecall_exit(void);
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -200,7 +201,7 @@ static void ifx_radio_settings_remove(struct ofono_radio_settings *rs)
|
||||
g_free(rsd);
|
||||
}
|
||||
|
||||
static const struct ofono_radio_settings_driver driver = {
|
||||
static struct ofono_radio_settings_driver driver = {
|
||||
.name = "ifxmodem",
|
||||
.probe = ifx_radio_settings_probe,
|
||||
.remove = ifx_radio_settings_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -306,7 +307,7 @@ static void ifx_stk_remove(struct ofono_stk *stk)
|
||||
g_free(sd);
|
||||
}
|
||||
|
||||
static const struct ofono_stk_driver driver = {
|
||||
static struct ofono_stk_driver driver = {
|
||||
.name = "ifxmodem",
|
||||
.probe = ifx_stk_probe,
|
||||
.remove = ifx_stk_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -1008,7 +1009,8 @@ static void ifx_voicecall_remove(struct ofono_voicecall *vc)
|
||||
{
|
||||
struct voicecall_data *vd = ofono_voicecall_get_data(vc);
|
||||
|
||||
g_slist_free_full(vd->calls, g_free);
|
||||
g_slist_foreach(vd->calls, (GFunc) g_free, NULL);
|
||||
g_slist_free(vd->calls);
|
||||
|
||||
g_strfreev(vd->en_list);
|
||||
|
||||
@@ -1018,7 +1020,7 @@ static void ifx_voicecall_remove(struct ofono_voicecall *vc)
|
||||
g_free(vd);
|
||||
}
|
||||
|
||||
static const struct ofono_voicecall_driver driver = {
|
||||
static struct ofono_voicecall_driver driver = {
|
||||
.name = "ifxmodem",
|
||||
.probe = ifx_voicecall_probe,
|
||||
.remove = ifx_voicecall_remove,
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* RIL constants for infineon modem
|
||||
*
|
||||
* Copyright (C) 2014 Canonical Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef INFINEON_CONSTANTS_H
|
||||
#define INFINEON_CONSTANTS_H
|
||||
|
||||
/* Messages encapsulated in RIL_REQUEST_OEM_HOOK_RAW requests */
|
||||
#define INF_RIL_REQUEST_OEM_QUERY_SELECT_BAND 1
|
||||
#define INF_RIL_REQUEST_OEM_SET_SELECT_BAND 2
|
||||
#define INF_RIL_REQUEST_OEM_SET_CIRCUIT_SWITCHING_PAGING 3
|
||||
#define INF_RIL_REQUEST_OEM_GET_LAST_FAILURE_REPORT_FOR_CS_REGISTRATION 4
|
||||
#define INF_RIL_REQUEST_OEM_GET_SELECT_BEARER_SERVICE_TYPE 5
|
||||
#define INF_RIL_REQUEST_OEM_GET_XPROGRESS_STATUS 6
|
||||
#define INF_RIL_REQUEST_OEM_SET_SS_NOTIFY 7
|
||||
#define INF_RIL_REQUEST_OEM_GET_SS_NOTIFY 8
|
||||
#define INF_RIL_REQUEST_OEM_SET_AUTHENTICATION_TYPE 9
|
||||
#define INF_RIL_REQUEST_OEM_SWITCH_OFF_MS 10
|
||||
#define INF_RIL_REQUEST_OEM_SET_AUTO_TIMEZONE_UPDATE 11
|
||||
#define INF_RIL_REQUEST_OEM_SET_TIMEZONE_RESPORTING 12
|
||||
#define INF_RIL_REQUEST_OEM_SET_DISPLAY_SIM_AND_PB_STATUS 13
|
||||
#define INF_RIL_REQUEST_OEM_GET_REMAIN_SIM_PIN_ATTEMPTS 14
|
||||
#define INF_RIL_REQUEST_OEM_SET_AUTO_REDIAL 15
|
||||
#define INF_RIL_REQUEST_OEM_QUERY_CALL_STATUS_REPORTING 16
|
||||
#define INF_RIL_REQUEST_OEM_SET_AUTO_ANSWER 17
|
||||
#define INF_RIL_REQUEST_OEM_SET_LINE 18
|
||||
#define INF_RIL_REQUEST_OEM_PDP_ACTIVATE_OR_DEACTIVATE 19
|
||||
#define INF_RIL_REQUEST_OEM_QUERY_GPRS_MS_CLASS 20
|
||||
#define INF_RIL_REQUEST_OEM_SET_TRACE_AND_AT_INTERFACES 21
|
||||
#define INF_RIL_REQUEST_OEM_QUERY_TRACE_AND_AT_INTERFACES_CONFIGURE 22
|
||||
#define INF_RIL_REQUEST_OEM_SWITCH_TRACE_ON_OR_OFF 23
|
||||
#define INF_RIL_REQUEST_OEM_READ_EXCEPTION_LOG 24
|
||||
#define INF_RIL_REQUEST_OEM_GET_PHONE_ACTIVITY_STATUS 25
|
||||
#define INF_RIL_REQUEST_OEM_INITIATE_RESEND_SMS_IF_GPRS_FAILS 26
|
||||
#define INF_RIL_REQUEST_OEM_GET_DEVICE_NUMBER 27
|
||||
#define INF_RIL_REQUEST_OEM_ENABLE_STK 28
|
||||
#define INF_RIL_REQUEST_OEM_GET_SUBSCRIBER_NUMBER 29
|
||||
#define INF_RIL_REQUEST_OEM_SELECT_PHONE_BOOK 30
|
||||
#define INF_RIL_REQUEST_OEM_READ_PHONE_BOOK 31
|
||||
#define INF_RIL_REQUEST_OEM_INSERT_RECORD_TO_PHONE_BOOK 32
|
||||
#define INF_RIL_REQUEST_OEM_DELECT_RECORD_IN_PHONE_BOOK 33
|
||||
#define INF_RIL_REQUEST_OEM_GET_RECORD_FIELDS_MAX_LEN 34
|
||||
#define INF_RIL_REQUEST_OEM_SET_SERIAL_PORT 35
|
||||
#define INF_RIL_REQUEST_OEM_SET_DATA_PREFERED 36
|
||||
#define INF_RIL_REQUEST_OEM_SET_MODEM_ROUTING 37
|
||||
#define INF_RIL_REQUEST_OEM_CLEAR_MISS_NUMBER 38
|
||||
#define INF_RIL_REQUEST_OEM_ATH 39
|
||||
#define INF_RIL_REQUEST_OEM_NOSIG_MODE_TEST 40
|
||||
#define INF_RIL_REQUEST_OEM_SELECT_3G_BAND 41
|
||||
#define INF_RIL_REQUEST_OEM_QUERY_3G_BAND 42
|
||||
#define INF_RIL_REQUEST_OEM_HW_RESET_MODEM 43
|
||||
#define INF_RIL_REQUEST_OEM_QUERY_DIRECT 44
|
||||
#define INF_RIL_REQUEST_OEM_USER_PLMN_QUERY 45
|
||||
#define INF_RIL_REQUEST_OEM_USER_PLMN_SET 46
|
||||
#define INF_RIL_REQUEST_OEM_USER_PLMN_DELTE 47
|
||||
#define INF_RIL_REQUEST_OEM_SET_USB_LOG 48
|
||||
#define INF_RIL_REQUEST_OEM_UPDATE_CSQ 49
|
||||
#define INF_RIL_REQUEST_OEM_DUMP_CELL_ENV 50
|
||||
|
||||
#endif /* INFINEON_CONSTANTS_H */
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -116,7 +117,7 @@ static void isi_audio_settings_remove(struct ofono_audio_settings *as)
|
||||
g_free(asd);
|
||||
}
|
||||
|
||||
static const struct ofono_audio_settings_driver driver = {
|
||||
static struct ofono_audio_settings_driver driver = {
|
||||
.name = "isimodem",
|
||||
.probe = isi_audio_settings_probe,
|
||||
.remove = isi_audio_settings_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -428,7 +429,7 @@ static void isi_call_barring_remove(struct ofono_call_barring *barr)
|
||||
g_free(data);
|
||||
}
|
||||
|
||||
static const struct ofono_call_barring_driver driver = {
|
||||
static struct ofono_call_barring_driver driver = {
|
||||
.name = "isimodem",
|
||||
.probe = isi_call_barring_probe,
|
||||
.remove = isi_call_barring_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -456,7 +457,7 @@ static void isi_call_forwarding_remove(struct ofono_call_forwarding *cf)
|
||||
g_free(data);
|
||||
}
|
||||
|
||||
static const struct ofono_call_forwarding_driver driver = {
|
||||
static struct ofono_call_forwarding_driver driver = {
|
||||
.name = "isimodem",
|
||||
.probe = isi_call_forwarding_probe,
|
||||
.remove = isi_call_forwarding_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -117,7 +118,7 @@ static void isi_call_meter_remove(struct ofono_call_meter *cm)
|
||||
g_free(data);
|
||||
}
|
||||
|
||||
static const struct ofono_call_meter_driver driver = {
|
||||
static struct ofono_call_meter_driver driver = {
|
||||
.name = "isimodem",
|
||||
.probe = isi_call_meter_probe,
|
||||
.remove = isi_call_meter_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -404,7 +405,7 @@ static void isi_call_settings_remove(struct ofono_call_settings *cs)
|
||||
g_free(data);
|
||||
}
|
||||
|
||||
static const struct ofono_call_settings_driver driver = {
|
||||
static struct ofono_call_settings_driver driver = {
|
||||
.name = "isimodem",
|
||||
.probe = isi_call_settings_probe,
|
||||
.remove = isi_call_settings_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -228,7 +229,7 @@ static void isi_cbs_remove(struct ofono_cbs *cbs)
|
||||
g_free(cd);
|
||||
}
|
||||
|
||||
static const struct ofono_cbs_driver driver = {
|
||||
static struct ofono_cbs_driver driver = {
|
||||
.name = "isimodem",
|
||||
.probe = isi_cbs_probe,
|
||||
.remove = isi_cbs_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -251,7 +252,7 @@ static void isi_devinfo_remove(struct ofono_devinfo *info)
|
||||
g_free(data);
|
||||
}
|
||||
|
||||
static const struct ofono_devinfo_driver driver = {
|
||||
static struct ofono_devinfo_driver driver = {
|
||||
.name = "isimodem",
|
||||
.probe = isi_devinfo_probe,
|
||||
.remove = isi_devinfo_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -658,7 +659,7 @@ static void isi_gprs_context_remove(struct ofono_gprs_context *gc)
|
||||
g_free(cd);
|
||||
}
|
||||
|
||||
static const struct ofono_gprs_context_driver driver = {
|
||||
static struct ofono_gprs_context_driver driver = {
|
||||
.name = "isimodem",
|
||||
.probe = isi_gprs_context_probe,
|
||||
.remove = isi_gprs_context_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -489,7 +490,7 @@ error:
|
||||
g_free(cbd);
|
||||
}
|
||||
|
||||
static const struct ofono_gprs_driver driver = {
|
||||
static struct ofono_gprs_driver driver = {
|
||||
.name = "isimodem",
|
||||
.probe = isi_gprs_probe,
|
||||
.remove = isi_gprs_remove,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -1164,7 +1165,7 @@ static void isi_netreg_remove(struct ofono_netreg *netreg)
|
||||
g_free(data);
|
||||
}
|
||||
|
||||
static const struct ofono_netreg_driver isimodem = {
|
||||
static struct ofono_netreg_driver isimodem = {
|
||||
.name = "isimodem",
|
||||
.probe = isi_netreg_probe,
|
||||
.remove = isi_netreg_remove,
|
||||
|
||||
@@ -340,7 +340,7 @@ static void isi_phonebook_remove(struct ofono_phonebook *pb)
|
||||
g_free(data);
|
||||
}
|
||||
|
||||
static const struct ofono_phonebook_driver driver = {
|
||||
static struct ofono_phonebook_driver driver = {
|
||||
.name = "isimodem",
|
||||
.probe = isi_phonebook_probe,
|
||||
.remove = isi_phonebook_remove,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user