Commit Graph

1865 Commits

Author SHA1 Message Date
Denis Kenzior 3ed0a1e077 mbimmodem: Add SMS atom 2017-11-08 21:41:34 -06:00
Denis Kenzior 529d522a00 mbim: Support embedded databuffers
SMS_SEND uses an embedded databuffer inside MBIM_SET_SMS_SEND which
wants to use a local offset (local to the databuffer structure) as
opposed to the offset from the start of the static buffer.
2017-11-08 21:41:31 -06:00
Denis Kenzior 5ef333b363 mbim: Fix incorrectly generating arrays 2017-11-08 21:02:22 -06:00
Denis Kenzior bae2843eac mbim: Add additional sanity checking
For zero element arrays we might inadvertently run past the end of the
iov buffer.  Fix this by adding additional checks that n_elem > 0 and
don't call _iter_get_data unless needed.
2017-11-08 21:02:22 -06:00
Denis Kenzior dc8574ba55 mbim: Support appending byte arrays 2017-11-08 21:02:22 -06:00
Denis Kenzior 79ebe4beb9 mbim: Fix iterator advance logic 2017-11-08 21:02:22 -06:00
Denis Kenzior 2ec8ed30bf mbimmodem: Add netreg driver 2017-11-08 21:02:22 -06:00
Denis Kenzior 689ebc808f mbim: Add MBIM_DATA_CLASS enum 2017-11-08 21:02:22 -06:00
Denis Kenzior 0222e657a0 mbimmodem: Support PIN/PUK operations 2017-11-08 21:02:22 -06:00
Denis Kenzior ecc6332e28 mbim: Fix comment typo 2017-11-08 21:02:22 -06:00
Denis Kenzior 9315d73f62 mbim: Add support for registering to notifications 2017-11-08 21:02:22 -06:00
Denis Kenzior 286e1b0952 hfpmodem: Make sure to NULL terminate 2017-11-08 21:02:22 -06:00
James Prestwood 44fdcbe97c atmodem: implemented logical access driver API
This moves the logical access API from the simauth
driver to the sim atmodem driver.
2017-11-07 10:55:01 -06:00
Denis Kenzior 64a240015d atmodem: Disambiguate simcom/cinterion spic use 2017-11-07 10:01:57 -06:00
Gabriel Lucas 90a89b2529 gemalto: add PIN retries support in driver
In SimManager, the Retries property isn't used for gemalto modems.
The at command AT^SPIC is used to get the remaining retries left
for the current required password type.

This commit adds the implementation in the SIM driver of the retries
queries.
2017-11-07 09:55:35 -06:00
James Prestwood 0d5faa5adf atmodem: implement new driver APIs for AID sessions
Implementation for open/close channel, list applications,
and session based file read.
2017-11-03 18:28:11 -05:00
James Prestwood c3b2ff945b atmodem: helper for appending the file path to a command
Several file read API's were re-using the same code to append
a file path. This code was moved into a helper API.
2017-11-03 17:52:25 -05:00
Philippe De Swert 57b1afc2e7 hfpmodem: Send last call dialled request
Handle the last call dialled request and send the required AT+BDLN command
for bluetooth HFP profile.
2017-11-03 13:27:22 -05:00
Christophe Ronco 5be941c608 qmi: remove request when it timeouts
When modem does not answer or answers slowly to a discovery request,
a timeout occurs.
In timeout callback, request should be removed from queues to avoid
treating answer if it arrives later.
2017-10-30 09:03:59 -05:00
Slava Monich b26abc8f78 atmodem: Query the list of supported <fac>s from the modem
Not all modems support all <fac>s (particularly, "PS"), let's be polite
and not ask them for the ones they don't support.
2017-10-23 17:24:02 -05:00
Jonas Bonn 35636752ad qmi: support SMS receive on Quectel EC21
The Quectel EC21 does not provide the SMS PDU on the message event
notification.

This patch adds a call to 'raw read' on the message ID from the event
notification if the event notification does not already contain the
message data.

The message data begins with the SMSC length, type, and address so
the TPDU length is adjusted accordingly in the raw_read callback.  This
differs from the way the raw message data is handled in the case
that it is included in the event notification itself.  As I don't have
access to any other QMI modem at this time, I'm can not confirm that
this difference is reasonable.
2017-10-17 09:35:02 -05:00
James Prestwood 1b5e95a32a atmodem: implemented sim-auth functionality in atmodem
Implemented the core API's needed for sim-auth:

