blob: 62a2c61df0370621697e4c57068823a45abe0f50 [file] [log] [blame]
Malcolm Chen360e1f92019-10-02 11:38:13 -07001/*
2 * Copyright (C) 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.hardware.radio@1.5;
18
Sarah Chin039d5422019-11-05 15:39:32 -080019import @1.2::DataRequestReason;
Malcolm Chen360e1f92019-10-02 11:38:13 -070020import @1.4::IRadio;
sqianf1850bf2019-11-12 18:26:30 -080021import @1.5::AccessNetwork;
Sarah Chin039d5422019-11-05 15:39:32 -080022import @1.5::DataProfileInfo;
Sarah Chinb7709bb2019-11-01 13:19:31 -070023import @1.5::NetworkScanRequest;
24import @1.5::RadioAccessSpecifier;
sqianf1850bf2019-11-12 18:26:30 -080025import @1.5::SignalThresholdInfo;
Malcolm Chen360e1f92019-10-02 11:38:13 -070026
27/**
28 * This interface is used by telephony and telecom to talk to cellular radio.
29 * All the functions have minimum one parameter:
30 * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
31 * duration of a method call. If clients provide colliding serials (including passing the same
32 * serial to different methods), multiple responses (one for each method call) must still be served.
33 * setResponseFunctions must work with @1.5::IRadioResponse and @1.5::IRadioIndication.
34 */
35interface IRadio extends @1.4::IRadio {
sqianf1850bf2019-11-12 18:26:30 -080036 /**
37 * Sets the signal strength reporting criteria.
38 *
39 * The resulting reporting rules are the AND of all the supplied criteria. For each RAN
40 * The hysteresisDb and thresholds apply to only the following measured quantities:
41 * -GERAN - RSSI
42 * -CDMA2000 - RSSI
43 * -UTRAN - RSCP
44 * -EUTRAN - RSRP/RSRQ/RSSNR
45 * -NGRAN - SSRSRP/SSRSRQ/SSSINR
46 *
Shuo Qian511264a2019-11-26 19:37:05 -080047 * Note: Reporting criteria must be individually set for each RAN. For each RAN, if none of
48 * reporting criteria of any measurement is set enabled
49 * (see @1.5::SignalThresholdInfo.isEnabled), the reporting criteria for this RAN is
50 * implementation-defined. For each RAN, if any of reporting criteria of any measure is set
51 * enabled, the reporting criteria of the other measures in this RAN are set disabled
52 * (see @1.5::SignalThresholdInfo.isEnabled) until they are set enabled.
sqianf1850bf2019-11-12 18:26:30 -080053 *
54 * Response callback is
55 * IRadioResponse.setSignalStrengthReportingCriteriaResponse_1_5()
56 *
57 * @param serial Serial number of request.
58 * @param signalThresholdInfo Signal threshold info including the threshold values,
Shuo Qian511264a2019-11-26 19:37:05 -080059 * hysteresisDb, hysteresisMs and isEnabled.
60 * See @1.5::SignalThresholdInfo for details.
sqianf1850bf2019-11-12 18:26:30 -080061 * @param accessNetwork The type of network for which to apply these thresholds.
62 */
63 oneway setSignalStrengthReportingCriteria_1_5(int32_t serial,
64 SignalThresholdInfo signalThresholdInfo, AccessNetwork accessNetwork);
Malcolm Chenfb6d6242019-11-12 19:03:12 -080065
66 /**
67 * Enable or disable UiccApplications on the SIM. If disabled:
68 * - Modem will not register on any network.
69 * - SIM must be PRESENT, and the IccId of the SIM must still be accessible.
70 * - The corresponding modem stack is still functional, e.g. able to make emergency calls or
71 * do network scan.
72 * By default if this API is not called, the uiccApplications must be enabled automatically.
73 * It must work for both single SIM and DSDS cases for UX consistency.
74 * The preference is per SIM, and must be remembered over power cycle, modem reboot, or SIM
75 * insertion / unplug.
76 *
Malcolm Chen2e7b82a2019-12-10 18:54:23 -080077 * @param serial Serial number of request.
78 * @param enable true if to enable uiccApplications, false to disable.
Malcolm Chenfb6d6242019-11-12 19:03:12 -080079
80 * Response callback is IRadioResponse.enableUiccApplicationsResponse()
81 */
82 oneway enableUiccApplications(int32_t serial, bool enable);
83
84 /**
85 * Whether uiccApplications are enabled, or disabled.
86 *
87 * By default uiccApplications must be enabled, unless enableUiccApplications() with enable
88 * being false is called.
89 *
90 * @param serial Serial number of request.
91 *
92 * Response callback is IRadioResponse.areUiccApplicationsEnabledResponse()
93 */
94 oneway areUiccApplicationsEnabled(int32_t serial);
95
96 /**
Sarah Chinb7709bb2019-11-01 13:19:31 -070097 * Specify which bands modem's background scan must act on.
98 * If specifyChannels is true, it only scans bands specified in specifiers.
99 * If specifyChannels is false, it scans all bands.
100 *
101 * For example, CBRS is only on LTE band 48. By specifying this band,
102 * modem saves more power.
103 *
104 * @param serial Serial number of request.
105 * @param specifyChannels whether to scan bands defined in specifiers.
106 * @param specifiers which bands to scan. Only used if specifyChannels is true.
107 *
108 * Response callback is IRadioResponse.setSystemSelectionChannelsResponse()
109 */
110 oneway setSystemSelectionChannels_1_5(int32_t serial, bool specifyChannels,
111 vec<RadioAccessSpecifier> specifiers);
112
113 /**
114 * Starts a network scan
115 *
116 * @param serial Serial number of request.
117 * @param request Defines the radio networks/bands/channels which need to be scanned.
118 *
119 * Same API as @1.4::IRadio.startNetworkScan_1_4, except using
120 * 1.5 version of NetworkScanRequest
121 */
122 oneway startNetworkScan_1_5(int32_t serial, NetworkScanRequest request);
Sarah Chin039d5422019-11-05 15:39:32 -0800123
124 /**
125 * Setup a packet data connection. If DataCallResponse.status returns DataCallFailCause:NONE,
126 * the data connection must be added to data calls and a unsolDataCallListChanged() must be
127 * sent. The call remains until removed by subsequent unsolDataCallIstChanged(). It may be
128 * lost due to many factors, including deactivateDataCall() being issued, the radio powered
129 * off, reception lost or even transient factors like congestion. This data call list is
130 * returned by getDataCallList() and dataCallListChanged().
131 *
132 * The Radio is expected to:
133 * - Create one data call context.
134 * - Create and configure a dedicated interface for the context.
135 * - The interface must be point to point.
136 * - The interface is configured with one or more addresses and is capable of sending and
137 * receiving packets. The prefix length of the addresses must be /32 for IPv4 and /128
138 * for IPv6.
139 * - Must not modify routing configuration related to this interface; routing management is
140 * exclusively within the purview of the Android OS.
141 * - Support simultaneous data call contexts up to DataRegStateResult.maxDataCalls specified
142 * in the response of getDataRegistrationState.
143 *
144 * @param serial Serial number of request.
145 * @param accessNetwork The access network to setup the data call. If the data connection cannot
146 * be established on the specified access network, the setup request must be failed.
147 * @param dataProfileInfo Data profile info.
148 * @param roamingAllowed Indicates whether or not data roaming is allowed by the user.
149 * @param reason The request reason. Must be DataRequestReason.NORMAL or
150 * DataRequestReason.HANDOVER.
151 * @param addresses If the reason is DataRequestReason.HANDOVER, this indicates the list of link
152 * addresses of the existing data connection. The format is IP address with optional "/"
153 * prefix length (The format is defined in RFC-4291 section 2.3). For example, "192.0.1.3",
154 * "192.0.1.11/16", or "2001:db8::1/64". Typically one IPv4 or one IPv6 or one of each. If
155 * the prefix length is absent, then the addresses are assumed to be point to point with
156 * IPv4 with prefix length 32 or IPv6 with prefix length 128. This parameter must be ignored
157 * unless reason is DataRequestReason.HANDOVER.
158 * @param dnses If the reason is DataRequestReason.HANDOVER, this indicates the list of DNS
159 * addresses of the existing data connection. The format is defined in RFC-4291 section
160 * 2.2. For example, "192.0.1.3" or "2001:db8::1". This parameter must be ignored unless
161 * reason is DataRequestReason.HANDOVER.
162 *
163 * Response function is IRadioResponse.setupDataCallResponse_1_5()
164 *
165 * Note this API is the same as the 1.4 version except using the
166 * 1.5 AccessNetwork and DataProfileInto as the input param.
167 */
168 oneway setupDataCall_1_5(int32_t serial, AccessNetwork accessNetwork,
169 DataProfileInfo dataProfileInfo, bool roamingAllowed,
170 DataRequestReason reason, vec<string> addresses, vec<string> dnses);
171
172 /**
173 * Set an apn to initial attach network
174 *
175 * @param serial Serial number of request.
176 * @param dataProfileInfo data profile containing APN settings
177 *
178 * Response callback is IRadioResponse.setInitialAttachApnResponse_1_5()
179 *
180 * Note this API is the same as the 1.4 version except using the 1.5 DataProfileInfo
181 * as the input param.
182 */
183 oneway setInitialAttachApn_1_5(int32_t serial, DataProfileInfo dataProfileInfo);
184
185 /**
186 * Send data profiles of the current carrier to the modem.
187 *
188 * @param serial Serial number of request.
189 * @param profiles Array of DataProfile to set.
190 *
191 * Response callback is IRadioResponse.setDataProfileResponse_1_5()
192 *
193 * Note this API is the same as the 1.4 version except using the 1.5 DataProfileInfo
194 * as the input param.
195 */
196 oneway setDataProfile_1_5(int32_t serial, vec<DataProfileInfo> profiles);
Malcolm Chen8f8e3d72019-12-16 18:53:58 -0800197
198 /**
199 * Toggle radio on and off (for "airplane" mode)
200 * If the radio is turned off/on the radio modem subsystem
201 * is expected return to an initialized state. For instance,
202 * any voice and data calls must be terminated and all associated
203 * lists emptied.
204 *
205 * When setting radio power on to exit from airplane mode to place an emergency call on this
206 * logical modem, powerOn, forEmergencyCall and preferredForEmergencyCall must be true. In
207 * this case, this modem is optimized to scan only emergency call bands, until:
208 * 1) Emergency call is completed; or
209 * 2) Another setRadioPower_1_5 is issued with forEmergencyCall being false or
210 * preferredForEmergencyCall being false; or
211 * 3) Timeout after a long period of time.
212 *
213 * @param serial Serial number of request.
214 * @param powerOn To turn on radio -> on = true, to turn off radio -> on = false.
215 * @param forEmergencyCall To indication to radio if this request is due to emergency call.
216 * No effect if powerOn is false.
217 * @param preferredForEmergencyCall indicate whether the following emergency call will be sent
218 * on this modem or not. No effect if forEmergencyCall is false, or powerOn is false.
219 *
220 * Response callback is IRadioConfigResponse. setRadioPowerResponse_1_5.
221 */
222 oneway setRadioPower_1_5(int32_t serial, bool powerOn, bool forEmergencyCall,
223 bool preferredForEmergencyCall);
Malcolm Chen360e1f92019-10-02 11:38:13 -0700224};