Commit Graph

1643 Commits

Author SHA1 Message Date
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
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