• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2017 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.2;
18
19import @1.0::Call;
20import @1.0::CardState;
21import @1.0::CardStatus;
22import @1.0::CdmaSignalStrength;
23import @1.0::CellIdentityCdma;
24import @1.0::CellIdentityGsm;
25import @1.0::CellIdentityLte;
26import @1.0::CellIdentityTdscdma;
27import @1.0::CellIdentityWcdma;
28import @1.0::CellInfoTdscdma;
29import @1.0::CellInfoType;
30import @1.0::EvdoSignalStrength;
31import @1.0::GsmSignalStrength;
32import @1.0::LteSignalStrength;
33import @1.0::RadioConst;
34import @1.0::RadioError;
35import @1.0::RegState;
36import @1.0::SignalStrength;
37import @1.0::TdScdmaSignalStrength;
38import @1.0::TimeStampType;
39import @1.0::WcdmaSignalStrength;
40import @1.1::RadioAccessSpecifier;
41import @1.1::ScanStatus;
42import @1.1::ScanType;
43
44enum RadioConst : @1.0::RadioConst {
45    RADIO_ACCESS_SPECIFIER_MAX_SIZE = 8,
46};
47
48/**
49 * values are in seconds
50 */
51enum ScanIntervalRange : int32_t {
52    MIN = 5,
53    MAX = 300,
54};
55
56/**
57 * value are in seconds
58 */
59enum MaxSearchTimeRange : int32_t {
60    MIN = 60,
61    MAX = 3600,
62};
63
64/**
65 * values are in seconds
66 */
67enum IncrementalResultsPeriodicityRange : int32_t {
68    MIN = 1,
69    MAX = 10,
70};
71
72enum CellConnectionStatus : int32_t {
73    /**
74     * Cell is not a serving cell.
75     */
76    NONE = 0,
77    /**
78     * UE has connection to cell for signalling and possibly data (3GPP 36.331, 25.331).
79     */
80    PRIMARY_SERVING,
81    /**
82     * UE has connection to cell for data (3GPP 36.331, 25.331).
83     */
84    SECONDARY_SERVING,
85};
86
87/**
88 * Overwritten from @1.0::IndicationFilter in order to redefine ALL. In the future, this should
89 * be extended instead of overwritten.
90 */
91enum IndicationFilter : int32_t {
92    NONE = 0,
93    ALL = ~0,
94    /**
95     * When this bit is set, modem must send the signal strength update through
96     * IRadioIndication.currentSignalStrength() when all criteria specified by
97     * IRadio.setSignalStrengthReportingCriteria() are met.
98     */
99    SIGNAL_STRENGTH = 1 << 0,
100    /**
101     * When this bit is set, modem must invoke IRadioIndication.networkStateChanged() when any field
102     * in VoiceRegStateResult or DataRegStateResult changes. When this bit is not set, modem must
103     * suppress IRadioIndication.networkStateChanged() when there are only changes from
104     * insignificant fields. Modem must invoke IRadioIndication.networkStateChanged() when
105     * significant fields are updated regardless of whether this bit is set.
106     *
107     * The following fields are considered significant: VoiceRegStateResult.regState,
108     * VoiceRegStateResult.rat, DataRegStateResult.regState, DataRegStateResult.rat.
109     */
110    FULL_NETWORK_STATE = 1 << 1,
111    /**
112     * When this bit is set, modem must send IRadioIndication.dataCallListChanged() whenever any
113     * field in ITypes.SetupDataCallResult changes. When this bit is not set, modem must suppress
114     * the indication when the only changed field is 'active' (for data dormancy). For all other
115     * field changes, the modem must send IRadioIndication.dataCallListChanged() regardless of
116     * whether this bit is set.
117     */
118    DATA_CALL_DORMANCY_CHANGED = 1 << 2,
119    /**
120     * When this bit is set, modem must send the link capacity update through
121     * IRadioIndication.currentLinkCapacityEstimate() when all criteria specified by
122     * IRadio.setLinkCapacityReportingCriteria() are met.
123     */
124    LINK_CAPACITY_ESTIMATE = 1 << 3,
125    /**
126     * When this bit is set, the modem must send the physical channel configuration update through
127     * IRadioIndication.currentPhysicalChannelConfigs() when the configuration has changed. It is
128     * recommended that this be reported whenever link capacity or signal strength is reported.
129     */
130    PHYSICAL_CHANNEL_CONFIG = 1 << 4,
131};
132
133/**
134 * Audio codec which is used on GSM, UMTS, and CDMA. These values must be opaque
135 * to the Android framework. Only for display.
136 */
137enum AudioQuality : int32_t {
138    /** Unspecified audio codec */
139    UNSPECIFIED,
140    /** AMR (Narrowband) audio codec */
141    AMR,
142    /** AMR (Wideband) audio codec */
143    AMR_WB,
144    /** GSM Enhanced Full-Rate audio codec */
145    GSM_EFR,
146    /** GSM Full-Rate audio codec */
147    GSM_FR,
148    /** GSM Half-Rate audio codec */
149    GSM_HR,
150    /** Enhanced Variable rate codec */
151    EVRC,
152    /** Enhanced Variable rate codec revision B */
153    EVRC_B,
154    /** Enhanced Variable rate codec (Wideband) */
155    EVRC_WB,
156    /** Enhanced Variable rate codec (Narrowband) */
157    EVRC_NW,
158};
159
160struct NetworkScanRequest {
161    ScanType type;
162
163    /**
164     * Time interval in seconds between periodic scans, only valid when type = PERIODIC
165     * Range: ScanIntervalRange:MIN to ScanIntervalRange:MAX
166     */
167    int32_t interval;
168
169    /**
170     * Networks with bands/channels to scan
171     * Maximum length of the vector is
172     * RadioConst:RADIO_ACCESS_SPECIFIER_MAX_SIZE
173     */
174    vec<RadioAccessSpecifier> specifiers;
175
176    /**
177     * Maximum duration of the periodic search (in seconds).
178     * Expected range for the input is [MaxSearchTimeRange:MIN - MaxSearchTimeRange:MAX]
179     * If the search lasts maxSearchTime, it must be terminated.
180     */
181    int32_t maxSearchTime;
182
183    /**
184     * Indicates whether the modem must report incremental results of the network scan
185     * to the client.
186     * FALSE – Incremental results must not be reported.
187     * TRUE  – Incremental must be reported.
188     */
189    bool incrementalResults;
190
191    /**
192     * Indicates the periodicity with which the modem must report incremental results to
193     * the client (in seconds).
194     * Expected range for the input is
195     * [IncrementalResultsPeriodicityRange:MIN - IncrementalResultsPeriodicityRange:MAX]
196     * This value must be less than or equal to maxSearchTime. If incremental results are
197     * not requested, implementations may ignore this value.
198     */
199    int32_t incrementalResultsPeriodicity;
200
201    /**
202     * Describes the List of PLMN ids (MCC-MNC)
203     * If any PLMN of this list is found, search must end at that point and results with all
204     * PLMN found until that point should be sent as response.
205     * If the list is not sent, search to be completed until end and all PLMNs found to be
206     * reported.
207     */
208    vec<string> mccMncs;
209};
210
211struct NetworkScanResult {
212    /**
213     * The status of the scan.
214     */
215    ScanStatus status;
216
217    /**
218     * The error code of the incremental result.
219     */
220    RadioError error;
221
222    /**
223     * List of network information as CellInfo.
224     */
225    vec<CellInfo> networkInfos;
226};
227
228struct CellIdentityOperatorNames {
229    /**
230     * Long alpha Operator Name String or Enhanced Operator Name String.
231     */
232    string alphaLong;
233
234    /**
235     * Short alpha Operator Name String or Enhanced Operator Name String
236     */
237    string alphaShort;
238};
239
240struct CellIdentityCdma {
241    @1.0::CellIdentityCdma base;
242    CellIdentityOperatorNames operatorNames;
243};
244
245struct CellIdentityGsm {
246    @1.0::CellIdentityGsm base;
247    CellIdentityOperatorNames operatorNames;
248};
249
250struct CellIdentityLte {
251    @1.0::CellIdentityLte base;
252    CellIdentityOperatorNames operatorNames;
253    /**
254     * Cell bandwidth, in kHz.
255     */
256    int32_t bandwidth;
257};
258
259struct CellIdentityTdscdma {
260    @1.0::CellIdentityTdscdma base;
261    /**
262     * 16-bit UMTS Absolute RF Channel Number defined in TS 25.102 5.4.4; this value must be valid.
263     */
264    int32_t uarfcn;
265    CellIdentityOperatorNames operatorNames;
266};
267
268struct CellIdentityWcdma {
269    @1.0::CellIdentityWcdma base;
270    CellIdentityOperatorNames operatorNames;
271};
272
273struct CellInfoGsm {
274    CellIdentityGsm cellIdentityGsm;
275    GsmSignalStrength signalStrengthGsm;
276};
277
278struct CellInfoWcdma {
279    CellIdentityWcdma cellIdentityWcdma;
280    WcdmaSignalStrength signalStrengthWcdma;
281};
282
283struct CellInfoCdma {
284    CellIdentityCdma cellIdentityCdma;
285    CdmaSignalStrength signalStrengthCdma;
286    EvdoSignalStrength signalStrengthEvdo;
287};
288
289struct CellInfoLte {
290    CellIdentityLte cellIdentityLte;
291    LteSignalStrength signalStrengthLte;
292};
293
294struct CellInfoTdscdma {
295    CellIdentityTdscdma cellIdentityTdscdma;
296    TdscdmaSignalStrength signalStrengthTdscdma;
297};
298
299struct CellInfo {
300    /**
301     * Cell type for selecting from union CellInfo.
302     */
303    CellInfoType cellInfoType;
304    /**
305     * True if this cell is registered false if not registered.
306     */
307    bool registered;
308    /**
309     * Type of time stamp represented by timeStamp.
310     */
311    TimeStampType timeStampType;
312    /**
313     * Time in nanos as returned by ril_nano_time.
314     */
315    uint64_t timeStamp;
316    /**
317     * Only one of the below vectors must be of size 1 based on the CellInfoType and others must be
318     * of size 0.
319     */
320    vec<CellInfoGsm> gsm;
321    /**
322     * Valid only if type = cdma and size = 1 else must be empty.
323     */
324    vec<CellInfoCdma> cdma;
325    /**
326     * Valid only if type = lte and size = 1 else must be empty.
327     */
328    vec<CellInfoLte> lte;
329    /**
330     * Valid only if type = wcdma and size = 1 else must be empty.
331     */
332    vec<CellInfoWcdma> wcdma;
333    /**
334     * Valid only if type = tdscdma and size = 1 else must be empty.
335     */
336    vec<CellInfoTdscdma> tdscdma;
337    /**
338     * Connection status for the cell.
339     */
340    CellConnectionStatus connectionStatus;
341};
342
343struct CardStatus {
344    @1.0::CardStatus base;
345    uint32_t physicalSlotId;
346    /**
347     * An Answer To Reset (ATR) is a message output by a Smart Card conforming to ISO/IEC 7816
348     * standards, following electrical reset of the card's chip. The ATR conveys information about
349     * the communication parameters proposed by the card, and the card's nature and state.
350     *
351     * This data is applicable only when cardState is CardState:PRESENT.
352     */
353    string atr;
354    /**
355     * Integrated Circuit Card IDentifier (ICCID) is Unique Identifier of the SIM CARD. File is
356     * located in the SIM card at EFiccid (0x2FE2) as per ETSI 102.221. The ICCID is defined by
357     * the ITU-T recommendation E.118 ISO/IEC 7816.
358     *
359     * This data is applicable only when cardState is CardState:PRESENT.
360     */
361    string iccid;
362};
363
364struct LinkCapacityEstimate {
365    /**
366     * Estimated downlink capacity in kbps. This bandwidth estimate shall be the estimated
367     * maximum sustainable link bandwidth (as would be measured at the Upper PDCP or SNDCP SAP).
368     * If the DL Aggregate Maximum Bit Rate is known, this value shall not exceed the DL-AMBR
369     * for the Internet PDN connection.
370     */
371    uint32_t downlinkCapacityKbps;
372    /**
373     * Estimated uplink capacity in kbps. This bandwidth estimate shall be the estimated
374     * maximum sustainable link bandwidth (as would be measured at the Upper PDCP or SNDCP SAP).
375     * If the UL Aggregate Maximum Bit Rate is known, this value shall not exceed the UL-AMBR
376     * for the Internet PDN connection.
377     */
378    uint32_t uplinkCapacityKbps;
379};
380
381struct PhysicalChannelConfig {
382    /**
383     * Connection status for cell. Valid values are PRIMARY_SERVING and SECONDARY_SERVING.
384     */
385    CellConnectionStatus status;
386    /**
387     * Cell bandwidth, in kHz.
388     */
389    int32_t cellBandwidthDownlink;
390};
391
392enum AccessNetwork : int32_t {
393    /** GSM EDGE Radio Access Network */
394    GERAN       = 1,
395    /** Universal Terrestrial Radio Access Network */
396    UTRAN       = 2,
397    /** Evolved Universal Terrestrial Radio Access Network */
398    EUTRAN      = 3,
399    /** CDMA 2000 network */
400    CDMA2000    = 4,
401    /** Interworking Wireless LAN */
402    IWLAN       = 5
403};
404
405enum DataRequestReason : int32_t {
406    /**
407     * The reason of the data request is normal
408     */
409    NORMAL    = 0x01,
410    /**
411     * The reason of the data request is device shutdown
412     */
413    SHUTDOWN  = 0x02,
414    /**
415     * The reason of the data request is IWLAN data handover to another transport
416     * (e.g. from cellular to wifi or vise versa)
417     */
418    HANDOVER  = 0x03,
419};
420
421struct Call {
422    @1.0::Call base;
423    AudioQuality audioQuality;
424};
425
426struct WcdmaSignalStrength {
427    @1.0::WcdmaSignalStrength base;
428    /**
429     * CPICH RSCP as defined in TS 25.215 5.1.1
430     * Valid values are (0-96, 255) as defined in TS 27.007 8.69
431     * INT_MAX denotes that the value is invalid/unreported.
432     */
433    uint32_t rscp;
434    /**
435     * Ec/No value as defined in TS 25.215 5.1.5
436     * Valid values are (0-49, 255) as defined in TS 27.007 8.69
437     * INT_MAX denotes that the value is invalid/unreported.
438     */
439    uint32_t ecno;
440
441};
442
443struct TdscdmaSignalStrength {
444    /**
445     * UTRA carrier RSSI as defined in TS 25.225 5.1.4
446     * Valid values are (0-31, 99) as defined in TS 27.007 8.5
447     * INT_MAX denotes that the value is invalid/unreported.
448     */
449    uint32_t signalStrength;
450    /**
451     * Transport Channel BER as defined in TS 25.225 5.2.5
452     * Valid values are (0-7, 99) as defined in TS 27.007 8.5
453     * INT_MAX denotes that the value is invalid/unreported.
454     */
455    uint32_t bitErrorRate;
456    /**
457     * P-CCPCH RSCP as defined in TS 25.225 5.1.1
458     * Valid values are (0-96, 255) as defined in TS 27.007 8.69
459     * INT_MAX denotes that the value is invalid/unreported.
460     */
461    uint32_t rscp;
462};
463
464struct SignalStrength {
465    /**
466     * If GSM measurements are provided, this structure must contain valid measurements; otherwise
467     * all fields should be set to INT_MAX to mark them as invalid.
468     */
469    GsmSignalStrength gsm;
470    /**
471     * If CDMA measurements are provided, this structure must contain valid measurements; otherwise
472     * all fields should be set to INT_MAX to mark them as invalid.
473     */
474    CdmaSignalStrength cdma;
475    /**
476     * If EvDO measurements are provided, this structure must contain valid measurements; otherwise
477     * all fields should be set to INT_MAX to mark them as invalid.
478     */
479    EvdoSignalStrength evdo;
480    /**
481     * If LTE measurements are provided, this structure must contain valid measurements; otherwise
482     * all fields should be set to INT_MAX to mark them as invalid.
483     */
484    LteSignalStrength lte;
485    /**
486     * If TD-SCDMA measurements are provided, this structure must contain valid measurements;
487     * otherwise all fields should be set to INT_MAX to mark them as invalid.
488     */
489    TdScdmaSignalStrength tdScdma;
490    /**
491     * If WCDMA measurements are provided, this structure must contain valid measurements; otherwise
492     * all fields should be set to INT_MAX to mark them as invalid.
493     */
494    WcdmaSignalStrength wcdma;
495};
496
497struct CellIdentity {
498    /**
499     * Cell type for selecting from union CellInfo.
500     * Only one of the below vectors must be of size 1 based on a
501     * valid CellInfoType and others must be of size 0.
502     * If cell info type is NONE, then all the vectors must be of size 0.
503     */
504    CellInfoType cellInfoType;
505    vec<CellIdentityGsm> cellIdentityGsm;
506    vec<CellIdentityWcdma> cellIdentityWcdma;
507    vec<CellIdentityCdma> cellIdentityCdma;
508    vec<CellIdentityLte> cellIdentityLte;
509    vec<CellIdentityTdscdma> cellIdentityTdscdma;
510};
511
512struct VoiceRegStateResult {
513    /**
514     * Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP,
515     * REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED,
516     * UNKNOWN, REG_ROAMING defined in RegState
517     */
518    RegState regState;
519    /**
520     * Indicates the available voice radio technology, valid values as
521     * defined by RadioTechnology.
522     */
523    int32_t rat;
524    /**
525     * concurrent services support indicator. if registered on a CDMA system.
526     * false - Concurrent services not supported,
527     * true - Concurrent services supported
528     */
529    bool cssSupported;
530    /**
531     * TSB-58 Roaming Indicator if registered on a CDMA or EVDO system or -1 if not.
532     * Valid values are 0-255.
533     */
534    int32_t roamingIndicator;
535    /**
536     * Indicates whether the current system is in the PRL if registered on a CDMA or EVDO system
537     * or -1 if not. 0=not in the PRL, 1=in the PRL
538     */
539    int32_t systemIsInPrl;
540    /**
541     * Default Roaming Indicator from the PRL if registered on a CDMA or EVDO system or -1 if not.
542     * Valid values are 0-255.
543     */
544    int32_t defaultRoamingIndicator;
545    /**
546     * reasonForDenial if registration state is 3
547     * (Registration denied) this is an enumerated reason why
548     * registration was denied. See 3GPP TS 24.008,
549     * 10.5.3.6 and Annex G.
550     * 0 - General
551     * 1 - Authentication Failure
552     * 2 - IMSI unknown in HLR
553     * 3 - Illegal MS
554     * 4 - Illegal ME
555     * 5 - PLMN not allowed
556     * 6 - Location area not allowed
557     * 7 - Roaming not allowed
558     * 8 - No Suitable Cells in this Location Area
559     * 9 - Network failure
560     * 10 - Persistent location update reject
561     * 11 - PLMN not allowed
562     * 12 - Location area not allowed
563     * 13 - Roaming not allowed in this Location Area
564     * 15 - No Suitable Cells in this Location Area
565     * 17 - Network Failure
566     * 20 - MAC Failure
567     * 21 - Sync Failure
568     * 22 - Congestion
569     * 23 - GSM Authentication unacceptable
570     * 25 - Not Authorized for this CSG
571     * 32 - Service option not supported
572     * 33 - Requested service option not subscribed
573     * 34 - Service option temporarily out of order
574     * 38 - Call cannot be identified
575     * 48-63 - Retry upon entry into a new cell
576     * 95 - Semantically incorrect message
577     * 96 - Invalid mandatory information
578     * 97 - Message type non-existent or not implemented
579     * 98 - Message type not compatible with protocol state
580     * 99 - Information element non-existent or not implemented
581     * 100 - Conditional IE error
582     * 101 - Message not compatible with protocol state
583     * 111 - Protocol error, unspecified
584     */
585    int32_t reasonForDenial;
586
587    CellIdentity cellIdentity;
588};
589
590struct DataRegStateResult {
591    /**
592     * Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP,
593     * REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED,
594     * UNKNOWN, REG_ROAMING defined in RegState
595     */
596    RegState regState;
597    /**
598     * Indicates the available data radio technology,
599     * valid values as defined by RadioTechnology.
600     */
601    int32_t rat;
602    /**
603     * If registration state is 3 (Registration
604     * denied) this is an enumerated reason why
605     * registration was denied. See 3GPP TS 24.008,
606     * Annex G.6 "Additional cause codes for GMM".
607     * 7 == GPRS services not allowed
608     * 8 == GPRS services and non-GPRS services not allowed
609     * 9 == MS identity cannot be derived by the network
610     * 10 == Implicitly detached
611     * 14 == GPRS services not allowed in this PLMN
612     * 16 == MSC temporarily not reachable
613     * 40 == No PDP context activated
614     */
615    int32_t reasonDataDenied;
616    /**
617     * The maximum number of simultaneous Data Calls must be established using setupDataCall().
618     */
619    int32_t maxDataCalls;
620    CellIdentity cellIdentity;
621};
622