Commit Graph

8330 Commits

Author SHA1 Message Date
Alexander Couzens 45eddec130 NOT-FOR-MERGE: ignore disconnecting network interface
when moving a wwanX interface to a lxc container ofono gets "remove" event.
Ignoring the "remove" events allow this to work without ofono is removing
the whole modem
2018-09-15 22:19:25 +02:00
Alexander Couzens b494ae129d NOT_FOR_MERGE: decode qmi messages with libqmi 2018-03-14 14:23:09 +01:00
Alexander Couzens 42c8c218f7 NOT-FOR-UPSTREAM: ofono.service.in: enable debug output 2018-03-14 14:23:09 +01:00
Alexander Couzens cb55875b77 NOT-FOR-UPSTREAM: ofono.serivce.in: add quad_modem_power_cycle + Restart=always 2018-03-14 14:23:09 +01:00
Alexander Couzens 06e3d59c79 qmimodem: report the qmimodem bug 2018-03-14 14:23:09 +01:00
Alexander Couzens 2d1549cb62 qmimodem: ensure the modem is registered by check cs and ps state
The modem tells to early it's registered even it hasn't yet received a location
update complete.
2018-03-14 14:23:09 +01:00
Alexander Couzens a036a8185b call gprs_detached_notify 2018-03-14 14:23:09 +01:00
Alexander Couzens 04cf1298f7 atutil.h: remove doublicated ofono_call_compare_by_status() 2018-03-14 14:23:09 +01:00
Alexander Couzens 33b8c365fd [RFC] qmimodem: implement voice calls
The voice_generated.* files is an RFC how files should look like.
They aren't yet generated.
2018-03-14 14:23:09 +01:00
Alexander Couzens 43b593b6d3 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.
2018-03-14 14:23:09 +01:00
Alexander Couzens 19ef04ab46 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.
2018-03-14 14:23:09 +01:00
Alexander Couzens 18fe1d3a0e network: debug output the network time if updated 2018-03-14 14:23:09 +01:00
Alexander Couzens 22e2b74a9d network/ofono_netreg_status_notify: debug output lac and ci
The location are code and cell id is updated at the same time.
2018-03-14 14:23:09 +01:00
Alexander Couzens c2b1a60f67 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.
2018-03-14 14:23:09 +01:00
Alexander Couzens f19a5cc4cb common: create GList helper ofono_call_compare
replaces at_util_call_compare (atmodem) and
call_compare (rild).
2018-03-14 14:23:09 +01:00
Alexander Couzens 0054236e87 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()
2018-03-14 14:23:09 +01:00
Marcel Holtmann 8766cedac6 Release 1.23 2018-03-10 17:15:06 +01:00
Jonas Bonn b4aff8549d qmimodem: release DMS service on radio-settings atom removal 2018-03-07 10:13:32 -06:00
Jonas Bonn 924f37b4b5 qmimodem: release WDS service on GPRS atom removal 2018-03-07 10:13:29 -06:00
Jonas Bonn b7b0b4ab73 qmimodem: get LTE default bearer APN from modem
When an LTE modem registers with the network, a default bearer is
automatically established.  The APN used for this bearer is taken from
whatever default settings the modem has.

The LTE atom takes cares of setting up the default context/profile with
the APN to use.  From there, a default bearer will be established when
the modem registers with the network.  This results in a call to 'Get
LTE Attach Parameters' which tells us what APN the gateway negotiated
with us.

If we can't get the APN, we do what the AT driver does:  pretend the
bearer wasn't established.  This is a reasonable fallback, currently,
because connman can't handle zero-length APN's anyway; the previous
approach of setting the APN to 'automatic' breaks connman badly when it
needs to switch between LTE and non-LTE networks.
2018-03-05 11:33:26 -06:00
Jonas Bonn 12a943866a gobi: add LTE atom
This atom needs to be created in post_sim so that the APN can be
written to the default profile before the modem attempts to use the
setting to connect to the network.
2018-03-05 11:32:47 -06:00
Jonas Bonn f2e38a6b42 qmi: add LTE atom driver
This patch adds an LTE atom for QMI modems.

This atom sets the APN that the LTE default bearer should use when
establishing its PDP context.  This APN needs to be set on the 'default'
profile so the atom queries which profile is the default and resets
it before allowing the APN to be set.

