• 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.
197     */
198    int32_t incrementalResultsPeriodicity;
199
200    /**
201     * Describes the List of PLMN ids (MCC-MNC)
202     * If any PLMN of this list is found, search must end at that point and results with all
203     * PLMN found until that point should be sent as response.
204     * If the list is not sent, search to be completed until end and all PLMNs found to be
205     * reported.
206     */
207    vec<string> mccMncs;
208};
209
210struct NetworkScanResult {
211    /**
212     * The status of the scan.
213     */
214    ScanStatus status;
215
216    /**
217     * The error code of the incremental result.
218     */
219    RadioError error;
220
221    /**
222     * List of network information as CellInfo.
223     */
224    vec<CellInfo> networkInfos;
225};
226
227struct CellIdentityOperatorNames {
228    /**
229     * Long alpha Operator Name String or Enhanced Operator Name String.
230     */
231    string alphaLong;
232
233    /**
234     * Short alpha Operator Name String or Enhanced Operator Name String
235     */
236    string alphaShort;
237};
238
239struct CellIdentityCdma {
240    @1.0::CellIdentityCdma base;
241    CellIdentityOperatorNames operatorNames;
242};
243
244struct CellIdentityGsm {
245    @1.0::CellIdentityGsm base;
246    CellIdentityOperatorNames operatorNames;
247};
248
249struct CellIdentityLte {
250    @1.0::CellIdentityLte base;
251    CellIdentityOperatorNames operatorNames;
252    /**
253     * Cell bandwidth, in kHz.
254     */
255    int32_t bandwidth;
256};
257
258struct CellIdentityTdscdma {
259    @1.0::CellIdentityTdscdma base;
260    /**
261     * 16-bit UMTS Absolute RF Channel Number defined in TS 25.102 5.4.4; this value must be valid.
262     */
263    int32_t uarfcn;
264    CellIdentityOperatorNames operatorNames;
265};
266
267struct CellIdentityWcdma {
268    @1.0::CellIdentityWcdma base;
269    CellIdentityOperatorNames operatorNames;
270};
271
272struct CellInfoGsm {
273    CellIdentityGsm cellIdentityGsm;
274    GsmSignalStrength signalStrengthGsm;
275};
276
277struct CellInfoWcdma {
278    CellIdentityWcdma cellIdentityWcdma;
279    WcdmaSignalStrength signalStrengthWcdma;
280};
281
282struct CellInfoCdma {
283    CellIdentityCdma cellIdentityCdma;
284    CdmaSignalStrength signalStrengthCdma;
285    EvdoSignalStrength signalStrengthEvdo;
286};
287
288struct CellInfoLte {
289    CellIdentityLte cellIdentityLte;
290    LteSignalStrength signalStrengthLte;
291};
292
293struct CellInfoTdscdma {
294    CellIdentityTdscdma cellIdentityTdscdma;
295    TdscdmaSignalStrength signalStrengthTdscdma;
296};
297
298struct CellInfo {
299    /**
300     * Cell type for selecting from union CellInfo.
301     */
302    CellInfoType cellInfoType;
303    /**
304     * True if this cell is registered false if not registered.
305     */
306    bool registered;
307    /**
308     * Type of time stamp represented by timeStamp.
309     */
310    TimeStampType timeStampType;
311    /**
312     * Time in nanos as returned by ril_nano_time.
313     */
314    uint64_t timeStamp;
315    /**
316     * Only one of the below vectors must be of size 1 based on the CellInfoType and others must be
317     * of size 0.
318     */
319    vec<CellInfoGsm> gsm;
320    /**
321     * Valid only if type = cdma and size = 1 else must be empty.
322     */
323    vec<CellInfoCdma> cdma;
324    /**
325     * Valid only if type = lte and size = 1 else must be empty.
326     */
327    vec<CellInfoLte> lte;
328    /**
329     * Valid only if type = wcdma and size = 1 else must be empty.
330     */
331    vec<CellInfoWcdma> wcdma;
332    /**
333     * Valid only if type = tdscdma and size = 1 else must be empty.
334     */
335    vec<CellInfoTdscdma> tdscdma;
336    /**
337     * Connection status for the cell.
338     */
339    CellConnectionStatus connectionStatus;
340};
341
342struct CardStatus {
343    @1.0::CardStatus base;
344    uint32_t physicalSlotId;
345    /**
346     * An Answer To Reset (ATR) is a message output by a Smart Card conforming to ISO/IEC 7816
347     * standards, following electrical reset of the card's chip. The ATR conveys information about
348     * the communication parameters proposed by the card, and the card's nature and state.
349     *
350     * This data is applicable only when cardState is CardState:PRESENT.
351     */
352    string atr;
353    /**
354     * Integrated Circuit Card IDentifier (ICCID) is Unique Identifier of the SIM CARD. File is
355     * located in the SIM card at EFiccid (0x2FE2) as per ETSI 102.221. The ICCID is defined by
356     * the ITU-T recommendation E.118 ISO/IEC 7816.
357     *
358     * This data is applicable only when cardState is CardState:PRESENT.
359     */
360    string iccid;
361};
362
363struct LinkCapacityEstimate {
364    /**
365     * Estimated downlink capacity in kbps. This bandwidth estimate shall be the estimated
366     * maximum sustainable link bandwidth (as would be measured at the Upper PDCP or SNDCP SAP).
367     * If the DL Aggregate Maximum Bit Rate is known, this value shall not exceed the DL-AMBR
368     * for the Internet PDN connection.
369     */
370    uint32_t downlinkCapacityKbps;
371    /**
372     * Estimated uplink capacity in kbps. This bandwidth estimate shall be the estimated
373     * maximum sustainable link bandwidth (as would be measured at the Upper PDCP or SNDCP SAP).
374     * If the UL Aggregate Maximum Bit Rate is known, this value shall not exceed the UL-AMBR
375     * for the Internet PDN connection.
376     */
377    uint32_t uplinkCapacityKbps;
378};
379
380struct PhysicalChannelConfig {
381    /**
382     * Connection status for cell. Valid values are PRIMARY_SERVING and SECONDARY_SERVING.
383     */
384    CellConnectionStatus status;
385    /**
386     * Cell bandwidth, in kHz.
387     */
388    int32_t cellBandwidthDownlink;
389};
390
391enum AccessNetwork : int32_t {
392    /** GSM EDGE Radio Access Network */
393    GERAN       = 1,
394    /** Universal Terrestrial Radio Access Network */
395    UTRAN       = 2,
396    /** Evolved Universal Terrestrial Radio Access Network */
397    EUTRAN      = 3,
398    /** CDMA 2000 network */
399    CDMA2000    = 4,
400    /** Interworking Wireless LAN */
401    IWLAN       = 5
402};
403
404enum DataRequestReason : int32_t {
405    /**
406     * The reason of the data request is normal
407     */
408    NORMAL    = 0x01,
409    /**
410     * The reason of the data request is device shutdown
411     */
412    SHUTDOWN  = 0x02,
413    /**
414     * The reason of the data request is IWLAN data handover to another transport
415     * (e.g. from cellular to wifi or vise versa)
416     */
417    HANDOVER  = 0x03,
418};
419
420struct Call {
421    @1.0::Call base;
422    AudioQuality audioQuality;
423};
424
425struct WcdmaSignalStrength {
426    @1.0::WcdmaSignalStrength base;
427    /**
428     * CPICH RSCP as defined in TS 25.215 5.1.1
429     * Valid values are (0-96, 255) as defined in TS 27.007 8.69
430     */
431    uint32_t rscp;
432    /**
433     * Ec/No value as defined in TS 25.215 5.1.5
434     * Valid values are (0-49, 255) as defined in TS 27.007 8.69
435     */
436    uint32_t ecno;
437
438};
439
440struct TdscdmaSignalStrength {
441    /**
442     * UTRA carrier RSSI as defined in TS 25.225 5.1.4
443     * Valid values are (0-31, 99) as defined in TS 27.007 8.5
444     */
445    uint32_t signalStrength;
446    /**
447     * Transport Channel BER as defined in TS 25.225 5.2.5
448     * Valid values are (0-7, 99) as defined in TS 27.007 8.5
449     */
450    uint32_t bitErrorRate;
451    /**
452     * P-CCPCH RSCP as defined in TS 25.225 5.1.1
453     * Valid values are (0-96, 255) as defined in TS 27.007 8.69
454     */
455    uint32_t rscp;
456};
457
458struct SignalStrength {
459    GsmSignalStrength gsm;
460    CdmaSignalStrength cdma;
461    EvdoSignalStrength evdo;
462    LteSignalStrength lte;
463    TdScdmaSignalStrength tdScdma;
464    WcdmaSignalStrength wcdma;
465};
466
467struct CellIdentity {
468    /**
469     * Cell type for selecting from union CellInfo.
470     * Only one of the below vectors must be of size 1 based on a
471     * valid CellInfoType and others must be of size 0.
472     * If cell info type is NONE, then all the vectors must be of size 0.
473     */
474    CellInfoType cellInfoType;
475    vec<CellIdentityGsm> cellIdentityGsm;
476    vec<CellIdentityWcdma> cellIdentityWcdma;
477    vec<CellIdentityCdma> cellIdentityCdma;
478    vec<CellIdentityLte> cellIdentityLte;
479    vec<CellIdentityTdscdma> cellIdentityTdscdma;
480};
481
482struct VoiceRegStateResult {
483    /**
484     * Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP,
485     * REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED,
486     * UNKNOWN, REG_ROAMING defined in RegState
487     */
488    RegState regState;
489    /**
490     * Indicates the available voice radio technology, valid values as
491     * defined by RadioTechnology.
492     */
493    int32_t rat;
494    /**
495     * concurrent services support indicator. if registered on a CDMA system.
496     * false - Concurrent services not supported,
497     * true - Concurrent services supported
498     */
499    bool cssSupported;
500    /**
501     * TSB-58 Roaming Indicator if registered on a CDMA or EVDO system or -1 if not.
502     * Valid values are 0-255.
503     */
504    int32_t roamingIndicator;
505    /**
506     * Indicates whether the current system is in the PRL if registered on a CDMA or EVDO system
507     * or -1 if not. 0=not in the PRL, 1=in the PRL
508     */
509    int32_t systemIsInPrl;
510    /**
511     * Default Roaming Indicator from the PRL if registered on a CDMA or EVDO system or -1 if not.
512     * Valid values are 0-255.
513     */
514    int32_t defaultRoamingIndicator;
515    /**
516     * reasonForDenial if registration state is 3
517     * (Registration denied) this is an enumerated reason why
518     * registration was denied. See 3GPP TS 24.008,
519     * 10.5.3.6 and Annex G.
520     * 0 - General
521     * 1 - Authentication Failure
522     * 2 - IMSI unknown in HLR
523     * 3 - Illegal MS
524     * 4 - Illegal ME
525     * 5 - PLMN not allowed
526     * 6 - Location area not allowed
527     * 7 - Roaming not allowed
528     * 8 - No Suitable Cells in this Location Area
529     * 9 - Network failure
530     * 10 - Persistent location update reject
531     * 11 - PLMN not allowed
532     * 12 - Location area not allowed
533     * 13 - Roaming not allowed in this Location Area
534     * 15 - No Suitable Cells in this Location Area
535     * 17 - Network Failure
536     * 20 - MAC Failure
537     * 21 - Sync Failure
538     * 22 - Congestion
539     * 23 - GSM Authentication unacceptable
540     * 25 - Not Authorized for this CSG
541     * 32 - Service option not supported
542     * 33 - Requested service option not subscribed
543     * 34 - Service option temporarily out of order
544     * 38 - Call cannot be identified
545     * 48-63 - Retry upon entry into a new cell
546     * 95 - Semantically incorrect message
547     * 96 - Invalid mandatory information
548     * 97 - Message type non-existent or not implemented
549     * 98 - Message type not compatible with protocol state
550     * 99 - Information element non-existent or not implemented
551     * 100 - Conditional IE error
552     * 101 - Message not compatible with protocol state
553     * 111 - Protocol error, unspecified
554     */
555    int32_t reasonForDenial;
556
557    CellIdentity cellIdentity;
558};
559
560struct DataRegStateResult {
561    /**
562     * Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP,
563     * REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED,
564     * UNKNOWN, REG_ROAMING defined in RegState
565     */
566    RegState regState;
567    /**
568     * Indicates the available data radio technology,
569     * valid values as defined by RadioTechnology.
570     */
571    int32_t rat;
572    /**
573     * If registration state is 3 (Registration
574     * denied) this is an enumerated reason why
575     * registration was denied. See 3GPP TS 24.008,
576     * Annex G.6 "Additional cause codes for GMM".
577     * 7 == GPRS services not allowed
578     * 8 == GPRS services and non-GPRS services not allowed
579     * 9 == MS identity cannot be derived by the network
580     * 10 == Implicitly detached
581     * 14 == GPRS services not allowed in this PLMN
582     * 16 == MSC temporarily not reachable
583     * 40 == No PDP context activated
584     */
585    int32_t reasonDataDenied;
586    /**
587     * The maximum number of simultaneous Data Calls must be established using setupDataCall().
588     */
589    int32_t maxDataCalls;
590    CellIdentity cellIdentity;
591};
592