Commit Graph

1464 Commits

Author SHA1 Message Date
Denis Kenzior 2801acc03e rilmodem: Implement ril_cops_list_cb inline 2015-11-13 14:17:50 -06:00
Denis Kenzior 0c3903ff66 rilmodem: Implement ril_nitz_notify inline 2015-11-13 13:34:22 -06:00
Denis Kenzior 828fb72553 rilmodem: Inline signal strength parsing & calc 2015-11-13 13:16:22 -06:00
Denis Kenzior 3e58f7722f rilmodem: Implement lastcause_cb inline 2015-11-12 14:22:36 -06:00
Denis Kenzior c5c6620aa2 rilmodem: Implement ril_ss_notify inline 2015-11-12 14:15:17 -06:00
Denis Kenzior 88f507c1ac rilmodem: Implement dial inline 2015-11-12 14:01:23 -06:00
Denis Kenzior a453157f94 rilmodem: Implement hangups inline 2015-11-12 13:58:15 -06:00
Denis Kenzior 4cbc608e9e rilmodem: Implement send_one_dtmf inline 2015-11-12 13:42:41 -06:00
Denis Kenzior e696d87f34 rilmodem: Implement ril_private_chat inline 2015-11-12 13:27:35 -06:00
Denis Kenzior 5ba7127b10 rilmodem: Implement enable_supp_svc inline 2015-11-12 13:22:25 -06:00
Denis Kenzior 0b23b2b74b rilmodem: Get rid of ril_voicecall_driver_data 2015-11-12 13:17:55 -06:00
Denis Kenzior d351e3ac03 voicecall: Remove redundant comment 2015-11-12 13:17:55 -06:00
Denis Kenzior e3ee401d72 rilmodem: Remove auto-answering logic
This was only used for testing at the factory for a specific product.
Does not belong in the driver code.
2015-11-12 13:17:52 -06:00
Denis Kenzior 433104e953 rilmodem: Implement ril_pin_change_state inline 2015-11-12 11:58:26 -06:00
Denis Kenzior a3e4a52583 rilmodem: Implement ril_change_passwd inline 2015-11-12 11:41:03 -06:00
Denis Kenzior ca06f58fef rilmodem: Implement ril_pin_send_puk inline 2015-11-12 11:06:02 -06:00
Denis Kenzior 740bac3584 rilmodem: Implement ril_pin_send inline 2015-11-12 11:00:59 -06:00
Denis Kenzior 3537e88ff6 rilmodem: Fix up headers in sms 2015-11-05 22:41:04 -06:00
Denis Kenzior 07be422cfa rilmodem: Implement ril_csca_query_cb inline 2015-11-05 22:39:59 -06:00
Denis Kenzior 5bf684207b rilmodem: Implement ril_submit_sms_cb inline 2015-11-05 22:30:44 -06:00
Denis Kenzior cfe8cfb85b rilmodem: Implement ril_ack_delivery inline 2015-11-05 22:25:26 -06:00
Denis Kenzior 5a16ea8c4e rilmodem: Implement ril_cmgs inline 2015-11-05 22:22:47 -06:00
Denis Kenzior faf8744453 rilmodem: Implement ril_csca_set inline 2015-11-05 22:12:07 -06:00
Denis Kenzior 26917d689e rilmodem: Implement ril_sms_notify inline 2015-11-05 22:00:51 -06:00
Denis Kenzior 15c976a437 rilmodem: Remove unneeded code 2015-11-05 21:35:59 -06:00
Denis Kenzior bfa5ca0204 rilmodem: Remove comments that state the obvious 2015-11-05 21:35:47 -06:00
Denis Kenzior 97a6725b9b rilmodem: Move constants from gril 2015-11-05 21:21:38 -06:00
Denis Kenzior e4d65f6cda rilmodem: Implement ril_set_rat_mode inline 2015-11-05 21:19:40 -06:00
Denis Kenzior 5e74fdfd80 rilmodem: Implement ril_rat_mode_cb inline 2015-11-05 21:16:31 -06:00
Denis Kenzior b7d02edd17 rilmodem: Implement ril_set_fast_dormancy inline 2015-11-05 21:03:10 -06:00
Denis Kenzior 2d770c375e rilmodem: Get rid of pointless g_idle_add 2015-11-05 20:59:38 -06:00
Denis Kenzior 8a01d8aced rilmodem: Get rid of ril_radio_settings_driver_data 2015-11-05 20:56:13 -06:00
Denis Kenzior a0ecd17069 rilmodem: Get rid of radio-settings.h 2015-11-05 20:40:22 -06:00
Denis Kenzior 25e99e3631 build: Make distcheck pass again 2015-11-05 20:37:16 -06:00
Denis Kenzior 5cb6273940 rilmodem: Get rid of g_try_new0 2015-11-05 20:35:59 -06:00
Denis Kenzior 37e5c0d8ea rilmodem: Make ril_ussd_request inline 2015-11-05 13:50:24 -06:00
Denis Kenzior 6910a2e2e9 rilmodem: Rework ril_ussd_request 2015-11-05 13:48:45 -06:00
Denis Kenzior 8b6c834a1c rilmodem: Rework ril_ussd_cancel 2015-11-05 13:41:12 -06:00
Denis Kenzior 94ce280545 rilmodem: Implement ril_ussd_notify inline 2015-11-05 12:48:32 -06:00
Denis Kenzior a0eab81cc4 rilmodem: Inline query_serial and query_revision
query_serial was supposed to use parse_imei functionality, but called
baseband_version instead.  Rework both these to use inline parsers.
2015-11-05 11:33:05 -06:00
Denis Kenzior 80e40277ce rilmodem: Rework devinfo driver
Remove comments that state the obvious
Remove pointless allocations / frees
2015-11-05 11:20:17 -06:00
Denis Kenzior 0032cbf4a5 rilmodem: Rework header order in call-volume 2015-11-05 11:13:47 -06:00
Denis Kenzior 492b952f84 rilmodem: Implement probe_mute_cb inline 2015-11-05 11:12:54 -06:00
Denis Kenzior 2722e49484 rilmodem: Implement ril_call_volume_mute inline 2015-11-05 11:09:41 -06:00
Denis Kenzior bbe34cb90a rilmodem: Rework header order in call-settings 2015-11-05 11:02:15 -06:00
Denis Kenzior fc14bde9f1 rilmodem: Rework header order in call-forwarding 2015-11-05 11:01:59 -06:00
Denis Kenzior ec3d719835 rilmodem: Rework header order in call-barring 2015-11-05 11:01:48 -06:00
Denis Kenzior b25ff340db rilmodem: Implement ril_call_barring_set_cb inline 2015-11-05 10:54:50 -06:00
Denis Kenzior acee0e4755 rilmodem: Implement ril_call_barring_query_cb inline 2015-11-05 10:47:02 -06:00
Denis Kenzior b539ac47d9 rilmodem: Make ril_call_barring_set_passwd inline 2015-11-05 10:40:11 -06:00
Denis Kenzior b99df52a78 rilmodem: Implement ril_call_barring_set inline 2015-11-05 10:35:23 -06:00
Denis Kenzior b54e7c9ee8 rilmodem: Implement ril_call_barring_query inline 2015-11-05 10:26:49 -06:00
Denis Kenzior b8fcc3ef21 rilmodem: Implement g_ril_request_call_fwd inline 2015-11-04 23:25:53 -06:00
Denis Kenzior 282b254a5d rilmodem: Rework call-forwarding requests 2015-11-04 23:08:06 -06:00
Denis Kenzior 35a91e191d rilmodem: Implement ril_imsi_cb inline 2015-11-04 21:53:22 -06:00
Denis Kenzior b279a0d10a rilmodem: Implement ril_clir_query_cb inline 2015-11-04 21:44:48 -06:00
Denis Kenzior 8d23f61d90 rilmodem: Implement ril_clip_query_cb inline 2015-11-04 21:34:46 -06:00
Denis Kenzior 861de782f8 rilmodem: Implement ril_cw_query_cb inline 2015-11-04 21:28:36 -06:00
Denis Kenzior 48ab98a449 rilmodem: Implement ril_clir_set inline 2015-11-04 21:13:18 -06:00
Denis Kenzior 626612c48c rilmodem: Implement ril_cw_query inline 2015-11-04 21:08:09 -06:00
Denis Kenzior b093dfe133 rilmodem: Implement ril_cw_set inline 2015-11-04 21:04:21 -06:00
Denis Kenzior 6c21109cb3 rilmodem: Move get_imsi implementation to rilmodem 2015-10-15 09:59:50 -05:00
Alfonso Sanchez-Beato 2de8ba9faa infineon: Definitions for infineon modem 2015-10-13 21:35:07 -05:00
Tony Espy e918a6b222 rilmodem: driver for Android modems
Driver for modems that are accessed through the Android Radio Interface
Layer (RIL) for telephony, using the gril library. The driver is almost
feature complete with some exceptions, being CBS and SAT the most
prominent.

