blob: d0c5b0d6bca573ad38c6bfffd1d0766312780c9b [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;
Sarah Chin039d5422019-11-05 15:39:32 -080023import @1.5::DataProfileInfo;
Nathan Haroldbacb8212019-12-27 12:58:32 -080024import @1.5::IndicationFilter;
Jack Yu7f6c8d02019-12-09 14:02:56 -080025import @1.5::LinkAddress;
Sarah Chinb7709bb2019-11-01 13:19:31 -070026import @1.5::NetworkScanRequest;
27import @1.5::RadioAccessSpecifier;
sqianf1850bf2019-11-12 18:26:30 -080028import @1.5::SignalThresholdInfo;
Malcolm Chen360e1f92019-10-02 11:38:13 -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.
36 * setResponseFunctions must work with @1.5::IRadioResponse and @1.5::IRadioIndication.
37 */
38interface IRadio extends @1.4::IRadio {
sqianf1850bf2019-11-12 18:26:30 -080039 /**
40 * Sets the signal strength reporting criteria.
41 *
42 * The resulting reporting rules are the AND of all the supplied criteria. For each RAN
43 * The hysteresisDb and thresholds apply to only the following measured quantities:
44 * -GERAN - RSSI
45 * -CDMA2000 - RSSI
46 * -UTRAN - RSCP
47 * -EUTRAN - RSRP/RSRQ/RSSNR
48 * -NGRAN - SSRSRP/SSRSRQ/SSSINR
49 *
Shuo Qian511264a2019-11-26 19:37:05 -080050 * Note: Reporting criteria must be individually set for each RAN. For each RAN, if none of
51 * reporting criteria of any measurement is set enabled
52 * (see @1.5::SignalThresholdInfo.isEnabled), the reporting criteria for this RAN is
53 * implementation-defined. For each RAN, if any of reporting criteria of any measure is set
54 * enabled, the reporting criteria of the other measures in this RAN are set disabled
55 * (see @1.5::SignalThresholdInfo.isEnabled) until they are set enabled.
sqianf1850bf2019-11-12 18:26:30 -080056 *
57 * Response callback is
58 * IRadioResponse.setSignalStrengthReportingCriteriaResponse_1_5()
59 *
60 * @param serial Serial number of request.
61 * @param signalThresholdInfo Signal threshold info including the threshold values,
Shuo Qian511264a2019-11-26 19:37:05 -080062 * hysteresisDb, hysteresisMs and isEnabled.
63 * See @1.5::SignalThresholdInfo for details.
sqianf1850bf2019-11-12 18:26:30 -080064 * @param accessNetwork The type of network for which to apply these thresholds.
65 */
66 oneway setSignalStrengthReportingCriteria_1_5(int32_t serial,
67 SignalThresholdInfo signalThresholdInfo, AccessNetwork accessNetwork);
Malcolm Chenfb6d6242019-11-12 19:03:12 -080068
69 /**
70 * Enable or disable UiccApplications on the SIM. If disabled:
71 * - Modem will not register on any network.
72 * - SIM must be PRESENT, and the IccId of the SIM must still be accessible.
73 * - The corresponding modem stack is still functional, e.g. able to make emergency calls or
74 * do network scan.
75 * By default if this API is not called, the uiccApplications must be enabled automatically.
76 * It must work for both single SIM and DSDS cases for UX consistency.
77 * The preference is per SIM, and must be remembered over power cycle, modem reboot, or SIM
78 * insertion / unplug.
79 *
Malcolm Chen2e7b82a2019-12-10 18:54:23 -080080 * @param serial Serial number of request.
81 * @param enable true if to enable uiccApplications, false to disable.
Malcolm Chenfb6d6242019-11-12 19:03:12 -080082
83 * Response callback is IRadioResponse.enableUiccApplicationsResponse()
84 */
85 oneway enableUiccApplications(int32_t serial, bool enable);
86
87 /**
88 * Whether uiccApplications are enabled, or disabled.
89 *
90 * By default uiccApplications must be enabled, unless enableUiccApplications() with enable
91 * being false is called.
92 *
93 * @param serial Serial number of request.
94 *
95 * Response callback is IRadioResponse.areUiccApplicationsEnabledResponse()
96 */
97 oneway areUiccApplicationsEnabled(int32_t serial);
98
99 /**
Sarah Chinb7709bb2019-11-01 13:19:31 -0700100 * Specify which bands modem's background scan must act on.
101 * If specifyChannels is true, it only scans bands specified in specifiers.
102 * If specifyChannels is false, it scans all bands.
103 *
104 * For example, CBRS is only on LTE band 48. By specifying this band,
105 * modem saves more power.
106 *
107 * @param serial Serial number of request.
108 * @param specifyChannels whether to scan bands defined in specifiers.
109 * @param specifiers which bands to scan. Only used if specifyChannels is true.
110 *
111 * Response callback is IRadioResponse.setSystemSelectionChannelsResponse()
112 */
113 oneway setSystemSelectionChannels_1_5(int32_t serial, bool specifyChannels,
114 vec<RadioAccessSpecifier> specifiers);
115
116 /**
117 * Starts a network scan
118 *
119 * @param serial Serial number of request.
120 * @param request Defines the radio networks/bands/channels which need to be scanned.
121 *
122 * Same API as @1.4::IRadio.startNetworkScan_1_4, except using
123 * 1.5 version of NetworkScanRequest
124 */
125 oneway startNetworkScan_1_5(int32_t serial, NetworkScanRequest request);
Sarah Chin039d5422019-11-05 15:39:32 -0800126
127 /**
128 * Setup a packet data connection. If DataCallResponse.status returns DataCallFailCause:NONE,
129 * the data connection must be added to data calls and a unsolDataCallListChanged() must be
130 * sent. The call remains until removed by subsequent unsolDataCallIstChanged(). It may be
131 * lost due to many factors, including deactivateDataCall() being issued, the radio powered
132 * off, reception lost or even transient factors like congestion. This data call list is
133 * returned by getDataCallList() and dataCallListChanged().
134 *
135 * The Radio is expected to:
136 * - Create one data call context.
137 * - Create and configure a dedicated interface for the context.
138 * - The interface must be point to point.
139 * - The interface is configured with one or more addresses and is capable of sending and
140 * receiving packets. The prefix length of the addresses must be /32 for IPv4 and /128
141 * for IPv6.
142 * - Must not modify routing configuration related to this interface; routing management is
143 * exclusively within the purview of the Android OS.
144 * - Support simultaneous data call contexts up to DataRegStateResult.maxDataCalls specified
145 * in the response of getDataRegistrationState.
146 *
147 * @param serial Serial number of request.
148 * @param accessNetwork The access network to setup the data call. If the data connection cannot
149 * be established on the specified access network, the setup request must be failed.
150 * @param dataProfileInfo Data profile info.
151 * @param roamingAllowed Indicates whether or not data roaming is allowed by the user.
152 * @param reason The request reason. Must be DataRequestReason.NORMAL or
153 * DataRequestReason.HANDOVER.
154 * @param addresses If the reason is DataRequestReason.HANDOVER, this indicates the list of link
Nathan Harold755bf302020-01-08 14:55:05 -0800155 * addresses of the existing data connection. This parameter must be ignored unless reason
156 * is DataRequestReason.HANDOVER.
Sarah Chin039d5422019-11-05 15:39:32 -0800157 * @param dnses If the reason is DataRequestReason.HANDOVER, this indicates the list of DNS
158 * addresses of the existing data connection. The format is defined in RFC-4291 section
159 * 2.2. For example, "192.0.1.3" or "2001:db8::1". This parameter must be ignored unless
160 * reason is DataRequestReason.HANDOVER.
161 *
162 * Response function is IRadioResponse.setupDataCallResponse_1_5()
163 *
164 * Note this API is the same as the 1.4 version except using the
Nathan Harold755bf302020-01-08 14:55:05 -0800165 * 1.5 AccessNetwork, DataProfileInto, and link addresses as the input param.
Sarah Chin039d5422019-11-05 15:39:32 -0800166 */
167 oneway setupDataCall_1_5(int32_t serial, AccessNetwork accessNetwork,
168 DataProfileInfo dataProfileInfo, bool roamingAllowed,
Jack Yu7f6c8d02019-12-09 14:02:56 -0800169 DataRequestReason reason, vec<LinkAddress> addresses, vec<string> dnses);
Sarah Chin039d5422019-11-05 15:39:32 -0800170
171 /**
172 * Set an apn to initial attach network
173 *
174 * @param serial Serial number of request.
175 * @param dataProfileInfo data profile containing APN settings
176 *
177 * Response callback is IRadioResponse.setInitialAttachApnResponse_1_5()
178 *
179 * Note this API is the same as the 1.4 version except using the 1.5 DataProfileInfo
180 * as the input param.
181 */
182 oneway setInitialAttachApn_1_5(int32_t serial, DataProfileInfo dataProfileInfo);
183
184 /**
185 * Send data profiles of the current carrier to the modem.
186 *
187 * @param serial Serial number of request.
188 * @param profiles Array of DataProfile to set.
189 *
190 * Response callback is IRadioResponse.setDataProfileResponse_1_5()
191 *
192 * Note this API is the same as the 1.4 version except using the 1.5 DataProfileInfo
Nathan Harold755bf302020-01-08 14:55:05 -0800193 * as the input param.
Sarah Chin039d5422019-11-05 15:39:32 -0800194 */
195 oneway setDataProfile_1_5(int32_t serial, vec<DataProfileInfo> profiles);
Malcolm Chen8f8e3d72019-12-16 18:53:58 -0800196
197 /**
198 * Toggle radio on and off (for "airplane" mode)
199 * If the radio is turned off/on the radio modem subsystem
200 * is expected return to an initialized state. For instance,
201 * any voice and data calls must be terminated and all associated
202 * lists emptied.
203 *
204 * When setting radio power on to exit from airplane mode to place an emergency call on this
205 * logical modem, powerOn, forEmergencyCall and preferredForEmergencyCall must be true. In
206 * this case, this modem is optimized to scan only emergency call bands, until:
207 * 1) Emergency call is completed; or
208 * 2) Another setRadioPower_1_5 is issued with forEmergencyCall being false or
209 * preferredForEmergencyCall being false; or
210 * 3) Timeout after a long period of time.
211 *
212 * @param serial Serial number of request.
213 * @param powerOn To turn on radio -> on = true, to turn off radio -> on = false.
214 * @param forEmergencyCall To indication to radio if this request is due to emergency call.
215 * No effect if powerOn is false.
216 * @param preferredForEmergencyCall indicate whether the following emergency call will be sent
217 * on this modem or not. No effect if forEmergencyCall is false, or powerOn is false.
218 *
219 * Response callback is IRadioConfigResponse. setRadioPowerResponse_1_5.
220 */
221 oneway setRadioPower_1_5(int32_t serial, bool powerOn, bool forEmergencyCall,
222 bool preferredForEmergencyCall);
Nathan Haroldbacb8212019-12-27 12:58:32 -0800223
224 /**
225 * Sets the indication filter.
226 *
227 * Prevents the reporting of specified unsolicited indications from the radio. This is used
228 * for power saving in instances when those indications are not needed. If unset, defaults to
229 * @1.2::IndicationFilter:ALL.
230 *
231 * @param serial Serial number of request.
232 * @param indicationFilter 32-bit bitmap of IndicationFilter. Bits set to 1 indicate the
233 * indications are enabled. See @1.5::IndicationFilter for the definition of each bit.
234 *
235 * Response callback is IRadioResponse.setIndicationFilterResponse()
236 */
237 oneway setIndicationFilter_1_5(int32_t serial, bitfield<IndicationFilter> indicationFilter);
Malcolm Chen360e1f92019-10-02 11:38:13 -0700238};