list_apps: already implemented
open_channel: Opens a logical channel with +CCHO
close_channel: Closes logical channel with +CCHC
logical_access: Access an opened channel with +CGLA
2017-10-12 15:33:27 -05:00
Denis Kenzior 92296924ff mbim: Add basic SIM driver 2017-10-09 16:37:39 -05:00
Ankit Navik 2518c0e9d2 xmm7modem: Add ims atom driver 2017-10-09 11:39:03 -05:00
Slava Monich 4a2915d52d atmodem: Fix use after free in sim_state_cb
==2941== Invalid read of size 4
==2941==    at 0x69338: sim_state_cb (sim.c:1301)
==2941==    by 0x71DCB: cpin_check_cb (atutil.c:567)
==2941==    by 0xA602B: at_chat_finish_command (gatchat.c:459)
==2941==    by 0xA6277: at_chat_handle_command_response (gatchat.c:521)
==2941==    by 0xA6587: have_line (gatchat.c:600)
==2941==    by 0xA6BB7: new_bytes (gatchat.c:759)
==2941==    by 0xAAFAF: received_data (gatio.c:124)
==2941==    by 0x4AF606F: g_main_dispatch (gmain.c:3154)
==2941==    by 0x4AF606F: g_main_context_dispatch (gmain.c:3769)
==2941==    by 0x4AF658F: g_main_loop_run (gmain.c:4034)
==2941==    by 0xBDDBB: main (main.c:261)
==2941==  Address 0x519c344 is 4 bytes inside a block of size 12 free'd
==2941==    at 0x4840B28: free (vg_replace_malloc.c:530)
==2941==    by 0x71F33: at_util_sim_state_query_free (atutil.c:613)
==2941==    by 0x6930B: sim_state_cb (sim.c:1297)
==2941==    by 0x71DCB: cpin_check_cb (atutil.c:567)
==2941==    by 0xA602B: at_chat_finish_command (gatchat.c:459)
==2941==    by 0xA6277: at_chat_handle_command_response (gatchat.c:521)
==2941==    by 0xA6587: have_line (gatchat.c:600)
==2941==    by 0xA6BB7: new_bytes (gatchat.c:759)
==2941==    by 0xAAFAF: received_data (gatio.c:124)
==2941==    by 0x4AF606F: g_main_dispatch (gmain.c:3154)
==2941==    by 0x4AF606F: g_main_context_dispatch (gmain.c:3769)
==2941==    by 0x4AF658F: g_main_loop_run (gmain.c:4034)
==2941==    by 0xBDDBB: main (main.c:261)
2017-10-05 11:11:13 -05:00
Denis Kenzior 94cefc7cff mbim: Add CIDs from the specification 2017-10-05 11:08:38 -05:00
Denis Kenzior f0c1bdcf88 mbim: Support all types in _mbim_message_build 2017-10-05 11:08:38 -05:00
Denis Kenzior 978752bcd6 mbim: Add devinfo driver
Querying Manufacturer and Model is still not supported
2017-10-05 11:08:38 -05:00
Denis Kenzior cc90b1f71e mbim: Add mbim_device_cancel_group 2017-10-05 11:08:38 -05:00
Denis Kenzior db42e75a9c mbim: Add mbim_device_cancel 2017-10-05 11:08:38 -05:00
Denis Kenzior b5512b2775 mbim: Implement receiving responses 2017-10-05 11:08:38 -05:00
Denis Kenzior f92ca542e7 mbim: Implement sending commands 2017-10-05 11:08:38 -05:00
Denis Kenzior c995e657f4 mbim: Close IO in an idle event 2017-10-05 11:08:38 -05:00
Denis Kenzior 65d6d7d199 mbim: Add is_ready flag 2017-10-05 11:08:38 -05:00
Denis Kenzior b1a089eb0f mbim: Add message_assembly utilities 2017-10-05 11:08:38 -05:00
Denis Kenzior 1d16d4ac4e mbim: Add header & body accessors for mbim-message 2017-10-05 11:08:38 -05:00
Denis Kenzior 0c8199dca5 mbim: Implement MBIM_CLOSE_MSG 2017-10-05 11:08:38 -05:00
Denis Kenzior 076faf21d7 mbim: Implement MBIM_OPEN_MSG 2017-10-05 11:08:38 -05:00
Denis Kenzior 4e058ece2c mbim: Add mbim_device_set_ready_handler 2017-10-05 11:08:38 -05:00
Denis Kenzior d8686704e7 mbim: Rework constructor 2017-10-05 11:08:38 -05:00
Denis Kenzior d8485cb5f4 mbim: Get rid of fd and close_on_unref members
l_io already does this for us
2017-10-05 11:08:38 -05:00
Denis Kenzior fb1641c539 mbim: Add mbim_device_set_max_outstanding 2017-10-05 11:08:38 -05:00
Denis Kenzior 684be2760c mbim: Add mbim_message_get_uuid 2017-10-05 11:08:38 -05:00
Denis Kenzior a12f3c73ac mbim: Add mbim_message_get_cid 2017-10-05 11:08:38 -05:00
Denis Kenzior d9b0bbf69b mbim: Rework mbim_message_new 2017-10-05 11:08:38 -05:00
Denis Kenzior 8c0caf5715 mbim: Add mbim_message_get_error 2017-10-05 11:08:38 -05:00
Denis Kenzior 5f6a0147ba unit: Add phonebook read build test 2017-10-05 11:08:38 -05:00
Denis Kenzior 75993d8edc mbim: Add mbim_message_set_arguments 2017-10-05 11:08:38 -05:00
Denis Kenzior 1ed919c368 mbim: Support for building variable-sized structs 2017-10-05 11:08:38 -05:00
Denis Kenzior 54ff05956c mbim: Add support for building arrays 2017-10-05 11:08:38 -05:00
Denis Kenzior 9ed20413cc mbim: Add _mbim_message_to_bytearray 2017-10-05 11:08:38 -05:00
Denis Kenzior 76c97996f5 mbim: Add _mbim_message_set_tid 2017-10-05 11:08:38 -05:00
Denis Kenzior f66c2fe982 mbim: Add _mbim_message_new_command_done
This is for unit testing purposes
2017-10-05 11:08:38 -05:00
Denis Kenzior 76811bb326 mbim: Add basic message builder support 2017-10-05 11:08:38 -05:00
Denis Kenzior 397079cc13 mbim: Add MBIM service UUID constants 2017-10-05 11:08:38 -05:00
Denis Kenzior 99501a7d1d mbim: Support parsing structures 2017-10-05 11:08:38 -05:00
Denis Kenzior db1a61cd27 mbim: Add support for arrays of fixed-size elements
Variable-sized arrays are handled by using an Element Count followed by
OL_PAIR_LIST.  For fixed size arrays, an Offset followed by Length is
used.
2017-10-05 11:08:38 -05:00
Denis Kenzior 506e77053b mbim: Don't assume 4-byte alignment
This change would make it possible to read individual bytes from ay type
structures.
2017-10-05 11:08:38 -05:00
Denis Kenzior a64b5453e8 mbim: Parse variable sized item arrays 2017-10-05 11:08:38 -05:00
Denis Kenzior b9de1d999f mbim: Add mbim_message_get_arguments 2017-10-05 11:08:38 -05:00
Denis Kenzior 3ee2343803 mbim: Handle extraction of strings 2017-10-05 11:08:38 -05:00
Denis Kenzior 60c9225169 mbim: add _mbim_information_buffer_length_offset 2017-10-05 11:08:38 -05:00
Denis Kenzior f854c8d193 mbim: Add basic message payload parser 2017-10-05 11:08:38 -05:00
Denis Kenzior 3ddbdda745 mbim: Add skeleton mbim-message class 2017-10-05 11:08:38 -05:00
Denis Kenzior 2d4093ae27 mbim: Add MBIM descriptor utilities
Used to find MBIM Functional and MBIM Extended Functional descriptors
2017-10-05 11:08:38 -05:00
Denis Kenzior 1bfa2749cd mbim: Add skeleton mbim_device object 2017-10-05 11:08:38 -05:00
Denis Kenzior ab58196e31 mbimmodem: Add skeleton driver 2017-10-05 11:08:38 -05:00
Christophe Ronco 22adf6402c huawei: add LTE support
Huawei LTE modems use AT^SYSCFGEX and AT^SYSINFOEX instead of
AT^SYSCFG and AT^SYSINFO.
If we want to be able to attach on LTE with this modem, we must use
AT^SYSCFGEX to configure rat mode and band. Using AT^SYSCFG, mode any
means UMTS or GSM.
2017-09-14 20:05:54 -05:00
Denis Kenzior 9405c9733c ifxmodem: Fix minor style issues 2017-09-13 10:28:56 -05:00
Ankit Navik ffbf6159e0 ifxmodem: support automatic context activation
Add support for automatic context activation by adding read_settings.
It also adds detach_shutdown to make sure context is cleaned up when
network registration is lost.
2017-09-13 10:27:32 -05:00
Ankit Navik aadd4668f1 atutil: Add logic for cgcontrdp to get address and netmask 2017-09-13 10:26:35 -05:00
Jonas Bonn fd453816cc qmi: add NetworkMonitor interface
This is a rudimentary implementation that contains technology and RSSI
and BitErrorRate, plus RSRQ/RSRP for LTE networks.  More data can be
added as needed.

