@@ -3,6 +3,60 @@ AM_MAKEFLAGS = --no-print-directory

noinst_LTLIBRARIES =

if EXTERNAL_ELL
ell_cflags = @ELL_CFLAGS@
ell_ldadd = @ELL_LIBS@
ell_dependencies =
ell_built_sources =
else
ell_cflags =
ell_ldadd = ell/libell-internal.la
ell_dependencies = $(ell_ldadd)
ell_built_sources = ell/internal ell/ell.h

noinst_LTLIBRARIES += ell/libell-internal.la

ell_headers = ell/util.h \
ell/test.h \
ell/strv.h \
ell/utf8.h \
ell/queue.h \
ell/main.h \
ell/idle.h \
ell/signal.h \
ell/timeout.h \
ell/io.h \
ell/log.h \
ell/checksum.h \
ell/random.h \
ell/uuid.h \
ell/file.h \
ell/uintset.h \
ell/string.h

ell_sources = ell/private.h \
ell/missing.h \
ell/util.c \
ell/test.c \
ell/strv.c \
ell/utf8.c \
ell/queue.c \
ell/main.c \
ell/idle.c \
ell/signal.c \
ell/timeout.c \
ell/io.c \
ell/log.c \
ell/checksum.c \
ell/random.c \
ell/uuid.c \
ell/file.c \
ell/uintset.c \
ell/string.c

ell_libell_internal_la_SOURCES = $(ell_headers) $(ell_sources)
endif

pkginclude_HEADERS = include/log.h include/plugin.h include/history.h \
include/dbus.h include/modem.h include/types.h \
include/call-barring.h include/call-forwarding.h \
@@ -22,7 +76,8 @@ pkginclude_HEADERS = include/log.h include/plugin.h include/history.h \
include/private-network.h include/cdma-netreg.h \
include/cdma-provision.h include/handsfree.h \
include/handsfree-audio.h include/siri.h \
include/netmon.h include/lte.h
include/netmon.h include/lte.h include/ims.h \
include/storage.h

nodist_pkginclude_HEADERS = include/version.h

@@ -216,7 +271,8 @@ qmi_sources = drivers/qmimodem/qmi.h drivers/qmimodem/qmi.c \
drivers/qmimodem/wds.h \
drivers/qmimodem/pds.h \
drivers/qmimodem/common.h \
drivers/qmimodem/wda.h
drivers/qmimodem/wda.h \
drivers/qmimodem/voice.h

builtin_modules += qmimodem
builtin_sources += $(qmi_sources) \
@@ -232,6 +288,7 @@ 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
@@ -240,6 +297,32 @@ builtin_modules += gobi
builtin_sources += plugins/gobi.c
endif

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

if ATMODEM
builtin_modules += atmodem
builtin_sources += drivers/atmodem/atmodem.h \
@@ -264,7 +347,6 @@ builtin_sources += drivers/atmodem/atmodem.h \
drivers/atmodem/atutil.c \
drivers/atmodem/gprs.c \
drivers/atmodem/gprs-context.c \
drivers/atmodem/sim-auth.c \
drivers/atmodem/gnss.c \
drivers/atmodem/lte.c

@@ -395,13 +477,16 @@ builtin_modules += gemaltomodem
builtin_sources += drivers/atmodem/atutil.h \
drivers/gemaltomodem/gemaltomodem.h \
drivers/gemaltomodem/gemaltomodem.c \
drivers/gemaltomodem/location-reporting.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/radio-settings.c \
drivers/xmm7modem/ims.c \
drivers/xmm7modem/netmon.c

if PHONESIM
builtin_modules += phonesim
@@ -496,6 +581,9 @@ builtin_sources += plugins/samsung.c
builtin_modules += sim900
builtin_sources += plugins/sim900.c

builtin_modules += sim7100
builtin_sources += plugins/sim7100.c

builtin_modules += connman
builtin_sources += plugins/connman.c

@@ -615,8 +703,8 @@ src_ofonod_SOURCES = $(builtin_sources) $(gatchat_sources) src/ofono.ver \
src/phonebook.c src/history.c src/message-waiting.c \
src/simutil.h src/simutil.c src/storage.h \
src/storage.c src/cbs.c src/watch.c src/call-volume.c \
src/gprs.c src/idmap.h src/idmap.c \
src/radio-settings.c src/stkutil.h src/stkutil.c \
src/gprs.c src/radio-settings.c \
src/stkutil.h src/stkutil.c \
src/nettime.c src/stkagent.c src/stkagent.h \
src/simfs.c src/simfs.h src/audio-settings.c \
src/smsagent.c src/smsagent.h src/ctm.c \
@@ -630,16 +718,18 @@ 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/hfp.h src/siri.c \
src/netmon.c src/lte.c \
src/netmon.c src/lte.c src/ims.c \
src/netmonagent.c src/netmonagent.h

src_ofonod_LDADD = gdbus/libgdbus-internal.la $(builtin_libadd) \
src_ofonod_LDADD = gdbus/libgdbus-internal.la $(builtin_libadd) $(ell_ldadd) \
@GLIB_LIBS@ @DBUS_LIBS@ -ldl

src_ofonod_LDFLAGS = -Wl,--export-dynamic \
-Wl,--version-script=$(srcdir)/src/ofono.ver

BUILT_SOURCES = $(local_headers) src/builtin.h
src_ofonod_DEPENDENCIES = $(ell_dependencies)

BUILT_SOURCES = $(local_headers) $(ell_built_sources) src/builtin.h

CLEANFILES = $(BUILT_SOURCES) $(rules_DATA)

@@ -651,7 +741,7 @@ else
build_plugindir = $(plugindir)
endif

AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ $(builtin_cflags) \
AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ $(ell_cflags) $(builtin_cflags) \
-DOFONO_PLUGIN_BUILTIN \
-DPLUGINDIR=\""$(build_plugindir)"\"

@@ -680,7 +770,8 @@ doc_files = doc/overview.txt doc/ofono-paper.txt doc/release-faq.txt \
doc/networkmonitor-api.txt \
doc/allowed-apns-api.txt \
doc/lte-api.txt \
doc/cinterion-hardware-monitor-api.txt
doc/cinterion-hardware-monitor-api.txt \
doc/ims-api.txt


test_scripts = test/backtrace \
@@ -785,7 +876,11 @@ test_scripts = test/backtrace \
test/enable-throttling \
test/disable-throttling \
test/set-lte-property \
test/test-serving-cell-info
test/test-serving-cell-info \
test/ims-register \
test/ims-unregister \
test/list-applications \
test/set-sms-alphabet


if TEST
@@ -801,9 +896,10 @@ dist_man_MANS = doc/ofonod.8

unit_objects =

unit_tests = unit/test-common unit/test-util unit/test-idmap \
unit_tests = unit/test-common unit/test-util \
unit/test-simutil unit/test-stkutil \
unit/test-sms unit/test-cdmasms \
unit/test-mbim \
unit/test-rilmodem-cs \
unit/test-rilmodem-sms \
unit/test-rilmodem-cb \
@@ -813,40 +909,36 @@ 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_LDADD = @GLIB_LIBS@
unit_test_common_LDADD = @GLIB_LIBS@ $(ell_ldadd)
unit_objects += $(unit_test_common_OBJECTS)

unit_test_util_SOURCES = unit/test-util.c src/util.c
unit_test_util_LDADD = @GLIB_LIBS@
unit_test_util_LDADD = @GLIB_LIBS@ $(ell_ldadd)
unit_objects += $(unit_test_utils_OBJECTS)

