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