blob: 66007b48ac0cd0e819c52d4e44c31281aa59f6be [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;
Jayachandran C262b6062020-07-22 15:53:58 -070024import @1.5::IRadio;
Jayachandran C9bc276b2020-07-24 00:46:58 -070025import @1.5::AccessNetwork;
26import @1.5::DataProfileInfo;
27import @1.5::LinkAddress;
Jayachandran C262b6062020-07-22 15:53:58 -070028
29/**
30 * This interface is used by telephony and telecom to talk to cellular radio.
31 * All the functions have minimum one parameter:
32 * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
33 * duration of a method call. If clients provide colliding serials (including passing the same
34 * serial to different methods), multiple responses (one for each method call) must still be served.
Jayachandran C9bc276b2020-07-24 00:46:58 -070035 * setResponseFunctions must work with @1.6::IRadioResponse and @1.6::IRadioIndication.
Jayachandran C262b6062020-07-22 15:53:58 -070036 */
37interface IRadio extends @1.5::IRadio {
Jayachandran C9bc276b2020-07-24 00:46:58 -070038 /**
Tim Line29df602020-09-26 22:43:24 +080039 * Toggle radio on and off (for "airplane" mode)
40 * If the radio is turned off/on the radio modem subsystem
41 * is expected return to an initialized state. For instance,
42 * any voice and data calls must be terminated and all associated
43 * lists emptied.
44 *
45 * When setting radio power on to exit from airplane mode to place an emergency call on this
46 * logical modem, powerOn, forEmergencyCall and preferredForEmergencyCall must be true. In
47 * this case, this modem is optimized to scan only emergency call bands, until:
48 * 1) Emergency call is completed; or
49 * 2) Another setRadioPower_1_5 is issued with forEmergencyCall being false or
50 * preferredForEmergencyCall being false; or
51 * 3) Timeout after 30 seconds if dial or emergencyDial is not called.
52 * Once one of these conditions is reached, the modem should move into normal operation.
53 *
54 * @param serial Serial number of request.
55 * @param powerOn To turn on radio -> on = true, to turn off radio -> on = false.
56 * @param forEmergencyCall To indication to radio if this request is due to emergency call.
57 * No effect if powerOn is false.
58 * @param preferredForEmergencyCall indicate whether the following emergency call will be sent
59 * on this modem or not. No effect if forEmergencyCall is false, or powerOn is false.
60 *
61 * Response callback is IRadioConfigResponse. setRadioPowerResponse_1_6.
62
63 * Note this API is the same as the 1.5
64 */
65 oneway setRadioPower_1_6(int32_t serial, bool powerOn, bool forEmergencyCall,
66 bool preferredForEmergencyCall);
67
68 /**
Jayachandran C9bc276b2020-07-24 00:46:58 -070069 * Returns the data call list. An entry is added when a setupDataCall() is issued and removed
70 * on a deactivateDataCall(). The list is emptied when setRadioPower() off/on issued or when
71 * the vendor HAL or modem crashes.
72 *
73 * @param serial Serial number of request.
74 *
75 * Response function is IRadioResponse.getDataCallListResponse_1_6()
76 */
77 oneway getDataCallList_1_6(int32_t serial);
78
79 /**
80 * Setup a packet data connection. If DataCallResponse.status returns DataCallFailCause:NONE,
81 * the data connection must be added to data calls and a unsolDataCallListChanged() must be
82 * sent. The call remains until removed by subsequent unsolDataCallIstChanged(). It may be
83 * lost due to many factors, including deactivateDataCall() being issued, the radio powered
84 * off, reception lost or even transient factors like congestion. This data call list is
85 * returned by getDataCallList() and dataCallListChanged().
86 *
87 * The Radio is expected to:
88 * - Create one data call context.
89 * - Create and configure a dedicated interface for the context.
90 * - The interface must be point to point.
91 * - The interface is configured with one or more addresses and is capable of sending and
92 * receiving packets. The format is IP address with optional "/" prefix length
93 * (The format is defined in RFC-4291 section 2.3). For example, "192.0.1.3",
94 * "192.0.1.11/16", or "2001:db8::1/64". Typically one IPv4 or one IPv6 or one of each. If
95 * the prefix length is absent, then the addresses are assumed to be point to point with
96 * IPv4 with prefix length 32 or IPv6 with prefix length 128.
97 * - Must not modify routing configuration related to this interface; routing management is
98 * exclusively within the purview of the Android OS.
99 * - Support simultaneous data call contexts up to DataRegStateResult.maxDataCalls specified
100 * in the response of getDataRegistrationState.
101 *
102 * @param serial Serial number of request.
103 * @param accessNetwork The access network to setup the data call. If the data connection cannot
104 * be established on the specified access network then it should be responded with an error.
105 * @param dataProfileInfo Data profile info.
106 * @param roamingAllowed Indicates whether or not data roaming is allowed by the user.
107 * @param reason The request reason. Must be DataRequestReason:NORMAL or
108 * DataRequestReason:HANDOVER.
109 * @param addresses If the reason is DataRequestReason:HANDOVER, this indicates the list of link
110 * addresses of the existing data connection. This parameter must be ignored unless reason
111 * is DataRequestReason:HANDOVER.
112 * @param dnses If the reason is DataRequestReason:HANDOVER, this indicates the list of DNS
113 * addresses of the existing data connection. The format is defined in RFC-4291 section 2.2.
114 * For example, "192.0.1.3" or "2001:db8::1". This parameter must be ignored unless reason
115 * is DataRequestReason:HANDOVER.
116 *
117 * Response function is IRadioResponse.setupDataCallResponse_1_6()
118 *
119 * Note this API is the same as the 1.5
120 */
121 oneway setupDataCall_1_6(int32_t serial, AccessNetwork accessNetwork,
122 DataProfileInfo dataProfileInfo, bool roamingAllowed,
123 DataRequestReason reason, vec<LinkAddress> addresses, vec<string> dnses);
allenwtsu1c3dcd32020-09-25 17:58:01 +0800124
125 /**
126 * Send an SMS message
127 *
128 * @param serial Serial number of request.
129 * @param message GsmSmsMessage as defined in types.hal
130 *
131 * Response function is IRadioResponse.sendSmsResponse_1_6()
132 *
133 * Note this API is the same as the 1.0
134 *
135 * Based on the return error, caller decides to resend if sending sms
136 * fails. RadioError:SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
137 * and RadioError:GENERIC_FAILURE means no retry (i.e. error cause is 500)
138 */
139 oneway sendSms_1_6(int32_t serial, GsmSmsMessage message);
140
141 /**
142 * Send an SMS message. Identical to sendSms_1_6,
143 * except that more messages are expected to be sent soon. If possible,
144 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
145 *
146 * @param serial Serial number of request.
147 * @param message GsmSmsMessage as defined in types.hal
148 *
149 * Response function is IRadioResponse.sendSMSExpectMoreResponse_1_6()
150 *
151 * Note this API is the same as the 1.0
152 *
153 * Based on the return error, caller decides to resend if sending sms
154 * fails. RadioError:SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
155 * and RadioError:GENERIC_FAILURE means no retry (i.e. error cause is 500)
156 */
157 oneway sendSMSExpectMore_1_6(int32_t serial, GsmSmsMessage message);
158
159 /**
160 * Send a CDMA SMS message
161 *
162 * @param serial Serial number of request.
163 * @param sms Cdma Sms to be sent described by CdmaSmsMessage in types.hal
164 *
165 * Response callback is IRadioResponse.sendCdmaSmsResponse_1_6()
166 *
167 * Note this API is the same as the 1.0
168 *
169 */
170 oneway sendCdmaSms_1_6(int32_t serial, CdmaSmsMessage sms);
171
172 /**
173 * Send an SMS message. Identical to sendCdmaSms_1_6,
174 * except that more messages are expected to be sent soon.
175 *
176 * @param serial Serial number of request.
177 * @param sms Cdma Sms to be sent described by CdmaSmsMessage in types.hal
178 *
179 * Response callback is IRadioResponse.sendCdmaSMSExpectMoreResponse_1_6()
180 *
181 * Note this API is the same as the 1.5
182 *
183 */
184 oneway sendCdmaSmsExpectMore_1_6(int32_t serial, CdmaSmsMessage sms);
Sooraj Sasindrana9d461b2020-08-14 11:00:11 -0700185
186 /**
Jordan Liue4f5f022020-10-21 16:28:40 -0700187 * Set SIM card power state.
188 * Request is used to power off or power on the card. It should not generate
189 * a CardState.CARDSTATE_ABSENT indication, since the SIM is still physically
190 * inserted.
191 *
192 * @param serial Serial number of request
193 * @param powerUp POWER_DOWN if powering down the SIM card,
194 * POWER_UP if powering up the SIM card,
195 * POWER_UP_PASS_THROUGH if powering up the SIM card in
196 * pass through mode.
197 *
198 * When SIM card is in POWER_UP_PASS_THROUGH, the modem does not send
199 * any command to it (for example SELECT of MF, or TERMINAL
200 * CAPABILITY), and the SIM card is controlled completely by Telephony
201 * sending APDUs directly. The SIM card state must be
202 * RIL_CARDSTATE_PRESENT and the number of card apps will be 0.
203 * No new error code is generated. Emergency calls are supported in
204 * the same way as if the SIM card is absent.
205 * Pass-through mode is valid only for the specific card session where
206 * it is activated, and normal behavior occurs at the next SIM
207 * initialization, unless POWER_UP_PASS_THROUGH is requested again.
208 *
209 * The device is required to power down the SIM card before it can
210 * switch the mode between POWER_UP and POWER_UP_PASS_THROUGH.
211 * At device power up, the SIM interface is powered up automatically.
212 * Each subsequent request to this method is processed only after the
213 * completion of the previous one.
214 *
215 * Response callback is IRadioResponse.setSimCardPowerResponse_1_6().
216 * Note that this differs from setSimCardPower_1_1 in that the response
217 * callback should only be sent once the device has finished executing
218 * the request (the SIM has finished powering on or off).
219 */
220 oneway setSimCardPower_1_6(int32_t serial, CardPowerState powerUp);
221
222 /**
Sooraj Sasindrana9d461b2020-08-14 11:00:11 -0700223 * Enable or disable E-UTRA-NR dual connectivity. If disabled then UE will not connect
224 * to secondary carrier.
225 *
226 * @param serial Serial number of request.
227 * @param nrDualConnectivityState expected NR dual connectivity state.
228 * 1. Enable NR dual connectivity {NrDualConnectivityState:ENABLE}
229 * 2. Disable NR dual connectivity {NrDualConnectivityState:DISABLE}
230 * 3. Disable NR dual connectivity and force secondary cell to be released
231 * {NrDualConnectivityState:DISABLE_IMMEDIATE}
232
233 * Response callback is IRadioResponse.enableNRDualConnectivityResponse()
234 */
235 oneway enableNrDualConnectivity(int32_t serial,
236 NrDualConnectivityState nrDualConnectivityState);
237
238 /**
239 * Is E-UTRA-NR Dual Connectivity enabled
240 *
241 * @param serial Serial number of request.
242 * Response callback is IRadioResponse.isNRDualConnectivityEnabledResponse()
243 */
244 oneway isNrDualConnectivityEnabled(int32_t serial);
Jayachandran C262b6062020-07-22 15:53:58 -0700245};