unit_test_idmap_SOURCES = unit/test-idmap.c src/idmap.c
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_LDADD = @GLIB_LIBS@
unit_test_simutil_LDADD = @GLIB_LIBS@ $(ell_ldadd)
unit_objects += $(unit_test_simutil_OBJECTS)

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_LDADD = @GLIB_LIBS@
unit_test_stkutil_LDADD = @GLIB_LIBS@ $(ell_ldadd)
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_LDADD = @GLIB_LIBS@
unit_test_sms_LDADD = @GLIB_LIBS@ $(ell_ldadd)
unit_objects += $(unit_test_sms_OBJECTS)

unit_test_cdmasms_SOURCES = unit/test-cdmasms.c src/cdma-smsutil.c
unit_test_cdmasms_LDADD = @GLIB_LIBS@
unit_test_cdmasms_LDADD = @GLIB_LIBS@ $(ell_ldadd)
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_LDADD = @GLIB_LIBS@
unit_test_sms_root_LDADD = @GLIB_LIBS@ $(ell_ldadd)
unit_objects += $(unit_test_sms_root_OBJECTS)

unit_test_mux_SOURCES = unit/test-mux.c $(gatchat_sources)
@@ -872,30 +964,40 @@ 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
@GLIB_LIBS@ @DBUS_LIBS@ \
$(ell_ldadd) -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
@GLIB_LIBS@ @DBUS_LIBS@ \
$(ell_ldadd) -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
@GLIB_LIBS@ @DBUS_LIBS@ \
$(ell_ldadd) -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
@GLIB_LIBS@ @DBUS_LIBS@ \
$(ell_ldadd) -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_ldadd)
unit_objects += $(unit_test_mbim_OBJECTS)

TESTS = $(unit_tests)

if TOOLS
@@ -994,5 +1096,22 @@ include/ofono/%.h: $(abs_top_srcdir)/include/%.h
$(AM_V_at)$(MKDIR_P) include/ofono
$(AM_V_GEN)$(LN_S) $< $@

ell/internal: Makefile
$(AM_V_at)$(MKDIR_P) ell
$(AM_V_GEN)for f in $(ell_headers) $(ell_sources) ; do \
if [ ! -f $$f ] ; then \
$(LN_S) -t ell -f $(abs_srcdir)/../ell/$$f ; \
fi \
done > $@

ell/ell.h: Makefile
$(AM_V_at)echo -n > $@
$(AM_V_GEN)for f in $(ell_headers) ; do \
echo "#include <$$f>" >> $@ ; \
done

maintainer-clean-local:
-rm -rf ell

clean-local:
@$(RM) -rf include/ofono
30 README
@@ -22,12 +22,42 @@ To compile and install run:
make && make install


Embedded Linux library
======================

In order to compile the daemon and utilities the development version of
Embedded Linux library is required to be present. The development
repositories can be found here:

git://git.kernel.org/pub/scm/libs/ell/ell.git
https://kernel.googlesource.com/pub/scm/libs/ell/ell.git

The build systems requires that the Embedded Linux library source code
is available on the same top level directory as the source code:

