blob: a398e7d07fca4bf8057b528ff6792b1c93dd89c4 [file] [log] [blame]
Jayachandran C262b6062020-07-22 15:53:58 -07001/*
2 * Copyright (C) 2020 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.6;
18
allenwtsu1c3dcd32020-09-25 17:58:01 +080019
20import @1.0::CdmaSmsMessage;
21import @1.0::GsmSmsMessage;
Jordan Liue4f5f022020-10-21 16:28:40 -070022import @1.1::CardPowerState;
Jayachandran C9bc276b2020-07-24 00:46:58 -070023import @1.2::DataRequestReason;
Thiébaud Weksteen5ae16f32020-08-21 16:46:07 +020024import @1.4::RadioAccessFamily;
Jayachandran C262b6062020-07-22 15:53:58 -070025import @1.5::IRadio;
Jayachandran C9bc276b2020-07-24 00:46:58 -070026import @1.5::AccessNetwork;
27import @1.5::DataProfileInfo;
28import @1.5::LinkAddress;
Jayachandran C262b6062020-07-22 15:53:58 -070029
30/**
31 * This interface is used by telephony and telecom to talk to cellular radio.
32 * All the functions have minimum one parameter:
33 * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
34 * duration of a method call. If clients provide colliding serials (including passing the same
35 * serial to different methods), multiple responses (one for each method call) must still be served.
Jayachandran C9bc276b2020-07-24 00:46:58 -070036 * setResponseFunctions must work with @1.6::IRadioResponse and @1.6::IRadioIndication.
Jayachandran C262b6062020-07-22 15:53:58 -070037 */
38interface IRadio extends @1.5::IRadio {
Jayachandran C9bc276b2020-07-24 00:46:58 -070039 /**
Tim Line29df602020-09-26 22:43:24 +080040 * Toggle radio on and off (for "airplane" mode)
41 * If the radio is turned off/on the radio modem subsystem
42 * is expected return to an initialized state. For instance,
43 * any voice and data calls must be terminated and all associated
44 * lists emptied.
45 *
46 * When setting radio power on to exit from airplane mode to place an emergency call on this
47 * logical modem, powerOn, forEmergencyCall and preferredForEmergencyCall must be true. In
48 * this case, this modem is optimized to scan only emergency call bands, until:
49 * 1) Emergency call is completed; or
50 * 2) Another setRadioPower_1_5 is issued with forEmergencyCall being false or
51 * preferredForEmergencyCall being false; or
52 * 3) Timeout after 30 seconds if dial or emergencyDial is not called.
53 * Once one of these conditions is reached, the modem should move into normal operation.
54 *
55 * @param serial Serial number of request.
56 * @param powerOn To turn on radio -> on = true, to turn off radio -> on = false.
57 * @param forEmergencyCall To indication to radio if this request is due to emergency call.
58 * No effect if powerOn is false.
59 * @param preferredForEmergencyCall indicate whether the following emergency call will be sent
60 * on this modem or not. No effect if forEmergencyCall is false, or powerOn is false.
61 *
62 * Response callback is IRadioConfigResponse. setRadioPowerResponse_1_6.
63
64 * Note this API is the same as the 1.5
65 */
66 oneway setRadioPower_1_6(int32_t serial, bool powerOn, bool forEmergencyCall,
67 bool preferredForEmergencyCall);
68
69 /**
Jayachandran C9bc276b2020-07-24 00:46:58 -070070 * Returns the data call list. An entry is added when a setupDataCall() is issued and removed
71 * on a deactivateDataCall(). The list is emptied when setRadioPower() off/on issued or when
72 * the vendor HAL or modem crashes.
73 *
74 * @param serial Serial number of request.
75 *
76 * Response function is IRadioResponse.getDataCallListResponse_1_6()
77 */
78 oneway getDataCallList_1_6(int32_t serial);
79
80 /**
81 * Setup a packet data connection. If DataCallResponse.status returns DataCallFailCause:NONE,
82 * the data connection must be added to data calls and a unsolDataCallListChanged() must be
83 * sent. The call remains until removed by subsequent unsolDataCallIstChanged(). It may be
84 * lost due to many factors, including deactivateDataCall() being issued, the radio powered
85 * off, reception lost or even transient factors like congestion. This data call list is
86 * returned by getDataCallList() and dataCallListChanged().
87 *
88 * The Radio is expected to:
89 * - Create one data call context.
90 * - Create and configure a dedicated interface for the context.
91 * - The interface must be point to point.
92 * - The interface is configured with one or more addresses and is capable of sending and
93 * receiving packets. The format is IP address with optional "/" prefix length
94 * (The format is defined in RFC-4291 section 2.3). For example, "192.0.1.3",
95 * "192.0.1.11/16", or "2001:db8::1/64". Typically one IPv4 or one IPv6 or one of each. If
96 * the prefix length is absent, then the addresses are assumed to be point to point with
97 * IPv4 with prefix length 32 or IPv6 with prefix length 128.
98 * - Must not modify routing configuration related to this interface; routing management is
99 * exclusively within the purview of the Android OS.
100 * - Support simultaneous data call contexts up to DataRegStateResult.maxDataCalls specified
101 * in the response of getDataRegistrationState.
102 *
103 * @param serial Serial number of request.
104 * @param accessNetwork The access network to setup the data call. If the data connection cannot
105 * be established on the specified access network then it should be responded with an error.
106 * @param dataProfileInfo Data profile info.
107 * @param roamingAllowed Indicates whether or not data roaming is allowed by the user.
108 * @param reason The request reason. Must be DataRequestReason:NORMAL or
109 * DataRequestReason:HANDOVER.
110 * @param addresses If the reason is DataRequestReason:HANDOVER, this indicates the list of link
111 * addresses of the existing data connection. This parameter must be ignored unless reason
112 * is DataRequestReason:HANDOVER.
113 * @param dnses If the reason is DataRequestReason:HANDOVER, this indicates the list of DNS
114 * addresses of the existing data connection. The format is defined in RFC-4291 section 2.2.
115 * For example, "192.0.1.3" or "2001:db8::1". This parameter must be ignored unless reason
116 * is DataRequestReason:HANDOVER.
Daniel Bright3c72fba2020-11-03 14:56:23 -0800117 * @param pduSessionId The pdu session id to be used for this data call. A value of 0 means
118 * no pdu session id was attached to this call.
119 * Reference: 3GPP TS 24.007 section 11.2.3.1b
Daniel Bright8e3a2bf2020-12-14 12:51:08 -0800120 * @param sliceInfo SliceInfo to be used for the data connection when a handover occurs from
121 * EPDG to 5G. It is valid only when accessNetwork is AccessNetwork:NGRAN. If the slice
122 * passed from EPDG is rejected, then the data failure cause must be DataCallFailCause:SLICE_REJECTED.
Jayachandran C9bc276b2020-07-24 00:46:58 -0700123 *
124 * Response function is IRadioResponse.setupDataCallResponse_1_6()
125 *
126 * Note this API is the same as the 1.5
127 */
128 oneway setupDataCall_1_6(int32_t serial, AccessNetwork accessNetwork,
129 DataProfileInfo dataProfileInfo, bool roamingAllowed,
Daniel Bright3c72fba2020-11-03 14:56:23 -0800130 DataRequestReason reason, vec<LinkAddress> addresses, vec<string> dnses,
Daniel Bright8e3a2bf2020-12-14 12:51:08 -0800131 int32_t pduSessionId, OptionalSliceInfo sliceInfo);
allenwtsu1c3dcd32020-09-25 17:58:01 +0800132
133 /**
134 * Send an SMS message
135 *
136 * @param serial Serial number of request.
137 * @param message GsmSmsMessage as defined in types.hal
138 *
139 * Response function is IRadioResponse.sendSmsResponse_1_6()
140 *
141 * Note this API is the same as the 1.0
142 *
143 * Based on the return error, caller decides to resend if sending sms
144 * fails. RadioError:SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
145 * and RadioError:GENERIC_FAILURE means no retry (i.e. error cause is 500)
146 */
147 oneway sendSms_1_6(int32_t serial, GsmSmsMessage message);
148
149 /**
150 * Send an SMS message. Identical to sendSms_1_6,
151 * except that more messages are expected to be sent soon. If possible,
152 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
153 *
154 * @param serial Serial number of request.
155 * @param message GsmSmsMessage as defined in types.hal
156 *
157 * Response function is IRadioResponse.sendSMSExpectMoreResponse_1_6()
158 *
159 * Note this API is the same as the 1.0
160 *
161 * Based on the return error, caller decides to resend if sending sms
162 * fails. RadioError:SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
163 * and RadioError:GENERIC_FAILURE means no retry (i.e. error cause is 500)
164 */
165 oneway sendSMSExpectMore_1_6(int32_t serial, GsmSmsMessage message);
166
167 /**
168 * Send a CDMA SMS message
169 *
170 * @param serial Serial number of request.
171 * @param sms Cdma Sms to be sent described by CdmaSmsMessage in types.hal
172 *
173 * Response callback is IRadioResponse.sendCdmaSmsResponse_1_6()
174 *
175 * Note this API is the same as the 1.0
176 *
177 */
178 oneway sendCdmaSms_1_6(int32_t serial, CdmaSmsMessage sms);
179
180 /**
181 * Send an SMS message. Identical to sendCdmaSms_1_6,
182 * except that more messages are expected to be sent soon.
183 *
184 * @param serial Serial number of request.
185 * @param sms Cdma Sms to be sent described by CdmaSmsMessage in types.hal
186 *
187 * Response callback is IRadioResponse.sendCdmaSMSExpectMoreResponse_1_6()
188 *
189 * Note this API is the same as the 1.5
190 *
191 */
192 oneway sendCdmaSmsExpectMore_1_6(int32_t serial, CdmaSmsMessage sms);
Sooraj Sasindrana9d461b2020-08-14 11:00:11 -0700193
194 /**
Jordan Liue4f5f022020-10-21 16:28:40 -0700195 * Set SIM card power state.
196 * Request is used to power off or power on the card. It should not generate
197 * a CardState.CARDSTATE_ABSENT indication, since the SIM is still physically
198 * inserted.
199 *
200 * @param serial Serial number of request
201 * @param powerUp POWER_DOWN if powering down the SIM card,
202 * POWER_UP if powering up the SIM card,
203 * POWER_UP_PASS_THROUGH if powering up the SIM card in
204 * pass through mode.
205 *
206 * When SIM card is in POWER_UP_PASS_THROUGH, the modem does not send
207 * any command to it (for example SELECT of MF, or TERMINAL
208 * CAPABILITY), and the SIM card is controlled completely by Telephony
209 * sending APDUs directly. The SIM card state must be
210 * RIL_CARDSTATE_PRESENT and the number of card apps will be 0.
211 * No new error code is generated. Emergency calls are supported in
212 * the same way as if the SIM card is absent.
213 * Pass-through mode is valid only for the specific card session where
214 * it is activated, and normal behavior occurs at the next SIM
215 * initialization, unless POWER_UP_PASS_THROUGH is requested again.
216 *
217 * The device is required to power down the SIM card before it can
218 * switch the mode between POWER_UP and POWER_UP_PASS_THROUGH.
219 * At device power up, the SIM interface is powered up automatically.
220 * Each subsequent request to this method is processed only after the
221 * completion of the previous one.
222 *
Jordan Liu8ca952e2020-11-09 15:47:21 -0800223 * When the SIM is in POWER_DOWN, the modem should send an empty vector of
224 * AppStatus in CardStatus.applications. If a SIM in the POWER_DOWN state
225 * is removed and a new SIM is inserted, the new SIM should be in POWER_UP
226 * mode by default. If the device is turned off or restarted while the SIM
227 * is in POWER_DOWN, then the SIM should turn on normally in POWER_UP mode
228 * when the device turns back on.
229 *
Jordan Liue4f5f022020-10-21 16:28:40 -0700230 * Response callback is IRadioResponse.setSimCardPowerResponse_1_6().
231 * Note that this differs from setSimCardPower_1_1 in that the response
232 * callback should only be sent once the device has finished executing
233 * the request (the SIM has finished powering on or off).
234 */
235 oneway setSimCardPower_1_6(int32_t serial, CardPowerState powerUp);
236
237 /**
Sooraj Sasindrana9d461b2020-08-14 11:00:11 -0700238 * Enable or disable E-UTRA-NR dual connectivity. If disabled then UE will not connect
239 * to secondary carrier.
240 *
241 * @param serial Serial number of request.
242 * @param nrDualConnectivityState expected NR dual connectivity state.
243 * 1. Enable NR dual connectivity {NrDualConnectivityState:ENABLE}
244 * 2. Disable NR dual connectivity {NrDualConnectivityState:DISABLE}
245 * 3. Disable NR dual connectivity and force secondary cell to be released
246 * {NrDualConnectivityState:DISABLE_IMMEDIATE}
247
Sooraj Sasindrane9525fd2020-11-03 20:46:57 -0800248 * Response callback is IRadioResponse.setNRDualConnectivityStateResponse()
Sooraj Sasindrana9d461b2020-08-14 11:00:11 -0700249 */
Sooraj Sasindrane9525fd2020-11-03 20:46:57 -0800250 oneway setNrDualConnectivityState(int32_t serial,
Sooraj Sasindrana9d461b2020-08-14 11:00:11 -0700251 NrDualConnectivityState nrDualConnectivityState);
252
253 /**
254 * Is E-UTRA-NR Dual Connectivity enabled
255 *
256 * @param serial Serial number of request.
257 * Response callback is IRadioResponse.isNRDualConnectivityEnabledResponse()
258 */
259 oneway isNrDualConnectivityEnabled(int32_t serial);
Daniel Bright15cc34a2020-10-26 11:34:53 -0700260
261 /**
262 * Reserves an unallocated pdu session id from the pool of ids.
263 *
264 * The allocated id is returned in the response.
265 *
266 * When the id is no longer needed, call releasePduSessionId to
267 * return it to the pool.
268 *
269 * Reference: 3GPP TS 24.007 section 11.2.3.1b
270 *
271 * @param serial Serial number of request.
272 *
273 * Response function is IRadioResponse.allocatePduSessionIdResponse()
274 */
275 oneway allocatePduSessionId(int32_t serial);
276
277 /**
278 * Releases a pdu session id that was previously allocated using
279 * allocatePduSessionId.
280 *
281 * Reference: 3GPP TS 24.007 section 11.2.3.1b
282 * @param serial Serial number of request.
283 * @param id Pdu session id to release.
284 *
285 * Response function is IRadioResponse.releasePduSessionIdResponse()
286 */
287 oneway releasePduSessionId(int32_t serial, int32_t id);
288
289 /**
290 * Indicates that a handover to the IWLAN transport has begun.
291 *
292 * Any resources being transferred to the IWlan transport cannot be released while a
293 * handover is underway. For example, if a pdu session id needs to be
294 * transferred to IWlan, then, the modem should not release the id while
295 * the handover is in progress.
296 *
297 * If a handover was unsuccessful, then the framework calls IRadio::cancelHandover.
298 * The modem retains ownership over any of the resources being transferred to IWlan.
299 *
300 * If a handover was successful, the framework calls IRadio::deactivateDataCall with reason
301 * HANDOVER. The IWlan transport now owns the transferred resources and is responsible for
302 * releasing them.
303 *
304 * @param serial Serial number of request.
305 * @param id callId The identifier of the data call which is provided in SetupDataCallResult
306 *
Daniel Bright3c72fba2020-11-03 14:56:23 -0800307 * Response function is IRadioResponse.startHandoverResponse()
Daniel Bright15cc34a2020-10-26 11:34:53 -0700308 */
Daniel Bright3c72fba2020-11-03 14:56:23 -0800309 oneway startHandover(int32_t serial, int32_t callId);
Daniel Bright15cc34a2020-10-26 11:34:53 -0700310
311 /**
Daniel Bright3c72fba2020-11-03 14:56:23 -0800312 * Indicates that a handover was cancelled after a call to IRadio::startHandover.
Daniel Bright15cc34a2020-10-26 11:34:53 -0700313 *
314 * Since the handover was unsuccessful, the modem retains ownership over any of the resources
315 * being transferred and is still responsible for releasing them.
316 *
317 * @param serial Serial number of request.
318 * @param id callId The identifier of the data call which is provided in SetupDataCallResult
319 *
320 * Response function is IRadioResponse.cancelHandoverResponse()
321 */
322 oneway cancelHandover(int32_t serial, int32_t callId);
Thiébaud Weksteen5ae16f32020-08-21 16:46:07 +0200323
324 /**
325 * Requests to set the network type for searching and registering.
326 *
327 * Instruct the radio to *only* accept the types of network provided. This
328 * is stronger than setPreferredNetworkType which is a suggestion.
329 *
330 * @param serial Serial number of request.
331 * @param networkTypeBitmap a 32-bit bearer bitmap of RadioAccessFamily
332 *
Yomna Nassere8bfa9c2020-11-17 22:00:55 +0000333 * Response callback is IRadioResponse.setNetworkTypeBitmapResponse()
Thiébaud Weksteen5ae16f32020-08-21 16:46:07 +0200334 */
335 oneway setAllowedNetworkTypeBitmap(
336 uint32_t serial, bitfield<RadioAccessFamily> networkTypeBitmap);
Jack Nudelman5cd94142020-09-24 14:23:35 -0700337
338 /**
Yomna Nassere8bfa9c2020-11-17 22:00:55 +0000339 * Requests bitmap representing the currently allowed network types.
340 *
341 * Requests the bitmap set by the corresponding method
342 * setAllowedNetworkTypeBitmap, which sets a strict set of RATs for the
343 * radio to use. Differs from getPreferredNetworkType and getPreferredNetworkTypeBitmap
344 * in that those request *preferences*.
345 *
346 * @param serial Serial number of request.
347 *
348 * Response callback is IRadioResponse.getNetworkTypeBitmapResponse()
349 */
350 oneway getAllowedNetworkTypeBitmap(uint32_t serial);
351
352 /**
Jack Nudelman5cd94142020-09-24 14:23:35 -0700353 * Control data throttling at modem.
354 * - DataThrottlingAction:NO_DATA_THROTTLING should clear any existing
355 * data throttling within the requested completion window.
356 * - DataThrottlingAction:THROTTLE_SECONDARY_CARRIER: Remove any existing
357 * throttling on anchor carrier and achieve maximum data throttling on
358 * secondary carrier within the requested completion window.
359 * - DataThrottlingAction:THROTTLE_ANCHOR_CARRIER: disable secondary
360 * carrier and achieve maximum data throttling on anchor carrier by
361 * requested completion window.
362 * - DataThrottlingAction:HOLD: Immediately hold on to current level of
363 * throttling.
364 *
365 * @param serial Serial number of request.
366 * @param dataThrottlingAction DataThrottlingAction as defined in types.hal
Jack Nudelman3f765542020-11-18 16:21:06 -0800367 * @param completionDurationMillis window, in milliseconds, in which the
368 * requested throttling action has to be achieved. This must be 0 when
Jack Nudelman5cd94142020-09-24 14:23:35 -0700369 * dataThrottlingAction is DataThrottlingAction:HOLD.
370 *
371 * Response function is IRadioResponse.setDataThrottlingResponse()
372 */
373 oneway setDataThrottling(int32_t serial,
374 DataThrottlingAction dataThrottlingAction,
Jack Nudelman3f765542020-11-18 16:21:06 -0800375 int64_t completionDurationMillis);
Sarah Chinf69abcf2020-11-18 13:40:15 -0800376
377 /**
378 * Get which bands the modem's background scan is acting on.
379 *
380 * @param serial Serial number of request.
381 *
382 * Response callback is IRadioResponse.getSystemSelectionChannelsResponse()
383 */
384 oneway getSystemSelectionChannels(int32_t serial);
Hui Wangfb202502020-11-13 04:30:18 +0000385
Mingming Caida0d9832020-11-05 17:56:57 -0800386 /**
387 * Request all of the current cell information known to the radio. The radio
388 * must return list of all current cells, including the neighboring cells. If for a particular
389 * cell information isn't known then the appropriate unknown value will be returned.
390 * This does not cause or change the rate of unsolicited cellInfoList().
391 *
392 * This is identitcal to getCellInfoList in V1.0, but it requests updated version of CellInfo.
393 *
394 * @param serial Serial number of request.
395 *
396 * Response callback is IRadioResponse.getCellInfoListResponse()
397 */
398 oneway getCellInfoList_1_6(int32_t serial);
399
Hui Wangfb202502020-11-13 04:30:18 +0000400 /**
401 * Request current voice registration state.
402 *
403 * @param serial Serial number of request.
404 *
405 * Response function is IRadioResponse.getVoiceRegistrationStateResponse_1_6()
406 */
407 oneway getVoiceRegistrationState_1_6(int32_t serial);
408
409 /**
Mingming Cai20a2f422020-12-03 12:18:48 -0800410 * Requests current signal strength and associated information. Must succeed if radio is on.
411 *
412 * @param serial Serial number of request.
413 *
414 * Response function is IRadioResponse.getSignalStrengthResponse_1_6()
415 */
416 oneway getSignalStrength_1_6(int32_t serial);
417
418 /**
Hui Wangfb202502020-11-13 04:30:18 +0000419 * Request current data registration state.
420 *
421 * @param serial Serial number of request.
422 *
423 * Response function is IRadioResponse.getDataRegistrationStateResponse_1_6()
424 */
425 oneway getDataRegistrationState_1_6(int32_t serial);
Shinsuke Ishiokaede1e952018-08-17 18:02:29 +0900426
427 /**
428 * Requests current call list
429 *
430 * @param serial Serial number of request.
431 *
432 * Response function is IRadioResponse.getCurrentCallsResponse_1_6()
433 */
434 oneway getCurrentCalls_1_6(int32_t serial);
Jayachandran C262b6062020-07-22 15:53:58 -0700435};