This implementations uses the 'Get Signal Strength' QMI method to retrieve
the data.  Operator fields (MNC, LAC, etc) can be gotten from the 'Serving
Cell' method if needed, but since this data is already provided in the
NetworkRegistration object it doesn't seem necessary to repeat it here
when an additional communication to the modem is required.
2017-09-12 12:52:42 -05:00
Joey Hewitt d80b3da897 qmimodem: implement SIM write functions 2017-09-12 12:39:26 -05:00
Alexander Couzens a18c892c64 qmimodem: register callbacks after netreg_register
When registering callbacks before ofono_netreg_register(), callbacks
will use the netreg api which might lead into undefined behaviour,
because certain fields aren't yet initilized.
2017-09-11 10:41:14 -05:00
Nishanth V 4590c695e0 rilmodem: netmon fix missing notify for g_ril_send 2017-09-11 10:37:52 -05:00
Clayton Craft cbac15cdd9 isimodem: Use correct callback for pin status 2017-09-11 10:37:06 -05:00
Nishanth V 25347b9e83 rilmodem: driver changes for netmon agent
Rilmodem driver updated to handle enabling
and disabling periodic serving cell updates
2017-09-08 15:07:06 -05:00
Denis Kenzior 0f2d1278c4 qmimodem: Fix whitespace issue 2017-09-08 09:56:32 -05:00
Jonas Bonn 054323d4ba qmi: provide AvailableTechnologies in radio-settings
This provides the list of available technologies in the radio-settings
atom.  The list is queried by the DMS Get Capabilities method; ofono
takes care of caching the available technologies for us so we don't need
to worry about this method being called excessively.
2017-09-08 09:48:42 -05:00
Alexander Couzens b81bdfe456 qmimodem: extract network time from serving system 2017-09-07 16:50:14 -05:00
Alexander Couzens 8d74986d6e qmimodem: add strength (in %) to the debug output 2017-09-07 16:49:00 -05:00
Jonas Bonn 76689b81d4 qmi: add helper to get int16_t result 2017-09-07 11:57:31 -05:00
Jonas Bonn 4ac537394e qmi: implement RAT selection
The QMI radio-settings atom was just a skeleton and did not even implement
the mandtory property TechnologyPreference.  As such, it probably should
never even have been registered for the modem.  Nonetheless, this patch
puts this mandatory property into place.

This is implemented via the 'Set System Selection' method by way of the
'mode' parameter.  This seems to best reflect the intention of the Ofono
API and works as expected when tested with a Quectel EC21.

Some notes:
i)  There is an alternative function called 'Set Technology Preference'
    which provides similar functionality.  This 'technology preference'
    is updated automatically when the 'system selection mode' is modified
    so everything seems to be in order.
ii) For the EC21, switching the underlying technology works seamlessly.
    There are indications, however, that some modems _might_ require a
    reset before changes take effect; that bridge will need to be crossed
    if reached.
2017-09-07 11:54:25 -05:00
Christophe Ronco b3e4837641 atmodem: correctly report lte bearer for huawei modems 2017-09-07 11:41:01 -05:00
Ankit Navik 2640e0a882 Add support for Intel xmm7xxx series modem driver
This adds driver as xmm7modem for radio-settings
2017-09-05 10:48:00 -05:00
Ankit Navik 7df48a5107 atmodem: Add lte atom driver
Adds atmodem driver for setting the default APN command.
The default APN is manage by config storage.
2017-09-05 10:44:22 -05:00
Matthijs Kooijman 8d690efa83 at/cdma/ifxmodem: Use /dev/net/tun to check for TUN support
Previously, these drivers would check /sys/devices/virtual/misc/tun to
see if TUN is supported, and bail out otherwise. However, the tun module
can sometimes be autoloaded by opening the /dev/net/tun file. In this
case the /dev file already exists, but the /sys file only gets created
after the modul is loaded.

Additionally, the ppp code does not use the /sys file, but only the
/dev file, so checking for the existence of the latter seems a better
indicator of expected success.
2017-08-22 23:24:59 -05:00
Alexander Couzens fb17995721 qmi/sms: require WMS version >= 1.2 for bearer calls
I've never seen a major 0 service. The gobi2000 comes with
WMS 1.0 and doesn't support the bearer command. Guessing
it's 1.2 required.
2017-08-22 10:38:14 -05:00
Alexander Couzens 49a7d0aa1b qmimodem: use a default RAT when registering
When registering to an operator ofono uses the old RAT.
In the case the modem is not connected to any network, this would use
QMI_NAS_NETWORK_RAT_NONE which results in the error OP_DEVICE_UNSUPPORTED.

Use QMI_NAS_NETWORK_RAT_NO_CHANGE instead to not define any preference.
2017-08-07 13:50:03 -05:00
Marcel Holtmann 9cdcf72994 ifxmodem: Fix GPRS activation command string buffer size 2017-07-11 10:43:59 -07:00
Marcel Holtmann 339e874212 telitmodem: Fix GPRS activation command string buffer size 2017-07-11 10:43:23 -07:00
Marcel Holtmann 6c936db4ae atmodem: Fix missing break statement for ublox driver 2017-07-11 10:42:59 -07:00
Alexander Couzens 417af0eaf2 qmimodem/sms: don't check for free ME space on receive
If the ME storage is full, the modem will reject new messages
with a SMPP RP-Error 'Protocol error, unspecific'.
It seems the qmimodem is first checking the ME storage for
free space, then deliver the SMS via QMI and not saving it
to the ME anyway.
Using QMI_WMS_STORAGE_TYPE_NONE it doesn't check for free space.

Tested-on: Quectel EC20
2017-05-30 17:31:25 -05:00
Alexander Couzens b5cc57775f qmimodem: add debug helper qmi_result_print_tlvs
qmi_result_print_tlvs prints the type and length field
of a result to DBG()
2017-05-30 17:29:13 -05:00
Denis Kenzior 2d6c4f9d02 qmi: Fix invalid memory access
When qmi_device_shutdown is used and the callback provided utilizes
qmi_device_unref, an access into already freed memory is triggered.

Sequence of events is:

1. timeout fires
2. glib calls timeout callback (e.g. shutdown_callback) which in turn
calls shutdown_func (gobi shutdown_cb) which in turn calls
qmi_device_unref()
3. qmi_device_unref calls g_source_remove, which doesn't call the
destroy callback (it is blocked)
4. qmi_device_unref then frees the memory used by device
5. glib then calls the source destroy callback (e.g. shutdown_destroy)
which results in just freed memory being used.

glib appears to always call the destroy callback, even if the source has
been removed previously.  So to work around the issue, delay the actual
g_free until the destroy callback is invoked.
2017-05-11 14:41:43 -05:00
Jonas Bonn f23ea6b45f qmimodem: set APN for LTE default bearer
Apparently, an empty APN in an ofono context means that that the context
cannot be activated.  connman definitely interprets it this way.

This patch sets a default name of "automatic" for the default bearer if
no other LTE APN is supplied (which is currently the case as the LTE
atom is not in place yet).  Without this, connman happily ignores the
context, even though it has been activated by ofono.
2017-05-04 11:00:24 -05:00
Jonas Bonn 4651a70285 qmi: activate default bearer context for LTE networks
When the modem attaches to an LTE network, a default bearer is
automatically negotiated using the "defalt profile" settings.  The
QMI modem, however, does not given any explicit indication that
the bearer exists; instead, we must assume its existence based on
the network registration state.

This patch extends the GPRS atom to signal the presence of a
default bearer when it detects network connectivity on an LTE
network.
2017-05-01 12:12:08 -05:00
Jonas Bonn 10854cb459 qmi: use named status values 2017-05-01 12:08:02 -05:00
Jonas Bonn ea7691f04b qmi: use shared services
Apparently it's not legal to create a QMI service multiple times for
a device.  I've been testing with a Quectel EC21 and here it works fine
to do so, but the general case would require "shared" services across
atoms.

This patch switches the users of the NAS and WDS services over to using
a "shared" service instead of each instatiating their own instance.
2017-05-01 12:07:41 -05:00
Jonas Bonn 81cb808daf qmi: watch packet status for spontaneous disconnection only
There are three principal ways for a context to become disconnected:

i)  deactivate_primary() is called
ii)  the network registration is lost and the context is cleaned up
via _detach_shutdown() (via release_all_contexts())
iii) the network decides to disconnect the context

We need to watch the packet status in order to detect case iii).  For
case i) and ii), stop_net will be called, the pkt_handle will be
cleared, and subsequent packet status notifications be ignored.

This patch makes it so that the packet status "disconnected" event
is only propagated when the pkt_handle has not been cleared, indicating
an unrequested disconnection.

This should fix a race reported by Christophe Ronco whereby the packet
status disconnect notification is called between activate_primary
(start_net) and it's callback (start_net_cb).
2017-05-01 12:05:54 -05:00
Vincent Cesson 0e7add9447 atmodem: Fix SMS reception for Gemalto modems
SMS reception is not working for Gemalto modems because of +CMT parsing.
PDU length is the first argument of +CMT URCs in Gemalto modems.

Add a switch case on vendor info to handle Gemalto case.
Also handle acknowledgment, +CNMA takes only one parameter.

CMT parsing is moved from at_parse_cmt() to at_cmt_notify(). This
function is modified to match the style of at_cmgr_notify() and it
includes a switch case for CINTERION modems.
2017-04-21 11:02:05 -05:00
Jonas Bonn d6704223d8 qmi: move rat_to_tech() into own module
We want to use this function from multiple atoms so this patch moves
it out to its own module for NAS-related helper functions.
2017-04-18 09:48:04 -05:00
Jonas Bonn c0273f9d85 qmi: add missing header inclusion 2017-04-18 09:47:39 -05:00
Jonas Bonn 27b527c4f9 qim: use named status value 2017-04-17 12:11:40 -05:00
Jonas Bonn 949f968676 qmi: implement detach_shutdown method
The detach_shutdown method is invoked to unconditionally release
an active context.  For QMI, this is equivalent to a call to
deactivate_primary.

This patch makes the callback to deactivate_primary optional and
implements detach_shutdown to simply call it.  When there is no
callback, the stop_net callback notifies ofono about the context
release via an asynchronous ofono_gprs_context_deactivated() call.
2017-04-17 12:09:48 -05:00
Jonas Bonn f0f5a19af5 qmi: free cb_data on error
...and move allocation of structure up to variable declarations to
match the pattern used elsewhere in the code.
2017-04-17 12:07:43 -05:00
Jonas Bonn 91b89f472f qmi: read_settings needs to call start network
For LTE networks, a default bearer is automatically activated when
the modem registers to the network.  QMI modems, however, do not
automatically enable the network interface just because the bearer
exists; a call to "start network" needs to be made in order to
get the packet handle before get_settings will return any data and
the network interface can be configured.

This patch makes read_settings call "start network" in order to
enable the interface for the default bearer.  No new bearer will
be created with this call and the settings for the bearer will come
from the default profile, irregardless of what parameters are passed
to the "start network" method.
2017-04-14 17:54:29 -05:00
Jonas Bonn ad39b9003b qmi: fix typo 2017-04-14 16:49:31 -05:00
Jonas Bonn 71372ba0b3 qmi: duplicate callback data correctly 2017-04-14 16:44:05 -05:00
Denis Kenzior 7a2e198fd7 qmi: Use destroy callback for context activate 2017-04-11 12:01:15 -05:00
Denis Kenzior f29a316c91 qmi: Use destroy callback for context deactivate
This ensures that cbd will be freed even if the device is hot-unplugged.
Also, this fixes a memory leak on the failure path inside stop_net_cb
2017-04-11 12:01:06 -05:00
Jonas Bonn ef9af151ee qmi: implement read_settings for automatic contexts
For LTE, a context is created automatically when the modem registers
to the network.  The read_settings function is called for these
automatic contexts to get their configuration.
2017-04-11 11:45:41 -05:00
Jonas Bonn 475b789f3d qmi: retrieve GPRS context parameters
The GPRS context needs to be configured with connection parameters when
the bearer has been established.  This was only partially implemented, so
this patch adds additional parameters to those passed to the context.
2017-04-11 11:43:16 -05:00
Jonas Bonn 55bd639ae1 qmi: add WDS parameter definition 2017-04-11 11:22:29 -05:00
Jonas Bonn a0b3a8e0b8 qmi: NAS definitions adjustment
Calling the ps_state/cs_state alternatives *ATTACH_STATUS* was confusing
because there is also a status field in the *serving_system structure.
This patch does a minor rename and adds the appropriate definitions for
the status field.
2017-04-11 10:22:57 -05:00
Denis Kenzior 829fc23137 qmi: Fix qmi_device_shutdown
qmi_device_shutdown allocated a new orphaned data structure and kicked
off a timeout to wait for the shutdown to complete.  The logic was quite
racy, but the main issue was that the timeouts could not be canceled
when the underlying qmi_device object was destroyed.  This resulted in
crashes.

This patch switches to first-past-the-gate mechanism.  Since only the
modem driver should be issuing a qmi_device_shutdown call, this should
not be a limitation.  The shutdown source is then tracked on the
qmi_device object itself and is canceled when the qmi_device object is
freed.

As an added bonus, the shutdown_destroy callback should now actually
function.  Before it was simply never called.
2017-04-04 10:24:13 -05:00
Denis Kenzior 2701dd8919 qmi: Optimize structure allocations
struct discovery was allocated for every discovery procedure that was
kicked off, which itself allocated a structure.  This patch uses a
class/subclass concept to only allocate a single structure per discovery
procedure.
2017-04-03 12:56:26 -05:00
Jonas Bonn 1e39a9d26d qmi: fix bad lookup and double free
This function was never removing discovery instances because it was looking
them up in the wrong list.  This led to some strangeness with the discovery
callbacks being invoked after the "failure" timeout of 5 seconds and
consequent failures with everything getting out of sync.

With this patch we fix the lookup to use the correct queue.  There's also
a double-free in the function that was never being hit before because the
lookups never succeeded; fix that as well.

With this, service discovery and creation work as expected when testing with
an EC21.
2017-04-03 09:23:53 -05:00
Jonas Bonn 529afeb67f qmi: add service ID's 2017-04-03 09:23:53 -05:00
Lukasz Nowak 81a54c5a47 atmodem: telit - re-attach gprs automatically
Telit AT modem firmware (tested with UE910-EUR) generates
+CGREG: 0\r\n\r\n+CGEV: NW DETACH
after a context is de-activated and ppp connection closed.
Then, after a random amount of time (observed from a few seconds
to a few hours), an unsolicited +CGREG: 1 arrives.
Attempt to fix the problem, by sending AT+CGATT=1 once.
This does not re-activate the context, but if a network connection
is still correct, will generate an immediate +CGREG: 1.
2017-03-29 10:01:50 -05:00
Denis Kenzior 4c46605f6b qmi: track discovery tasks so clean up is possible
There are various device & service discovery tasks that are initiated
based on a qmi_device object.  qmi_device object does not currently
keep track of these tasks.  Unfortunately the qmi_device object can
go away at any time, and these tasks can become orphaned.

The result of this can lead to crashes.  E.g. a discovery task timeout fires
after the qmi_device object has been destroyed.  Since the object is no
longer valid, any accesses to it will likely result in a SEGFAULT.

