Commit Graph

2685 Commits

Author SHA1 Message Date
Alexander Couzens d351ec5027 NOT-FOR-UPSTREAM: ofono.service.in: enable debug output 2019-03-25 14:38:04 +01:00
Alexander Couzens 8e11828ff5 NOT-FOR-UPSTREAM: ofono.serivce.in: add quad_modem_power_cycle + Restart=always 2019-03-25 14:38:04 +01:00
Alexander Couzens 5326d5d19d call gprs_detached_notify 2019-03-25 14:38:04 +01:00
Alexander Couzens ff5dd1f6a1 common,atmodem: rename & move at_util_call_compare_by_id to common.c
at_util_call_compare_by_id is used by several modem drivers.
2019-03-25 14:38:04 +01:00
Alexander Couzens dc8ee604db common,atmodem: rename & move at_util_call_compare_by_status to common.c
at_util_call_compare_by_status is used by several modem drivers.
2019-03-25 14:38:04 +01:00
Alexander Couzens 9bcebfde29 network: debug output the network time if updated 2019-03-25 14:38:04 +01:00
Alexander Couzens ad483b2b6b network/ofono_netreg_status_notify: debug output lac and ci
The location are code and cell id is updated at the same time.
2019-03-25 14:38:04 +01:00
Alexander Couzens 28ed01a745 add call-list helper to manage voice call lists
Many drivers asks the modem for a complete call list of current calls.
These list of calls can be feeded into call-list which parse the
list and notify ofono for new calls.
2019-03-25 14:38:04 +01:00
Alexander Couzens 4cd5716ba5 common: create GList helper ofono_call_compare
replaces at_util_call_compare (atmodem) and
call_compare (rild).
2019-03-25 13:11:33 +01:00
Alexander Couzens e86936d04e gprs/pri_set_apn: only call dbus function when msg is given
Otherwise dbus is trying to operate on a null-pointer resulting in an abort()
2019-03-25 12:31:14 +01:00
Anirudh Gargi e54ac6bcd4 sim: fix segfault in sim atom
While adding the sim pin cache feature, pin_name could cause issue in
cases when sim pin is not there.

log:
ofonod[27810]: drivers/atmodem/sim.c:at_cpin_cb() crsm_pin_cb: READY
ofonod[27810]: src/sim.c:sim_pin_query_cb() sim->pin_type: 0, pin_type: 0
ofonod[27810]: Aborting (signal 11) [./src/ofonod]
ofonod[27810]: ++++++++ backtrace ++++++++
ofonod[27810]: #0  0x7fb7a7586cb0 in /lib/x86_64-linux-gnu/libc.so.6
ofonod[27810]: #1  0x7fb7a7693cd8 in /lib/x86_64-linux-gnu/libc.so.6
ofonod[27810]: #2  0x4d899b in sim_pin_query_cb() at src/sim.c:3174
ofonod[27810]: #3  0x4649e7 in at_cpin_cb() at drivers/atmodem/sim.c:1304
ofonod[27810]: #4  0x4a5d70 in at_chat_finish_command() at gatchat/gatchat.c:462
2019-03-07 10:24:54 -06:00
Antara Borwankar 608c683250 gprs-context: Adding get function for inteface
Added definition of get function to get interface value in
gprs-context
2019-02-21 11:00:04 -06:00
Philippe De Swert 45efc2354e common: Add new NB-IoT technologies
Add lte-cat-m1 and lte-cat-nb1 technology identifiers.
2019-02-17 21:18:54 -06:00
Denis Kenzior 13c0e25eb2 gprs: Let gprs_context interface be settable once
This patch allows a driver to set the interface only once, instead of at
every context activation.  The previous way was originally designed for
PPP and RAW_IP based contexts which would have a (potentially)
differently named interface after each context activation due to use of
TUN/TAP.  This also worked for static high-speed interface setups as
well, since these usually had a single interface only.