.
|--- ell
| |--- ell
| `--- unit
`--- ofono
|--- src
`--- tools

It is not required to build or install Embedded Linux library. The build
will happen when building the Wireless daemon and it will then be linked
internally.

When using --enable-external-ell build option, it is not required that the
Embedded Linux library source code is available in the top level directory.


Kernel Dependencies
===================

In order to have the PPP stack working in oFono you need to enable CONFIG_TUN
(Universal TUN/TAP device driver support) in your kernel .config.


Information
===========

@@ -12,7 +12,8 @@ AC_DEFUN([AC_PROG_CC_PIE], [

AC_DEFUN([COMPILER_FLAGS], [
if (test "${CFLAGS}" = ""); then
CFLAGS="-Wall -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
CFLAGS="-Wall -O2 -fsigned-char -fno-exceptions"
CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
fi
if (test "$USE_MAINTAINER_MODE" = "yes"); then
CFLAGS="$CFLAGS -Werror -Wextra"
@@ -0,0 +1,8 @@
#!/bin/sh

aclocal && \
autoheader && \
libtoolize --automake --copy --force && \
autoconf && \
automake --add-missing --copy

@@ -0,0 +1,17 @@
#!/bin/sh

if [ -f config.status ]; then
make maintainer-clean
fi

./bootstrap && \
./configure --enable-maintainer-mode \
--enable-debug \
--prefix=/usr \
--mandir=/usr/share/man \
--sysconfdir=/etc \
--localstatedir=/var \
--enable-test \
--enable-tools \
--enable-dundee \
--disable-datafiles $*
@@ -1,5 +1,5 @@
AC_PREREQ(2.60)
AC_INIT(ofono, 1.21)
AC_INIT(ofono, 1.29)

AM_INIT_AUTOMAKE([foreign subdir-objects color-tests])
AC_CONFIG_HEADERS(config.h)
@@ -54,9 +54,6 @@ 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))

@@ -68,14 +65,6 @@ PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32, dummy=yes,
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_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))
AC_SUBST(DBUS_CFLAGS)
@@ -171,6 +160,11 @@ AC_ARG_ENABLE(qmimodem, AC_HELP_STRING([--disable-qmimodem],
[enable_qmimodem=${enableval}])
AM_CONDITIONAL(QMIMODEM, test "${enable_qmimodem}" != "no")

AC_ARG_ENABLE(mbimmodem, AC_HELP_STRING([--disable-mbimmodem],
[disable MBIM modem support]),
[enable_mbimmodem=${enableval}])
AM_CONDITIONAL(MBIMMODEM, test "${enable_mbimmodem}" != "no")

AC_ARG_ENABLE(bluetooth, AC_HELP_STRING([--disable-bluetooth],
[disable BlueZ 4 and BlueZ 5 plugins support]),
[enable_bluetooth=${enableval}])
@@ -218,6 +212,17 @@ AC_ARG_ENABLE(upower, AC_HELP_STRING([--disable-upower],
[enable_upower=${enableval}])
AM_CONDITIONAL(UPOWER, test "${enable_power}" != "no")

AC_ARG_ENABLE([external_ell], AC_HELP_STRING([--enable-external-ell],
[enable external Embedded Linux library]),
[enable_external_ell=${enableval}])
if (test "${enable_external_ell}" = "yes"); then
PKG_CHECK_MODULES(ELL, ell >= 0.12, dummy=yes,
AC_MSG_ERROR(Embedded Linux library >= 0.12 is required))
AC_SUBST(ELL_CFLAGS)
AC_SUBST(ELL_LIBS)
fi
AM_CONDITIONAL(EXTERNAL_ELL, test "${enable_external_ell}" = "yes")

AC_ARG_ENABLE(datafiles, AC_HELP_STRING([--disable-datafiles],
[do not install configuration and data files]),
[enable_datafiles=${enableval}])
@@ -0,0 +1,56 @@
Assisted Satellite Navigation hierarchy [experimental]
==========================================================

Service org.ofono
Interface org.ofono.AssistedSatelliteNavigation
Object path [variable prefix]/{modem0,modem1,...}

Methods void SendPositioningElement(string xml_element)

Send an XML element conforming to the XML DTD for <pos>
as defined in 3GPP 27.007 Table 8.55-2. This xml is
used for transferring data associated with positioning
requests received via control plane from the network.
This includes assistance data requests and the results
of positioning procedures. This method maps directly to
the 3GPP 27.007 AT+CPOS command.

void RegisterPositioningRequestAgent(object path)

Registers an agent which will be called whenever a
CPOSR AT response is received. The Agent must respond
to requests using SendPositioningElement.

void UnregisterPositioningRequestAgent(object path)

Un-registers the agent.

PositioningRequestAgent hierarchy
==================================

Service unique name
Interface org.ofono.PositioningRequestAgent
Object path freely definable

Methods void Request(string xml_element)

Receive an XML element conforming to the XML DTD for
<pos> in 3GPP 27.007. This xml is used for transferring
data associated with positioning requests received, via
control plane, from the network. This includes
measurement requests and assistance data. This method
maps directly to the 3GPP defined +CPOSR unsolicited
result code.

void ResetAssistanceData()

A request has been received from the network that all
assistance data should be reset. This is used for 3gpp
performance tests.

void Release()

Agent is being released, possibly because of oFono
terminating, AssistedSatelliteNavigation interface
is being torn down or modem off.
No UnregisterPositioningRequestAgent call is needed.
@@ -0,0 +1,78 @@
CDMA Connection Manager hierarchy [experimental]
=================================

Service org.ofono
Interface org.ofono.cdma.ConnectionManager
Object path [variable]

Methods dict GetProperties()

Returns all global system properties. See the
properties section for available properties.

Possible Errors: [service].Error.InvalidArguments

void SetProperty(string property, variant value)

Sets the property to a desired value

Possible Errors: [service].Error.InvalidArguments
[service].Error.InvalidFormat
[service].Error.Failed

Signals PropertyChanged(string property, variant value)

This signal indicates a changed value of the given
property.

Properties boolean Powered [readwrite]

Controls whether the CDMA data connection is
enabled.

boolean Dormant [readonly]

Contains whether the connection is dormant. Will
always be false if the connection is not powered.

string Username [readwrite]

Holds the username to be used for authentication
purposes.

string Password [readwrite]

Holds the password to be used for authentication
purposes.

dict Settings [readonly, optional]

Holds all the IP network settings

string Interface [readonly, optional]

Holds the interface of the network interface
used by this context (e.g. "ppp0" "usb0")

string Method [readonly, optional]

Holds the IP network config method
"static"- Set IP network statically
"dhcp" - Set IP network through DHCP

string Address [readonly, optional]

Holds the IP address for this context.

string Netmask [readonly, optional]

Holds the Netmask for this context.

array{string} DomainNameServers [readonly, optional]

Holds the list of domain name servers for this
context.

string Gateway [readonly, optional]

Holds the gateway IP for this connection.
@@ -0,0 +1,112 @@
CDMA Message Manager hierarchy [experimental]
==============================

Service org.ofono
Interface org.ofono.cdma.MessageManager
Object path [variable prefix]/{modem0,modem1,...}

Methods dict GetProperties()

Returns properties for the manager object. See
the properties section for available properties.

Possible Errors: [service].Error.InvalidArguments

array{object,dict} GetMessages()

Get an array of message object paths and properties
that represents the currently pending messages.

This method call should only be used once when an
application starts up. Further message additions
and removal shall be monitored via MessageAdded and
MessageRemoved signals.

void SetProperty(string name, 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.InvalidArguments
[service].Error.DoesNotExist

object SendMessage(dict message_info)

The dictionary can contain the following keys:

string "To" - Address of the receiver

string "Text" - The text to send

string "Priority" - The value can be one of:
"normal",
"interactive",
"urgent",
"emergency",

TODO: Figure out where this is really needed

string "Privacy" - The value can be one of:
"not restricted",
"restricted",
"confidential",
"secret"

TODO: Figure out where this is really needed

If the message could be queued successfully, this
method returns an object path to the created Message
object.

Signals PropertyChanged(string name, variant value)

This signal indicates a changed value of the given
property.

ImmediateMessage(string message, dict info)

New immediate SMS received. Info has Sender,
LocalSentTime, SentTime, Priority, Privacy and
CallbackNumber information. Sender address is given
in string format. LocalSentTime and SentTime are
given in string form using ISO8601 format.

IncomingMessage(string message, dict info)

New incoming text SMS received. Info has Sender,
LocalSentTime, SentTime, Priority, Privacy, and
CallbackNumber.

MessageAdded(object path, dict properties)

This signal is emitted whenever a new Message object
has been created.

MessageRemoved(object path)

This signal is emitted whenever a Message object
has been removed, e.g. when it reaches a final state.

Properties boolean UseDeliveryAcknowledgement

Request to be notified when the SMSC has delivered
the message to the receiving user. In effect this
is the same as the GSM Status Report.

boolean UseUserAcknowledgement

Request to be notified when the receiving user has
acknowledged the message.

boolean UseReadAcknowledgement

Request to be notified when the receiving User has
read the message.

string CallbackNumber

The call back number for the user. If the number is
empty, then the optional field is not included
in the encoded PDU.
@@ -0,0 +1,81 @@
CDMA Network registration hierarchy [experimental]
===================================

Service org.ofono
Interface org.ofono.cdma.NetworkRegistration
Object path [variable prefix]/{modem0,modem1,...}

Methods dict GetProperties()

Returns all network registration properties. See the
properties section for available properties.

Possible Errors: [service].Error.InvalidArguments

void SetProperty(string name, 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.InvalidArguments
[service].Error.DoesNotExist

Signals PropertyChanged(string property, variant value)

This signal indicates a changed value of the given
property.

Properties string Status [readonly]

The current registration status of a modem.

The possible values are:
"unregistered" Not registered
"registered" Registered to home network
"roaming" Roaming

byte Strength [readonly]

Contains the current signal strength as a percentage
between 0-100 percent.

byte DataStrength [readonly]

Contains the current signal strength of the High Data
Rate network. This is a percentage value between
0-100 percent.

uint16 SystemIdentifier [readonly, optional]

Contains the system identifier of the currently
selected network.

uint16 NetworkIdentifier [readonly, optional]

Contains the network identifier of the currently
selected network.

uint16 MobileCountryCode [readonly, optional]

Contains the Mobile Country Code (MCC).

uint16 MobileNetworkCode [readonly, optional]

Contains the Mobile Network Code (MNC).

string Name [readonly, optional]

Contains the name of the current network.

string RoamingPreference [readwrite]

Contains the roaming preference used in the network
selection.

The possible values are:
"home" Home networks only
"roamonly" Roaming networks only
"affiliated" Affiliated networks only
"any" Any network
@@ -0,0 +1,124 @@
CDMA VoiceCallManager hierarchy [experimental]
===============================

Service org.ofono
Interface org.ofono.cdma.VoiceCallManager
Object path [variable prefix]/{modem0,modem1,...}

Methods dict GetProperties()

Returns properties for the VoiceCallManager Interface.
See the properties section for available properties.

void Dial(string number)

Initiates a new outgoing call. This is usually
implemented using the ATD AT command.

Possible Errors: [service].Error.InProgress
[service].Error.InvalidArguments
[service].Error.InvalidFormat
[service].Error.NotImplemented
[service].Error.Failed

void Hangup()

Hangup all active calls.

Possible Errors: [service].Error.InProgress
[service].Error.NotImplemented
[service].Error.Failed

void Answer()

Answer the incoming call. This only affects the
incoming call.

void SendFlash(string flash_string)

Sends the flash string to the network.

void SendTones(string tones)

Sends the DTMF tones to the network. The tones have
a fixed duration. Tones can be one of: '0' - '9',
'*', '#', 'A', 'B', 'C', 'D'. The last four are
typically not used in normal circumstances.

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.InvalidArguments
[service].Error.DoesNotExist

Signals PropertyChanged(string property, variant value)

Signal is emitted whenever a property has changed.
The new value is passed as the signal argument.

DisconnectReason(string reason)

This signal is emitted when the modem manager can
provide extra information about why the call was
released. The possible reason values are:
"local" - The call was release due to local
user action
"remote" - Remote party released the call
"network" - Network released the call, most
likely due to low signal or
other network failure

Not all implementations are able to provide this
information, so applications should treat the emission
of this signal as optional. This signal will be
emitted before the PropertyChanged signal.

Properties string State [readonly]

Contains the state of the current call. The state
can be one of:
- "active" - The call is active
- "dialing" - The call is being dialed
- "alerting" - The remote party is being alerted
- "incoming" - Incoming call in progress
- "disconnected" - No call is connected

boolean CallWaiting [readonly]

Contains whether a call is waiting.

string CallWaitingNumber [readonly, optional]

Contains the call waiting number.

string ToneDuration [readwrite]

Contains the length of the DTMF tone duration. The
currently supported values are:
"short",
"long"

string LineIdentification [readonly]

Contains the Line Identification information returned
by the network, if present. For incoming calls this is
effectively the CLIP. For outgoing calls this attribute
will hold the dialed number.

Please note that after sending flash this property
will be empty.

string StartTime [readonly, optional]

Contains the starting time of the call. The time is
stamped when the call enters the "active" state.
Client applications can use this to infer somewhat
reliable call duration information.

Please note that after sending Flash, there will not be
any StartTime property change for the Flash
string/number.
@@ -0,0 +1,352 @@
Every project has its coding style, and oFono is not an exception. This
document describes the preferred coding style for oFono code, in order to keep
some level of consistency among developers so that code can be easily
understood and maintained, and also to help your code survive under
maintainer's fastidious eyes so that you can get a passport for your patch
ASAP.

First of all, oFono coding style must follow every rule for Linux kernel
(http://www.kernel.org/doc/Documentation/CodingStyle). There also exists a tool
named checkpatch.pl to help you check the compliance with it. Just type
"checkpatch.pl --no-tree patch_name" to check your patch. In theory, you need
to clean up all the warnings and errors except this one: "ERROR: Missing
Signed-off-by: line(s)". oFono does not used Signed-Off lines, so including
them is actually an error. In certain circumstances one can ignore the 80
character per line limit. This is generally only allowed if the alternative
would make the code even less readable.

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
============================================================
There should be a blank line before if statement unless the if is nested and
not preceded by an expression or variable declaration.

Example:
1)
a = 1;
if (b) { // wrong

2)
a = 1

if (b) {
}
a = 2; // wrong

3)
if (a) {
if (b) // correct

4)
b = 2;

if (a) { // correct

}

b = 3;

The only exception to this rule applies when a variable is being allocated:
array = g_try_new0(int, 20);
if (array == NULL) // Correct
return;


M2: Multiple line comment
=========================
If your comments have more then one line, please start it from the second line.

Example:
/*
* first line comment // correct
* ...
* last line comment
*/


M3: Space before and after operator
===================================
There should be a space before and after each operator.

Example:
a + b; // correct


M4: Wrap long lines
===================
If your condition in if, while, for statement or a function declaration is too
long to fit in one line, the new line needs to be indented not aligned with the
body.

Example:
1)
if (call->status == CALL_STATUS_ACTIVE ||
call->status == CALL_STATUS_HELD) { // wrong
ofono_dbus_dict_append();

2)
if (call->status == CALL_STATUS_ACTIVE ||
call->status == CALL_STATUS_HELD) { // correct
ofono_dbus_dict_append();

3)
gboolean sim_ust_is_available(unsigned char *service_ust, unsigned char len,
num sim_ust_service index) // wrong
{
int a;
...
}

4)
gboolean sim_ust_is_available(unsigned char *service_ust, unsigned char len,
enum sim_ust_service index) // correct
{
int a;
...
}

If the line being wrapped is a function call or function declaration, the
preferred style is to indent at least past the opening parenthesis. Indenting
further is acceptable as well (as long as you don't hit the 80 character
limit).

If this is not possible due to hitting the 80 character limit, then indenting
as far as possible to the right without hitting the limit is preferred.

Example:

1)
gboolean sim_ust_is_available(unsigned char *service_ust, unsigned char len,
enum sim_ust_service index); // worse

2)
gboolean sim_ust_is_available(unsigned char *service_ust, unsigned char len,
enum sim_ust_service index);
// better

M5: Git commit message 50/72 formatting
=======================================
The commit message header should be within 50 characters. And if you have
detailed explanatory text, wrap it to 72 character.


M6: Space when doing type casting
=================================
There should be a space between new type and variable.

Example:
1)
a = (int *)b; // wrong
2)
a = (int *) b; // correct


M7: Don't initialize variable unnecessarily
===========================================
When declaring a variable, try not to initialize it unless necessary.

Example:
int i = 1; // wrong

for (i = 0; i < 3; i++) {
}


M8: Use g_try_malloc instead of g_malloc
========================================
When g_malloc fails, the whole program would exit. Most of time, this is not
the expected behavior, and you may want to use g_try_malloc instead.

Example:
additional = g_try_malloc(len - 1); // correct
if (additional == NULL)
return FALSE;


M9: Follow the order of include header elements
===============================================
When writing an include header the various elements should be in the following
order:
- #includes
- forward declarations
- #defines
- enums
- typedefs
- function declarations and inline function definitions


M10: Internal headers must not use include guards
=================================================
Any time when creating a new header file with non-public API, that header
must not contain include guards.


M11: Naming of enums
====================

Enums must have a descriptive name. The enum type should be small caps and
it should not be typedef-ed. Enum contents should be in CAPITAL letters and
prefixed by the enum type name.

Example:

enum animal_type {
ANIMAL_TYPE_FOUR_LEGS,
ANIMAL_TYPE_EIGHT_LEGS,
ANIMAL_TYPE_TWO_LEGS,
};

If the enum contents have values (e.g. from specification) the formatting
should be as follows:

enum animal_type {
ANIMAL_TYPE_FOUR_LEGS = 4,
ANIMAL_TYPE_EIGHT_LEGS = 8,
ANIMAL_TYPE_TWO_LEGS = 2,
};

M12: Enum as switch variable
====================

If the variable of a switch is an enum, you must not include a default in
switch body. The reason for this is: If later on you modify the enum by adding
a new type, and forget to change the switch accordingly, the compiler will
complain the new added type hasn't been handled.

Example:

enum animal_type {
ANIMAL_TYPE_FOUR_LEGS = 4,
ANIMAL_TYPE_EIGHT_LEGS = 8,
ANIMAL_TYPE_TWO_LEGS = 2,
};

enum animal_type t;

switch (t) {
case ANIMAL_TYPE_FOUR_LEGS:
...
break;
case ANIMAL_TYPE_EIGHT_LEGS:
...
break;
case ANIMAL_TYPE_TWO_LEGS:
...
break;
default: // wrong
break;
}

However if the enum comes from an external header file outside ofono
we cannot make any assumption of how the enum is defined and this
rule might not apply.

M13: Check for pointer being NULL
=================================

When checking if a pointer or a return value is NULL, explicitly compare to
NULL rather than use the shorter check with "!" operator.

Example:
1)
array = g_try_new0(int, 20);
if (!array) // Wrong
return;

2)
if (!g_at_chat_get_slave(chat)) // Wrong
return -EINVAL;

3)
array = g_try_new0(int, 20);
if (array == NULL) // Correct
return;


M14: Always use parenthesis with sizeof
=======================================
The expression argument to the sizeof operator should always be in
parenthesis, too.

Example:
1)
memset(stuff, 0, sizeof(*stuff));

2)
memset(stuff, 0, sizeof *stuff); // Wrong


M15: Use void if function has no parameters
===========================================================
A function with no parameters must use void in the parameter list.

Example:
1)
void foo(void)
{
}

2)
void foo() // Wrong
{
}

M16: Don't use hex value with shift operators
==============================================
The expression argument to the shift operators should not be in hex.

Example:

1)
1 << y

2)
0x1 << y // Wrong

M17: Avoid forward-declaration of static functions
==================================================

Functions that are static should not be forward-declared. The only exception
to this rule is if a circular dependency condition exists, and the forward
declaration cannot be avoided.

O1: Shorten the name
====================
Better to use abbreviation, rather than full name, to name a variable,
function, struct, etc.

Example:
supplementary_service // too long
ss // better


O2: Try to avoid complex if body
================================
It's better not to have a complicated statement for if. You may judge its
contrary condition and return | break | continue | goto ASAP.

Example:
1)
if (a) { // worse
struct voicecall *v;
call = synthesize_outgoing_call(vc, vc->pending);
v = voicecall_create(vc, call);
v->detect_time = time(NULL);
DBG("Registering new call: %d", call->id);
voicecall_dbus_register(v);
} else
return;

2)
if (!a)
return;

struct voicecall *v;
call = synthesize_outgoing_call(vc, vc->pending);
v = voicecall_create(vc, call);
v->detect_time = time(NULL);
DBG("Registering new call: %d", call->id);
voicecall_dbus_register(v);
@@ -0,0 +1,164 @@
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, &lte->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.
@@ -192,7 +192,8 @@ Properties boolean Active [readwrite]

string AuthenticationMethod [readwrite]
Holds the PPP authentication method to use. Valid
values are "pap" and "chap". Defaults to "chap".
values are "pap", "chap" and "none".
Defaults to "chap".

string Username [readwrite]

@@ -0,0 +1,47 @@
This document specifies the AT command set used in the bluetooth ofono plugins.

Bluetooth Dial-up Networking Profile Features Description
=========================================================
(Ref. document: Dial-up Networking Profile - Bluetooth specification version 1.1 - 22 February 2001)

- AT COMMAND SET USED:
Commands:
&C Circuit 109 (DCD) Control
&D Circuit 108 (DTR) Response
&F Set to Factory Defined Configuration
+GCAP Request Complete Capabilities List
+GMI Request Manufacturer Identification
+GMM Read Model Identification
+GMR Read Revision Identification
A Answer Incoming Call
D Dial
E Command Echo
H Hang Up
L Monitor Speaker Loudness
M Monitor Speaker Control
O Return to Online Data Mode
P Select Pulse Dialling
Q Result Code Suppression
S0 Automatic Answer Control
S10 Automatic Disconnect Delay Control
S3 Command Line Termination Character
S4 Response Formatting Character
S5 Command Line Editing Character (BACKSPACE)
S6 Blind Dial Delay Control
S7 Connection Completion Timeout
S8 Comma Dial Modifier Delay Control
T Select Tone Dialling
V DCE Response Format
X Call Progress Monitoring Control
Z Reset to Default Configuration

Result codes:
OK Acknowledge execution of a command
CONNECT Connection has been established
RING The DCE has detected an incoming call signal from the
network
NO CARRIER The connection has been terminated, or attempt to
establish a connection failed
ERROR Error
NO DIALTONE No dial-tone detected
BUSY Busy signal detected
@@ -0,0 +1,48 @@
DialUp Networking diagram
=========================

This diagram explains how oFono and ConnMan are interacting to handle a data
call from a DUN client.

1) GAtServer receive ATD*99#.
2) The GAtPPP server is setup.
3) oFono through GAtPPP notify ConnMan that he needs a TUN/TAP interface.
4) oFono is notified that TUN/TAP interface is created and can start exchanging
PPP packets with DUN client. Those PPP packets are converted into IP stream
and transmitted to/received from TUN/TAP interface.
5) ConnMan is selecting which interface to send IP packets (WiFi, 3G, ...).


*----------------* *----------------*
| | ATD*99# | |
| DUN Client |----------->| GAtServer |
| |<---* | |
*----------------* | *----------------*
| |
PPP | | setup_ppp()
Packets | |
| |
| V Need
| *----------------* /dev/net/tun *----------------*
*--->| | interface | |
| GAtPPP |<-------------->| ConnMan |
*--->| | interface | |
| *----------------* created *----------------*
IP | |
Stream | |Create
| *------------------------* |/dev/net/tun
| | | |interface
*--->| TUN/TAP interface |<-----------*
| |
*------------------------*
IP | Stream
routed with | ConnMan rules
*---------------------*--------------------*
| | |
| | |
V V V
*-------------* *-------------* *-------------*
| | | | | |
| WiFi | | Modem | | EthX |
| | | | | |
*-------------* *-------------* *-------------*
@@ -0,0 +1,87 @@

Manager hierarchy
=================

Service org.ofono.dundee
Interface org.ofono.dundee.Manager
Object path /

Methods array{object,dict} GetDevices()

Get an array of device objects and properties
that represent the currently attached devices.

This method call should only be used once when an
application starts up. Further device additions
and removal shall be monitored via DeviceAdded and
DeviceRemoved signals.

Signals DeviceAdded(object path, dict properties)

Signal that is sent when a new device is added. It
contains the object path of new device and its
properties.

DeviceRemoved(object path)

Signal that is sent when a device has been removed.
The object path is no longer accessible after this
signal and only emitted for reference.


Device hierarchy
================

Service org.ofono.dundee
Interface org.ofono.dundee.Device
Object path /{device0,device1,...}

Methods dict GetProperties()

Returns properties for the device object. See
the properties section for available 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.Timedout
[service].Error.InvalidArguments
[service].Error.Failed

Signals PropertyChanged(string name, variant value)

This signal indicates a changed value of the given
property.

Properties string Name [readonly]

Friendly name of the device.

boolean Active [readwrite]

Holds whether the device is connected. A
connection will be established when this value
is set to true. A existing connection will be
teared down when set to false.

dict Settings [readonly]

Holds all the IP network settings.

string Interface [readonly, optional]

Holds the interface of the network interface
used by this connection (e.g. "ppp0" "usb0")

string Address [readonly, optional]

Holds the IP address for this connection.

array{string} DomainNameServers [readonly, optional]

Holds the list of domain name servers for this
connection.
@@ -0,0 +1,113 @@
This document explains what is expected from applications and what oFono
will do for an emergency call request in different states.

Case 1: Call in offline and SIM present state

Expected from UI/applications:

- Online property of org.ofono.Modem interface should be set to TRUE.
- Dial method should be called with the dialled number.

What oFono will do:

- Modem will be set to online.
- 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.

Case 2: Call in SIM Present and PIN required state

Expected from UI/applications:

- If the user enters emergency number in the PIN entry dialog, then
Online property on org.ofono.Modem interface should be set to TRUE.
- List of Emergency numbers can be known from the
EmergencyNumbers property on the org.ofono.VoiceCallManager
interface.
- Dial method should be called with the dialled number

What oFono will do:

- Modem will be set to online.
- Upon reception of Dial request, Emergency mode is activated.
- Once the call is ended, Emergency mode is deactivated.
- Modem remains in online mode but the functionalities will be
limited.

Case 3: Call in SIM Present and PIN required state - Dial cancelled by user

Expected from UI/applications:

- If the user enters emergency number in the PIN entry dialog, then
Online property on org.ofono.Modem interface should be set to TRUE.
- List of Emergency numbers can be known from the
EmergencyNumbers property on the org.ofono.VoiceCallManager
interface.
- Dial method should be called with the dialled number
- Upon dial cancellation by user, HangupAll should be called.

What oFono will do:

- Modem will be set to online.
- Post SIM and Post online atoms are not created.
- Upon reception of Dial request, Emergency mode is activated.
- Upon dial cancellation(HangupAll request), Emergency mode is
deactivated.
- Modem remains in online mode but the functionalities will be
limited.

Case 4: Call in No SIM state

Expected from UI/applications:

- Online property on org.ofono.Modem interface should be set to TRUE.
- Dial method should be called with the dialled number

What oFono will do:

- Modem will be set to online.
- Post SIM and Post online atoms not created.
- If the dialed number is an Emergeny number, Emergency mode is
activated.
- Once the call is ended, Emergency mode is deactivated.
- Modem remains in online mode but the functionalities will be
limited.

Case 5: Call in No SIM state - PIN disabled SIM inserted during emergency call

Expected from UI/applications:

- Online property on org.ofono.Modem interface should be set to TRUE.
- Dial method should be called with the dialled number

What oFono will do:

- Modem will be set to online.
- Post SIM and Post online atoms are not created.
- If the dialed number is an Emergeny number, Emergency mode is
activated.
- Upon PIN disabled SIM detection, Post SIM and Post online
atoms are created.
- Once the call is ended, Emergency mode is deactivated.
- Modem remains in online mode with full functionality.

Case 6: Call in No SIM state - PIN enabled SIM inserted during emergency call

Expected from UI/applications:

- Online property on org.ofono.Modem interface should be set to TRUE.
- Dial method should be called with the dialled number

What oFono will do:

- Modem will be set to online.
- Post SIM and Post online atoms are not created.
- If the dialed number is an Emergeny number, Emergency mode is
activated.
- Upon PIN enabled SIM detection, applications will be informed
of the pin status via PinRequired property on the
org.ofono.SimManager interface.
- Once the call is ended, Emergency mode is deactivated.
- Modem remains in online mode but the functionalities will be
limited.
@@ -0,0 +1,92 @@
Handsfree hierarchy
===================

Service org.ofono
Interface org.ofono.Handsfree
Object path [variable prefix]/{modem0,modem1,...}

Methods dict GetProperties()

Returns properties for the Handsfree Interface. See the
properties section for available 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.NotImplemented
[service].Error.NotSupported

string RequestPhoneNumber()

Request a phone number from the AG, corresponding to the
last voice tag recorded in the HF. The AG may accept or
reject this request depending on its internal state.

This functionality is generally implemented by using
the +BINP=1 AT command.

Possible Errors: [service].Error.InProgress
[service].Error.InvalidArguments
[service].Error.Failed

Signals PropertyChanged(string property, variant value)

Signal is emitted whenever a property has changed.
The new value is passed as the signal argument.

Properties array{string} Features [readonly]

List of features supported by the AG. The currently
supported values are:
"voice-recognition"
"attach-voice-tag"
"echo-canceling-and-noise-reduction"
"three-way-calling"
"release-all-held"
"release-specified-active-call"
"private-chat"
"create-multiparty"
"transfer"
"hf-indicators"

boolean InbandRinging [readonly]

Boolean representing whether inband ringing is enabled.

boolean VoiceRecognition [readwrite]

Boolean representing whether voice recognition is
currently active in the AG. This property may be written
to activate or deactivate the function from the HF, or
the AG could autonomously initiate it.

boolean EchoCancelingNoiseReduction [readwrite, optional]

Non-persistent Boolean property representing whether
echo canceling and noise reduction is enabled in the
AG. This feature can only be disabled once from the
HF unit; the current specification does not allow the
HF unit from enabling this feature on the AG once
it has been disabled.

byte BatteryChargeLevel [readonly]

The current charge level of the battery. The value
can be between 0 and 5 respectively.

array{string} SubscriberNumbers [readonly]

List of subscriber numbers provided by the AG.

boolean DistractedDrivingReduction [readwrite, optional]

Non-persistent property representing whether
distracted driving reduction mode should be enabled in
the AG. Support for this feature is optional on the
AG.
@@ -0,0 +1,129 @@
Handsfree Audio Manager hierarchy [experimental]
=================================

Service org.ofono
Interface org.ofono.HandsfreeAudioManager
Object path /

Methods array{object,dict} GetCards()

Get an array of card objects and properties
that represent the currently attached devices.

This method call should only be used once when an
application starts up. Further device additions
and removal shall be monitored via CardAdded and
CardRemoved signals.

void Register(object path, array{byte})

Registers a Handsfree Audio agent with a specific
path (freely selectable by the audio subsystem) and
list of supported codecs. Available codec
identifiers:

1 CVSD
2 mSBC

Possible Errors: [service].Error.InvalidArguments
[service].Error.InUse

void Unregister(object path)

Unregisters a Handsfree Audio agent registered
through the Register method.

Possible Errors: [service].Error.NotFound
[service].Error.InvalidArguments
[service].Error.NotAllowed

Signals CardAdded(object path, dict properties)

Signal that is sent when a new card is added. It
contains the object path of new card and its
properties.

CardRemoved(object path)

Signal that is sent when a card has been removed.
The object path is no longer accessible after this
signal and only emitted for reference.


Handsfree Audio Card hierarchy [experimental]
==============================

Service org.ofono
Interface org.ofono.HandsfreeAudioCard
Object path /{device0,device1,...}

Methods dict GetProperties()

Returns properties for the device object. See
the properties section for available properties.

void Connect()

Attempts to establish the SCO audio connection.
The Agent NewConnection() method will be called
whenever the SCO audio link has been established. If
the audio connection could not be established, this
method will return an error.

Possible Errors: [service].Error.InProgress
[service].Error.Failed
[service].Error.NotAvailable
[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
property.

Properties string RemoteAddress [readonly]

Bluetooth address of the remote peer.

string LocalAddress [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]
===============================

Service <freely defined>
Interface org.ofono.HandsfreeAudioAgent
Object <freely defined>

Methods void NewConnection(object card, fd sco, byte codec)

Notifies the handler that a new SCO connection is
available. Returning an error will cause oFono to
disconnect the SCO connection.

void Release()

Notifies the Agent that it is no longer registered
to oFono.
@@ -0,0 +1,112 @@
Hardware support
****************

Voice and data modems
=====================

- Infineon (IFX)

Fully supported modem with voice calls, text messaging,
supplementary services, data connections, SIM Toolkit etc.

Supports multiple GPRS connections with RawIP interface.

- ST-Ericsson (STE)

Fully supported modem with voice calls, text messaging,
supplementary service, data connections, SIM Toolkit etc.

Supports multiple GPRS connections via CAIF subsystem.

- Nokia Phonet/ISI

Supports majority of phone features used on the N900
phone from Nokia.

Supports multiple GPRS connections via Phonet pipes.

- Calypso / Openmoko Freerunner

Fully supported modem with voice calls, text messaging,
supplementary services, data connections, SIM Toolkit etc.

GPRS connection support is limited due to hardware design.


Data only modems
================

- Ericsson MBM

Fully supported data only modem with extra support for
text messaging, USSD and SIM Toolkit.

Support for one high-speed CDC Ethernet GPRS connection
and one PPP connection.

Sony-Ericsson MD-300
Toshiba F3607gw
Lenovo F3507g and F3607gw
Dell 5530, F3607gw and F3307

- Option HSO

Fully supported data only modem with extra support for
text messaging and USSD.

Support for one high-speed point-to-point GRPS connection.

- Huawei

Support for one PPP based GPRS connection with extra support
for text messaging and USSD.

Modems based on EM770 have voice call support.

Newer Qualcomm QMI based versions are also supported.

- Novatel

Support for one PPP based GPRS connection with extra support
for text messaging and USSD.

Newer Qualcomm QMI based versions are also supported.

- ZTE

Support for one PPP based GPRS connection with extra support
for text messaging and USSD.

Newer Qualcomm QMI based versions are also supported.

- Sierra

Support for PPP based GPRS connection still work in progress
and it has limited support for text messaging and USSD.

Devices with DirectIP are supported and have extra support
for text messaging and USSD.

- Nvidia Icera

Fully support data only modem with extra support for
text messaging and USSD.

- Qualcomm Gobi

Fully supported data only modem with extra support for
text messaging and GPS location reporting.

Support for voice calls, USSD and SS is work in progress.


Other modems
============

- Phonesim

Fully supported emulator for testing.

- Bluetooth Handsfree

Special Bluetooth Handsfree client support.
@@ -0,0 +1,49 @@
HandsFree Profile Audio Gateway diagram
=======================================

This diagram explains how oFono manages HFP AG.

AT commands and unsolicited results are managed in their related atom (eg. ATA
is managed in voicecall atom).
The emulator atom is managing AT commands or unsolicited results that are not
falling into a specific atom.

1) HFP AG plugin registers a HFP AG server as soon as a voicecall atom exist.
2) When a connection occurs on this server, HFP AG plugin creates and registers
an emulator atom.
3) Emulator atom will start a GAtServer and registers non-atom-specific
AT commands to it.
4) On emulator atom registration, voice call related atoms (voicecall, network
and sim) register AT callbacks they managed through emulator atom.


*===========* *-----------------*
| | Register | |
| BlueZ |<---------------| HFP AG plugin |
| | SDP record | |
*===========* *-----------------*
|
| Start emulator on connection
|
V
*-----------------*
| |
*-------->| Emulator Atom |
| | |
| *-----------------*
| |
Register | | Register AT commands
AT | V
callbacks | *-----------------*
| | |
| | GAtServer |
| | |
| *-----------------*
|
*---------------------*-------------------*
| | |
*----------------* *--------------* *-------------*
| | | | | |
| Voicecall atom | | Network atom | | SIM atom |
| | | | | |
*----------------* *--------------* *-------------*
@@ -0,0 +1,59 @@
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.
@@ -0,0 +1,137 @@
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 cliend should
gps device file descriptor. The external client should
use the file descriptor to receive the NMEA data.

Possible Errors: [service].Error.InProgress
@@ -33,3 +33,39 @@ Properties string DefaultAccessPointName [readwrite]

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,6 +104,16 @@ 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
@@ -0,0 +1,108 @@
Man-Machine Interface (MMI) Codes and oFono
===========================================

1.0 Introduction

3GPP 22.030 describes the structure of MMI codes for User Equipment. All user
equipment that wishes to be compliant with the Global Certification Forum
(GCF) must recognize such codes in the dialer application. This document
describes the basic design principles for how to handle MMI codes with oFono.


2.0 Basic MMI structure

The MMI codes fall into two broad categories: codes that are followed by
<SEND> and standalone codes. oFono handles all codes that are followed by
<SEND> while the UI is expected to handle standalone codes.

2.1 Supplementary Service Control Codes

The following codes are followed by <SEND> and are handled by oFono. The
general structure of the codes is as follows:

* Activation - '*SC*SI#'
* Registration - '*SC*SI#' and '**SC*SI#'
* Erasure - '##SC*SI#'
* Deactivation - '#SC*SI#'
* Interrogation - '*#SC*SI#'

Please refer to 3GPP 22.030 for detailed explanation of the structure of SI
and SC. oFono currently handles the following SCs:

* 33 - Call Barring - All Outgoing
* 331 - Call Barring - Outgoing International
* 332 - Call Barring - Outgoing International except Home Country
* 35 - Call Barring - All Incoming
* 351 - Call Barring - All Incoming when Roaming
* 330 - Call Barring - All Barrring Services
* 333 - Call Barring - All Outgoing Services (e.g. 33, 331, 332)
* 335 - Call Barring - All Incoming Services (e.g. 35, 351)

* 21 - Unconditional Call Forwarding
* 67 - Call Forwarding on Busy
* 61 - Call Forwarding on No Reply
* 62 - Call Forwarding on Unreachable
* 002 - Call Forwarding All Conditional
* 004 - Call Forwarding All

* 30 - CLIP
* 31 - CLIR
* 76 - COLP
* 77 - COLR
* 43 - Call Waiting
* 300 - CNAP

2.2 Registration of a new password

The following password change strings are followed by <SEND> and are recognized
by oFono:

* 03 * ZZ * OLD_PASSWORD * NEW_PASSWORD * NEW_PASSWORD #
** 03 * ZZ * OLD_PASSWORD * NEW_PASSWORD * NEW_PASSWORD #
* 03 ** OLD_PASSWORD * NEW_PASSWORD * NEW_PASSWORD #
** 03 ** OLD_PASSWORD * NEW_PASSWORD * NEW_PASSWORD #

NOTE: ZZ is the Call Barring supplementary service code.

2.3 Change of PIN/PIN2

The following string allows the user to change the PIN:

PIN1: **04*OLD_PIN*NEW_PIN*NEW_PIN#
PIN2: **042*OLD-PIN2*NEW_PIN2*NEW_PIN2#

The following string allows the user to unblock the PIN:

PIN1: **05*PIN_UNBLOCKING_KEY*NEW_PIN*NEW_PIN#
PIN2: **052*PIN2_UNBLOCKING_KEY*NEW_PIN2*NEW_PIN2#

Please note that this procedure is not followed by <SEND>. It is up to the
dialer to recognize this string and act accordingly by using the appropriate
method on the SimManager interface.

2.4 IMEI Display

The following string can be used to obtain the IMEI:

*#06#

Please note that this procedure is not followed by <SEND>. It is up to the
dialer to recognize this string and display the SerialNumber property of the
Modem Interface.

3.0 General Application Guidelines

When the application is taking user input it is expected to match the input
against all possible strings that are not to be followed by <SEND>. At a
minimum the PIN change or unlock and the IMEI display strings must be handled
by the application. Any additional manufacturer-specific strings are also to
be handled by the application.

Once the user presses <SEND> the request should be sent to the
SupplementaryServices.Initiate() method. If the string is recognized as a
control string, then the return value will be interpreted according to
structure specified in doc/supplementaryservices-api.txt. If the error
NotRecognized is returned, then the string is not recognized as a
supplementary service string and should be treated as a call setup request
instead. In this case the application should forward the string to
VoiceCallManager.Dial() method.
@@ -95,6 +95,13 @@ Properties boolean Powered [readwrite]
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
@@ -127,6 +134,8 @@ 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
@@ -77,7 +77,9 @@ Properties string Mode [readonly]

string Status [readonly]

The current registration status of a modem.
The current registration status of a modem. In case
technology is 'lte', 'registered' and 'roaming' may
not necessarily mean voice calling available.

The possible values are:
"unregistered" Not registered to any network
@@ -200,3 +200,20 @@ 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.
@@ -0,0 +1,104 @@
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'
@@ -0,0 +1,22 @@
SIM900 modem usage
===================

To enable SIM900 module support you need to put the following
udev rule into appropriate file in /{etc,lib}/udev/rules.d:

KERNEL=="gsmtty3", ENV{OFONO_DRIVER}="sim900"

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.
@@ -0,0 +1,194 @@
Referencing standards in the source
===================================

When referencing standard documents use raw numbers xx.xxx for 3GPP
documents or xxx.xxx for ETSI document (eg: 23.040). If needing to
point to an specific section/subsection, explicitly say "Section foo"

3GPP specs can be found in http://3gpp.org/ftp/Specs.

Core 3GPP Specifications
========================

- 22.030: Man-Machine Interface (MMI) of the User Equipment (UE)

Describes the various supplementary service magic strings, how Abbreviated
Dialing Numbers are used and general UI interaction. This spec is
particularly important for its description of how calls are put on hold,
transferred, swapped, etc.

- 22.038: Alphabets and Language Specific Information

Describes the GSM 7-bit character set, bit packing for SMS, CBS and USSD.
Also describes UCS2 and how it is encoded for SMS, CBS and USSD.

- 27.007: AT command set for User Equipment (UE)

Describes the AT command set for all GSM modems. oFono atom driver APIs are
largely based on the AT commands defined in this document.

- 27.005: Short Message Service (SMS) & Cell Broadcast Service (CBS)

Describes the AT command set for SMS and CBS interaction.

- 23.040: Technical realization of the Short Message Service (SMS)

Describes the SMS service in detail, including the various PDUs, headers,
EMS messages, MWI messages and other aspects of SMS.

- 23.041: Technical realization of Cell Broadcast Service (CBS)

Describes the CBS service in detail, including the PDU structure, ETWS and
other aspects.

- 31.102: Characteristics of the (USIM) application

Describes the contents of the SIM, SIM initialization procedures, elementary
file permissions and formats.

- 31.111: Universal Subscriber Identity Module (USIM) Application Toolkit (USAT)

Describes 3GPP specific aspects of Card Application Toolkit (CAT) / STK.

- 31.124: USAT conformance test specification

Describes the testing parameters and test cases for 31.111.


Security Specifications
=======================

- 33.220 Generic bootstrapping architecture (GBA)

Describes the generic bootstrapping architecture used to leverage
SIM-based authentication.

- 24.109 Bootstrapping interface (Ub) and NAF interface (Ua)

Describes how the GBA authentication is used with, e.g., HTTP.


3GPP Specific Services
======================

- 22.072: Call Deflection
- 22.081: Line Identification
- 22.082: Call Forwarding
- 22.083: Call Waiting and Call Hold
- 22.084: Multiparty (MPTY)
- 22.085: Closed User Group
- 22.086: Advice of Charge
- 22.088: Call Barring
- 22.090: Unstructured Supplementary Service Data (USSD)
- 22.091: Explicit Call Transfer


ETSI Card Application Toolkit (Sim Toolkit)
===========================================

- 102.223: Card Application Toolkit (CAT)

Describes the core functionality of CAT, but does not describe network
technology specific features (e.g. UMTS/CDMA).

- 102.384: Card Application Toolkit (CAT) conformance specification

Describes test methodology and test cases for 102.223.



Core 3GPP2 Specifications
========================
- C.R1001-G: Administration of Parameter Value Assignments for cdma2000
Spread Spectrum Standards - Release G

Describes the value of various parameters that defined in other specifications

- C.S0015-B: Short Message Service (SMS) for Wideband Spread Spectrum Systems

Describes the SMS service(include broadcast short message)in detail. providing
delivery of text and numeric information for paging, messaging, and voice mail
notification.

- C.S0023-D: Removable User Identity Module for Spread Spectrum Systems

Describes the contents of the R-UIM, R-UIM initialization procedures, functions,
commands, file architecture and the coding of elementary files.

- C.S0035-A: CDMA Card Application Toolkit (CCAT)

Describes the core functionality of CCAT.

- S.R0006-000 Wireless Features Description

Describes the general definitions and concepts of a subset of wireless features.

- S.R0006-100 Wireless Features Description: General Background and Assumptions

Describes the general background and assumption of wireless features.

3GPP2 Wireless Features Description
===================================
- S.R0006-501: Call Delivery
- S.R0006-502: Call Forwarding--Busy
- S.R0006-503: Call Forwarding--Default
- S.R0006-504: Call Forwarding--No Answer
- S.R0006-505: Call Forwarding--Unconditional
- S.R0006-506: Call Transfer
- S.R0006-507: Call Waiting
- S.R0006-508: Calling Number Identification Presentation
- S.R0006-509: Calling Number Identification Restriction
- S.R0006-510: Conference Calling
- S.R0006-511: Do Not Disturb
- S.R0006-512: Flexible Alerting
- S.R0006-513: Message Waiting Notification
- S.R0006-514: Mobile Access Hunting
- S.R0006-515: Password Call Acceptance
- S.R0006-516: Preferred Language
- S.R0006-517: Priority Access and Channel Assignment
- S.R0006-518: Remote Feature Control
- S.R0006-519: Selective Call Acceptance
- S.R0006-520: Subscriber PIN Access
- S.R0006-521: Subscriber PIN Intercept
- S.R0006-522: Three-Way Calling
- S.R0006-523: Voice Message Retrieval
- S.R0006-524: Voice Privacy
- S.R0006-525: Asynchronous Data Service
- S.R0006-526: Calling Name Presentation
- S.R0006-527: Calling Name Restriction
- S.R0006-528: Data Privacy
- S.R0006-529: Emergency Services
- S.R0006-530: Group 3 Facsimile Service
- S.R0006-531: Network Directed System Selection
- S.R0006-532: Non-Public Service Mode
- S.R0006-533: Over-the-Air Service Provisioning
- S.R0006-534: Service Negotiation
- S.R0006-535: User Group
- S.R0006-536: Group 3 Analog Facsimile Service
- S.R0006-601: Short Message Delivery - Point-to-Point Bearer Service
- S.R0006-602: Wireless Features Description: Wireless Messaging Teleservice
- S.R0006-603: Wireless Features Description: Wireless Paging Teleservice
- S.R0006-701: Wireless Features Description: Mobile Station Functionality
- S.R0006-801: Wireless Features Description: System Functionality
- S.R0006-802: Wireless Features Description: Subscriber Confidentiality
- S.R0006-803: Wireless Features Description: Network Services
- S.R0006-804: Wireless Features Description: Enhanced Security Services
- S.R0006-805: Wireless Features Description: CDMA Packet Data Service
- S.R0006-806: Wireless Features Description: Over-the-Air Parameter Administration
- S.R0006-807: Wireless Features Description: Generic Broadcast Teleservice Transport
Capability: Network Perspective
- S.R0006-808: Wireless Features Description: Circuit Switched Call Precedence Over
CDMA Packet Data Session

Common PCN Handset Specification (CPHS)
=======================================

This specification includes certain pre-standard extensions to GSM
standards. oFono implements some of the features found in the Phase 2
specification, version 4.2.

The specification itself is not publicly available.

Bluetooth Specifications
========================
- Dial-up Networking Profile - Bluetooth specification version 1.1 - 22 February 2001