blob: bea0454aa3b59f135d76011e27bec76ab2078274 [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
Nazish Tabassumba2f8302019-12-10 14:35:09 +053019import @1.0::CdmaSmsMessage;
Sarah Chin039d5422019-11-05 15:39:32 -080020import @1.2::DataRequestReason;
Jack Yu7f6c8d02019-12-09 14:02:56 -080021import @1.4::DataProfileInfo;
Nazish Tabassumba2f8302019-12-10 14:35:09 +053022import @1.4::IRadio;
sqianf1850bf2019-11-12 18:26:30 -080023import @1.5::AccessNetwork;
Nathan Harold4bb9d312019-12-23 14:34:26 -080024import @1.5::BarringInfo;
Sarah Chin039d5422019-11-05 15:39:32 -080025import @1.5::DataProfileInfo;
Nathan Haroldbacb8212019-12-27 12:58:32 -080026import @1.5::IndicationFilter;
Jack Yu7f6c8d02019-12-09 14:02:56 -080027import @1.5::LinkAddress;
Sarah Chinb7709bb2019-11-01 13:19:31 -070028import @1.5::NetworkScanRequest;
Sarah Chin3efba532019-12-18 17:37:27 -080029import @1.5::RadioAccessNetworks;
Sarah Chinb7709bb2019-11-01 13:19:31 -070030import @1.5::RadioAccessSpecifier;
sqianf1850bf2019-11-12 18:26:30 -080031import @1.5::SignalThresholdInfo;
Malcolm Chen360e1f92019-10-02 11:38:13 -070032
33/**
34 * This interface is used by telephony and telecom to talk to cellular radio.
35 * All the functions have minimum one parameter:
36 * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
37 * duration of a method call. If clients provide colliding serials (including passing the same
38 * serial to different methods), multiple responses (one for each method call) must still be served.
39 * setResponseFunctions must work with @1.5::IRadioResponse and @1.5::IRadioIndication.
40 */
41interface IRadio extends @1.4::IRadio {
sqianf1850bf2019-11-12 18:26:30 -080042 /**
43 * Sets the signal strength reporting criteria.
44 *
45 * The resulting reporting rules are the AND of all the supplied criteria. For each RAN
46 * The hysteresisDb and thresholds apply to only the following measured quantities:
47 * -GERAN - RSSI
48 * -CDMA2000 - RSSI
49 * -UTRAN - RSCP
50 * -EUTRAN - RSRP/RSRQ/RSSNR
51 * -NGRAN - SSRSRP/SSRSRQ/SSSINR
52 *
Shuo Qian511264a2019-11-26 19:37:05 -080053 * Note: Reporting criteria must be individually set for each RAN. For each RAN, if none of
54 * reporting criteria of any measurement is set enabled
55 * (see @1.5::SignalThresholdInfo.isEnabled), the reporting criteria for this RAN is
56 * implementation-defined. For each RAN, if any of reporting criteria of any measure is set
57 * enabled, the reporting criteria of the other measures in this RAN are set disabled
58 * (see @1.5::SignalThresholdInfo.isEnabled) until they are set enabled.
sqianf1850bf2019-11-12 18:26:30 -080059 *
60 * Response callback is
61 * IRadioResponse.setSignalStrengthReportingCriteriaResponse_1_5()
62 *
63 * @param serial Serial number of request.
64 * @param signalThresholdInfo Signal threshold info including the threshold values,
Shuo Qian511264a2019-11-26 19:37:05 -080065 * hysteresisDb, hysteresisMs and isEnabled.
66 * See @1.5::SignalThresholdInfo for details.
sqianf1850bf2019-11-12 18:26:30 -080067 * @param accessNetwork The type of network for which to apply these thresholds.
68 */
69 oneway setSignalStrengthReportingCriteria_1_5(int32_t serial,
70 SignalThresholdInfo signalThresholdInfo, AccessNetwork accessNetwork);
Malcolm Chenfb6d6242019-11-12 19:03:12 -080071
72 /**
73 * Enable or disable UiccApplications on the SIM. If disabled:
74 * - Modem will not register on any network.
75 * - SIM must be PRESENT, and the IccId of the SIM must still be accessible.
76 * - The corresponding modem stack is still functional, e.g. able to make emergency calls or
77 * do network scan.
78 * By default if this API is not called, the uiccApplications must be enabled automatically.
79 * It must work for both single SIM and DSDS cases for UX consistency.
80 * The preference is per SIM, and must be remembered over power cycle, modem reboot, or SIM
81 * insertion / unplug.
82 *
Malcolm Chen2e7b82a2019-12-10 18:54:23 -080083 * @param serial Serial number of request.
84 * @param enable true if to enable uiccApplications, false to disable.
Malcolm Chenfb6d6242019-11-12 19:03:12 -080085
86 * Response callback is IRadioResponse.enableUiccApplicationsResponse()
87 */
88 oneway enableUiccApplications(int32_t serial, bool enable);
89
90 /**
91 * Whether uiccApplications are enabled, or disabled.
92 *
93 * By default uiccApplications must be enabled, unless enableUiccApplications() with enable
94 * being false is called.
95 *
96 * @param serial Serial number of request.
97 *
98 * Response callback is IRadioResponse.areUiccApplicationsEnabledResponse()
99 */
100 oneway areUiccApplicationsEnabled(int32_t serial);
101
102 /**
Sarah Chinb7709bb2019-11-01 13:19:31 -0700103 * Specify which bands modem's background scan must act on.
104 * If specifyChannels is true, it only scans bands specified in specifiers.
105 * If specifyChannels is false, it scans all bands.
106 *
107 * For example, CBRS is only on LTE band 48. By specifying this band,
108 * modem saves more power.
109 *
110 * @param serial Serial number of request.
111 * @param specifyChannels whether to scan bands defined in specifiers.
112 * @param specifiers which bands to scan. Only used if specifyChannels is true.
113 *
114 * Response callback is IRadioResponse.setSystemSelectionChannelsResponse()
115 */
116 oneway setSystemSelectionChannels_1_5(int32_t serial, bool specifyChannels,
117 vec<RadioAccessSpecifier> specifiers);
118
119 /**
120 * Starts a network scan
121 *
122 * @param serial Serial number of request.
123 * @param request Defines the radio networks/bands/channels which need to be scanned.
124 *
125 * Same API as @1.4::IRadio.startNetworkScan_1_4, except using
126 * 1.5 version of NetworkScanRequest
127 */
128 oneway startNetworkScan_1_5(int32_t serial, NetworkScanRequest request);
Sarah Chin039d5422019-11-05 15:39:32 -0800129
130 /**
131 * Setup a packet data connection. If DataCallResponse.status returns DataCallFailCause:NONE,
132 * the data connection must be added to data calls and a unsolDataCallListChanged() must be
133 * sent. The call remains until removed by subsequent unsolDataCallIstChanged(). It may be
134 * lost due to many factors, including deactivateDataCall() being issued, the radio powered
135 * off, reception lost or even transient factors like congestion. This data call list is
136 * returned by getDataCallList() and dataCallListChanged().
137 *
138 * The Radio is expected to:
139 * - Create one data call context.
140 * - Create and configure a dedicated interface for the context.
141 * - The interface must be point to point.
142 * - The interface is configured with one or more addresses and is capable of sending and
143 * receiving packets. The prefix length of the addresses must be /32 for IPv4 and /128
144 * for IPv6.
145 * - Must not modify routing configuration related to this interface; routing management is
146 * exclusively within the purview of the Android OS.
147 * - Support simultaneous data call contexts up to DataRegStateResult.maxDataCalls specified
148 * in the response of getDataRegistrationState.
149 *
150 * @param serial Serial number of request.
151 * @param accessNetwork The access network to setup the data call. If the data connection cannot
152 * be established on the specified access network, the setup request must be failed.
153 * @param dataProfileInfo Data profile info.
154 * @param roamingAllowed Indicates whether or not data roaming is allowed by the user.
155 * @param reason The request reason. Must be DataRequestReason.NORMAL or
156 * DataRequestReason.HANDOVER.
157 * @param addresses If the reason is DataRequestReason.HANDOVER, this indicates the list of link
Nathan Harold755bf302020-01-08 14:55:05 -0800158 * addresses of the existing data connection. This parameter must be ignored unless reason
159 * is DataRequestReason.HANDOVER.
Sarah Chin039d5422019-11-05 15:39:32 -0800160 * @param dnses If the reason is DataRequestReason.HANDOVER, this indicates the list of DNS
161 * addresses of the existing data connection. The format is defined in RFC-4291 section
162 * 2.2. For example, "192.0.1.3" or "2001:db8::1". This parameter must be ignored unless
163 * reason is DataRequestReason.HANDOVER.
164 *
165 * Response function is IRadioResponse.setupDataCallResponse_1_5()
166 *
167 * Note this API is the same as the 1.4 version except using the
Nathan Harold755bf302020-01-08 14:55:05 -0800168 * 1.5 AccessNetwork, DataProfileInto, and link addresses as the input param.
Sarah Chin039d5422019-11-05 15:39:32 -0800169 */
170 oneway setupDataCall_1_5(int32_t serial, AccessNetwork accessNetwork,
171 DataProfileInfo dataProfileInfo, bool roamingAllowed,
Jack Yu7f6c8d02019-12-09 14:02:56 -0800172 DataRequestReason reason, vec<LinkAddress> addresses, vec<string> dnses);
Sarah Chin039d5422019-11-05 15:39:32 -0800173
174 /**
175 * Set an apn to initial attach network
176 *
177 * @param serial Serial number of request.
178 * @param dataProfileInfo data profile containing APN settings
179 *
180 * Response callback is IRadioResponse.setInitialAttachApnResponse_1_5()
181 *
182 * Note this API is the same as the 1.4 version except using the 1.5 DataProfileInfo
183 * as the input param.
184 */
185 oneway setInitialAttachApn_1_5(int32_t serial, DataProfileInfo dataProfileInfo);
186
187 /**
188 * Send data profiles of the current carrier to the modem.
189 *
190 * @param serial Serial number of request.
191 * @param profiles Array of DataProfile to set.
192 *
193 * Response callback is IRadioResponse.setDataProfileResponse_1_5()
194 *
195 * Note this API is the same as the 1.4 version except using the 1.5 DataProfileInfo
Nathan Harold755bf302020-01-08 14:55:05 -0800196 * as the input param.
Sarah Chin039d5422019-11-05 15:39:32 -0800197 */
198 oneway setDataProfile_1_5(int32_t serial, vec<DataProfileInfo> profiles);
Malcolm Chen8f8e3d72019-12-16 18:53:58 -0800199
200 /**
201 * Toggle radio on and off (for "airplane" mode)
202 * If the radio is turned off/on the radio modem subsystem
203 * is expected return to an initialized state. For instance,
204 * any voice and data calls must be terminated and all associated
205 * lists emptied.
206 *
207 * When setting radio power on to exit from airplane mode to place an emergency call on this
208 * logical modem, powerOn, forEmergencyCall and preferredForEmergencyCall must be true. In
209 * this case, this modem is optimized to scan only emergency call bands, until:
210 * 1) Emergency call is completed; or
211 * 2) Another setRadioPower_1_5 is issued with forEmergencyCall being false or
212 * preferredForEmergencyCall being false; or
213 * 3) Timeout after a long period of time.
214 *
215 * @param serial Serial number of request.
216 * @param powerOn To turn on radio -> on = true, to turn off radio -> on = false.
217 * @param forEmergencyCall To indication to radio if this request is due to emergency call.
218 * No effect if powerOn is false.
219 * @param preferredForEmergencyCall indicate whether the following emergency call will be sent
220 * on this modem or not. No effect if forEmergencyCall is false, or powerOn is false.
221 *
222 * Response callback is IRadioConfigResponse. setRadioPowerResponse_1_5.
223 */
224 oneway setRadioPower_1_5(int32_t serial, bool powerOn, bool forEmergencyCall,
225 bool preferredForEmergencyCall);
Nathan Haroldbacb8212019-12-27 12:58:32 -0800226
227 /**
228 * Sets the indication filter.
229 *
230 * Prevents the reporting of specified unsolicited indications from the radio. This is used
231 * for power saving in instances when those indications are not needed. If unset, defaults to
232 * @1.2::IndicationFilter:ALL.
233 *
234 * @param serial Serial number of request.
235 * @param indicationFilter 32-bit bitmap of IndicationFilter. Bits set to 1 indicate the
236 * indications are enabled. See @1.5::IndicationFilter for the definition of each bit.
237 *
238 * Response callback is IRadioResponse.setIndicationFilterResponse()
239 */
240 oneway setIndicationFilter_1_5(int32_t serial, bitfield<IndicationFilter> indicationFilter);
Nathan Harold4bb9d312019-12-23 14:34:26 -0800241
242 /**
243 * Get all the barring info for the current camped cell applicable to the current user.
244 *
245 * @param serial Serial number of request.
246 *
247 * Response callback is IRadioResponse.getBarringInfoResponse()
248 */
249 oneway getBarringInfo(int32_t serial);
Nathan Harold8f6b67b2020-01-16 17:00:49 -0800250
251 /**
252 * Request current voice registration state
253 *
254 * @param serial Serial number of request.
255 *
256 * Response function is IRadioResponse.getVoiceRegistrationStateResponse_1_5()
257 */
258 oneway getVoiceRegistrationState_1_5(int32_t serial);
259
260 /**
261 * Request current data registration state
262 *
263 * @param serial Serial number of request.
264 *
265 * Response function is IRadioResponse.getDataRegistrationStateResponse_1_5()
266 */
267 oneway getDataRegistrationState_1_5(int32_t serial);
Sarah Chin3efba532019-12-18 17:37:27 -0800268
269 /*
270 * Manually select a specified network.
271 * This request must not respond until the new operator is selected and registered.
272 * Per TS 23.122, the RAN is just the initial suggested value.
273 * If registration fails, the RAN is not available afterwards, or the RAN is not within
274 * the network types specified by IRadio::setPreferredNetworkTypeBitmap, then the modem
275 * will need to select the next best RAN for network registration.
276 *
277 * @param serial Serial number of request.
278 * @param operatorNumeric String specifying MCCMNC of network to select (eg "310170").
279 * @param ran Initial suggested radio access network type. If value is UNKNOWN, the modem
280 * will select the next best RAN for network registration.
281 *
282 * Response function is IRadioResponse.setNetworkSelectionModeManualResponse_1_5()
283 */
284 oneway setNetworkSelectionModeManual_1_5(int32_t serial, string operatorNumeric,
285 RadioAccessNetworks ran);
Nazish Tabassumba2f8302019-12-10 14:35:09 +0530286
287 /**
288 * Send an SMS message. Identical to sendCdmaSms,
289 * except that more messages are expected to be sent soon.
290 *
291 * @param serial Serial number of request.
292 * @param sms Cdma Sms to be sent described by CdmaSmsMessage in types.hal
293 *
294 * Response callback is IRadioResponse.sendCdmaSMSExpectMoreResponse()
295 */
296 oneway sendCdmaSmsExpectMore(int32_t serial, CdmaSmsMessage sms);
Malcolm Chen360e1f92019-10-02 11:38:13 -0700297};