1// Copyright 2010 Google Inc. All Rights Reserved. 2// Author: wink@google.com (Wink Saville) 3 4package ril_proto; 5 6option java_package='com.android.internal.telephony.ril_proto'; 7option java_outer_classname='RilCmds'; 8 9enum RadioState { 10 RADIOSTATE_OFF = 0; /* Radio explictly powered off (eg CFUN=0) */ 11 RADIOSTATE_UNAVAILABLE = 1; /* Radio unavailable (eg, resetting or not booted) */ 12 RADIOSTATE_SIM_NOT_READY = 2; /* Radio is on, but the SIM interface is not ready */ 13 RADIOSTATE_SIM_LOCKED_OR_ABSENT = 3; /* SIM PIN locked, PUK required, network 14 personalization locked, or SIM absent */ 15 RADIOSTATE_SIM_READY = 4; /* Radio is on and SIM interface is available */ 16 RADIOSTATE_RUIM_NOT_READY = 5; /* Radio is on, but the RUIM interface is not ready */ 17 RADIOSTATE_RUIM_READY = 6; /* Radio is on and the RUIM interface is available */ 18 RADIOSTATE_RUIM_LOCKED_OR_ABSENT = 7; /* RUIM PIN locked, PUK required, network 19 personalization locked, or RUIM absent */ 20 RADIOSTATE_NV_NOT_READY = 8; /* Radio is on, but the NV interface is not available */ 21 RADIOSTATE_NV_READY = 9; /* Radio is on and the NV interface is available */ 22} 23 24enum RilCardState { 25 CARDSTATE_ABSENT = 0; 26 CARDSTATE_PRESENT = 1; 27 CARDSTATE_ERROR = 2; 28} 29 30enum RilPersoSubstate { 31 PERSOSUBSTATE_UNKNOWN = 0; /* initial state */ 32 PERSOSUBSTATE_IN_PROGRESS = 1; /* in between each lock transition */ 33 PERSOSUBSTATE_READY = 2; /* when either SIM or RUIM Perso is finished 34 since each app can only have 1 active perso 35 involved */ 36 PERSOSUBSTATE_SIM_NETWORK = 3; 37 PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4; 38 PERSOSUBSTATE_SIM_CORPORATE = 5; 39 PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6; 40 PERSOSUBSTATE_SIM_SIM = 7; 41 PERSOSUBSTATE_SIM_NETWORK_PUK = 8; /* The corresponding perso lock is blocked */ 42 PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9; 43 PERSOSUBSTATE_SIM_CORPORATE_PUK = 10; 44 PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11; 45 PERSOSUBSTATE_SIM_SIM_PUK = 12; 46 PERSOSUBSTATE_RUIM_NETWORK1 = 13; 47 PERSOSUBSTATE_RUIM_NETWORK2 = 14; 48 PERSOSUBSTATE_RUIM_HRPD = 15; 49 PERSOSUBSTATE_RUIM_CORPORATE = 16; 50 PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17; 51 PERSOSUBSTATE_RUIM_RUIM = 18; 52 PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19; /* The corresponding perso lock is blocked */ 53 PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20; 54 PERSOSUBSTATE_RUIM_HRPD_PUK = 21; 55 PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22; 56 PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23; 57 PERSOSUBSTATE_RUIM_RUIM_PUK = 24; 58} 59 60enum RilAppState { 61 APPSTATE_UNKNOWN = 0; 62 APPSTATE_DETECTED = 1; 63 APPSTATE_PIN = 2; /* If PIN1 or UPin is required */ 64 APPSTATE_PUK = 3; /* If PUK1 or Puk for UPin is required */ 65 APPSTATE_SUBSCRIPTION_PERSO = 4; /* perso_substate should be look at 66 when app_state is assigned to this value */ 67 APPSTATE_READY = 5; 68} 69 70enum RilPinState { 71 PINSTATE_UNKNOWN = 0; 72 PINSTATE_ENABLED_NOT_VERIFIED = 1; 73 PINSTATE_ENABLED_VERIFIED = 2; 74 PINSTATE_DISABLED = 3; 75 PINSTATE_ENABLED_BLOCKED = 4; 76 PINSTATE_ENABLED_PERM_BLOCKED = 5; 77} 78 79enum RilAppType { 80 APPTYPE_UNKNOWN = 0; 81 APPTYPE_SIM = 1; 82 APPTYPE_USIM = 2; 83 APPTYPE_RUIM = 3; 84 APPTYPE_CSIM = 4; 85} 86 87message RilAppStatus { 88 optional RilAppType app_type = 1; 89 optional RilAppState app_state = 2; 90 optional RilPersoSubstate perso_substate = 3; /* applicable only if app_state == 91 APPSTATE_SUBSCRIPTION_PERSO */ 92 optional string aid = 4; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41, 93 0x30, 0x30, 0x30 */ 94 optional string app_label = 5; /* null terminated string */ 95 optional int32 pin1_replaced = 6; /* applicable to USIM and CSIM */ 96 optional RilPinState pin1 = 7; 97 optional RilPinState pin2 = 8; 98} 99 100 101message RilCardStatus { 102 optional RilCardState card_state = 1; /* current state */ 103 optional RilPinState universal_pin_state = 2; /* applicable to USIM and CSIM: PINSTATE_xxx */ 104 optional int32 gsm_umts_subscription_app_index = 3; /* value < CARD_MAX_APPS */ 105 optional int32 cdma_subscription_app_index = 4; /* value < CARD_MAX_APPS */ 106 optional int32 ims_subscription_app_index = 5; /* value < CARD_MAX_APPS */ 107 optional int32 num_applications = 6; /* value <= CARD_MAX_APPS */ 108 repeated RilAppStatus applications = 7; /* CARD_MAX_APPS == 8 */ 109} 110 111/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */ 112enum RilUusType { 113 RILUUSTYPE1_IMPLICIT = 0; 114 RILUUSTYPE1_REQUIRED = 1; 115 RILUUSTYPE1_NOT_REQUIRED = 2; 116 RILUUSTYPE2_REQUIRED = 3; 117 RILUUSTYPE2_NOT_REQUIRED = 4; 118 RILUUSTYPE3_REQUIRED = 5; 119 RILUUSTYPE3_NOT_REQUIRED = 6; 120}; 121 122/* User-to-User Signaling Information data coding schemes. Possible values for 123 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been 124 * specified in section 10.5.4.25 of 3GPP TS 24.008 */ 125enum RilUusDcs { 126 RILUUSDCS_USP = 0; /* User specified protocol */ 127 RILUUSDCS_OSIHLP = 1; /* OSI higher layer protocol */ 128 RILUUSDCS_X244 = 2; /* X.244 */ 129 RILUUSDCS_RMCF = 3; /* Reserved for system mangement 130 convergence function */ 131 RILUUSDCS_IA5c = 4; /* IA5 characters */ 132} 133 134/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0 135 * This data is passed in RIL_ExtensionRecord and rec contains this 136 * structure when type is RIL_UUS_INFO_EXT_REC */ 137message RilUusInfo { 138 optional RilUusType uus_type = 1; /* UUS Type */ 139 optional RilUusDcs uus_dcs = 2; /* UUS Data Coding Scheme */ 140 optional int32 uus_length = 3; /* Length of UUS Data */ 141 optional string uus_data = 4; /* UUS Data */ 142} 143 144enum RilCallState { 145 CALLSTATE_ACTIVE = 0; 146 CALLSTATE_HOLDING = 1; 147 CALLSTATE_DIALING = 2; /* MO call only */ 148 CALLSTATE_ALERTING = 3; /* MO call only */ 149 CALLSTATE_INCOMING = 4; /* MT call only */ 150 CALLSTATE_WAITING = 5; /* MT call only */ 151} 152 153message RilCall { 154 optional RilCallState state = 1; /* State of the call */ 155 optional int32 index = 2; /* Connection Index for use with, 156 eg, AT+CHLD */ 157 optional int32 toa = 3; /* type of address, eg 145 = intl */ 158 optional bool is_mpty = 4; /* true if is mpty call */ 159 optional bool is_mt = 5; /* true if call is mobile terminated */ 160 optional int32 als = 6; /* ALS line indicator if available 161 (0 = line 1) */ 162 optional bool is_voice = 7; /* true if this is is a voice call */ 163 optional bool is_voice_privacy = 8; /* true if CDMA voice privacy mode 164 is active */ 165 optional string number = 9; /* Remote party number */ 166 optional int32 number_presentation = 10; /* 0=Allowed, 1=Restricted, 167 2=Not Specified/Unknown 3=Payphone */ 168 optional string name = 11; /* Remote party name */ 169 optional int32 name_presentation = 12; /* 0=Allowed, 1=Restricted, 170 2=Not Specified/Unknown 3=Payphone */ 171 optional RilUusInfo uus_info = 13; /* NULL or Pointer to User-User Signaling 172 Information */ 173} 174 175message RILGWSignalStrength { 176 optional int32 signal_strength = 1; /* Valid values are (0-31, 99) as defined 177 in TS 27.007 8.5 */ 178 optional int32 bit_error_rate = 2; /* bit error rate (0-7, 99) as defined 179 in TS 27.007 8.5 */ 180} 181 182message RILCDMASignalStrength { 183 optional int32 dbm = 1; /* Valid values are positive integers. This value is the actual RSSI 184 value multiplied by -1. Example: If the actual RSSI is -75, then 185 this response value will be 75. */ 186 optional int32 ecio = 2; /* Valid values are positive integers. This value is the actual Ec/Io 187 multiplied by -10. Example: If the actual Ec/Io is -12.5 dB, then 188 this response value will be 125. */ 189} 190 191message RILEVDOSignalStrength { 192 optional int32 dbm = 1; /* Valid values are positive integers. This value is the actual RSSI 193 value multiplied by -1. Example: If the actual RSSI is -75, then 194 this response value will be 75. */ 195 optional int32 ecio = 2; /* Valid values are positive integers. This value is the actual 196 Ec/Io multiplied by -10. Example: If the actual Ec/Io is -12.5 dB, 197 then this response value will be 125. */ 198 optional int32 signal_noise_ratio = 3; /* Valid values are 0-8. 199 8 is the highest signal to noise ratio. */ 200} 201 202message RILLTESignalStrength { 203 optional int32 signal_strength = 1; /* Valid values are (0-31, 99) 204 * as defined in TS 27.007 8.5 */ 205 optional int32 rsrp = 2; /* The current Reference Signal Receive Power in dBm 206 * multipled by -1. Range: 44 to 140 dBm, 207 * TODO: doc reference */ 208 optional int32 rsrq = 3; /* The current Reference Signal Receive Quality in dB 209 * multiplied by -1. Range: 20 to 3 dB. 210 * TODO: doc reference */ 211 optional int32 rssnr = 4; /* TODO: Need documentation and doc reference */ 212 optional int32 cqi = 5; /* TODO: Need documentation and doc reference */ 213} 214 215// Response is an array of strings. 216// 217// If a strings(i) is "*magic-null*" then that value will be returned as null. 218message RspStrings{ 219 repeated string strings = 1; 220} 221 222// Response is an array of integers 223message RspIntegers{ 224 repeated int32 integers = 1; 225} 226 227// 1 RIL_REQUEST_GET_SIM_STATUS 228message RspGetSimStatus { 229 required RilCardStatus card_status = 1; 230} 231 232// 2 RIL_REQUEST_ENTER_SIM_PIN 233message ReqEnterSimPin { 234 required string pin = 1; 235} 236// RIL_REQUEST_ENTER_SIM_PIN response 237message RspEnterSimPin { 238 required int32 retries_remaining = 1; 239} 240 241// 9 RIL_GET_CURRENT_CALLS response 242message RspGetCurrentCalls { 243 repeated RilCall calls = 1; 244} 245 246// 10 RIL_REQUEST_DIAL 247message ReqDial { 248 optional string address = 1; 249 optional int32 clir = 2; 250 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR" 251 * clir == 0 on "use subscription default value" 252 * clir == 1 on "CLIR invocation" (restrict CLI presentation) 253 * clir == 2 on "CLIR suppression" (allow CLI presentation) 254 */ 255 optional RilUusInfo uus_info = 3; /* NULL or Pointer to User-User Signaling Information */ 256} 257 258// 12 RIL_REQUEST_HANG_UP 259message ReqHangUp { 260 required int32 connection_index = 1; 261} 262 263// 18 response for RIL_REQUEST_LAST_CALL_FAIL_CAUSE 264message RspLastCallFailCause { 265 required int32 last_call_fail_cause = 1; 266} 267 268// 19 RIL_REQUEST_SIGNAL_STRENGTH response 269message RspSignalStrength { 270 optional RILGWSignalStrength gw_signalstrength = 1; 271 optional RILCDMASignalStrength cdma_signalstrength = 2; 272 optional RILEVDOSignalStrength evdo_signalstrength = 3; 273 optional RILLTESignalStrength lte_signalstrength = 4; 274} 275 276// 22 RIL_REQUEST_OPERATOR response 277message RspOperator{ 278 optional string long_alpha_ons = 1; // The long alpha ons or eons 279 optional string short_alpha_ons = 2; // The short alpha ons or eons 280 optional string mcc_mnc = 3; // The 5 or 6 digit mcc + mnc 281} 282 283// 52 RIL_REQUEST_SEPARATE_CONNECTION 284message ReqSeparateConnection{ 285 required int32 index = 1; // Connection index to separate 286 // from multiparty call 287} 288 289// 53 RIL_REQUEST_SET_MUTE 290message ReqSetMute{ 291 required bool state = 1; // true to "enable mute", false to "disable mute" 292} 293 294// 61 RIL_REQUEST_SCREEN_STATE 295message ReqScreenState { 296 required bool state = 1; // true screen is on, false screen is off 297} 298 299