Co-authored-by: Tony Espy <espy@canonical.com>
Co-authored-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
Co-authored-by: Alfonso Sanchez-Beato <alfonso.sanchez-beato@canonical.com>
Co-authored-by: Islam Amer <islam.amer@jollamobile.com>
Co-authored-by: Jussi Kangas <jussi.kangas@tieto.com>
Co-authored-by: Juho Hämäläinen <juho.hamalainen@tieto.com>
Co-authored-by: Petri Takalokastari <petri.takalokastari@oss.tieto.com>
Co-authored-by: Jarko Poutiainen <Jarko.Poutiainen@oss.tieto.com>
Co-authored-by: Tommi Kenakkala <tommi.kenakkala@oss.tieto.com>
Co-authored-by: Miia Leinonen <miia.leinonen@oss.tieto.com>
Co-authored-by: Martti Piirainen <martti.piirainen@canonical.com>
Co-authored-by: You-Sheng Yang <vicamo.yang@canonical.com>
2015-10-13 17:38:45 -05:00
Kuba Pawlak 4e9cbcdb89 hfp: Handle extra CCWA event
When a call is waitng, CCWA event is sent and call object
in state WAITING is created. on ReleaseAndAnswer it is
promoted to INCOMING and later to ACTIVE.
iPhones send an extra CCWA event when active call is ended.
This extra event is creating a second call object in state
WAITING. It is not possible to have two WAITING calls, but
previously waiting call was already promoted to INCOMING.
For a brief time we have two calls from the same number,
one INCOMING and one WAITING. Later WAITING one is removed.
As we cannot have a waiting and incoming call at the same
time, ignore CCWA when there is already an INCOMING call.