Once configured, the default profile settings are used when the
modem connects to the network; for this reason, the LTE atom needs
to be instantiated in post_sim, before the modem is set online.
2018-03-05 11:32:30 -06:00
Denis Kenzior dca9071ffe sim-auth: Improve pending cleanup on sim_auth_remove 2018-02-28 11:28:54 -06:00
Denis Kenzior d65a2fc377 sim: Do not leak aid_list
==31530== 366 (48 direct, 318 indirect) bytes in 3 blocks are definitely lost in loss record 165 of 186
==31530==    at 0x4C2BF8F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==31530==    by 0x50BB3A3: g_malloc (gmem.c:94)
==31530==    by 0x50D62B4: g_slice_alloc (gslice.c:1025)
==31530==    by 0x50D7A1E: g_slist_prepend (gslist.c:254)
==31530==    by 0x4DD0B3: sim_parse_app_template_entries (simutil.c:1590)
==31530==    by 0x4D2242: discover_apps_cb (sim.c:1509)
==31530==    by 0x45E364: at_discover_apps_cb (sim.c:1579)
==31530==    by 0x49CB5F: at_chat_finish_command (gatchat.c:459)
==31530==    by 0x49DAC7: at_chat_handle_command_response (gatchat.c:521)
==31530==    by 0x49DAC7: have_line (gatchat.c:600)
==31530==    by 0x49DAC7: new_bytes (gatchat.c:759)
==31530==    by 0x49FCEF: received_data (gatio.c:122)
==31530==    by 0x510C2F3: g_io_unix_dispatch (giounix.c:165)
==31530==    by 0x50B2D44: g_main_dispatch (gmain.c:3203)
2018-02-28 11:22:46 -06:00
Denis Kenzior dc59351de6 sim-auth: Do not leak nai
==31530== 88 bytes in 2 blocks are definitely lost in loss record 132 of 186
==31530==    at 0x4C2BF8F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==31530==    by 0x5847B97: vasprintf (in /lib64/libc-2.23.so)
==31530==    by 0x510AE38: g_vasprintf (gprintf.c:316)
==31530==    by 0x50D8BDF: g_strdup_vprintf (gstrfuncs.c:514)
==31530==    by 0x50D8CAA: g_strdup_printf (gstrfuncs.c:540)
==31530==    by 0x4F706B: build_nai (sim-auth.c:660)
==31530==    by 0x4F706B: sim_auth_register (sim-auth.c:738)
==31530==    by 0x4F706B: ofono_sim_auth_create (sim-auth.c:768)
==31530==    by 0x4ACBB4: modem_change_state (modem.c:525)
==31530==    by 0x4AD0CD: sim_state_watch.part.5 (modem.c:720)
==31530==    by 0x4CF6D0: call_state_watches (sim.c:366)
==31530==    by 0x4CF6D0: sim_set_ready (sim.c:1475)
==31530==    by 0x4CF6D0: sim_imsi_obtained (sim.c:1577)
==31530==    by 0x45D868: at_cimi_cb (sim.c:453)
==31530==    by 0x49CB5F: at_chat_finish_command (gatchat.c:459)
==31530==    by 0x49DAC7: at_chat_handle_command_response (gatchat.c:521)
==31530==    by 0x49DAC7: have_line (gatchat.c:600)
==31530==    by 0x49DAC7: new_bytes (gatchat.c:759)
2018-02-28 11:21:45 -06:00
Denis Kenzior 497e38f237 unit: Use sim_app_record_free to avoid memleaks 2018-02-28 11:08:29 -06:00
Denis Kenzior 134b163182 simutil: Add sim_app_record free 2018-02-28 11:08:16 -06:00
Denis Kenzior 984d88492d sim: Fix crash
aid_sessions was not properly reset to NULL when freed:

Program received signal SIGSEGV, Segmentation fault.
__ofono_watchlist_free (watchlist=0x0) at src/watch.c:91
91		for (l = watchlist->items; l; l = l->next) {
(gdb) bt
    func=0x4ceca0 <aid_session_free>, user_data=0x0)
    at /var/tmp/portage/dev-libs/glib-2.50.3-r1/work/glib-2.50.3/glib/gslist.c:878
    free_func=0x4ceca0 <aid_session_free>)
    at /var/tmp/portage/dev-libs/glib-2.50.3-r1/work/glib-2.50.3/glib/gslist.c:172
    at src/sim.c:2605
    user_data=<optimized out>) at plugins/phonesim.c:511
    func=0x49c8a0 <at_notify_call_callback>, user_data=0x7fffffffdbc0)
    at /var/tmp/portage/dev-libs/glib-2.50.3-r1/work/glib-2.50.3/glib/gslist.c:878
    chat=0x7b70b0) at gatchat/gatchat.c:417