For devices that support multiple high-speed interfaces it would be
advantageous to have each gprs_context get an interface assignment right
in the modem driver and skip having to setup the interface on every
activation.
2019-02-11 17:51:16 -06:00
Nandini Rebello 55e5a766f2 modem: add support to clear cached pins.
If the modem is powered off via D-Bus, clear any cached PINs to make
sure that automatic PIN entry behavior is not activated.
2019-01-23 17:49:53 -06:00
Denis Kenzior 3152c59455 sim: Fix memory leaks introduced by sim pin caching 2019-01-23 17:49:49 -06:00
Nandini Rebello f36d6d05cc sim: Sim PIN1 cache upon modem reset/crash
Adding SIM PIN caching feature to oFono. oFono now caches the SIM PIN1
type against the ICCID throughout its lifetime in a link list and
enters implicitly upon modem reset/crash.

Note, that this behavior can violate 3GPP spec 21.111, section 5.3 -
User Data stored in ME if that section is interpreted very strictly.
However, our interpretation is that firmware resets are allowed, based
on historic precedent.  Helps in user experience by not barring out
cellular services unless pin is entered manually.

Handles cases of incorrect pin and sim pin changed externally.
Clear cached PIN incase modem disabled manually and selectively when
sim is removed.

Seperate 'pin_cache_enter_cb' added without dbus calls to handle
implict entering of cached pin.

For now this behavior is applicable to all modems by default.  In the
future it may be needed to make this behavior opt in or otherwise
configurable.
2019-01-23 17:44:31 -06:00
Denis Kenzior dbc314ebc4 stkutil: Fix ofono_bool_t usage
The actual datatype is bool
2019-01-18 08:55:52 -06:00
Denis Kenzior c3fdf6a7c5 gprs: Fix allocation of context id
After the convertion to l_uintset, the creation of new contexts fails
due to a range error being returned from l_uintset_find_unused().

The error happens because the uinset is created with a min-value of 1,
but the start-value passed to l_uintset_find_unused() is initialized as
0.

Reported-by: Martin Hundebøll <martin@geanix.com>
2019-01-03 17:17:21 -06:00
Denis Kenzior 9601ff5331 stkutil: Use standard types 2018-12-29 15:26:37 -06:00
Denis Kenzior 27c9952f86 stkutil: Convert away from glib datatypes 2018-12-29 14:14:51 -06:00
Denis Kenzior c3d5ccbe53 stkutil: Use l_queue instead of GSList 2018-12-28 18:12:21 -06:00
Denis Kenzior 22002d142c stkutil: Use l_queue instead of GSList 2018-12-28 13:48:34 -06:00
Denis Kenzior 4927905db4 stkagent: Use bool instead of gboolean / ofono_bool_t 2018-12-28 13:47:41 -06:00
Denis Kenzior caeb1650a1 util: Remove last glib uses 2018-12-27 18:18:51 -06:00
Denis Kenzior 9d18385e5f util: Remove encode_hex 2018-12-27 18:18:51 -06:00
Denis Kenzior d793b291b3 util: Remove decode_hex 2018-12-27 18:18:51 -06:00
Denis Kenzior f7d8edeaac stkutil: Convert stk_image_to_xpm to ell 2018-12-27 18:18:51 -06:00
Denis Kenzior 1d08969613 stkutil: Convert stk_text_to_html to use ell 2018-12-27 18:18:51 -06:00
Denis Kenzior b66abb4902 stkutil: Use l_malloc 2018-12-27 18:18:51 -06:00
Denis Kenzior 4059d4226b util: Switch character conversions to ell
Switch various conversions from GSM/UCS2 to UTF8 from glib based
implementation over to ell.