This patch attempts to track all discovery tasks on the qmi_device
object itself, so that they can be cleaned up properly.  This patch does
not handle the qmi_device_shutdown functionality.
2017-03-28 14:21:07 -05:00
Jonas Bonn f3911b1669 qmimodem: add WDA service string 2017-03-25 16:01:21 -05:00
Jonas Bonn c548fe2eb5 qmimodem: fix typo 2017-03-25 16:01:06 -05:00
Lukasz Nowak 078582d567 qmimodem: detect utf-8 string as operator name
Telit QMI modems can return non-utf-8 characters in plmn-desc.
Observed with LE910-SVG and Verizon. When that happens, libdbus
will abort ofono.
If non-utf-8 characters are detected, use mccmnc string.
2017-03-23 10:26:30 -05:00
Lukasz Nowak 4219fcf7bc qmimodem: read ss_info at probe time
LTE modems (observed with Telit LE910 V1) can power on
already registered to a network. In that case, the SS_INFO
change notification will never arrive, and the gprs driver
will never be marked as attached.

To avoid this situation, read SS_INFO at probe time, and if
registered, mark the gprs driver as attached.
2017-03-23 10:25:23 -05:00
Denis Kenzior 8559a29d77 qmimodem: Fix warning
This was introduced by the previous patch:
drivers/qmimodem/devinfo.c: In function ‘get_ids_cb’:
drivers/qmimodem/devinfo.c:129:14: error: implicit declaration of function ‘strcmp’ [-Werror=implicit-function-declaration]
  if (!str || strcmp(str, "0") == 0) {
2017-03-23 10:24:34 -05:00
Lukasz Nowak a2a8e71db2 qmimodem: telit LE910 V1 - fix ESN string
Telit QMI modems report "0", rather than a NULL string,
if ESN is not available.
2017-03-23 10:23:50 -05:00
Christophe Ronco 89c92e7277 qmimodem: fix sim file reading on MC7304
Command read_file_info on MC7304 always fails.
Using qmicli or AT command, I am able to read file info.
Qmicli command is:
qmicli -d /dev/cdc-wdm0 --uim-get-file-attributes=0x3f00,0x7fff,0x6fad
[(null)] Successfully got file '/dev/cdc-wdm0' attributes from the UIM:
Card result:
        SW1: '0x90'
        SW2: '0x00'
File attributes:
        File size: 4
        File ID: 28589
        File type: transparent
        Record size: 0
        Record count: 0
        Read security attributes: (always) (null)
        Write security attributes: (single) adm
        Increase security attributes: (always) (null)
        Deactivate security attributes: (single) adm
        Activate security attributes: (single) adm
        Raw:    62:17:82:02:41:21:83:02:6F:AD:8A:01:05:8B:...

After a check of parameters sent by qmimodem driver and qmicli,
the only difference is on parameter "Session Information".
Session type sent by qmimodem driver is 'Card on slot 1'.
Session type sent by qmicli command is 'primary-gw-provisioning'.
Changing session type in qmimodem driver fixed problem (on this modem).

Comparing with what is done by qmili command
2017-02-17 11:16:54 -06:00
Christophe Ronco 8e929df4f5 atmodem: use ATD99 to enter data state when needed
Some modems do not support AT+CGDATA="PPP",X to enter data state.
Use AT+CGDATA=? to detect these modems and for them use ATD*99***X#
to enter data state.
2017-02-16 11:52:49 -06:00
Denis Kenzior 149002c110 rilmodem: Fix warning
drivers/rilmodem/stk.c: In function ‘ril_stk_probe’:
drivers/rilmodem/stk.c:210:18: error: ‘data’ is used uninitialized in
this function [-Werror=uninitialized]
  struct cb_data *cbd = cb_data_new(stk, NULL, data);
2017-02-07 11:05:09 -06:00
Antara Borwankar 058a293de6 rilmodem: Send needed RIL request for stk init
sending RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING after
stk atom is created so that modem will inititialize
sim toolkit by sending terminal profile to sim.
2017-02-07 10:56:46 -06:00
Christophe Ronco cf3835f0f3 qmimodem: change kernel driver data format if needed
During gprs-context driver probe function, check kernel device driver
data format and modem low level data format.
If they are different, align kernel device driver data format on
modem low level data format.
If an error occurs during this process, continue probing without error.
This is inspired by what is done in qmicli and qmi-network (package
libqmi).
2017-02-02 11:48:38 -06:00
Denis Kenzior 0fbc802845 qmi: Fix typo 2017-02-02 11:41:36 -06:00
Christophe Ronco 8dffd365a2 qmimodem: get/set kernel device driver data format
Add a way to get and set data format expected by kernel device driver.
This is inspired by what is done in qmicli (package libqmi).
It does not use QMI protocol but a sysfs exported by kernel driver.
To use this feature, kernel version must be equal or more than 4.5.
2017-02-02 11:41:27 -06:00
Piotr Haber bf3890a445 telitmodem: support for CDC-NCM network adapter
Network Control Model is a new Communication Device Class
protocol for exchanging Ethernet frames over USB.
NCM is intended to be used with high-speed network
attachments such as HSDPA and LTE data services.
2017-01-27 20:35:50 -06:00
Piotr Haber 50f1dfcb24 qmimodem: send authentication credentials
Pass authentication method, user and password
to QMI WDS service.
2017-01-26 09:21:07 -06:00
Piotr Haber c493491c1a atmodem: add LTE to Telit #PSNT status parser
Network type of 4 in Telit #PSNT command response
denotes LTE network
2017-01-25 10:00:07 -06:00
Vincent Cesson c0c7c92a82 drivers: Add gemaltomodem driver to handle GNSS
Add a new location-reporting driver for Gemalto Cinterion modems based
on telit implementation + use it in gemalto plugin. It supports
activation of GNSS engine (Request) with command AT^SGPSC. This driver
is tested on PHS8. NMEA frames are accessible on /dev/ttyUSB1.
2017-01-19 13:34:36 -06:00
Christophe Ronco d6866f2f90 qmimodem: query_passwd_state can be retried
Retry command QMI_UIM_GET_CARD_STATUS during query_passwd_state if a
temporary error status has been detected.
This happens with a MC7430 modem when query_passwd_state is called just
after PIN is entered.
2017-01-16 22:25:23 -06:00
Vincent Cesson 4edc9fd57f atmodem: Fix CGDCONT result parsing.
CGDCONT result parsing fails if first list contains several ranges. For
example with modem Cinterion PHS8:

 AT+CGDCONT=?
 +CGDCONT: (1-17,101-116),"IP",,,(0),(0-4)

Solution: read first range and jump to second list instead of trying to
close the brackets.
2017-01-13 09:38:43 -06:00
Christophe Ronco b4cbe8d41a qmimodem: add pin_send feature
Add ability to send PIN to a QMI modem using QMI_UIM_VERIFY_PIN command.
This has been tested on MC7304 and MC7430 modems.
2017-01-11 09:57:53 -06:00
Christophe Ronco 6a1d111e21 qmimodem: get password state from modem
Password state and number of retries asked to modem using
QMI_UIM_GET_CARD_STATUS command rather than remembered after initial
QMI_UIM_GET_CARD_STATUS command.
2017-01-11 09:57:06 -06:00
Christophe Ronco 2505d96544 qmimodem: Add read_imsi to qmimodem sim driver
Add read_imsi feature to qmimodem sim driver.
This is based on DMS service.
On MC7430, this is mandatory to be able to use this driver for GPRS
connection because reading IMSI via EF reads fails.
2017-01-09 12:31:35 -06:00
Christophe Ronco 567e5ec9fc qmimodem: fix QMI notification messages handling
QMI notification messages handlers are never called on MC7430 without this fix.

- Do not test transaction id before calling notification handler.  On MC7430,
notification messages contain a not null transaction id (starts with 1,
increased at each message for a particular client).
- On MC7304 transaction id in notification messages is always 0.
2016-12-30 18:38:29 -06:00
Christophe Ronco f15c33ed20 qmimodem: fix get signal strength
Get current signal strength (type: 0x01), not list of other signals strength
(0x10)

Without this fix:
- I can't get a signal strength on MC7430 because list does not exist
	(only one signal strength).
- On MC7304, result is wrong
2016-12-30 18:37:30 -06:00
Marko Šulejić a9a477e469 atmodem: fix typo 2016-12-14 11:19:56 -06:00
Ankit Navik 6aa1f1b3be rilmodem: set LTE preferred in rat mode 2016-12-07 10:20:01 -06:00
Ankit Navik 94789031bb rilmodem: Add lte atom driver
Adds rilmodem driver for setting the default APN command.
The default APN is manage by config storage.
2016-12-07 10:20:01 -06:00
Denis Kenzior 3c473979c7 ubloxmodem: Fixup minor style issues
- useless return at the end of a function
- mixed tabs & spaces for indentation
- over 80 characters for the comment
- line > 80 characters due to access technology conversion.  Replaced
  with a direct assignment.
2016-12-01 11:27:21 -06:00
Denis Kenzior 83783a71d8 ubloxmodem: Fix warning
drivers/ubloxmodem/netmon.c: In function ‘req_cb_data_unref’:
drivers/ubloxmodem/netmon.c:131:10: error: ‘return’ with a value, in
function returning void [-Werror]
   return NULL;
2016-12-01 11:23:29 -06:00
Djalal Harouni a21f175ea1 ubloxmodem: add the netmon driver
This adds a netmon driver for ublox. The driver support both +COPS and
+CESQ commands to return the previously added ofono netmon types:

RSCP: Received Signal Code Power
ECN0: Received Energy Ratio
RSRQ: Reference Signal Received Quality
RSRP: Reference Signal Received Power

Current revision makes the driver use ref countig when chaining multiple
AT commands.
2016-12-01 11:21:59 -06:00
Dragos Tatulea eeaabafdee ubloxmodem: tweak to work on different firmware
The U-Blox documentation specifies the following:
* get interface ip and dns from +CGDCONTRDP
* get gw ip and netmask from +UIPADDR

However, different firmware versions have different befaviour:

* On newer firmware, +UIPADDR returns error. But it's possible to configure
gateway ip == ipterface ip (read from CGDCONTRDP).

* On older firmware, we can actually use the commands specified in the
docs.

This patch runs +CGDCONTRDP, configures everything and then tries to run
+UIPADDR. In that works, reconfigures gw ip and netmask.
2016-11-16 11:49:38 -06:00
Dragos Tatulea 5d276f953e ubloxmodem: add lte atom driver
Adds U-Blox Toby L2 driver for setting the default APN via the
+UCGDFLT command. Currently only IPv4 is supported. APN is
not stored to modem's non-volatile memory. oFono will manage this
default APN via it's config storage.

When receiving an empty default APN, the value is reset.
2016-11-15 13:45:35 -06:00
Dragos Tatulea c43e44b154 ubloxmodem: fix memory leak in gprs_context_remove 2016-11-14 11:27:39 -06:00
Santtu Lakkala 54c9068ff2 huaweimodem: Fix DHCP parsing on 32-bit platforms
strtol clamps returned value between INT_MIN and INT_MAX, causing
invalid value (255.255.255.127) being reported for any address
if last octet > 127 when sizeof(long) == 4.
2016-08-10 11:21:56 -05:00
Samrat Guha Niyogi 2ba2ccbee4 rilmodem: fix cbd init in ril_query_facility_lock 2016-08-06 11:06:58 -05:00
Samrat Guha Niyogi cafd98778d rilmodem: fix num_params in query_facility_lock_cb 2016-08-06 11:06:14 -05:00
Denis Kenzior eaed7dd7e9 rilmodem: Co-locate the callback with invocation 2016-08-06 11:05:12 -05:00
Denis Kenzior d2ec4a2309 rilmodem: Co-locate the callback with invocation 2016-08-06 11:04:20 -05:00
Samrat Guha Niyogi 3047fbd87b rilmodem: split ril_pin_change_state_cb
split ril_pin_change_state_cb based on functionality w.r.t.
facility lock, puk and pin. Rename ril_pin_change_state to
more appropriate name ril_set_facility_lock and rename
ril_pin_change_state_cb to ril_enter_sim_pin_cb.
2016-08-06 10:58:29 -05:00
Samrat Guha Niyogi e3f1eae928 rilmodem: Remove unneeded pin sending logic 2016-08-06 10:53:40 -05:00
Nishanth V ba42155a2c rilmodem: fix WCDMA only in query rat mode 2016-05-20 10:16:23 -05:00
Caiwen Zhang 1eec2fc46e rilmodem: add cell broadcast message support 2016-05-19 10:29:33 -05:00
Suman Mallela 9a584ae2bb rilmodem: Fix PIN retries logic
The SIM PIN retries were not getting reset when the correct PIN/PUK
was entered.
2016-05-17 09:48:03 -05:00
Caiwen Zhang 008eed357d rilmodem/stk: add STK support for rilmodem 2016-05-03 11:14:28 -05:00
Denis Kenzior 29ff4dc2e4 rilmodem: Remove no longer relevant TODO 2016-04-27 11:14:59 -05:00
Denis Kenzior 5d1702fa0e isi: Change query_locked to query_facility_lock 2016-04-27 11:13:33 -05:00
Denis Kenzior 7d5d131e99 isimodem: Remove unimplemented query_locked method 2016-04-27 11:06:52 -05:00
Denis Kenzior 847df8ee78 atmodem: Change query_locked to query_facility_lock 2016-04-27 11:04:43 -05:00
Denis Kenzior 9809aee40c rilmodem: Fix style 2016-04-27 10:58:13 -05:00
Samrat Guha Niyogi 421351cf57 rilmodem: Implement sim atom query_facility_lock 2016-04-27 10:41:33 -05:00
Denis Kenzior c02a97b207 ril: vendorize SoFiA set_band implementation
Since the set_band implementation uses an OEM hook, it should be wrapped
behind a vendor quirk.
2016-04-25 15:26:35 -05:00
Antara Borwankar 2bb515a6ab rilmodem: Driver code to set band mode and value
set_band driver to set GSM band and UMTS band
2016-04-25 15:16:22 -05:00
John Ernberg 3f12d06b20 stemodem: Use g_slist_free_full 2016-04-22 15:22:07 -05:00
John Ernberg 397102bdc5 rilmodem: Use g_slist_free_full 2016-04-22 15:21:39 -05:00
John Ernberg 2db09e4e3f ifxmodem: Use g_slist_free_full 2016-04-22 15:21:11 -05:00
John Ernberg 171ec467e9 hfpmodem: Use g_slist_free_full 2016-04-22 15:20:43 -05:00
John Ernberg 6a07d059d1 atmodem: use g_slist_free_full 2016-04-22 15:20:11 -05:00
Denis Kenzior 756e0215ad rilmodem: Remove some unneeded whitespace 2016-04-22 14:16:27 -05:00
Denis Kenzior 92dba5c21d rilmodem: Rename addrs to addr when not plural
addrs variable seems to be used whenever multiple addresses are being
references.  Either as a strv or a compound string separated by a
separator.  In these cases addrs was used for a single address, which
was confusing.
2016-04-22 14:13:19 -05:00
Denis Kenzior 7b8a6db4af rilmodem: Refactor away some explicit casts 2016-04-22 14:09:36 -05:00
Nishanth V 1fa8338661 rilmodem: Add IPv6 support in gprs-context 2016-04-22 12:26:11 -05:00
Nishanth V dc1116876d rilmodem: Add address to protocol type util func 2016-04-22 12:23:00 -05:00
Nishanth V ca246413d1 ril: don't set an ipv4 netmask if not provided
For historical reasons a netmask was always being set, even if one was
not provided.
2016-04-21 12:22:15 -05:00
Nishanth V b44f59e5e4 gprs-context: fix set ipv4 netmask for rilmodem 2016-04-19 20:53:29 -05:00
Kuba Pawlak 2d80a04a05 drivers/isimodem: fix GCC 6.0 errors
-Werror=misleading-indentation
2016-04-18 09:52:56 -05:00
Kuba Pawlak 31d2dfcfbe hfp: Handle +CCWA at HFP connection setup
Some phones with an active and waiting call at the time of HFP SLC
establishment, may send call waiting notification before all calls
are synchronized. This will lead to call Id mismatch because call
object is created with assumed Id 1 and not Id assigned by the phone.

In example below waiting call is created with Id 1 but in AT+CLCC
this phone returns active call as call with Id 1, and waiting as 2.

< \r\n+CCWA: "+1234567890",145\r\n
< \r\n+CIEV: 2,1\r\n
drivers/hfpmodem/voicecall.c:ccwa_notify() ccwa_notify: +1234567890 145 0
src/voicecall.c:ofono_voicecall_notify() Got a voicecall event, status: 5, id: 1, number: +1234567890 called_number: , called_name
src/voicecall.c:ofono_voicecall_notify() Did not find a call with id: 1
> AT+CIND?\r
< \r\n+CIND: 1,1,1,4,0,2,0\r\n\r\nOK\r\n
src/network.c:ofono_netreg_status_notify() /hfp/org/bluez/hci0/dev_60_AF_6D_F7_8E_37 status 1 tech -1
> AT+VGS=7\r
< \r\nOK\r\n
> AT+VGM=7\r
< \r\nOK\r\n
> AT+CLCC\r
< \r\n+CLCC: 1,1,0,0,0,"+9876543210",145\r\n
< \r\n+CLCC: 2,1,5,0,0,"+1234567890",145\r\n\r\nOK\r\n
src/voicecall.c:ofono_voicecall_notify() Got a voicecall event, status: 0, id: 1, number: +9876543210 called_number: , called_name
src/voicecall.c:ofono_voicecall_notify() Found call with id: 1
src/voicecall.c:ofono_voicecall_notify() Got a voicecall event, status: 5, id: 2, number: +1234567890 called_number: , called_name
src/voicecall.c:ofono_voicecall_notify() Did not find a call with id: 2
src/voicecall.c:ofono_voicecall_mpty_hint() ids: 0
2016-04-04 14:43:11 -05:00
Samrat Guha Niyogi 408b78e285 rilmodem: Add support of IMEISV 2016-03-31 10:16:23 -05:00
Denis Kenzior a259c5439a rilmodem: Fix minor style issues 2016-03-31 09:59:47 -05:00
Nishanth V 6d97528592 rilmodem: Add netmon support 2016-03-31 09:56:32 -05:00
Anirudh Gargi b99a108d00 rilmodem: Add sms bearer set and bearer query func 2016-03-22 10:27:40 -05:00
Denis Kenzior 7bd7a541d0 ubloxmodem: Remove unneeded #include 2016-03-18 10:13:53 -05:00
Dragos Tatulea 0af7ded845 ubloxmodem: support automatic ctx activation
... by imlementing read_settings.
2016-03-18 10:13:04 -05:00
Dragos Tatulea 52b698222c atmodem: gprs: handle automatic context activation
When the event comes, trigger CGCONT? to read the APN for the
activated cid and then call ogono_gprs_cid_activated to handle
the event.
2016-03-18 10:10:09 -05:00
Dragos Tatulea 6504e7090e ubloxmodem: support authentication
If username and password specified, issue an UAUTHREQ
command with the configured authentication method, selected cid
and credentials.
2016-03-17 11:24:42 -05:00
Dragos Tatulea e4d3df016e ubloxmodem: add Toby L2 gprs context driver
For now the driver works only with bridged mode for 2G/3G.

Once it activates the context it reads the ip, netmask,
gw, dns and sets them in the context settings.
2016-03-17 10:59:00 -05:00
Dragos Tatulea 6970a289c2 atmodem: add support for U-Blox TOBY L2 modems
Besides exceptions below, act like normal U-Blox devices.

gprs-context: don't set auth for TOBY L2. U-Blox Toby L2
doesn't support PAP/CHAP APN auth method.

atmodem: TOBY L2 supports only CMER mode 1. Also chaged original
mode variable to ind, which is a more appropriate name.
mode is what is being set first.
2016-03-16 13:15:08 -05:00
Dragos Tatulea 1290fd1410 atmodem: ublox: EPS now supported by newer ublox
Based on UBX-13002752 R33
2016-03-10 08:26:34 -06:00
Dragos Tatulea cf13dcf4a6 atmodem: add vendor enumeration for ublox toby
Required to differentiate between the old LISA family
of supported devices and future TOBY L2 devices.
2016-03-10 08:04:58 -06:00
Kuba Pawlak fc4088fb02 hfpmodem: Handle repeated held call indicator
An issue with iPhone 5C iOS 9.2 triggers desynchronization in call
states. When an active call is put on hold and another call arrives,
it is in WAITING state. It should be possible to answer it by issuing
AT+CHLD=2 but the phone changes its state to INCOMING so ATA should be
used. This change is advertised by sending callheld:2 event, but it is
not handled. This event can be used to trigger CLCC poll to synchronize
call states.

+CIEV: 3,1   <- first call arrives
AT+CLCC
+CLCC: 1,1,4,0,0,"01234567890",129
OK
RING
+CLIP: "01234567890",129
ATA
OK
+CIEV: 2,1
+CIEV: 3,0.
AT+CHLD=2.$  <- first call is put on hold
OK
+CIEV: 7,2   <- notification confirming that call #1 is on hold
+CCWA: "09876543210",129,1     <- second call arrives
+CIEV: 7,2
+CIEV: 3,1
AT+CLCC
+CLCC: 1,1,1,0,0,"01234567890",129
+CLCC: 2,1,5,0,0,"09876543210",129 <- new call is still in WAITING state
OK
+CIEV: 7,2 <- phone iternally promotes WAITING call to INCOMING
AT+CHLD=2  <- there is no WAITING call anymore, ATA should be used
+CME ERROR:3
2016-01-12 10:31:15 -06:00
Denis Kenzior 5ef046d63d rilmodem: Initialize ofono_error correctly 2015-12-17 20:32:28 -06:00
Tony Espy 4cc0bc4d11 rilmodem: fix call_barring_query_cb
The return value from a RIL_REQUEST_GET_FACILITY_LOCK
is the TS 27.007 service class bit vector of services
for the specified barring facility.  The value canf be
zero, which indicates "disabled for all".
2015-12-15 12:22:38 -06:00
Denis Kenzior 2a78ecbbc3 rilmodem: Get rid of ril_gprs_context_data 2015-12-13 22:20:58 -06:00
Denis Kenzior 5896f792e5 rilmodem: Get rid of ril_sim_data 2015-12-13 21:29:57 -06:00
Denis Kenzior 32516c4844 sim: Silence warning on 32-bit 2015-12-13 20:53:17 -06:00
Denis Kenzior 0e3f108edc sim: Tweak debug statement 2015-12-13 20:53:17 -06:00
Denis Kenzior d1d2a16f94 sim: Add additional DBG statements 2015-12-13 20:53:17 -06:00
Tony Espy 65e026b784 rilmodem: fix sim_status_cb debug logging
During the re-factoring of rilmodem's sim atom
messaging code, the sim_status_cb function's
RIL tracing code was converted to DBG calls.
This change adds the same prefix to DBG/trace
calls when a single message's parameters span
more than one DBG call. This makes it easier
to filter out trace messages when looking at a
log file.
2015-12-04 16:26:49 -06:00
Tony Espy 98f3486fb3 rilmodem: restore SET_SMSC_ADDRESS number format
Restore quoting of SMSC number string, as it's
required by at least one rild implementation (mako).
2015-12-04 16:25:08 -06:00
Denis Kenzior b078ea60f0 rilmodem: Remove unneeded include 2015-12-04 13:45:24 -06:00
Denis Kenzior dae1073f13 rilmodem: Don't include grilunsol.h 2015-12-04 13:43:58 -06:00
Denis Kenzior 21e28ed19f rilmodem: Implement ril_setup_data_call_cb inline 2015-12-04 13:38:20 -06:00
Denis Kenzior 1d03261070 rilmodem: Implement get_active_data_calls_cb inline 2015-12-03 18:26:58 -06:00
Denis Kenzior 234dfedbaa rilmodem: Remove drivers/rilmodem/gprs.h 2015-12-03 13:26:15 -06:00
Denis Kenzior 55cedbf109 rilmodem: Don't expose private structures 2015-12-03 13:24:41 -06:00
Denis Kenzior cb2ca76bae rilmodem: Get rid of unnecessary exports 2015-12-03 13:13:36 -06:00
Denis Kenzior b090cf62d3 rilmodem: Get rid of ril_gprs_driver_data 2015-12-03 13:09:34 -06:00
Denis Kenzior 78368c5c88 rilmodem: Get rid of useless member variable 2015-12-03 13:04:21 -06:00
Denis Kenzior 561ab0d34a rilmodem: Remove data reg state query retry logic
This is no longer needed as the query for max_cid is done in a different
logic flow.
2015-12-03 13:02:19 -06:00
Denis Kenzior fcde83dcbf rilmodem: Don't include grilreply.h 2015-12-03 11:41:10 -06:00
Denis Kenzior 69f6a77d78 rilmodem: use g_new0 instead of g_try_new0 2015-12-03 11:38:36 -06:00
Denis Kenzior 5ea2800800 rilmodem: Implement clcc_poll_cb inline 2015-12-03 11:38:04 -06:00
Denis Kenzior f1a79f56b3 rilmodem: Implement ril_pin_change_state_cb inline 2015-12-03 11:22:02 -06:00
Denis Kenzior 4db0659cbd rilmodem: Implement inf_pin_retries_cb inline 2015-12-03 10:50:32 -06:00
Denis Kenzior e3188e7d43 rilmodem: Implement mtk_pin_retries_cb inline 2015-12-03 10:33:10 -06:00
Denis Kenzior 194003912d rilmodem: Don't include grilrequest.h 2015-12-03 10:20:44 -06:00
Denis Kenzior 5f3e3523ef rilmodem: Inline g_ril_request_oem_hook_strings 2015-12-03 10:17:53 -06:00
Denis Kenzior 4c2cd6fce6 rilmodem: inline request_oem_hook_raw 2015-12-03 10:12:02 -06:00
Denis Kenzior c99a5303c9 rilmodem: Refactor ril_data_reg_cb 2015-12-03 10:03:35 -06:00
Denis Kenzior 239008221f rilmodem: Implement reg_cb inline 2015-12-01 12:52:27 -06:00
Denis Kenzior 0f86f7b15c rilmodem: Add ril_util_registration_state_to_status 2015-12-01 12:51:24 -06:00
Denis Kenzior 2dbd1ce771 rilmodem: Implement activate_primary inline 2015-11-30 17:41:28 -06:00
Denis Kenzior 834816f458 rilmodem: Add ril_util_gprs_proto_to_ril_string 2015-11-30 17:40:59 -06:00
Denis Kenzior d13fd042e1 rilmodem: Refactor get_sim_status reply parsing 2015-11-30 13:43:27 -06:00
Denis Kenzior 50a8b36aee rilmodem: Implement sim io parser inline 2015-11-29 17:04:10 -06:00
Denis Kenzior 1c9ed8af0e rilmodem: Remove unused ril_util_sim_state_query 2015-11-29 15:53:46 -06:00
Tony Espy 30e6833f0e rilmodem: fix set_call_barring reply trace (mako)
This change restores the trace output for a reply to a
REQUEST_SET_FACILITY_LOCK used by the set function.
2015-11-29 15:51:12 -06:00
Denis Kenzior 77c7a90049 rilmodem: Remove unused ril_util_call_compare_by_status 2015-11-20 23:10:57 -06:00
Denis Kenzior 1658dfe2d2 rilmodem: Remove unused compare_by_phone_number 2015-11-20 23:09:52 -06:00
Denis Kenzior fbbd11cedd rilmodem: Remove unused ril_util_call_compare 2015-11-20 23:09:27 -06:00
Denis Kenzior 3ed496e00f rilmodem: Remove unused ril_util_call_compare_by_id 2015-11-20 23:08:41 -06:00
Denis Kenzior 43208828ab rilmodem: Implement ril_register_manual inline 2015-11-20 22:54:27 -06:00
Denis Kenzior 45d59d04a9 rilmodem: Use ril_util_build_deactivate_data_call 2015-11-20 22:51:44 -06:00
Denis Kenzior 7172e5cc19 rilmodem: Add ril_util_build_deactivate_data_call 2015-11-20 22:45:26 -06:00
Denis Kenzior c128fbf1e1 rilmodem: implement update_record inline 2015-11-20 22:19:31 -06:00
Denis Kenzior 4affc129c5 rilmodem: Implement ril_sim_update_binary inline 2015-11-20 22:05:22 -06:00
Denis Kenzior 31c4e3ca12 rilmodem: Implement ril_sim_read_record inline 2015-11-20 22:05:19 -06:00
Denis Kenzior 2283493125 rilmodem: Implement ril_sim_read_binary inline 2015-11-20 22:05:17 -06:00
Denis Kenzior f6591998de rilmodem: Implement ril_sim_read_info inline 2015-11-20 22:05:12 -06:00
Denis Kenzior 65398ce382 rilmodem: Simplify ril_gprs_set_attached 2015-11-13 16:10:30 -06:00