blob: 0e421cb86f0b84934d740107f378c5ae7629d146 [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;
Jayachandran C9bc276b2020-07-24 00:46:58 -070022import @1.2::DataRequestReason;
Jayachandran C262b6062020-07-22 15:53:58 -070023import @1.5::IRadio;
Jayachandran C9bc276b2020-07-24 00:46:58 -070024import @1.5::AccessNetwork;
25import @1.5::DataProfileInfo;
26import @1.5::LinkAddress;
Jayachandran C262b6062020-07-22 15:53:58 -070027
28/**
29 * This interface is used by telephony and telecom to talk to cellular radio.
30 * All the functions have minimum one parameter:
31 * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
32 * duration of a method call. If clients provide colliding serials (including passing the same
33 * serial to different methods), multiple responses (one for each method call) must still be served.
Jayachandran C9bc276b2020-07-24 00:46:58 -070034 * setResponseFunctions must work with @1.6::IRadioResponse and @1.6::IRadioIndication.
Jayachandran C262b6062020-07-22 15:53:58 -070035 */
36interface IRadio extends @1.5::IRadio {
Jayachandran C9bc276b2020-07-24 00:46:58 -070037 /**
Tim Line29df602020-09-26 22:43:24 +080038 * Toggle radio on and off (for "airplane" mode)
39 * If the radio is turned off/on the radio modem subsystem
40 * is expected return to an initialized state. For instance,
41 * any voice and data calls must be terminated and all associated
42 * lists emptied.
43 *
44 * When setting radio power on to exit from airplane mode to place an emergency call on this
45 * logical modem, powerOn, forEmergencyCall and preferredForEmergencyCall must be true. In
46 * this case, this modem is optimized to scan only emergency call bands, until:
47 * 1) Emergency call is completed; or
48 * 2) Another setRadioPower_1_5 is issued with forEmergencyCall being false or
49 * preferredForEmergencyCall being false; or
50 * 3) Timeout after 30 seconds if dial or emergencyDial is not called.
51 * Once one of these conditions is reached, the modem should move into normal operation.
52 *
53 * @param serial Serial number of request.
54 * @param powerOn To turn on radio -> on = true, to turn off radio -> on = false.
55 * @param forEmergencyCall To indication to radio if this request is due to emergency call.
56 * No effect if powerOn is false.
57 * @param preferredForEmergencyCall indicate whether the following emergency call will be sent
58 * on this modem or not. No effect if forEmergencyCall is false, or powerOn is false.
59 *
60 * Response callback is IRadioConfigResponse. setRadioPowerResponse_1_6.
61
62 * Note this API is the same as the 1.5
63 */
64 oneway setRadioPower_1_6(int32_t serial, bool powerOn, bool forEmergencyCall,
65 bool preferredForEmergencyCall);
66
67 /**
Jayachandran C9bc276b2020-07-24 00:46:58 -070068 * Returns the data call list. An entry is added when a setupDataCall() is issued and removed
69 * on a deactivateDataCall(). The list is emptied when setRadioPower() off/on issued or when
70 * the vendor HAL or modem crashes.
71 *
72 * @param serial Serial number of request.
73 *
74 * Response function is IRadioResponse.getDataCallListResponse_1_6()
75 */
76 oneway getDataCallList_1_6(int32_t serial);
77
78 /**
79 * Setup a packet data connection. If DataCallResponse.status returns DataCallFailCause:NONE,
80 * the data connection must be added to data calls and a unsolDataCallListChanged() must be
81 * sent. The call remains until removed by subsequent unsolDataCallIstChanged(). It may be
82 * lost due to many factors, including deactivateDataCall() being issued, the radio powered
83 * off, reception lost or even transient factors like congestion. This data call list is
84 * returned by getDataCallList() and dataCallListChanged().
85 *
86 * The Radio is expected to:
87 * - Create one data call context.
88 * - Create and configure a dedicated interface for the context.
89 * - The interface must be point to point.
90 * - The interface is configured with one or more addresses and is capable of sending and
91 * receiving packets. The format is IP address with optional "/" prefix length
92 * (The format is defined in RFC-4291 section 2.3). For example, "192.0.1.3",
93 * "192.0.1.11/16", or "2001:db8::1/64". Typically one IPv4 or one IPv6 or one of each. If
94 * the prefix length is absent, then the addresses are assumed to be point to point with
95 * IPv4 with prefix length 32 or IPv6 with prefix length 128.
96 * - Must not modify routing configuration related to this interface; routing management is
97 * exclusively within the purview of the Android OS.
98 * - Support simultaneous data call contexts up to DataRegStateResult.maxDataCalls specified
99 * in the response of getDataRegistrationState.
100 *
101 * @param serial Serial number of request.
102 * @param accessNetwork The access network to setup the data call. If the data connection cannot
103 * be established on the specified access network then it should be responded with an error.
104 * @param dataProfileInfo Data profile info.
105 * @param roamingAllowed Indicates whether or not data roaming is allowed by the user.
106 * @param reason The request reason. Must be DataRequestReason:NORMAL or
107 * DataRequestReason:HANDOVER.
108 * @param addresses If the reason is DataRequestReason:HANDOVER, this indicates the list of link
109 * addresses of the existing data connection. This parameter must be ignored unless reason
110 * is DataRequestReason:HANDOVER.
111 * @param dnses If the reason is DataRequestReason:HANDOVER, this indicates the list of DNS
112 * addresses of the existing data connection. The format is defined in RFC-4291 section 2.2.
113 * For example, "192.0.1.3" or "2001:db8::1". This parameter must be ignored unless reason
114 * is DataRequestReason:HANDOVER.
115 *
116 * Response function is IRadioResponse.setupDataCallResponse_1_6()
117 *
118 * Note this API is the same as the 1.5
119 */
120 oneway setupDataCall_1_6(int32_t serial, AccessNetwork accessNetwork,
121 DataProfileInfo dataProfileInfo, bool roamingAllowed,
122 DataRequestReason reason, vec<LinkAddress> addresses, vec<string> dnses);
allenwtsu1c3dcd32020-09-25 17:58:01 +0800123
124 /**
125 * Send an SMS message
126 *
127 * @param serial Serial number of request.
128 * @param message GsmSmsMessage as defined in types.hal
129 *
130 * Response function is IRadioResponse.sendSmsResponse_1_6()
131 *
132 * Note this API is the same as the 1.0
133 *
134 * Based on the return error, caller decides to resend if sending sms
135 * fails. RadioError:SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
136 * and RadioError:GENERIC_FAILURE means no retry (i.e. error cause is 500)
137 */
138 oneway sendSms_1_6(int32_t serial, GsmSmsMessage message);
139
140 /**
141 * Send an SMS message. Identical to sendSms_1_6,
142 * except that more messages are expected to be sent soon. If possible,
143 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
144 *
145 * @param serial Serial number of request.
146 * @param message GsmSmsMessage as defined in types.hal
147 *
148 * Response function is IRadioResponse.sendSMSExpectMoreResponse_1_6()
149 *
150 * Note this API is the same as the 1.0
151 *
152 * Based on the return error, caller decides to resend if sending sms
153 * fails. RadioError:SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
154 * and RadioError:GENERIC_FAILURE means no retry (i.e. error cause is 500)
155 */
156 oneway sendSMSExpectMore_1_6(int32_t serial, GsmSmsMessage message);
157
158 /**
159 * Send a CDMA SMS message
160 *
161 * @param serial Serial number of request.
162 * @param sms Cdma Sms to be sent described by CdmaSmsMessage in types.hal
163 *
164 * Response callback is IRadioResponse.sendCdmaSmsResponse_1_6()
165 *
166 * Note this API is the same as the 1.0
167 *
168 */
169 oneway sendCdmaSms_1_6(int32_t serial, CdmaSmsMessage sms);
170
171 /**
172 * Send an SMS message. Identical to sendCdmaSms_1_6,
173 * except that more messages are expected to be sent soon.
174 *
175 * @param serial Serial number of request.
176 * @param sms Cdma Sms to be sent described by CdmaSmsMessage in types.hal
177 *
178 * Response callback is IRadioResponse.sendCdmaSMSExpectMoreResponse_1_6()
179 *
180 * Note this API is the same as the 1.5
181 *
182 */
183 oneway sendCdmaSmsExpectMore_1_6(int32_t serial, CdmaSmsMessage sms);
Sooraj Sasindrana9d461b2020-08-14 11:00:11 -0700184
185 /**
186 * Enable or disable E-UTRA-NR dual connectivity. If disabled then UE will not connect
187 * to secondary carrier.
188 *
189 * @param serial Serial number of request.
190 * @param nrDualConnectivityState expected NR dual connectivity state.
191 * 1. Enable NR dual connectivity {NrDualConnectivityState:ENABLE}
192 * 2. Disable NR dual connectivity {NrDualConnectivityState:DISABLE}
193 * 3. Disable NR dual connectivity and force secondary cell to be released
194 * {NrDualConnectivityState:DISABLE_IMMEDIATE}
195
196 * Response callback is IRadioResponse.enableNRDualConnectivityResponse()
197 */
198 oneway enableNrDualConnectivity(int32_t serial,
199 NrDualConnectivityState nrDualConnectivityState);
200
201 /**
202 * Is E-UTRA-NR Dual Connectivity enabled
203 *
204 * @param serial Serial number of request.
205 * Response callback is IRadioResponse.isNRDualConnectivityEnabledResponse()
206 */
207 oneway isNrDualConnectivityEnabled(int32_t serial);
Daniel Bright15cc34a2020-10-26 11:34:53 -0700208
209 /**
210 * Reserves an unallocated pdu session id from the pool of ids.
211 *
212 * The allocated id is returned in the response.
213 *
214 * When the id is no longer needed, call releasePduSessionId to
215 * return it to the pool.
216 *
217 * Reference: 3GPP TS 24.007 section 11.2.3.1b
218 *
219 * @param serial Serial number of request.
220 *
221 * Response function is IRadioResponse.allocatePduSessionIdResponse()
222 */
223 oneway allocatePduSessionId(int32_t serial);
224
225 /**
226 * Releases a pdu session id that was previously allocated using
227 * allocatePduSessionId.
228 *
229 * Reference: 3GPP TS 24.007 section 11.2.3.1b
230 * @param serial Serial number of request.
231 * @param id Pdu session id to release.
232 *
233 * Response function is IRadioResponse.releasePduSessionIdResponse()
234 */
235 oneway releasePduSessionId(int32_t serial, int32_t id);
236
237 /**
238 * Indicates that a handover to the IWLAN transport has begun.
239 *
240 * Any resources being transferred to the IWlan transport cannot be released while a
241 * handover is underway. For example, if a pdu session id needs to be
242 * transferred to IWlan, then, the modem should not release the id while
243 * the handover is in progress.
244 *
245 * If a handover was unsuccessful, then the framework calls IRadio::cancelHandover.
246 * The modem retains ownership over any of the resources being transferred to IWlan.
247 *
248 * If a handover was successful, the framework calls IRadio::deactivateDataCall with reason
249 * HANDOVER. The IWlan transport now owns the transferred resources and is responsible for
250 * releasing them.
251 *
252 * @param serial Serial number of request.
253 * @param id callId The identifier of the data call which is provided in SetupDataCallResult
254 *
255 * Response function is IRadioResponse.beginHandoverResponse()
256 */
257 oneway beginHandover(int32_t serial, int32_t callId);
258
259 /**
260 * Indicates that a handover was cancelled after a call to IRadio::beginHandover.
261 *
262 * Since the handover was unsuccessful, the modem retains ownership over any of the resources
263 * being transferred and is still responsible for releasing them.
264 *
265 * @param serial Serial number of request.
266 * @param id callId The identifier of the data call which is provided in SetupDataCallResult
267 *
268 * Response function is IRadioResponse.cancelHandoverResponse()
269 */
270 oneway cancelHandover(int32_t serial, int32_t callId);
Jayachandran C262b6062020-07-22 15:53:58 -0700271};