Commit Graph

1600 Commits

Author SHA1 Message Date
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
Denis Kenzior 659851b1b1 rilmodem: Implement ril_cops_cb inline 2015-11-13 14:27:47 -06:00
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
Krzysztof Wilk 8a7b8b0521 hfp: Add CHLD features to drver data 2014-03-19 10:19:53 -05:00
Denis Kenzior d6af339c99 git: Fixup messed up permissions 2013-12-21 13:39:54 -06:00
Krzysztof Wilk 171d4dee76 siri: Add atom driver 2013-12-18 00:07:47 -06:00
Andrew Earl e0aeebae0a hfp: Add Voice Recognition flag to BRSF 2013-12-05 03:45:48 -06:00
Denis Kenzior 85cdacb509 netreg: Turn off CIEV indications other than rssi 2013-11-26 16:25:03 -06:00
Denis Kenzior a4a170e1ea hfpmodem: Call ofono_voicecall_mpty_hint as needed 2013-09-12 13:17:39 -05:00
Denis Kenzior 0026ae3fb7 atmodem: Update parse_clcc utility function 2013-09-12 13:17:39 -05:00
Denis Kenzior c912e0066a hfp: Set UDUB affected set to WAITING only
INCOMING calls are not affected by UDUB, only by +CHUP.
2013-08-25 01:25:28 -05:00
Denis Kenzior fe36dec9a1 hfp: Fix up disconnect reason handling for +CHUP
The affected call types for +CHUP were set to only ACTIVE calls.
Instead the affected set should include INCOMING, DIALING, ALERTING and
ACTIVE calls.

Thanks to Ionut Dediu for the diagnosing and reporting this issue.
2013-08-25 01:21:23 -05:00
Denis Kenzior b131cfde52 atmodem: Fix whitespace violation 2013-07-22 15:56:28 -05:00
Anthony Viallard d3e8218b50 SIMCOM: add a quirk to fix crsm request 2013-07-22 15:49:59 -05:00
Anthony Viallard d1ac1ba3d4 SIMCOM: add a quirk for signal strength reporting
We must tell we want the signal strength reporting using
AT+AUTOCSQ command (ref. "SIM5215_SIM5216_ATC_V1.18.pdf - §10.7").
2013-07-22 15:48:59 -05:00
Anthony Viallard 8c6eea3385 SIMCOM: add a quirk for AT+CNMI command building
Use mode=1 otherwise it fails (ref. "SIM5215_SIM5216_ATC_V1.18.pdf - §6.9")
2013-07-22 15:48:59 -05:00
Jesper Larsen ff2051053c atmodem: Add gprs-context quirk for SIM900
The SIM900 module from SIMCOM does have a AT+CGDATA command.
However, it is not possible to make a ppp connection when CGDATA
has been used to bring up the gprs context.

This patch adds a quirk that uses the alternative ATD*99***<cid>#
command instead.
2013-07-18 14:10:38 -05:00
Jesper Larsen f6930db19c atmodem: Add vendor entry for SIM900 module 2013-07-18 14:10:38 -05:00
Frederic Danis 8fb70d6271 hfpmodem: Fix ECNR HF feature 2013-06-26 10:39:08 -05:00
Claudio Takahasi cf6dce3445 hfpmodem: Add EchoCancelingNoiseReduction
This patch adds echo canceling and noise reduction implementation to
hfpmodem. It adds the implementation to send the command "AT+NREC=0"
to the AG.
2013-04-23 10:28:46 -05:00
Paulo Borges 2e9cb14e26 hfp: Move HFP versions definitions to hfp.h
hfp.h should store all HFP related definitions.
2013-04-18 08:43:21 -05:00
Vinicius Costa Gomes df1f9bf730 hfpmodem: Send AT+BAC with the supported codecs
Before, the AT+BAC command was being sent with fixed information,
now we send the command (that inform the AG of the codecs supported by
the HF) with the codecs supported by the registered Handsfree Audio
Agent.
2013-04-09 14:33:41 -05:00
Denis Kenzior b18963af33 drivers: Include hfp.h 2013-04-09 14:33:41 -05:00
Anthony Viallard 8650c1019a sim: Add SIMCOM SIM card ready quirk
SIM is busy right after pin is entered. Use the quirk which
add a CPIN? pooling check until having "CPIN: READY" answer.
2013-04-01 21:38:26 -05:00
Claudio Takahasi 0772fda92e hfpmodem: Fix segfault in CIEV GAtChat callback
This patch fixes segmentation fault when the network registration
watch is called without being initialized. CIEV GAtChat callback can
be called before ofono_netreg_register().