2018-02-28 10:44:26 -06:00
Slava Monich b5ad34faab phonebook: Fixed double deletion of merge_list 2018-02-22 09:48:23 -06:00
Christophe Ronco 1df92289d4 udevng: Add modem string SystemPath 2018-02-20 11:09:25 -06:00
Christophe Ronco 895ca91d85 modem: Add SystemPath dbus property 2018-02-20 11:09:11 -06:00
Christophe Ronco 4b1609c2d7 doc: Add SystemPath to Modem interface 2018-02-20 11:08:46 -06:00
Philippe De Swert 31e9b73238 doc: add new DialMemory method to VoicecallManager 2018-02-13 13:09:14 -06:00
Denis Kenzior 1a57d8a92e hfpmodem: Don't use strcat 2018-02-13 13:08:52 -06:00
Philippe De Swert 96508d1e2c hfpmodem: Add memory dialling support
Handle the request to dial from a memory index and send the
correct ATD> sequence to make it happen.
2018-02-13 13:08:33 -06:00
Philippe De Swert 2de1aff6bd voicecall: Add memory location dialing
Implement functionality to allow to  dial favourites/quick contacts over
bluetooth.
2018-02-13 13:05:53 -06:00
Philippe De Swert db7d9bb9dd voicecall: Add support for dialing number at a given memory location
Add a new function to be able to dial numbers from memory/favourites.
2018-02-13 13:01:37 -06:00
Philippe De Swert 08ac5a6e5b voicecall: Rename hfp dialing functions
Calling from memory index is very similar in functionality to dialing
the last called number. So we rename the functions so we can reuse them,
to deal with memory index calling. Function names now also reflect this
is for hfp.
2018-02-13 13:00:39 -06:00
Jonas Bonn e29f9511b1 xmm7modem: drop executable bit from C source file 2018-02-05 10:19:44 -06:00
Marcel Holtmann 82f54044a8 Release 1.22 2018-01-21 18:58:16 +01:00
Denis Kenzior 0e8e7346af simutil: Fix copiler warning
src/simutil.c:1573:3: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
	app.type = GUINT16_FROM_BE(*((unsigned short *)(app.aid + 5)));
2018-01-19 14:12:37 -06:00
James Prestwood 62382e8ac3 unit: fix test-simutil failure
A fixup was made in simauth to fix the AUTS length
and the simutil unit test was never updated to reflect
the length change.
2018-01-19 12:50:53 -06:00
Slava Monich 007a855bab unit: Improve idmap.c unit test coverage
This brings function, line and branch coverage for idmap.c to 100%
2018-01-18 14:41:47 -06:00
Slava Monich 0797b23c5d dbus: Use dbus_validate_path
Instead of __ofono_dbus_valid_object_path
2018-01-18 10:53:28 -06:00
Alexander Couzens f7544d87a3 qmi: add USSD support for MO services 2018-01-16 11:32:03 -06:00
Denis Kenzior 66972ab467 build: Add voice.h to qmi_sources 2018-01-16 11:18:56 -06:00
Alexander Couzens 23dc3cb701 add qmimodem/voice.h to add USSD defines
USSD is part of the QMI voice service.
2018-01-16 11:17:14 -06:00
Slava Monich 72758ef34b sim: Don't submit parallel EFpl reads
In addition to not doing unnecessary SIM I/O, this fixes memory leaks
like this one:

==10096== 74 (56 direct, 18 indirect) bytes in 2 blocks are definitely lost in loss record 1,252 of 1,342
==10096==    at 0x4841BF0: calloc (vg_replace_malloc.c)
==10096==    by 0x4B03117: g_malloc0 (gmem.c)
==10096==    by 0xF83DF: concat_lang_prefs (sim.c)
==10096==    by 0xF8697: sim_efpl_read_cb (sim.c)
==10096==    by 0x12CBF7: sim_fs_op_read_block_cb (simfs.c)
2017-12-08 10:23:35 -06:00
Philippe De Swert 5c0ec25353 voicecall: Fix issue with invalid dbus path
Fix an error message from dbus about the path supplied not being valid.
Related to commit f58e7685b0

ofonod[19107]: src/voicecall.c:voicecall_dial_shortcut() check position
ofonod[19107]: src/voicecall.c:synthesize_outgoing_call() Registering new call: 1
process 19107: arguments to dbus_message_iter_append_basic() were incorrect, assertion "_dbus_check_is_valid_path (*string_p)" failed in file ../../../dbus/dbus-message.c line 2759.
This is normally a bug in some application using the D-Bus library.
2017-12-08 08:26:35 -06:00
Alexander Couzens 070608b899 qmimodem: convert register_net_cb errors into CMEs
Certain modems doesn't support manual registering (gobi 2000).
Translate the error code into ofono error to report a
more detailed debug error message.
2017-12-05 22:06:44 -06:00