< \r\n+CIEV: 3,3\r\n
< \r\n+CIEV: 2,1\r\n
< \r\n+CIEV: 3,0\r\n
< \r\n+CCWA: "01234567890",129,1,"Me"\r\n
< \r\n+CIEV: 3,1\r\n
> AT+CLCC\r
< \r\n+CLCC: 1,0,0,0,0,"09876543210",129,"Me"\r\n
< \r\n+CLCC: 2,1,5,0,0,"01234567890",129,"Me"\r\n
< \r\nOK\r\n
< \r\n+CIEV: 2,0\r\n
< \r\n+CCWA: "01234567890",129,1,"Me"\r\n
< \r\n+CIEV: 2,1\r\n
< \r\n+CIEV: 3,0\r\n
> AT+CLCC\r
< \r\n+CLCC: 2,1,0,0,0,"01234567890",129,"Me"\r\n
< \r\nOK\r\n
2015-08-24 16:29:29 -05:00
Kuba Pawlak 3e6bbc676f hfp: Synchronize call state in case of +CHUP error
It is possible for the phone to accept Dial request
but not actually dial. This leaves a voicecall object
in state 'dialling' that cannot be removed.
Proposed workaround is to trigger AT+CLCC when an error
is returned for Hangup. As the call is not on the list,
this would remove this hanging object and signal CallRemoved.