==15101== Invalid read of size 8
==15101==    at 0x492B56: ofono_netreg_register (network.c:2073)
==15101==    by 0x47245E: hfp_netreg_probe (network-registration.c:311)
==15101==    by 0x492A8D: ofono_netreg_create (network.c:1881)
==15101==    by 0x4849D5: hfp_pre_sim (hfp_hf_bluez5.c:288)
==15101==    by 0x48C486: ofono_modem_set_powered (modem.c:1194)
==15101==    by 0x484E9D: slc_established (hfp_hf_bluez5.c:85)
==15101==    by 0x4702AD: chld_cb (slc.c:147)
==15101==    by 0x440457: at_chat_finish_command (gatchat.c:461)
==15101==    by 0x44109F: new_bytes (gatchat.c:532)
==15101==    by 0x4433B7: received_data (gatio.c:122)
==15101==    by 0x3CBAA47824: g_main_context_dispatch (gmain.c:2539)
==15101==    by 0x3CBAA47B57: g_main_context_iterate.isra.23
(gmain.c:3146)
==15101==  Address 0x18 is not stack'd, malloc'd or (recently) free'd
2013-02-21 17:09:54 -06:00
Denis Kenzior 2fa7a4a66e netreg: Fix broken CMER behavior on MBM 2013-01-21 10:23:34 -06:00
Denis Kenzior b9782fedfc hfpmodem: Add comment for previous commit 2013-01-21 09:41:54 -06:00
Mikel Astiz 843bd71169 hfpmodem: Fix release-and-swap without +CIEV
Some phones do not send the corresponding call state update (+CIEV)
after a successful release-and-swap operation (AT+CHLD=1).

This has been observed with a Nokia 500, while testing ReleaseAndSwap()
while an active and a held call exist:

ofonod[20414]: > AT+CLCC\r
ofonod[20414]: < \r\n+CLCC: 1,0,1,0,0,"<number1>",145\r\n
ofonod[20414]: < \r\n+CLCC: 2,0,0,0,0,"<number2>",145\r\n
ofonod[20414]: < \r\nOK\r\n
ofonod[20414]: > AT+CHLD=1\r
ofonod[20414]: < \r\nOK\r\n

After this, no +CIEV is received, but the call has been hung up.

The proposed approach to solve this consists of using AT+CLCC, unless
a call release has been received within a specific time period.

The result fixes the problem as can be seen below:

ofonod[20847]: < \r\n+CLCC: 1,0,1,0,0,"<number1>",145\r\n
ofonod[20847]: < \r\n+CLCC: 2,0,0,0,0,"<number2>",145\r\n
ofonod[20847]: < \r\nOK\r\n
ofonod[20847]: > AT+CHLD=1\r
ofonod[20847]: < \r\nOK\r\n
ofonod[20847]: > AT+CLCC\r
ofonod[20847]: < \r\n+CLCC: 1,0,0,0,0,"<number1>",145\r\n
ofonod[20847]: < \r\nOK\r\n
ofonod[20847]: < \r\n+CIEV: 5,2\r\n
ofonod[20847]: < \r\n+CIEV: 5,0\r\n
2013-01-21 09:41:54 -06:00
Mikel Astiz cbb784e734 hfpmodem: Avoid transitional voicecall states
While processing the result of AT+CLCC, process the differences in a way
that disconnections are reported first, then call state changes and
finally new calls.