This also converts all related g_free calls to l_free calls (though in
the end they are equivalent calls to free)
2018-12-27 18:18:51 -06:00
Denis Kenzior 44415e754b smsutil: Use l_utf8_from_utf16 instead of g_convert 2018-12-27 18:18:51 -06:00
Denis Kenzior 9c7a87673a util: Use l_utf8_to_ucs2be instead of g_convert 2018-12-27 18:18:51 -06:00
Denis Kenzior 5229080d92 util: Use ell in convert_utf8_to_gsm 2018-12-27 18:18:51 -06:00
Denis Kenzior c4ed942e40 util: use ell in convert_ucs2_to_gsm_with_lang 2018-12-27 18:18:51 -06:00
Denis Kenzior d5f117be80 util: Convert pack7_bit / unpack_7bit to use l_malloc 2018-12-27 18:18:51 -06:00
Denis Kenzior 70c70a67b0 util: Use bool instead of gboolean 2018-12-27 18:18:51 -06:00
Denis Kenzior 674b28f150 util: Use L_ARRAY_SIZE instead of TABLE_SIZE 2018-12-27 18:18:51 -06:00
Denis Kenzior 506243ef67 idmap: Remove
This has now been replaced by l_uintset
2018-12-19 14:46:08 -06:00
Denis Kenzior ab55f2f811 gprs: Use l_uintset instead of idmap 2018-12-19 14:46:08 -06:00
Antara Borwankar 20b1e957cb xmm7modem: modified ofono.conf for coex agent
Added coex agent interface to ofono.conf
2018-12-13 10:11:23 -06:00
Marcel Holtmann 6f431e2d70 main: Remove leftover HAVE_ELL conditions 2018-11-01 20:54:37 +01:00
Jonas Bonn 652a717f3a modem: global data is pre-zeroed
Module-local and global data are BSS symbols and don't require
zero-initialization.
2018-10-29 14:04:50 -05:00
Jonas Bonn ec3c6c67af stkutil: remove test for impossible condition
'string' is an array and therefore never NULL so this test always fails.
2018-10-29 13:59:19 -05:00
Giacinto Cifelli f20da0e7f9 modem: Implement ofono_modem_set_timeout_hint
this patch provides the handling for the modem-depending powered timeout

It provides the trivial implementation for
ofono_modem_set_powered_timeout_hint, introducing the ofono_modem
variable timeout_hint, used together with the existing ofono_modem
variable timeout.

The default value, previously hardcoded as a magic number, is provided
by the DEFAULT_POWERED_TIMEOUT define and set as soon as the
ofono_modem struct is created, and then can be overwritten by the
aforementioned ofono_modem_set_powered_timeout_hint.
2018-10-24 14:32:02 -05:00
Denis Kenzior 2637bfd4ec lte: Add additional sanity checks for username/password 2018-10-22 11:46:08 -05:00
Giacinto Cifelli 924edf03ce lte: protocol and authentication for default ctx
Many LTE networks require user authentication, even for the default
context. In particular, most of the private APNs use this facility
to add some control on top of the MNO providing the service, so that
another user of the same network cannot access the private one.
As such, we add these parameters to the default context
settings that will attempt to use when registering to the network.

The additional parameters added by this patch are:  protocol, user, and
password.  These are sufficient to allow to connect to networks
available to the patch author where ofono previously failed to register
to the network at all.

Co-authored-by: Martin Baschin <martin.baschin@googlemail.com>
Co-authored-by: Denis Kenzior <denis.kenzior@intel.com>
2018-10-22 11:44:29 -05:00
Jonas Bonn 3beeff758d treewide: Remove superfluous use of _GNU_SOURCE
There are a large number of files in the tree that define _GNU_SOURCE
despite not actually using features hidden behind this flag.  This patch
removes all these definitions in one fell swoop...
2018-10-17 10:01:57 -05:00
Nandini Rebello 4f0ba39cbe sms: support 8 national lang in Alphabet property
Adding support for 8 additional languages for GSM 7 bit.
2018-10-15 14:09:07 -05:00
Nandini Rebello d984a59f3d util: adding 8 national sms alphabets
Adding national language tables for hindi,kannada,malayalam,
oriya,punjabi,tamil,telugu and urdu.
2018-10-15 14:07:27 -05:00