1*4d7e907cSAndroid Build Coastguard Worker/* 2*4d7e907cSAndroid Build Coastguard Worker * Copyright (C) 2017 The Android Open Source Project 3*4d7e907cSAndroid Build Coastguard Worker * 4*4d7e907cSAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License"); 5*4d7e907cSAndroid Build Coastguard Worker * you may not use this file except in compliance with the License. 6*4d7e907cSAndroid Build Coastguard Worker * You may obtain a copy of the License at 7*4d7e907cSAndroid Build Coastguard Worker * 8*4d7e907cSAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0 9*4d7e907cSAndroid Build Coastguard Worker * 10*4d7e907cSAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software 11*4d7e907cSAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS, 12*4d7e907cSAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*4d7e907cSAndroid Build Coastguard Worker * See the License for the specific language governing permissions and 14*4d7e907cSAndroid Build Coastguard Worker * limitations under the License. 15*4d7e907cSAndroid Build Coastguard Worker */ 16*4d7e907cSAndroid Build Coastguard Worker 17*4d7e907cSAndroid Build Coastguard Workerpackage [email protected]; 18*4d7e907cSAndroid Build Coastguard Worker 19*4d7e907cSAndroid Build Coastguard Workerimport @1.1::IRadio; 20*4d7e907cSAndroid Build Coastguard Workerimport @1.1::RadioAccessNetworks; 21*4d7e907cSAndroid Build Coastguard Workerimport @1.0::DataProfileInfo; 22*4d7e907cSAndroid Build Coastguard Workerimport @1.0::RadioTechnology; 23*4d7e907cSAndroid Build Coastguard Worker 24*4d7e907cSAndroid Build Coastguard Worker/** 25*4d7e907cSAndroid Build Coastguard Worker * This interface is used by telephony and telecom to talk to cellular radio. 26*4d7e907cSAndroid Build Coastguard Worker * All the functions have minimum one parameter: 27*4d7e907cSAndroid Build Coastguard Worker * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the 28*4d7e907cSAndroid Build Coastguard Worker * duration of a method call. If clients provide colliding serials (including passing the same 29*4d7e907cSAndroid Build Coastguard Worker * serial to different methods), multiple responses (one for each method call) must still be served. 30*4d7e907cSAndroid Build Coastguard Worker * setResponseFunctions must work with @1.1::IRadioResponse and @1.1::IRadioIndication. 31*4d7e907cSAndroid Build Coastguard Worker */ 32*4d7e907cSAndroid Build Coastguard Workerinterface IRadio extends @1.1::IRadio { 33*4d7e907cSAndroid Build Coastguard Worker 34*4d7e907cSAndroid Build Coastguard Worker /** 35*4d7e907cSAndroid Build Coastguard Worker * Starts a network scan 36*4d7e907cSAndroid Build Coastguard Worker * 37*4d7e907cSAndroid Build Coastguard Worker * @param serial Serial number of request. 38*4d7e907cSAndroid Build Coastguard Worker * @param request Defines the radio networks/bands/channels which need to be scanned. 39*4d7e907cSAndroid Build Coastguard Worker * 40*4d7e907cSAndroid Build Coastguard Worker * Response function is IRadioResponse.startNetworkScanResponse() which may return 41*4d7e907cSAndroid Build Coastguard Worker * RadioError:REQUEST_NOT_SUPPORTED if @1.4::IRadio or higher is supported. 42*4d7e907cSAndroid Build Coastguard Worker * 43*4d7e907cSAndroid Build Coastguard Worker * DEPRECATED in @1.4 or higher, use @1.4::IRadio.startNetworkScan_1_4() instead. 44*4d7e907cSAndroid Build Coastguard Worker */ 45*4d7e907cSAndroid Build Coastguard Worker oneway startNetworkScan_1_2(int32_t serial, NetworkScanRequest request); 46*4d7e907cSAndroid Build Coastguard Worker 47*4d7e907cSAndroid Build Coastguard Worker /** 48*4d7e907cSAndroid Build Coastguard Worker * Sets the indication filter. 49*4d7e907cSAndroid Build Coastguard Worker * 50*4d7e907cSAndroid Build Coastguard Worker * Prevents the reporting of specified unsolicited indications from the radio. This is used 51*4d7e907cSAndroid Build Coastguard Worker * for power saving in instances when those indications are not needed. If unset, defaults to 52*4d7e907cSAndroid Build Coastguard Worker * @1.2::IndicationFilter:ALL. 53*4d7e907cSAndroid Build Coastguard Worker * 54*4d7e907cSAndroid Build Coastguard Worker * @param serial Serial number of request. 55*4d7e907cSAndroid Build Coastguard Worker * @param indicationFilter 32-bit bitmap of IndicationFilter. Bits set to 1 indicate the 56*4d7e907cSAndroid Build Coastguard Worker * indications are enabled. See @1.2::IndicationFilter for the definition of each bit. 57*4d7e907cSAndroid Build Coastguard Worker * 58*4d7e907cSAndroid Build Coastguard Worker * Response callback is IRadioResponse.setIndicationFilterResponse() 59*4d7e907cSAndroid Build Coastguard Worker */ 60*4d7e907cSAndroid Build Coastguard Worker oneway setIndicationFilter_1_2(int32_t serial, bitfield<IndicationFilter> indicationFilter); 61*4d7e907cSAndroid Build Coastguard Worker 62*4d7e907cSAndroid Build Coastguard Worker /** 63*4d7e907cSAndroid Build Coastguard Worker * Sets the signal strength reporting criteria. 64*4d7e907cSAndroid Build Coastguard Worker * 65*4d7e907cSAndroid Build Coastguard Worker * The resulting reporting rules are the AND of all the supplied criteria. For each RAN 66*4d7e907cSAndroid Build Coastguard Worker * The thresholdsDbm and hysteresisDb apply to only the following measured quantities: 67*4d7e907cSAndroid Build Coastguard Worker * -GERAN - RSSI 68*4d7e907cSAndroid Build Coastguard Worker * -CDMA2000 - RSSI 69*4d7e907cSAndroid Build Coastguard Worker * -UTRAN - RSCP 70*4d7e907cSAndroid Build Coastguard Worker * -EUTRAN - RSRP 71*4d7e907cSAndroid Build Coastguard Worker * 72*4d7e907cSAndroid Build Coastguard Worker * Note: Reporting criteria must be individually set for each RAN. For any unset reporting 73*4d7e907cSAndroid Build Coastguard Worker * criteria, the value is implementation-defined. 74*4d7e907cSAndroid Build Coastguard Worker * 75*4d7e907cSAndroid Build Coastguard Worker * Note: As this mechanism generally only constrains reports based on one measured quantity per 76*4d7e907cSAndroid Build Coastguard Worker * RAN, if multiple measured quantities must be used to trigger a report for a given RAN, the 77*4d7e907cSAndroid Build Coastguard Worker * only valid field may be hysteresisMs: hysteresisDb and thresholdsDbm must be set to zero and 78*4d7e907cSAndroid Build Coastguard Worker * length zero respectively. If either hysteresisDb or thresholdsDbm is set, then reports shall 79*4d7e907cSAndroid Build Coastguard Worker * only be triggered by the respective measured quantity, subject to the applied constraints. 80*4d7e907cSAndroid Build Coastguard Worker * 81*4d7e907cSAndroid Build Coastguard Worker * Response callback is IRadioResponse.setSignalStrengthReportingCriteriaResponse() 82*4d7e907cSAndroid Build Coastguard Worker * 83*4d7e907cSAndroid Build Coastguard Worker * @param serial Serial number of request. 84*4d7e907cSAndroid Build Coastguard Worker * @param hysteresisMs A hysteresis time in milliseconds to prevent flapping. A value of 0 85*4d7e907cSAndroid Build Coastguard Worker * disables hysteresis. 86*4d7e907cSAndroid Build Coastguard Worker * @param hysteresisDb An interval in dB defining the required magnitude change between reports. 87*4d7e907cSAndroid Build Coastguard Worker * hysteresisDb must be smaller than the smallest threshold delta. An interval value of 0 88*4d7e907cSAndroid Build Coastguard Worker * disables hysteresis. 89*4d7e907cSAndroid Build Coastguard Worker * @param thresholdsDbm A vector of trigger thresholds in dBm. A vector size of 0 disables the 90*4d7e907cSAndroid Build Coastguard Worker * use of thresholds for reporting. 91*4d7e907cSAndroid Build Coastguard Worker * @param accessNetwork The type of network for which to apply these thresholds. 92*4d7e907cSAndroid Build Coastguard Worker */ 93*4d7e907cSAndroid Build Coastguard Worker oneway setSignalStrengthReportingCriteria(int32_t serial, int32_t hysteresisMs, 94*4d7e907cSAndroid Build Coastguard Worker int32_t hysteresisDb, vec<int32_t> thresholdsDbm, AccessNetwork accessNetwork); 95*4d7e907cSAndroid Build Coastguard Worker 96*4d7e907cSAndroid Build Coastguard Worker /** 97*4d7e907cSAndroid Build Coastguard Worker * Sets the link capacity reporting criteria. 98*4d7e907cSAndroid Build Coastguard Worker * 99*4d7e907cSAndroid Build Coastguard Worker * The resulting reporting criteria are the AND of all the supplied criteria. 100*4d7e907cSAndroid Build Coastguard Worker * 101*4d7e907cSAndroid Build Coastguard Worker * Note: Reporting criteria must be individually set for each RAN. If unset, reporting criteria 102*4d7e907cSAndroid Build Coastguard Worker * for that RAN are implementation-defined. 103*4d7e907cSAndroid Build Coastguard Worker * 104*4d7e907cSAndroid Build Coastguard Worker * Response callback is IRadioResponse.setLinkCapacityReportingCriteriaResponse(). 105*4d7e907cSAndroid Build Coastguard Worker * 106*4d7e907cSAndroid Build Coastguard Worker * @param serial Serial number of request. 107*4d7e907cSAndroid Build Coastguard Worker * @param hysteresisMs A hysteresis time in milliseconds to prevent flapping. A value of 0 108*4d7e907cSAndroid Build Coastguard Worker * disables hysteresis. 109*4d7e907cSAndroid Build Coastguard Worker * @param hysteresisDlKbps An interval in kbps defining the required magnitude change between DL 110*4d7e907cSAndroid Build Coastguard Worker * reports. hysteresisDlKbps must be smaller than the smallest threshold delta. A value of 0 111*4d7e907cSAndroid Build Coastguard Worker * disables hysteresis. 112*4d7e907cSAndroid Build Coastguard Worker * @param hysteresisUlKbps An interval in kbps defining the required magnitude change between UL 113*4d7e907cSAndroid Build Coastguard Worker * reports. hysteresisUlKbps must be smaller than the smallest threshold delta. A value of 0 114*4d7e907cSAndroid Build Coastguard Worker * disables hysteresis. 115*4d7e907cSAndroid Build Coastguard Worker * @param thresholdsDownlinkKbps A vector of trigger thresholds in kbps for downlink reports. A 116*4d7e907cSAndroid Build Coastguard Worker * vector size of 0 disables the use of DL thresholds for reporting. 117*4d7e907cSAndroid Build Coastguard Worker * @param thresholdsUplinkKbps A vector of trigger thresholds in kbps for uplink reports. A 118*4d7e907cSAndroid Build Coastguard Worker * vector size of 0 disables the use of UL thresholds for reporting. 119*4d7e907cSAndroid Build Coastguard Worker * @param accessNetwork The type of network for which to apply these thresholds. 120*4d7e907cSAndroid Build Coastguard Worker */ 121*4d7e907cSAndroid Build Coastguard Worker oneway setLinkCapacityReportingCriteria(int32_t serial, int32_t hysteresisMs, 122*4d7e907cSAndroid Build Coastguard Worker int32_t hysteresisDlKbps, int32_t hysteresisUlKbps, vec<int32_t> thresholdsDownlinkKbps, 123*4d7e907cSAndroid Build Coastguard Worker vec<int32_t> thresholdsUplinkKbps, AccessNetwork accessNetwork); 124*4d7e907cSAndroid Build Coastguard Worker 125*4d7e907cSAndroid Build Coastguard Worker /** 126*4d7e907cSAndroid Build Coastguard Worker * Setup a packet data connection. If DataCallResponse.status returns DataCallFailCause:NONE, 127*4d7e907cSAndroid Build Coastguard Worker * the data connection must be added to data calls and a unsolDataCallListChanged() must be 128*4d7e907cSAndroid Build Coastguard Worker * sent. The call remains until removed by subsequent unsolDataCallIstChanged(). It may be 129*4d7e907cSAndroid Build Coastguard Worker * lost due to many factors, including deactivateDataCall() being issued, the radio powered 130*4d7e907cSAndroid Build Coastguard Worker * off, reception lost or even transient factors like congestion. This data call list is 131*4d7e907cSAndroid Build Coastguard Worker * returned by getDataCallList() and dataCallListChanged(). 132*4d7e907cSAndroid Build Coastguard Worker * 133*4d7e907cSAndroid Build Coastguard Worker * The Radio is expected to: 134*4d7e907cSAndroid Build Coastguard Worker * - Create one data call context. 135*4d7e907cSAndroid Build Coastguard Worker * - Create and configure a dedicated interface for the context. 136*4d7e907cSAndroid Build Coastguard Worker * - The interface must be point to point. 137*4d7e907cSAndroid Build Coastguard Worker * - The interface is configured with one or more addresses and is capable of sending and 138*4d7e907cSAndroid Build Coastguard Worker * receiving packets. The prefix length of the addresses must be /32 for IPv4 and /128 139*4d7e907cSAndroid Build Coastguard Worker * for IPv6. 140*4d7e907cSAndroid Build Coastguard Worker * - Must not modify routing configuration related to this interface; routing management is 141*4d7e907cSAndroid Build Coastguard Worker * exclusively within the purview of the Android OS. 142*4d7e907cSAndroid Build Coastguard Worker * - Support simultaneous data call contexts up to DataRegStateResult.maxDataCalls specified 143*4d7e907cSAndroid Build Coastguard Worker * in the response of getDataRegistrationState. 144*4d7e907cSAndroid Build Coastguard Worker * 145*4d7e907cSAndroid Build Coastguard Worker * @param serial Serial number of request. 146*4d7e907cSAndroid Build Coastguard Worker * @param accessNetwork The access network to setup the data call. If the data connection cannot 147*4d7e907cSAndroid Build Coastguard Worker * be established on the specified access network, the setup request must be failed. 148*4d7e907cSAndroid Build Coastguard Worker * @param dataProfileInfo Data profile info. 149*4d7e907cSAndroid Build Coastguard Worker * @param modemCognitive Indicates that the requested profile has previously been provided via 150*4d7e907cSAndroid Build Coastguard Worker * setDataProfile(). 151*4d7e907cSAndroid Build Coastguard Worker * @param roamingAllowed Indicates whether or not data roaming is allowed by the user. 152*4d7e907cSAndroid Build Coastguard Worker * @param isRoaming Indicates whether or not the framework has requested this setupDataCall for 153*4d7e907cSAndroid Build Coastguard Worker * a roaming network. The 'protocol' parameter in the old RIL API must be filled 154*4d7e907cSAndroid Build Coastguard Worker * accordingly based on the roaming condition. Note this is for backward compatibility with 155*4d7e907cSAndroid Build Coastguard Worker * the old radio modem. The modem must not use this param for any other reason. 156*4d7e907cSAndroid Build Coastguard Worker * @param reason The request reason. Must be DataRequestReason.NORMAL or 157*4d7e907cSAndroid Build Coastguard Worker * DataRequestReason.HANDOVER. 158*4d7e907cSAndroid Build Coastguard Worker * @param addresses If the reason is DataRequestReason.HANDOVER, this indicates the list of link 159*4d7e907cSAndroid Build Coastguard Worker * addresses of the existing data connection. The format is IP address with optional "/" 160*4d7e907cSAndroid Build Coastguard Worker * prefix length (The format is defined in RFC-4291 section 2.3). For example, "192.0.1.3", 161*4d7e907cSAndroid Build Coastguard Worker * "192.0.1.11/16", or "2001:db8::1/64". Typically one IPv4 or one IPv6 or one of each. If 162*4d7e907cSAndroid Build Coastguard Worker * the prefix length is absent, then the addresses are assumed to be point to point with 163*4d7e907cSAndroid Build Coastguard Worker * IPv4 with prefix length 32 or IPv6 with prefix length 128. This parameter must be ignored 164*4d7e907cSAndroid Build Coastguard Worker * unless reason is DataRequestReason.HANDOVER. 165*4d7e907cSAndroid Build Coastguard Worker * @param dnses If the reason is DataRequestReason.HANDOVER, this indicates the list of DNS 166*4d7e907cSAndroid Build Coastguard Worker * addresses of the existing data connection. The format is defined in RFC-4291 section 167*4d7e907cSAndroid Build Coastguard Worker * 2.2. For example, "192.0.1.3" or "2001:db8::1". This parameter must be ignored unless 168*4d7e907cSAndroid Build Coastguard Worker * reason is DataRequestReason.HANDOVER. 169*4d7e907cSAndroid Build Coastguard Worker * 170*4d7e907cSAndroid Build Coastguard Worker * Response function is IRadioResponse.setupDataCallResponse() 171*4d7e907cSAndroid Build Coastguard Worker */ 172*4d7e907cSAndroid Build Coastguard Worker oneway setupDataCall_1_2(int32_t serial, AccessNetwork accessNetwork, 173*4d7e907cSAndroid Build Coastguard Worker DataProfileInfo dataProfileInfo, bool modemCognitive, bool roamingAllowed, 174*4d7e907cSAndroid Build Coastguard Worker bool isRoaming, DataRequestReason reason, vec<string> addresses, vec<string> dnses); 175*4d7e907cSAndroid Build Coastguard Worker 176*4d7e907cSAndroid Build Coastguard Worker /** 177*4d7e907cSAndroid Build Coastguard Worker * Deactivate packet data connection and remove from the data call list. An 178*4d7e907cSAndroid Build Coastguard Worker * unsolDataCallListChanged() must be sent when data connection is deactivated. 179*4d7e907cSAndroid Build Coastguard Worker * 180*4d7e907cSAndroid Build Coastguard Worker * @param serial Serial number of request. 181*4d7e907cSAndroid Build Coastguard Worker * @param cid Data call id. 182*4d7e907cSAndroid Build Coastguard Worker * @param reason The request reason. Must be normal, handover, or shutdown. 183*4d7e907cSAndroid Build Coastguard Worker * 184*4d7e907cSAndroid Build Coastguard Worker * Response function is IRadioResponse.deactivateDataCallResponse() 185*4d7e907cSAndroid Build Coastguard Worker */ 186*4d7e907cSAndroid Build Coastguard Worker oneway deactivateDataCall_1_2(int32_t serial, int32_t cid, DataRequestReason reason); 187*4d7e907cSAndroid Build Coastguard Worker}; 188