The goal is to avoid unnecessary transitional states such as two active
calls existing at the same time.
2013-01-21 09:41:54 -06:00
Mikel Astiz 9726e50d82 hfpmodem: Refactor voicecall notify with foreach
Define a helper function in order to use foreach statements when
ofono_voicecall_notify() needs to be called.
2013-01-21 09:41:54 -06:00
Vinicius Costa Gomes a419432c0f hfpmodem: Add support for sending the supported codecs
Right now, only the mandatory CVSD codec is supported. The mSBC
mandatory codec is "temporarily" not supported.

The spec alows this, HFP 1.6 Spec Section 4.34.1 page 92: "If wide band
speech is supported then the mandatory codec (mSBC) shall be included
unless it is temporarily unavailable."
2013-01-17 11:21:16 -06:00
Vinicius Costa Gomes f09a57d799 hfpmodem: Add version defines for HFP 1.6 2013-01-17 11:21:16 -06:00
Denis Kenzior b67e68e753 sim: Fix whitespace violation 2013-01-15 12:16:08 -06:00
Christopher Vogl 404f2e3cb9 sim: return from cpin when sim ready for telit
Especially for Telit HE910 it is not enough to wait for
entering a PIN code.
If we do not wait for #QSS: 3, subsequent commands,
like +CMER will report SIM BUSY and the network registration
atom will be removed as a consequence.
2012-12-17 09:50:22 -06:00
Daniel Wagner 79453f3284 atutil: Remove unused macro
With commit 6ee21a3fc1
the usage DECLARE_FAILURE was removed.
2012-12-17 09:50:22 -06:00
Denis Kenzior fb1d1c3426 hfp: use ofono_handsfree_battchg_notify 2012-12-17 09:50:22 -06:00
Mingli Wu 911eeb6565 atmodem: remove pending idle callbacks at removal
If device probe and removal happen in short succession, it's possible
that the idle handler registered in the probe function doesn't run before
the device is removed.  In this case, the idle handler needs to be
unregistered so that it does not run and try to access the data that's
destroyed during the removal.
2012-12-04 23:48:14 -06:00
Denis Kenzior 25e7ecd3c7 atmodem: Re-work the CBS driver
We might have mis-interpreted how 27.007 intends for CBS to work.  After
studying the implementation notes of the IMC 6260 modem, the spec intent
made a little bit more sense.
2012-12-04 23:47:58 -06:00
Marcel Holtmann 788922cbdf qmi: Include persistent device configuration service 2012-12-04 05:42:14 +01:00
Marcel Holtmann 15f309742c qmi: Print service number if name is not known 2012-12-01 21:37:22 +01:00
Denis Kenzior 68df0eb758 ifx: Fix the case of modem-originated call
During STK Set Up Call, we have modem-originated calls that do not go
through the core 'Dial' method.  Make sure the calls are still detected
in this case.
2012-11-28 10:31:15 -06:00
Denis Kenzior b26f7c73d3 atmodem: For IFX XSIMSTATE 7 should never occur
in the case of a PIN entry, XSIMSTATE of 7 (Ready to Attach) should
never occur
2012-11-28 10:31:14 -06:00
Marcel Holtmann 076abafb03 qmimodem: Fix reporting of PIN or PUK states 2012-11-27 23:31:52 +01:00
Denis Kenzior 2528b74491 atmodem: Always quote data in CRSM write operations 2012-11-23 07:22:25 -06:00
Denis Kenzior 291f4e0bb0 atmodem: Support CRSM with paths
For GET STATUS and READ BINARY variations, support appending of the
optional path in the CRSM command
2012-11-23 07:22:25 -06:00
Marcel Holtmann 67670a659f qmimodem: Add support for UIM service handling 2012-11-25 20:11:29 +01:00
Marcel Holtmann 56e4798e1e qmimodem: Print error string instead of code if available 2012-11-25 10:19:40 +01:00
Marcel Holtmann 9b4d69cf8d qmimodem: Pretty print service name in debug logs 2012-11-25 00:05:54 +01:00
Marcel Holtmann 535e16c8a4 qmimodem: Fix debug printing of messages 2012-11-25 00:05:15 +01:00
Marcel Holtmann 7feb9e2711 qmimodem: Add helper for error message strings 2012-11-25 00:04:14 +01:00
Denis Kenzior 57692483a9 atmodem: Update sim driver to the new api 2012-11-22 10:26:34 -06:00
Denis Kenzior 180f91f6c9 qmi: Update sim-legacy driver to the new API 2012-11-22 10:26:34 -06:00
Denis Kenzior d32c6451bd isi: Update UICC driver to the new API 2012-11-22 10:26:34 -06:00
Denis Kenzior 6451d012ec isimodem: Update sim driver to the new API 2012-11-22 10:26:34 -06:00
Marcel Holtmann 48a5fec5cc atmodem: Monitor IFX technology and band changes 2012-11-23 16:20:15 +01:00
Cedric Jehasse b728a02981 atmodem: add PIN retry count for Alcatel modems 2012-11-15 12:31:06 -06:00
Cedric Jehasse 5f9c1e9e34 atmodem: Poll SIM state after entering PIN
Encountered a problem of CME ERROR 14: SIM busy on Alcatel and Huawei modem.
The Huawei modem has a ^SIMST unsollicited sim state indication, but not all
Huawei modems support this.
So poll the SIM state, as was already done for ZTE modems.
2012-11-12 13:30:38 -06:00
Cedric Jehasse 0f242c9714 atmodem: Add ALCATEL vendor 2012-11-12 13:30:13 -06:00
Holger Hans Peter Freyther 2b9b1ae6d3 sim: Fix the quirk handling of CPIN for Wavecom
The Wavecom Q2XXX support broke in commit 72ce19bf3e.
This is because at_cpin_cb called decode_at_error with final and not
with OK. This lead to an error being set in the error variable and the
new code returns early when an error is set.