Windows Phone trace with this fix:
ofonod[273]: > ATD1;\r
ofonod[273]: < \r\nOK\r\n
ofonod[273]: src/voicecall.c:dial_handle_result() Registering new call: 1
ofonod[273]: < \r\n+CIEV: 5,4\r\n
ofonod[273]: src/network.c:ofono_netreg_strength_notify() strength 80
ofonod[273]: > AT+CHUP\r
ofonod[273]: < \r\nERROR\r\n
ofonod[273]: src/voicecall.c:generic_callback() command failed with error: Unknown error type
ofonod[273]: > AT+CLCC\r
ofonod[273]: < \r\nOK\r\n
ofonod[273]: src/voicecall.c:ofono_voicecall_disconnected() Got disconnection event for id: 1, reason: 2
2015-08-05 11:15:33 -05:00
Kuba Pawlak 93ccb84761 hfpmodem: Fix connecting to AG with existing mpty
If there is more then one active or held call, we are in mpty calls.
We won't get indicator update if any of them is released by CHLD=1x.
So we have to poll it.
2015-06-04 16:18:08 -05:00
Alex J Lennon 4242f6ee72 atmodem: Add Cinterion quirk for signal strength
Implement OFONO_VENDOR_CINTERION specific vendor support to register
textual +CIEV indications for signal strength using AT^SIND command.
2015-05-13 09:57:53 -05:00
Kuba Pawlak cede3700f7 hfpmodem: slc.c: make sure to use none_prefix 2015-03-24 11:05:03 -05:00
Kuba Pawlak 318d313fc9 hfpmodem: hfpmodem.c make sure to use none_prefix 2015-03-24 11:04:48 -05:00
Denis Kenzior d6bc91ebfc hfpmodem: Make sure to use none_prefix
ofonod[253]: > AT+CCWA=1\r
ofonod[253]: < \r\n+BCS:2\r\n
ofonod[253]: < \r\nOK\r\n
2015-02-20 10:30:21 -06:00
Denis Kenzior 3d592d7d46 hfpmodem: Make sure to set the prefix properly
ofonod[1239]: > AT+COPS=3,0\r
ofonod[1239]: < \r\n+BCS:2\r\n
ofonod[1239]: < \r\nOK\r\n
2015-02-20 10:28:24 -06:00
Cedric Jehasse d539ed19f3 atmodem: fix retries reporting from AT+CPINR
The retries array was not correctly filled in.
2015-02-02 09:22:21 -06:00
Cedric Jehasse 25f926c733 atmodem: Sierra modems should be polled after CPIN
Sierra modem will return "CME ERROR: 14" when polled right after pin has
been entered. Use the existing vendor quirk to handle this.
2015-02-02 09:21:10 -06:00
Denis Kenzior 2abcb85809 telitmodem: Fix a few coding style violations 2014-10-22 21:21:49 -05:00
Kuba Pawlak a753d6c012 telitmodem: location reporting driver 2014-10-22 21:15:35 -05:00
Denis Kenzior 0f28d9206d slc: Make sure to initialize variables 2014-10-20 13:40:28 -05:00
Denis Kenzior eef67018b6 hfp: Implement +BIND notifications 2014-10-20 13:40:28 -05:00
Denis Kenzior 299ffc9620 hfp: Notify core of HF indicators supported by AG
This information was obtained from SLC negotiation
2014-10-20 13:40:28 -05:00
Denis Kenzior 39f08a5e1c hfp: Track supported / active indicators
This information is obtained during SLC establishment
2014-10-20 13:40:28 -05:00
Denis Kenzior e176a9019f hfp: Add implementation of +BIEV 2014-10-20 13:40:28 -05:00
Denis Kenzior debb0d2d3e hfp: Add HF Indicators BRSF feature for 1.7
If HFP 1.7 client is used, enable the right BRSF feature
2014-10-20 13:40:28 -05:00
Denis Kenzior ab5b6d1217 handsfree: Skeleton implementation of DDR
Distracted Driving Reduction or Enhanced Safety is implemented using HF
indicator 0x0001
2014-10-20 13:40:28 -05:00
Denis Kenzior fa105c4ba6 hfp: Add initial SLC negotiation for HFP 1.7 2014-10-20 13:40:28 -05:00
Philip Paeps 293c701e25 atmodem: set the auth method for u-blox modems 2014-07-08 08:52:25 -05:00
Philip Paeps cca3e085b3 sim: query u-blox PIN retries with AT+UPINCNT 2014-07-08 08:51:54 -05:00
Philip Paeps 6df64cd1a9 gprs: add support for u-blox +UREG URCs 2014-06-30 14:03:08 -05:00
Philip Paeps 4a0831bc80 atmodem: add vendor u-blox 2014-06-30 13:59:46 -05:00
Denis Kenzior b2bfdd69d2 atmodem: Minor style fixups 2014-06-30 13:44:40 -05:00
Philip Paeps 1588e7c082 sim: query Quectel UC15 PIN retries with AT+QPINC? 2014-06-30 13:35:19 -05:00
Philip Paeps d2f6ffc18d atmodem: add vendor Quectel 2014-06-30 13:26:25 -05:00
Sergio Checa Blanco 6369cc902c hfpmodem: Fix crash with more than two calls
A periodic CLCC polling is started when there is an ongoing multiparty
call and a new call appears in the system. A simple way to reproduce
the crashing scenario is:

1. Place a call.
2. Place a second call.
3. Create a multiparty call with both calls.
4. Place a third call (incoming or outgoing does not matter).
5. Disconnect HFP from the modem.

Within the function ciev_callheld_notify, the AT+CLCC command is also
invoked, thus a new cyclic CLCC polling is started, and it overwrites
the timer resource identifier stored in voicecall_data.clcc_source.
This means that there are several timers doing the CLCC polling, but
only one of those is under control, i.e. it can be removed through its
source identifier, hence a timer source leak.

This has a fatal consequence when the HFP modem is disconnected. The
function hfp_voicecall_remove stops the timer that is under control
before freeing the voicecall_data struct. However there are other timers
that are still active and will execute its handler poll_clcc afterwards.
Inside poll_clcc the driver_data is accessed, which is already NULL.

A solution for this is to avoid starting a CLCC polling if there is
already one active, i.e. clcc_source is not 0. By doing this the
uncontrolled timers will not cycle forever.
2014-06-30 13:22:10 -05:00
Philip Paeps 8cbe061c3b atmodem: set the PPP authentication method to use 2014-06-21 12:02:51 -05:00
Sergio Checa Blanco 65be2b344c hfpmodem: Split AT+VTS command into multiple +VTS
According to the standard "3GPP 27.007 v6.8.0" Appendix C.2.11,
when sending multiple DTMF characters, these must go in individual
+VTS commands for each tone. This adopts the AT modem approach.

Before: AT+VTS=1234\r
After:  AT+VTS=1;+VTS=2;+VTS=3;+VTS=4\r
2014-06-21 11:45:44 -05:00
Denis Kenzior 815d62888f hfp: Fix case where RING never arrives 2014-05-30 12:25:23 -05:00
Denis Kenzior 516165c311 handsfree: Rename driver function
To be more consistent with others in the same file
2014-04-10 10:04:36 -05:00
Denis Kenzior b37f5e842d handsfree: Simplify logic 2014-04-10 10:04:12 -05:00
Andrew Earl e7f055385f hfp: Add CNUM query to handsfree interface for subscriber number 2014-04-10 09:52:11 -05:00
Denis Kenzior 29fefe6450 hfp: Use enum from hfp.h 2014-03-19 10:24:57 -05:00
Denis Kenzior 65e6df8e50 hfp: Fixup variable names 2014-03-19 10:20:28 -05:00