The addition of the terminator in at_sim_probe for Wavecom broke in
git commit ac524be99f because
terminators can not be added on cloned chats.

Move the addition of the terminator from the atmodem to the wavecom
plugin. Use the same terminator for Q2XXX and the normal Wavecom
class. The WAVECOM terminator has been tested on a Q2XXX modem.

Apply the CPIN quirk for both WAVECOM and WAVECOM_Q2XXX inside the
sim.c file. Introduce needs_wavecom_sim_quirk to handle it for
WAVECOM and WAVECOM_Q2XXX.
2012-11-01 04:56:51 -05:00
Denis Kenzior bddfb9bfc5 isimodem: Fix style issues in previous commit 2012-09-11 23:30:25 -05:00
Jarko Poutiainen dc2dc41bcf isimodem: voicecall answer fix for Nemo on N9
Voicecall answering in Mer/Nemomobile run on Nokia N9 will fail
unless call id is passed to modem.
2012-09-11 23:29:43 -05:00
Denis Kenzior b274e74102 netreg: Remove netreg atom in case init fails 2012-09-11 23:21:48 -05:00
Denis Kenzior bb0f308223 netreg: Don't register for CIEV twice 2012-09-11 23:20:53 -05:00
Christopher Vogl edbf04cded netreg: Add telit version for ciev notification 2012-09-11 23:16:32 -05:00
Christopher Vogl b87619a43a netreg: Query and select supported CMER modes 2012-09-11 22:54:43 -05:00
Philippe Nunes 006a37cdf8 atmodem: specify class for call barring query
class is specified when querying the call barring status if
the class is not the default (7 - voice, data and fax)
2012-09-05 15:04:18 -05:00
Christopher Vogl 90c7bdfc8d sim: return from CPIN when SIM unlocked for telit
Only return from CPIN when the modem informs that the SIM is ready
2012-08-22 18:44:18 -05:00