ril.h revision 8b4e4f7e5ddcb8b7450bcded4d0395f02b340bbe
1/* 2 * Copyright (C) 2006 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 17#ifndef ANDROID_RIL_H 18#define ANDROID_RIL_H 1 19 20#include <stdlib.h> 21#include <stdint.h> 22#include <telephony/ril_cdma_sms.h> 23#include <telephony/ril_nv_items.h> 24#include <telephony/ril_msim.h> 25 26#ifndef FEATURE_UNIT_TEST 27#include <sys/time.h> 28#endif /* !FEATURE_UNIT_TEST */ 29 30#ifdef __cplusplus 31extern "C" { 32#endif 33 34 35#if defined(ANDROID_SIM_COUNT_2) 36#define SIM_COUNT 2 37#elif defined(ANDROID_SIM_COUNT_3) 38#define SIM_COUNT 3 39#elif defined(ANDROID_SIM_COUNT_4) 40#define SIM_COUNT 4 41#else 42#define SIM_COUNT 1 43#endif 44 45#ifndef ANDROID_MULTI_SIM 46#define SIM_COUNT 1 47#endif 48 49#define RIL_VERSION 10 /* Current version */ 50#define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */ 51 52#define CDMA_ALPHA_INFO_BUFFER_LENGTH 64 53#define CDMA_NUMBER_INFO_BUFFER_LENGTH 81 54 55#define MAX_RILDS 3 56#define MAX_SOCKET_NAME_LENGTH 6 57#define MAX_CLIENT_ID_LENGTH 2 58#define MAX_DEBUG_SOCKET_NAME_LENGTH 12 59#define MAX_QEMU_PIPE_NAME_LENGTH 11 60#define MAX_UUID_LENGTH 64 61 62 63typedef void * RIL_Token; 64 65typedef enum { 66 RIL_SOCKET_1, 67#if (SIM_COUNT >= 2) 68 RIL_SOCKET_2, 69#if (SIM_COUNT >= 3) 70 RIL_SOCKET_3, 71#endif 72#if (SIM_COUNT >= 4) 73 RIL_SOCKET_4, 74#endif 75#endif 76 RIL_SOCKET_NUM 77} RIL_SOCKET_ID; 78 79 80typedef enum { 81 RIL_E_SUCCESS = 0, 82 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */ 83 RIL_E_GENERIC_FAILURE = 2, 84 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */ 85 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */ 86 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */ 87 RIL_E_REQUEST_NOT_SUPPORTED = 6, 88 RIL_E_CANCELLED = 7, 89 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice 90 call on a Class C GPRS device */ 91 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device 92 registers in network */ 93 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */ 94 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription 95 shall be retrieved because of SIM or RUIM 96 card absent */ 97 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified 98 location */ 99 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */ 100 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */ 101 RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to 102 illegal SIM or ME */ 103 RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */ 104 RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */ 105} RIL_Errno; 106 107typedef enum { 108 RIL_CALL_ACTIVE = 0, 109 RIL_CALL_HOLDING = 1, 110 RIL_CALL_DIALING = 2, /* MO call only */ 111 RIL_CALL_ALERTING = 3, /* MO call only */ 112 RIL_CALL_INCOMING = 4, /* MT call only */ 113 RIL_CALL_WAITING = 5 /* MT call only */ 114} RIL_CallState; 115 116typedef enum { 117 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */ 118 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */ 119 /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */ 120 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */ 121 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network 122 personalization locked, or SIM absent */ 123 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */ 124 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */ 125 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */ 126 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network 127 personalization locked, or RUIM absent */ 128 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */ 129 RADIO_STATE_NV_READY = 9, /* Radio is on and the NV interface is available */ 130 RADIO_STATE_ON = 10 /* Radio is on */ 131} RIL_RadioState; 132 133typedef enum { 134 RADIO_TECH_UNKNOWN = 0, 135 RADIO_TECH_GPRS = 1, 136 RADIO_TECH_EDGE = 2, 137 RADIO_TECH_UMTS = 3, 138 RADIO_TECH_IS95A = 4, 139 RADIO_TECH_IS95B = 5, 140 RADIO_TECH_1xRTT = 6, 141 RADIO_TECH_EVDO_0 = 7, 142 RADIO_TECH_EVDO_A = 8, 143 RADIO_TECH_HSDPA = 9, 144 RADIO_TECH_HSUPA = 10, 145 RADIO_TECH_HSPA = 11, 146 RADIO_TECH_EVDO_B = 12, 147 RADIO_TECH_EHRPD = 13, 148 RADIO_TECH_LTE = 14, 149 RADIO_TECH_HSPAP = 15, // HSPA+ 150 RADIO_TECH_GSM = 16, // Only supports voice 151 RADIO_TECH_TD_SCDMA = 17 152} RIL_RadioTechnology; 153 154typedef enum { 155 RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN), 156 RAF_GPRS = (1 << RADIO_TECH_GPRS), 157 RAF_EDGE = (1 << RADIO_TECH_EDGE), 158 RAF_UMTS = (1 << RADIO_TECH_UMTS), 159 RAF_IS95A = (1 << RADIO_TECH_IS95A), 160 RAF_IS95B = (1 << RADIO_TECH_IS95B), 161 RAF_1xRTT = (1 << RADIO_TECH_1xRTT), 162 RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0), 163 RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A), 164 RAF_HSDPA = (1 << RADIO_TECH_HSDPA), 165 RAF_HSUPA = (1 << RADIO_TECH_HSUPA), 166 RAF_HSPA = (1 << RADIO_TECH_HSPA), 167 RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B), 168 RAF_EHRPD = (1 << RADIO_TECH_EHRPD), 169 RAF_LTE = (1 << RADIO_TECH_LTE), 170 RAF_HSPAP = (1 << RADIO_TECH_HSPAP), 171 RAF_GSM = (1 << RADIO_TECH_GSM), 172 RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA), 173} RIL_RadioAccessFamily; 174 175typedef enum { 176 RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes 177 RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be 178 // forthcoming with these same parameters 179 RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned 180 // RIL_RadioCapability.status = 0, if any START's fail no 181 // APPLY will be sent 182 RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY 183 RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error 184 // occurs in any previous command the RIL_RadioAccessesFamily and 185 // LogicalModem fields will be the prior configuration thus 186 // restoring the configuration to the previous value. An error 187 // returned by this command will generally be ignored or may 188 // cause that logical modem to be removed from service. 189} RadioCapabilityPhase; 190 191typedef enum { 192 RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START, 193 // RC_PHASE_APPLY 194 RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio 195 // capability was success with RC_PHASE_FINISH 196 RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio 197 // capability is fail with RC_PHASE_FINISH. 198} RadioCapabilityStatus; 199 200#define RIL_RADIO_CAPABILITY_VERSION 1 201typedef struct { 202 int version; // Version of structure, RIL_RadioCapability_Version 203 int session; // Unique session value defined by framework returned in all "responses/unsol" 204 int phase; // CONFIGURED, START, APPLY, FINISH 205 int rat; // RIL_RadioAccessFamily for the radio 206 char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem. 207 int status; // Return status and an input parameter for RC_PHASE_FINISH 208} RIL_RadioCapability; 209 210// Do we want to split Data from Voice and the use 211// RIL_RadioTechnology for get/setPreferredVoice/Data ? 212typedef enum { 213 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */ 214 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */ 215 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */ 216 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */ 217 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */ 218 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */ 219 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */ 220 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */ 221 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */ 222 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */ 223 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */ 224 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */ 225 PREF_NET_TYPE_LTE_WCDMA = 12 /* LTE/WCDMA */ 226} RIL_PreferredNetworkType; 227 228/* Source for cdma subscription */ 229typedef enum { 230 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0, 231 CDMA_SUBSCRIPTION_SOURCE_NV = 1 232} RIL_CdmaSubscriptionSource; 233 234/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */ 235typedef enum { 236 RIL_UUS_TYPE1_IMPLICIT = 0, 237 RIL_UUS_TYPE1_REQUIRED = 1, 238 RIL_UUS_TYPE1_NOT_REQUIRED = 2, 239 RIL_UUS_TYPE2_REQUIRED = 3, 240 RIL_UUS_TYPE2_NOT_REQUIRED = 4, 241 RIL_UUS_TYPE3_REQUIRED = 5, 242 RIL_UUS_TYPE3_NOT_REQUIRED = 6 243} RIL_UUS_Type; 244 245/* User-to-User Signaling Information data coding schemes. Possible values for 246 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been 247 * specified in section 10.5.4.25 of 3GPP TS 24.008 */ 248typedef enum { 249 RIL_UUS_DCS_USP = 0, /* User specified protocol */ 250 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */ 251 RIL_UUS_DCS_X244 = 2, /* X.244 */ 252 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement 253 convergence function */ 254 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */ 255} RIL_UUS_DCS; 256 257/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0 258 * This data is passed in RIL_ExtensionRecord and rec contains this 259 * structure when type is RIL_UUS_INFO_EXT_REC */ 260typedef struct { 261 RIL_UUS_Type uusType; /* UUS Type */ 262 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */ 263 int uusLength; /* Length of UUS Data */ 264 char * uusData; /* UUS Data */ 265} RIL_UUS_Info; 266 267/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */ 268typedef struct { 269 char isPresent; /* non-zero if signal information record is present */ 270 char signalType; /* as defined 3.7.5.5-1 */ 271 char alertPitch; /* as defined 3.7.5.5-2 */ 272 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */ 273} RIL_CDMA_SignalInfoRecord; 274 275typedef struct { 276 RIL_CallState state; 277 int index; /* Connection Index for use with, eg, AT+CHLD */ 278 int toa; /* type of address, eg 145 = intl */ 279 char isMpty; /* nonzero if is mpty call */ 280 char isMT; /* nonzero if call is mobile terminated */ 281 char als; /* ALS line indicator if available 282 (0 = line 1) */ 283 char isVoice; /* nonzero if this is is a voice call */ 284 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */ 285 char * number; /* Remote party number */ 286 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */ 287 char * name; /* Remote party name */ 288 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */ 289 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */ 290} RIL_Call; 291 292/* Deprecated, use RIL_Data_Call_Response_v6 */ 293typedef struct { 294 int cid; /* Context ID, uniquely identifies this call */ 295 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ 296 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. 297 For example, "IP", "IPV6", "IPV4V6", or "PPP". */ 298 char * apn; /* ignored */ 299 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */ 300} RIL_Data_Call_Response_v4; 301 302/* 303 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST 304 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0. 305 */ 306typedef struct { 307 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */ 308 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry 309 back-off timer value RIL wants to override the one 310 pre-configured in FW. 311 The unit is miliseconds. 312 The value < 0 means no value is suggested. 313 The value 0 means retry should be done ASAP. 314 The value of INT_MAX(0x7fffffff) means no retry. */ 315 int cid; /* Context ID, uniquely identifies this call */ 316 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ 317 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. 318 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is 319 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported 320 such as "IP" or "IPV6" */ 321 char * ifname; /* The network interface name */ 322 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length, 323 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64". 324 May not be empty, typically 1 IPv4 or 1 IPv6 or 325 one of each. If the prefix length is absent the addresses 326 are assumed to be point to point with IPv4 having a prefix 327 length of 32 and IPv6 128. */ 328 char * dnses; /* A space-delimited list of DNS server addresses, 329 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 330 May be empty. */ 331 char * gateways; /* A space-delimited list of default gateway addresses, 332 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 333 May be empty in which case the addresses represent point 334 to point connections. */ 335} RIL_Data_Call_Response_v6; 336 337typedef struct { 338 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */ 339 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry 340 back-off timer value RIL wants to override the one 341 pre-configured in FW. 342 The unit is miliseconds. 343 The value < 0 means no value is suggested. 344 The value 0 means retry should be done ASAP. 345 The value of INT_MAX(0x7fffffff) means no retry. */ 346 int cid; /* Context ID, uniquely identifies this call */ 347 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ 348 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. 349 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is 350 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported 351 such as "IP" or "IPV6" */ 352 char * ifname; /* The network interface name */ 353 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length, 354 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64". 355 May not be empty, typically 1 IPv4 or 1 IPv6 or 356 one of each. If the prefix length is absent the addresses 357 are assumed to be point to point with IPv4 having a prefix 358 length of 32 and IPv6 128. */ 359 char * dnses; /* A space-delimited list of DNS server addresses, 360 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 361 May be empty. */ 362 char * gateways; /* A space-delimited list of default gateway addresses, 363 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 364 May be empty in which case the addresses represent point 365 to point connections. */ 366 char * pcscf; /* the Proxy Call State Control Function address 367 via PCO(Protocol Configuration Option) for IMS client. */ 368} RIL_Data_Call_Response_v9; // FIXME: Change to v10 369 370typedef enum { 371 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */ 372 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */ 373} RIL_RadioTechnologyFamily; 374 375typedef struct { 376 RIL_RadioTechnologyFamily tech; 377 unsigned char retry; /* 0 == not retry, nonzero == retry */ 378 int messageRef; /* Valid field if retry is set to nonzero. 379 Contains messageRef from RIL_SMS_Response 380 corresponding to failed MO SMS. 381 */ 382 383 union { 384 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */ 385 RIL_CDMA_SMS_Message* cdmaMessage; 386 387 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */ 388 char** gsmMessage; 389 } message; 390} RIL_IMS_SMS_Message; 391 392typedef struct { 393 int messageRef; /* TP-Message-Reference for GSM, 394 and BearerData MessageId for CDMA 395 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */ 396 char *ackPDU; /* or NULL if n/a */ 397 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS, 398 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA, 399 -1 if unknown or not applicable*/ 400} RIL_SMS_Response; 401 402/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */ 403typedef struct { 404 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */ 405 /* 0 = "REC UNREAD" */ 406 /* 1 = "REC READ" */ 407 /* 2 = "STO UNSENT" */ 408 /* 3 = "STO SENT" */ 409 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address, 410 the TP-layer length is "strlen(pdu)/2". */ 411 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte 412 (as expected by TS 27.005) or NULL for default SMSC */ 413} RIL_SMS_WriteArgs; 414 415/** Used by RIL_REQUEST_DIAL */ 416typedef struct { 417 char * address; 418 int clir; 419 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR" 420 * clir == 0 on "use subscription default value" 421 * clir == 1 on "CLIR invocation" (restrict CLI presentation) 422 * clir == 2 on "CLIR suppression" (allow CLI presentation) 423 */ 424 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */ 425} RIL_Dial; 426 427typedef struct { 428 int command; /* one of the commands listed for TS 27.007 +CRSM*/ 429 int fileid; /* EF id */ 430 char *path; /* "pathid" from TS 27.007 +CRSM command. 431 Path is in hex asciii format eg "7f205f70" 432 Path must always be provided. 433 */ 434 int p1; 435 int p2; 436 int p3; 437 char *data; /* May be NULL*/ 438 char *pin2; /* May be NULL*/ 439} RIL_SIM_IO_v5; 440 441typedef struct { 442 int command; /* one of the commands listed for TS 27.007 +CRSM*/ 443 int fileid; /* EF id */ 444 char *path; /* "pathid" from TS 27.007 +CRSM command. 445 Path is in hex asciii format eg "7f205f70" 446 Path must always be provided. 447 */ 448 int p1; 449 int p2; 450 int p3; 451 char *data; /* May be NULL*/ 452 char *pin2; /* May be NULL*/ 453 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */ 454} RIL_SIM_IO_v6; 455 456/* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and 457 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */ 458typedef struct { 459 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be 460 ignored for +CSIM command. */ 461 462 /* Following fields are used to derive the APDU ("command" and "length" 463 values in TS 27.007 +CSIM and +CGLA commands). */ 464 int cla; 465 int instruction; 466 int p1; 467 int p2; 468 int p3; /* A negative P3 implies a 4 byte APDU. */ 469 char *data; /* May be NULL. In hex string format. */ 470} RIL_SIM_APDU; 471 472typedef struct { 473 int sw1; 474 int sw2; 475 char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION 476 response for which it is in Base64 format, see 3GPP TS 31.102 7.1.2 */ 477} RIL_SIM_IO_Response; 478 479/* See also com.android.internal.telephony.gsm.CallForwardInfo */ 480 481typedef struct { 482 int status; /* 483 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 484 * status 1 = active, 0 = not active 485 * 486 * For RIL_REQUEST_SET_CALL_FORWARD: 487 * status is: 488 * 0 = disable 489 * 1 = enable 490 * 2 = interrogate 491 * 3 = registeration 492 * 4 = erasure 493 */ 494 495 int reason; /* from TS 27.007 7.11 "reason" */ 496 int serviceClass;/* From 27.007 +CCFC/+CLCK "class" 497 See table for Android mapping from 498 MMI service code 499 0 means user doesn't input class */ 500 int toa; /* "type" from TS 27.007 7.11 */ 501 char * number; /* "number" from TS 27.007 7.11. May be NULL */ 502 int timeSeconds; /* for CF no reply only */ 503}RIL_CallForwardInfo; 504 505typedef struct { 506 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM. 507 * Upper 16 bits is LAC and lower 16 bits 508 * is CID (as described in TS 27.005) 509 * Primary Scrambling Code (as described in TS 25.331) 510 * in 9 bits in UMTS 511 * Valid values are hexadecimal 0x0000 - 0xffffffff. 512 */ 513 int rssi; /* Received RSSI in GSM, 514 * Level index of CPICH Received Signal Code Power in UMTS 515 */ 516} RIL_NeighboringCell; 517 518/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */ 519typedef enum { 520 CALL_FAIL_UNOBTAINABLE_NUMBER = 1, 521 CALL_FAIL_NORMAL = 16, 522 CALL_FAIL_BUSY = 17, 523 CALL_FAIL_CONGESTION = 34, 524 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68, 525 CALL_FAIL_CALL_BARRED = 240, 526 CALL_FAIL_FDN_BLOCKED = 241, 527 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242, 528 CALL_FAIL_IMEI_NOT_ACCEPTED = 243, 529 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000, 530 CALL_FAIL_CDMA_DROP = 1001, 531 CALL_FAIL_CDMA_INTERCEPT = 1002, 532 CALL_FAIL_CDMA_REORDER = 1003, 533 CALL_FAIL_CDMA_SO_REJECT = 1004, 534 CALL_FAIL_CDMA_RETRY_ORDER = 1005, 535 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006, 536 CALL_FAIL_CDMA_PREEMPTED = 1007, 537 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed 538 during emergency callback mode */ 539 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */ 540 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff 541} RIL_LastCallFailCause; 542 543/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */ 544typedef enum { 545 PDP_FAIL_NONE = 0, /* No error, connection ok */ 546 547 /* an integer cause code defined in TS 24.008 548 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B. 549 If the implementation does not have access to the exact cause codes, 550 then it should return one of the following values, 551 as the UI layer needs to distinguish these 552 cases for error notification and potential retries. */ 553 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */ 554 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A, 555 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */ 556 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */ 557 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */ 558 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */ 559 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F, 560 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */ 561 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */ 562 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22, 563 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */ 564 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio, 565 based on framework config */ 566 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */ 567 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */ 568 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34, 569 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */ 570 571 /* Not mentioned in the specification */ 572 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1, 573 PDP_FAIL_DATA_REGISTRATION_FAIL = -2, 574 575 /* reasons for data call drop - network/modem disconnect */ 576 PDP_FAIL_SIGNAL_LOST = -3, 577 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry 578 with parameters appropriate for new technology */ 579 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting, 580 powered off - no retry */ 581 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered 582 mode was up on same APN/data profile - no retry until 583 tethered call is off */ 584 585 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently */ 586} RIL_DataCallFailCause; 587 588/* See RIL_REQUEST_SETUP_DATA_CALL */ 589typedef enum { 590 RIL_DATA_PROFILE_DEFAULT = 0, 591 RIL_DATA_PROFILE_TETHERED = 1, 592 RIL_DATA_PROFILE_OEM_BASE = 1000 /* Start of OEM-specific profiles */ 593} RIL_DataProfile; 594 595/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */ 596typedef struct { 597 int notificationType; /* 598 * 0 = MO intermediate result code 599 * 1 = MT unsolicited result code 600 */ 601 int code; /* See 27.007 7.17 602 "code1" for MO 603 "code2" for MT. */ 604 int index; /* CUG index. See 27.007 7.17. */ 605 int type; /* "type" from 27.007 7.17 (MT only). */ 606 char * number; /* "number" from 27.007 7.17 607 (MT only, may be NULL). */ 608} RIL_SuppSvcNotification; 609 610#define RIL_CARD_MAX_APPS 8 611 612typedef enum { 613 RIL_CARDSTATE_ABSENT = 0, 614 RIL_CARDSTATE_PRESENT = 1, 615 RIL_CARDSTATE_ERROR = 2 616} RIL_CardState; 617 618typedef enum { 619 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */ 620 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */ 621 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished 622 since each app can only have 1 active perso 623 involved */ 624 RIL_PERSOSUBSTATE_SIM_NETWORK = 3, 625 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4, 626 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5, 627 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6, 628 RIL_PERSOSUBSTATE_SIM_SIM = 7, 629 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */ 630 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9, 631 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10, 632 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11, 633 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12, 634 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13, 635 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14, 636 RIL_PERSOSUBSTATE_RUIM_HRPD = 15, 637 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16, 638 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17, 639 RIL_PERSOSUBSTATE_RUIM_RUIM = 18, 640 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */ 641 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20, 642 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21, 643 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22, 644 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23, 645 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24 646} RIL_PersoSubstate; 647 648typedef enum { 649 RIL_APPSTATE_UNKNOWN = 0, 650 RIL_APPSTATE_DETECTED = 1, 651 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */ 652 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */ 653 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at 654 when app_state is assigned to this value */ 655 RIL_APPSTATE_READY = 5 656} RIL_AppState; 657 658typedef enum { 659 RIL_PINSTATE_UNKNOWN = 0, 660 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1, 661 RIL_PINSTATE_ENABLED_VERIFIED = 2, 662 RIL_PINSTATE_DISABLED = 3, 663 RIL_PINSTATE_ENABLED_BLOCKED = 4, 664 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5 665} RIL_PinState; 666 667typedef enum { 668 RIL_APPTYPE_UNKNOWN = 0, 669 RIL_APPTYPE_SIM = 1, 670 RIL_APPTYPE_USIM = 2, 671 RIL_APPTYPE_RUIM = 3, 672 RIL_APPTYPE_CSIM = 4, 673 RIL_APPTYPE_ISIM = 5 674} RIL_AppType; 675 676typedef struct 677{ 678 RIL_AppType app_type; 679 RIL_AppState app_state; 680 RIL_PersoSubstate perso_substate; /* applicable only if app_state == 681 RIL_APPSTATE_SUBSCRIPTION_PERSO */ 682 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41, 683 0x30, 0x30, 0x30 */ 684 char *app_label_ptr; /* null terminated string */ 685 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */ 686 RIL_PinState pin1; 687 RIL_PinState pin2; 688} RIL_AppStatus; 689 690/* Deprecated, use RIL_CardStatus_v6 */ 691typedef struct 692{ 693 RIL_CardState card_state; 694 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */ 695 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 696 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 697 int num_applications; /* value <= RIL_CARD_MAX_APPS */ 698 RIL_AppStatus applications[RIL_CARD_MAX_APPS]; 699} RIL_CardStatus_v5; 700 701typedef struct 702{ 703 RIL_CardState card_state; 704 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */ 705 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 706 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 707 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 708 int num_applications; /* value <= RIL_CARD_MAX_APPS */ 709 RIL_AppStatus applications[RIL_CARD_MAX_APPS]; 710} RIL_CardStatus_v6; 711 712/** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH 713 * or as part of RIL_SimRefreshResponse_v7 714 */ 715typedef enum { 716 /* A file on SIM has been updated. data[1] contains the EFID. */ 717 SIM_FILE_UPDATE = 0, 718 /* SIM initialized. All files should be re-read. */ 719 SIM_INIT = 1, 720 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */ 721 SIM_RESET = 2 722} RIL_SimRefreshResult; 723 724typedef struct { 725 RIL_SimRefreshResult result; 726 int ef_id; /* is the EFID of the updated file if the result is */ 727 /* SIM_FILE_UPDATE or 0 for any other result. */ 728 char * aid; /* is AID(application ID) of the card application */ 729 /* See ETSI 102.221 8.1 and 101.220 4 */ 730 /* For SIM_FILE_UPDATE result it can be set to AID of */ 731 /* application in which updated EF resides or it can be */ 732 /* NULL if EF is outside of an application. */ 733 /* For SIM_INIT result this field is set to AID of */ 734 /* application that caused REFRESH */ 735 /* For SIM_RESET result it is NULL. */ 736} RIL_SimRefreshResponse_v7; 737 738/* Deprecated, use RIL_CDMA_CallWaiting_v6 */ 739typedef struct { 740 char * number; /* Remote party number */ 741 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */ 742 char * name; /* Remote party name */ 743 RIL_CDMA_SignalInfoRecord signalInfoRecord; 744} RIL_CDMA_CallWaiting_v5; 745 746typedef struct { 747 char * number; /* Remote party number */ 748 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */ 749 char * name; /* Remote party name */ 750 RIL_CDMA_SignalInfoRecord signalInfoRecord; 751 /* Number type/Number plan required to support International Call Waiting */ 752 int number_type; /* 0=Unknown, 1=International, 2=National, 753 3=Network specific, 4=subscriber */ 754 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */ 755} RIL_CDMA_CallWaiting_v6; 756 757/** 758 * Which types of Cell Broadcast Message (CBM) are to be received by the ME 759 * 760 * uFromServiceID - uToServiceID defines a range of CBM message identifiers 761 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS 762 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty 763 * CBM message ID. 764 * 765 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes 766 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS 767 * and 9.4.4.2.3 for UMTS. 768 * All other values can be treated as empty CBM data coding scheme. 769 * 770 * selected 0 means message types specified in <fromServiceId, toServiceId> 771 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted. 772 * 773 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and 774 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG. 775 */ 776typedef struct { 777 int fromServiceId; 778 int toServiceId; 779 int fromCodeScheme; 780 int toCodeScheme; 781 unsigned char selected; 782} RIL_GSM_BroadcastSmsConfigInfo; 783 784/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */ 785#define RIL_RESTRICTED_STATE_NONE 0x00 786/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */ 787#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01 788/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */ 789#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02 790/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/ 791#define RIL_RESTRICTED_STATE_CS_ALL 0x04 792/* Block packet data access due to restriction. */ 793#define RIL_RESTRICTED_STATE_PS_ALL 0x10 794 795/* The status for an OTASP/OTAPA session */ 796typedef enum { 797 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED, 798 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED, 799 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED, 800 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED, 801 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED, 802 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED, 803 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED, 804 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED, 805 CDMA_OTA_PROVISION_STATUS_COMMITTED, 806 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED, 807 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED, 808 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED 809} RIL_CDMA_OTA_ProvisionStatus; 810 811typedef struct { 812 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ 813 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */ 814} RIL_GW_SignalStrength; 815 816typedef struct { 817 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ 818 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */ 819} RIL_SignalStrengthWcdma; 820 821typedef struct { 822 int dbm; /* Valid values are positive integers. This value is the actual RSSI value 823 * multiplied by -1. Example: If the actual RSSI is -75, then this response 824 * value will be 75. 825 */ 826 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied 827 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value 828 * will be 125. 829 */ 830} RIL_CDMA_SignalStrength; 831 832 833typedef struct { 834 int dbm; /* Valid values are positive integers. This value is the actual RSSI value 835 * multiplied by -1. Example: If the actual RSSI is -75, then this response 836 * value will be 75. 837 */ 838 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied 839 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value 840 * will be 125. 841 */ 842 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */ 843} RIL_EVDO_SignalStrength; 844 845typedef struct { 846 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ 847 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1. 848 * Range: 44 to 140 dBm 849 * INT_MAX: 0x7FFFFFFF denotes invalid value. 850 * Reference: 3GPP TS 36.133 9.1.4 */ 851 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1. 852 * Range: 20 to 3 dB. 853 * INT_MAX: 0x7FFFFFFF denotes invalid value. 854 * Reference: 3GPP TS 36.133 9.1.7 */ 855 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units. 856 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB). 857 * INT_MAX : 0x7FFFFFFF denotes invalid value. 858 * Reference: 3GPP TS 36.101 8.1.1 */ 859 int cqi; /* The current Channel Quality Indicator. 860 * Range: 0 to 15. 861 * INT_MAX : 0x7FFFFFFF denotes invalid value. 862 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */ 863} RIL_LTE_SignalStrength; 864 865typedef struct { 866 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ 867 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1. 868 * Range: 44 to 140 dBm 869 * INT_MAX: 0x7FFFFFFF denotes invalid value. 870 * Reference: 3GPP TS 36.133 9.1.4 */ 871 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1. 872 * Range: 20 to 3 dB. 873 * INT_MAX: 0x7FFFFFFF denotes invalid value. 874 * Reference: 3GPP TS 36.133 9.1.7 */ 875 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units. 876 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB). 877 * INT_MAX : 0x7FFFFFFF denotes invalid value. 878 * Reference: 3GPP TS 36.101 8.1.1 */ 879 int cqi; /* The current Channel Quality Indicator. 880 * Range: 0 to 15. 881 * INT_MAX : 0x7FFFFFFF denotes invalid value. 882 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */ 883 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device. 884 * Approximate distance can be calculated using 300m/us * timingAdvance. 885 * Range: 0 to 0x7FFFFFFE 886 * INT_MAX : 0x7FFFFFFF denotes invalid value. 887 * Reference: 3GPP 36.321 section 6.1.3.5 888 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */ 889} RIL_LTE_SignalStrength_v8; 890 891typedef struct { 892 int rscp; /* The Received Signal Code Power in dBm multipled by -1. 893 * Range : 25 to 120 894 * INT_MAX: 0x7FFFFFFF denotes invalid value. 895 * Reference: 3GPP TS 25.123, section 9.1.1.1 */ 896} RIL_TD_SCDMA_SignalStrength; 897 898/* Deprecated, use RIL_SignalStrength_v6 */ 899typedef struct { 900 RIL_GW_SignalStrength GW_SignalStrength; 901 RIL_CDMA_SignalStrength CDMA_SignalStrength; 902 RIL_EVDO_SignalStrength EVDO_SignalStrength; 903} RIL_SignalStrength_v5; 904 905typedef struct { 906 RIL_GW_SignalStrength GW_SignalStrength; 907 RIL_CDMA_SignalStrength CDMA_SignalStrength; 908 RIL_EVDO_SignalStrength EVDO_SignalStrength; 909 RIL_LTE_SignalStrength LTE_SignalStrength; 910} RIL_SignalStrength_v6; 911 912typedef struct { 913 RIL_GW_SignalStrength GW_SignalStrength; 914 RIL_CDMA_SignalStrength CDMA_SignalStrength; 915 RIL_EVDO_SignalStrength EVDO_SignalStrength; 916 RIL_LTE_SignalStrength_v8 LTE_SignalStrength; 917} RIL_SignalStrength_v8; 918 919typedef struct { 920 RIL_GW_SignalStrength GW_SignalStrength; 921 RIL_CDMA_SignalStrength CDMA_SignalStrength; 922 RIL_EVDO_SignalStrength EVDO_SignalStrength; 923 RIL_LTE_SignalStrength_v8 LTE_SignalStrength; 924 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength; 925} RIL_SignalStrength_v10; 926 927/** RIL_CellIdentityGsm */ 928typedef struct { 929 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 930 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */ 931 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ 932 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */ 933} RIL_CellIdentityGsm; 934 935/** RIL_CellIdentityWcdma */ 936typedef struct { 937 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 938 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */ 939 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ 940 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */ 941 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */ 942} RIL_CellIdentityWcdma; 943 944/** RIL_CellIdentityCdma */ 945typedef struct { 946 int networkId; /* Network Id 0..65535, INT_MAX if unknown */ 947 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */ 948 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */ 949 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. 950 * It is represented in units of 0.25 seconds and ranges from -2592000 951 * to 2592000, both values inclusive (corresponding to a range of -180 952 * to +180 degrees). INT_MAX if unknown */ 953 954 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. 955 * It is represented in units of 0.25 seconds and ranges from -1296000 956 * to 1296000, both values inclusive (corresponding to a range of -90 957 * to +90 degrees). INT_MAX if unknown */ 958} RIL_CellIdentityCdma; 959 960/** RIL_CellIdentityLte */ 961typedef struct { 962 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 963 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */ 964 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */ 965 int pci; /* physical cell id 0..503, INT_MAX if unknown */ 966 int tac; /* 16-bit tracking area code, INT_MAX if unknown */ 967} RIL_CellIdentityLte; 968 969/** RIL_CellIdentityTdscdma */ 970typedef struct { 971 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 972 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */ 973 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ 974 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */ 975 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */ 976} RIL_CellIdentityTdscdma; 977 978/** RIL_CellInfoGsm */ 979typedef struct { 980 RIL_CellIdentityGsm cellIdentityGsm; 981 RIL_GW_SignalStrength signalStrengthGsm; 982} RIL_CellInfoGsm; 983 984/** RIL_CellInfoWcdma */ 985typedef struct { 986 RIL_CellIdentityWcdma cellIdentityWcdma; 987 RIL_SignalStrengthWcdma signalStrengthWcdma; 988} RIL_CellInfoWcdma; 989 990/** RIL_CellInfoCdma */ 991typedef struct { 992 RIL_CellIdentityCdma cellIdentityCdma; 993 RIL_CDMA_SignalStrength signalStrengthCdma; 994 RIL_EVDO_SignalStrength signalStrengthEvdo; 995} RIL_CellInfoCdma; 996 997/** RIL_CellInfoLte */ 998typedef struct { 999 RIL_CellIdentityLte cellIdentityLte; 1000 RIL_LTE_SignalStrength_v8 signalStrengthLte; 1001} RIL_CellInfoLte; 1002 1003/** RIL_CellInfoTdscdma */ 1004typedef struct { 1005 RIL_CellIdentityTdscdma cellIdentityTdscdma; 1006 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma; 1007} RIL_CellInfoTdscdma; 1008 1009// Must be the same as CellInfo.TYPE_XXX 1010typedef enum { 1011 RIL_CELL_INFO_TYPE_GSM = 1, 1012 RIL_CELL_INFO_TYPE_CDMA = 2, 1013 RIL_CELL_INFO_TYPE_LTE = 3, 1014 RIL_CELL_INFO_TYPE_WCDMA = 4, 1015 RIL_CELL_INFO_TYPE_TD_SCDMA = 5 1016} RIL_CellInfoType; 1017 1018// Must be the same as CellInfo.TIMESTAMP_TYPE_XXX 1019typedef enum { 1020 RIL_TIMESTAMP_TYPE_UNKNOWN = 0, 1021 RIL_TIMESTAMP_TYPE_ANTENNA = 1, 1022 RIL_TIMESTAMP_TYPE_MODEM = 2, 1023 RIL_TIMESTAMP_TYPE_OEM_RIL = 3, 1024 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4, 1025} RIL_TimeStampType; 1026 1027typedef struct { 1028 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */ 1029 int registered; /* !0 if this cell is registered 0 if not registered */ 1030 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */ 1031 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */ 1032 union { 1033 RIL_CellInfoGsm gsm; 1034 RIL_CellInfoCdma cdma; 1035 RIL_CellInfoLte lte; 1036 RIL_CellInfoWcdma wcdma; 1037 RIL_CellInfoTdscdma tdscdma; 1038 } CellInfo; 1039} RIL_CellInfo; 1040 1041/* Names of the CDMA info records (C.S0005 section 3.7.5) */ 1042typedef enum { 1043 RIL_CDMA_DISPLAY_INFO_REC, 1044 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC, 1045 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC, 1046 RIL_CDMA_CONNECTED_NUMBER_INFO_REC, 1047 RIL_CDMA_SIGNAL_INFO_REC, 1048 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC, 1049 RIL_CDMA_LINE_CONTROL_INFO_REC, 1050 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC, 1051 RIL_CDMA_T53_CLIR_INFO_REC, 1052 RIL_CDMA_T53_RELEASE_INFO_REC, 1053 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC 1054} RIL_CDMA_InfoRecName; 1055 1056/* Display Info Rec as defined in C.S0005 section 3.7.5.1 1057 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16 1058 Note: the Extended Display info rec contains multiple records of the 1059 form: display_tag, display_len, and display_len occurrences of the 1060 chari field if the display_tag is not 10000000 or 10000001. 1061 To save space, the records are stored consecutively in a byte buffer. 1062 The display_tag, display_len and chari fields are all 1 byte. 1063*/ 1064 1065typedef struct { 1066 char alpha_len; 1067 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH]; 1068} RIL_CDMA_DisplayInfoRecord; 1069 1070/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2 1071 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3 1072 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4 1073*/ 1074 1075typedef struct { 1076 char len; 1077 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH]; 1078 char number_type; 1079 char number_plan; 1080 char pi; 1081 char si; 1082} RIL_CDMA_NumberInfoRecord; 1083 1084/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */ 1085typedef enum { 1086 RIL_REDIRECTING_REASON_UNKNOWN = 0, 1087 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1, 1088 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2, 1089 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9, 1090 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10, 1091 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15, 1092 RIL_REDIRECTING_REASON_RESERVED 1093} RIL_CDMA_RedirectingReason; 1094 1095typedef struct { 1096 RIL_CDMA_NumberInfoRecord redirectingNumber; 1097 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */ 1098 RIL_CDMA_RedirectingReason redirectingReason; 1099} RIL_CDMA_RedirectingNumberInfoRecord; 1100 1101/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */ 1102typedef struct { 1103 char lineCtrlPolarityIncluded; 1104 char lineCtrlToggle; 1105 char lineCtrlReverse; 1106 char lineCtrlPowerDenial; 1107} RIL_CDMA_LineControlInfoRecord; 1108 1109/* T53 CLIR Information Record */ 1110typedef struct { 1111 char cause; 1112} RIL_CDMA_T53_CLIRInfoRecord; 1113 1114/* T53 Audio Control Information Record */ 1115typedef struct { 1116 char upLink; 1117 char downLink; 1118} RIL_CDMA_T53_AudioControlInfoRecord; 1119 1120typedef struct { 1121 1122 RIL_CDMA_InfoRecName name; 1123 1124 union { 1125 /* Display and Extended Display Info Rec */ 1126 RIL_CDMA_DisplayInfoRecord display; 1127 1128 /* Called Party Number, Calling Party Number, Connected Number Info Rec */ 1129 RIL_CDMA_NumberInfoRecord number; 1130 1131 /* Signal Info Rec */ 1132 RIL_CDMA_SignalInfoRecord signal; 1133 1134 /* Redirecting Number Info Rec */ 1135 RIL_CDMA_RedirectingNumberInfoRecord redir; 1136 1137 /* Line Control Info Rec */ 1138 RIL_CDMA_LineControlInfoRecord lineCtrl; 1139 1140 /* T53 CLIR Info Rec */ 1141 RIL_CDMA_T53_CLIRInfoRecord clir; 1142 1143 /* T53 Audio Control Info Rec */ 1144 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl; 1145 } rec; 1146} RIL_CDMA_InformationRecord; 1147 1148#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10 1149 1150typedef struct { 1151 char numberOfInfoRecs; 1152 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS]; 1153} RIL_CDMA_InformationRecords; 1154 1155/* See RIL_REQUEST_NV_READ_ITEM */ 1156typedef struct { 1157 RIL_NV_Item itemID; 1158} RIL_NV_ReadItem; 1159 1160/* See RIL_REQUEST_NV_WRITE_ITEM */ 1161typedef struct { 1162 RIL_NV_Item itemID; 1163 char * value; 1164} RIL_NV_WriteItem; 1165 1166typedef enum { 1167 HANDOVER_STARTED = 0, 1168 HANDOVER_COMPLETED = 1, 1169 HANDOVER_FAILED = 2, 1170 HANDOVER_CANCELED = 3 1171} RIL_SrvccState; 1172 1173/* hardware configuration reported to RILJ. */ 1174typedef enum { 1175 RIL_HARDWARE_CONFIG_MODEM = 0, 1176 RIL_HARDWARE_CONFIG_SIM = 1, 1177} RIL_HardwareConfig_Type; 1178 1179typedef enum { 1180 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0, 1181 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1, 1182 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2, 1183} RIL_HardwareConfig_State; 1184 1185typedef struct { 1186 int rilModel; 1187 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */ 1188 int maxVoice; 1189 int maxData; 1190 int maxStandby; 1191} RIL_HardwareConfig_Modem; 1192 1193typedef struct { 1194 char modemUuid[MAX_UUID_LENGTH]; 1195} RIL_HardwareConfig_Sim; 1196 1197typedef struct { 1198 RIL_HardwareConfig_Type type; 1199 char uuid[MAX_UUID_LENGTH]; 1200 RIL_HardwareConfig_State state; 1201 union { 1202 RIL_HardwareConfig_Modem modem; 1203 RIL_HardwareConfig_Sim sim; 1204 } cfg; 1205} RIL_HardwareConfig; 1206 1207/** 1208 * Data connection power state 1209 */ 1210typedef enum { 1211 RIL_DC_POWER_STATE_LOW = 1, // Low power state 1212 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state 1213 RIL_DC_POWER_STATE_HIGH = 3, // High power state 1214 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state 1215} RIL_DcPowerStates; 1216 1217/** 1218 * Data connection real time info 1219 */ 1220typedef struct { 1221 uint64_t time; // Time in nanos as returned by ril_nano_time 1222 RIL_DcPowerStates powerState; // Current power state 1223} RIL_DcRtInfo; 1224 1225/** 1226 * Data profile to modem 1227 */ 1228typedef struct { 1229 /* id of the data profile */ 1230 int profileId; 1231 /* the APN to connect to */ 1232 char* apn; 1233 /** one of the PDP_type values in TS 27.007 section 10.1.1. 1234 * For example, "IP", "IPV6", "IPV4V6", or "PPP". 1235 */ 1236 char* protocol; 1237 /** authentication protocol used for this PDP context 1238 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) 1239 */ 1240 int authType; 1241 /* the username for APN, or NULL */ 1242 char* user; 1243 /* the password for APN, or NULL */ 1244 char* password; 1245 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */ 1246 int type; 1247 /* the period in seconds to limit the maximum connections */ 1248 int maxConnsTime; 1249 /* the maximum connections during maxConnsTime */ 1250 int maxConns; 1251 /** the required wait time in seconds after a successful UE initiated 1252 * disconnect of a given PDN connection before the device can send 1253 * a new PDN connection request for that given PDN 1254 */ 1255 int waitTime; 1256 /* true to enable the profile, 0 to disable, 1 to enable */ 1257 int enabled; 1258} RIL_DataProfileInfo; 1259 1260/** 1261 * RIL_REQUEST_GET_SIM_STATUS 1262 * 1263 * Requests status of the SIM interface and the SIM card 1264 * 1265 * "data" is NULL 1266 * 1267 * "response" is const RIL_CardStatus_v6 * 1268 * 1269 * Valid errors: 1270 * Must never fail 1271 */ 1272#define RIL_REQUEST_GET_SIM_STATUS 1 1273 1274/** 1275 * RIL_REQUEST_ENTER_SIM_PIN 1276 * 1277 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state 1278 * 1279 * "data" is const char ** 1280 * ((const char **)data)[0] is PIN value 1281 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 1282 * 1283 * "response" is int * 1284 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 1285 * 1286 * Valid errors: 1287 * 1288 * SUCCESS 1289 * RADIO_NOT_AVAILABLE (radio resetting) 1290 * GENERIC_FAILURE 1291 * PASSWORD_INCORRECT 1292 */ 1293 1294#define RIL_REQUEST_ENTER_SIM_PIN 2 1295 1296 1297/** 1298 * RIL_REQUEST_ENTER_SIM_PUK 1299 * 1300 * Supplies SIM PUK and new PIN. 1301 * 1302 * "data" is const char ** 1303 * ((const char **)data)[0] is PUK value 1304 * ((const char **)data)[1] is new PIN value 1305 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 1306 * 1307 * "response" is int * 1308 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 1309 * 1310 * Valid errors: 1311 * 1312 * SUCCESS 1313 * RADIO_NOT_AVAILABLE (radio resetting) 1314 * GENERIC_FAILURE 1315 * PASSWORD_INCORRECT 1316 * (PUK is invalid) 1317 */ 1318 1319#define RIL_REQUEST_ENTER_SIM_PUK 3 1320 1321/** 1322 * RIL_REQUEST_ENTER_SIM_PIN2 1323 * 1324 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was 1325 * returned as a a failure from a previous operation. 1326 * 1327 * "data" is const char ** 1328 * ((const char **)data)[0] is PIN2 value 1329 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 1330 * 1331 * "response" is int * 1332 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 1333 * 1334 * Valid errors: 1335 * 1336 * SUCCESS 1337 * RADIO_NOT_AVAILABLE (radio resetting) 1338 * GENERIC_FAILURE 1339 * PASSWORD_INCORRECT 1340 */ 1341 1342#define RIL_REQUEST_ENTER_SIM_PIN2 4 1343 1344/** 1345 * RIL_REQUEST_ENTER_SIM_PUK2 1346 * 1347 * Supplies SIM PUK2 and new PIN2. 1348 * 1349 * "data" is const char ** 1350 * ((const char **)data)[0] is PUK2 value 1351 * ((const char **)data)[1] is new PIN2 value 1352 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 1353 * 1354 * "response" is int * 1355 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 1356 * 1357 * Valid errors: 1358 * 1359 * SUCCESS 1360 * RADIO_NOT_AVAILABLE (radio resetting) 1361 * GENERIC_FAILURE 1362 * PASSWORD_INCORRECT 1363 * (PUK2 is invalid) 1364 */ 1365 1366#define RIL_REQUEST_ENTER_SIM_PUK2 5 1367 1368/** 1369 * RIL_REQUEST_CHANGE_SIM_PIN 1370 * 1371 * Supplies old SIM PIN and new PIN. 1372 * 1373 * "data" is const char ** 1374 * ((const char **)data)[0] is old PIN value 1375 * ((const char **)data)[1] is new PIN value 1376 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 1377 * 1378 * "response" is int * 1379 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 1380 * 1381 * Valid errors: 1382 * 1383 * SUCCESS 1384 * RADIO_NOT_AVAILABLE (radio resetting) 1385 * GENERIC_FAILURE 1386 * PASSWORD_INCORRECT 1387 * (old PIN is invalid) 1388 * 1389 */ 1390 1391#define RIL_REQUEST_CHANGE_SIM_PIN 6 1392 1393 1394/** 1395 * RIL_REQUEST_CHANGE_SIM_PIN2 1396 * 1397 * Supplies old SIM PIN2 and new PIN2. 1398 * 1399 * "data" is const char ** 1400 * ((const char **)data)[0] is old PIN2 value 1401 * ((const char **)data)[1] is new PIN2 value 1402 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 1403 * 1404 * "response" is int * 1405 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 1406 * 1407 * Valid errors: 1408 * 1409 * SUCCESS 1410 * RADIO_NOT_AVAILABLE (radio resetting) 1411 * GENERIC_FAILURE 1412 * PASSWORD_INCORRECT 1413 * (old PIN2 is invalid) 1414 * 1415 */ 1416 1417#define RIL_REQUEST_CHANGE_SIM_PIN2 7 1418 1419/** 1420 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 1421 * 1422 * Requests that network personlization be deactivated 1423 * 1424 * "data" is const char ** 1425 * ((const char **)(data))[0]] is network depersonlization code 1426 * 1427 * "response" is int * 1428 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 1429 * 1430 * Valid errors: 1431 * 1432 * SUCCESS 1433 * RADIO_NOT_AVAILABLE (radio resetting) 1434 * GENERIC_FAILURE 1435 * PASSWORD_INCORRECT 1436 * (code is invalid) 1437 */ 1438 1439#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8 1440 1441/** 1442 * RIL_REQUEST_GET_CURRENT_CALLS 1443 * 1444 * Requests current call list 1445 * 1446 * "data" is NULL 1447 * 1448 * "response" must be a "const RIL_Call **" 1449 * 1450 * Valid errors: 1451 * 1452 * SUCCESS 1453 * RADIO_NOT_AVAILABLE (radio resetting) 1454 * GENERIC_FAILURE 1455 * (request will be made again in a few hundred msec) 1456 */ 1457 1458#define RIL_REQUEST_GET_CURRENT_CALLS 9 1459 1460 1461/** 1462 * RIL_REQUEST_DIAL 1463 * 1464 * Initiate voice call 1465 * 1466 * "data" is const RIL_Dial * 1467 * "response" is NULL 1468 * 1469 * This method is never used for supplementary service codes 1470 * 1471 * Valid errors: 1472 * SUCCESS 1473 * RADIO_NOT_AVAILABLE (radio resetting) 1474 * GENERIC_FAILURE 1475 */ 1476#define RIL_REQUEST_DIAL 10 1477 1478/** 1479 * RIL_REQUEST_GET_IMSI 1480 * 1481 * Get the SIM IMSI 1482 * 1483 * Only valid when radio state is "RADIO_STATE_ON" 1484 * 1485 * "data" is const char ** 1486 * ((const char **)data)[0] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 1487 * "response" is a const char * containing the IMSI 1488 * 1489 * Valid errors: 1490 * SUCCESS 1491 * RADIO_NOT_AVAILABLE (radio resetting) 1492 * GENERIC_FAILURE 1493 */ 1494 1495#define RIL_REQUEST_GET_IMSI 11 1496 1497/** 1498 * RIL_REQUEST_HANGUP 1499 * 1500 * Hang up a specific line (like AT+CHLD=1x) 1501 * 1502 * After this HANGUP request returns, RIL should show the connection is NOT 1503 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. 1504 * 1505 * "data" is an int * 1506 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) 1507 * 1508 * "response" is NULL 1509 * 1510 * Valid errors: 1511 * SUCCESS 1512 * RADIO_NOT_AVAILABLE (radio resetting) 1513 * GENERIC_FAILURE 1514 */ 1515 1516#define RIL_REQUEST_HANGUP 12 1517 1518/** 1519 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 1520 * 1521 * Hang up waiting or held (like AT+CHLD=0) 1522 * 1523 * After this HANGUP request returns, RIL should show the connection is NOT 1524 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. 1525 * 1526 * "data" is NULL 1527 * "response" is NULL 1528 * 1529 * Valid errors: 1530 * SUCCESS 1531 * RADIO_NOT_AVAILABLE (radio resetting) 1532 * GENERIC_FAILURE 1533 */ 1534 1535#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13 1536 1537/** 1538 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 1539 * 1540 * Hang up waiting or held (like AT+CHLD=1) 1541 * 1542 * After this HANGUP request returns, RIL should show the connection is NOT 1543 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. 1544 * 1545 * "data" is NULL 1546 * "response" is NULL 1547 * 1548 * Valid errors: 1549 * SUCCESS 1550 * RADIO_NOT_AVAILABLE (radio resetting) 1551 * GENERIC_FAILURE 1552 */ 1553 1554#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14 1555 1556/** 1557 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 1558 * 1559 * Switch waiting or holding call and active call (like AT+CHLD=2) 1560 * 1561 * State transitions should be is follows: 1562 * 1563 * If call 1 is waiting and call 2 is active, then if this re 1564 * 1565 * BEFORE AFTER 1566 * Call 1 Call 2 Call 1 Call 2 1567 * ACTIVE HOLDING HOLDING ACTIVE 1568 * ACTIVE WAITING HOLDING ACTIVE 1569 * HOLDING WAITING HOLDING ACTIVE 1570 * ACTIVE IDLE HOLDING IDLE 1571 * IDLE IDLE IDLE IDLE 1572 * 1573 * "data" is NULL 1574 * "response" is NULL 1575 * 1576 * Valid errors: 1577 * SUCCESS 1578 * RADIO_NOT_AVAILABLE (radio resetting) 1579 * GENERIC_FAILURE 1580 */ 1581 1582#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15 1583#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15 1584 1585/** 1586 * RIL_REQUEST_CONFERENCE 1587 * 1588 * Conference holding and active (like AT+CHLD=3) 1589 1590 * "data" is NULL 1591 * "response" is NULL 1592 * 1593 * Valid errors: 1594 * SUCCESS 1595 * RADIO_NOT_AVAILABLE (radio resetting) 1596 * GENERIC_FAILURE 1597 */ 1598#define RIL_REQUEST_CONFERENCE 16 1599 1600/** 1601 * RIL_REQUEST_UDUB 1602 * 1603 * Send UDUB (user determined used busy) to ringing or 1604 * waiting call answer)(RIL_BasicRequest r); 1605 * 1606 * "data" is NULL 1607 * "response" is NULL 1608 * 1609 * Valid errors: 1610 * SUCCESS 1611 * RADIO_NOT_AVAILABLE (radio resetting) 1612 * GENERIC_FAILURE 1613 */ 1614#define RIL_REQUEST_UDUB 17 1615 1616/** 1617 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE 1618 * 1619 * Requests the failure cause code for the most recently terminated call 1620 * 1621 * "data" is NULL 1622 * "response" is a "int *" 1623 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are 1624 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA 1625 * failure reasons are derived from the possible call failure scenarios 1626 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard. 1627 * 1628 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked 1629 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED) 1630 * 1631 * If the implementation does not have access to the exact cause codes, 1632 * then it should return one of the values listed in RIL_LastCallFailCause, 1633 * as the UI layer needs to distinguish these cases for tone generation or 1634 * error notification. 1635 * 1636 * Valid errors: 1637 * SUCCESS 1638 * RADIO_NOT_AVAILABLE 1639 * GENERIC_FAILURE 1640 * 1641 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 1642 */ 1643#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18 1644 1645/** 1646 * RIL_REQUEST_SIGNAL_STRENGTH 1647 * 1648 * Requests current signal strength and associated information 1649 * 1650 * Must succeed if radio is on. 1651 * 1652 * "data" is NULL 1653 * 1654 * "response" is a const RIL_SignalStrength * 1655 * 1656 * Valid errors: 1657 * SUCCESS 1658 * RADIO_NOT_AVAILABLE 1659 */ 1660#define RIL_REQUEST_SIGNAL_STRENGTH 19 1661 1662/** 1663 * RIL_REQUEST_VOICE_REGISTRATION_STATE 1664 * 1665 * Request current registration state 1666 * 1667 * "data" is NULL 1668 * "response" is a "char **" 1669 * ((const char **)response)[0] is registration state 0-6, 1670 * 0 - Not registered, MT is not currently searching 1671 * a new operator to register 1672 * 1 - Registered, home network 1673 * 2 - Not registered, but MT is currently searching 1674 * a new operator to register 1675 * 3 - Registration denied 1676 * 4 - Unknown 1677 * 5 - Registered, roaming 1678 * 10 - Same as 0, but indicates that emergency calls 1679 * are enabled. 1680 * 12 - Same as 2, but indicates that emergency calls 1681 * are enabled. 1682 * 13 - Same as 3, but indicates that emergency calls 1683 * are enabled. 1684 * 14 - Same as 4, but indicates that emergency calls 1685 * are enabled. 1686 * 1687 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or 1688 * NULL if not.Valid LAC are 0x0000 - 0xffff 1689 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or 1690 * NULL if not. 1691 * Valid CID are 0x00000000 - 0xffffffff 1692 * In GSM, CID is Cell ID (see TS 27.007) 1693 * in 16 bits 1694 * In UMTS, CID is UMTS Cell Identity 1695 * (see TS 25.331) in 28 bits 1696 * ((const char **)response)[3] indicates the available voice radio technology, 1697 * valid values as defined by RIL_RadioTechnology. 1698 * ((const char **)response)[4] is Base Station ID if registered on a CDMA 1699 * system or NULL if not. Base Station ID in 1700 * decimal format 1701 * ((const char **)response)[5] is Base Station latitude if registered on a 1702 * CDMA system or NULL if not. Base Station 1703 * latitude is a decimal number as specified in 1704 * 3GPP2 C.S0005-A v6.0. It is represented in 1705 * units of 0.25 seconds and ranges from -1296000 1706 * to 1296000, both values inclusive (corresponding 1707 * to a range of -90 to +90 degrees). 1708 * ((const char **)response)[6] is Base Station longitude if registered on a 1709 * CDMA system or NULL if not. Base Station 1710 * longitude is a decimal number as specified in 1711 * 3GPP2 C.S0005-A v6.0. It is represented in 1712 * units of 0.25 seconds and ranges from -2592000 1713 * to 2592000, both values inclusive (corresponding 1714 * to a range of -180 to +180 degrees). 1715 * ((const char **)response)[7] is concurrent services support indicator if 1716 * registered on a CDMA system 0-1. 1717 * 0 - Concurrent services not supported, 1718 * 1 - Concurrent services supported 1719 * ((const char **)response)[8] is System ID if registered on a CDMA system or 1720 * NULL if not. Valid System ID are 0 - 32767 1721 * ((const char **)response)[9] is Network ID if registered on a CDMA system or 1722 * NULL if not. Valid System ID are 0 - 65535 1723 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered 1724 * on a CDMA or EVDO system or NULL if not. Valid values 1725 * are 0-255. 1726 * ((const char **)response)[11] indicates whether the current system is in the 1727 * PRL if registered on a CDMA or EVDO system or NULL if 1728 * not. 0=not in the PRL, 1=in the PRL 1729 * ((const char **)response)[12] is the default Roaming Indicator from the PRL, 1730 * if registered on a CDMA or EVDO system or NULL if not. 1731 * Valid values are 0-255. 1732 * ((const char **)response)[13] if registration state is 3 (Registration 1733 * denied) this is an enumerated reason why 1734 * registration was denied. See 3GPP TS 24.008, 1735 * 10.5.3.6 and Annex G. 1736 * 0 - General 1737 * 1 - Authentication Failure 1738 * 2 - IMSI unknown in HLR 1739 * 3 - Illegal MS 1740 * 4 - Illegal ME 1741 * 5 - PLMN not allowed 1742 * 6 - Location area not allowed 1743 * 7 - Roaming not allowed 1744 * 8 - No Suitable Cells in this Location Area 1745 * 9 - Network failure 1746 * 10 - Persistent location update reject 1747 * 11 - PLMN not allowed 1748 * 12 - Location area not allowed 1749 * 13 - Roaming not allowed in this Location Area 1750 * 15 - No Suitable Cells in this Location Area 1751 * 17 - Network Failure 1752 * 20 - MAC Failure 1753 * 21 - Sync Failure 1754 * 22 - Congestion 1755 * 23 - GSM Authentication unacceptable 1756 * 25 - Not Authorized for this CSG 1757 * 32 - Service option not supported 1758 * 33 - Requested service option not subscribed 1759 * 34 - Service option temporarily out of order 1760 * 38 - Call cannot be identified 1761 * 48-63 - Retry upon entry into a new cell 1762 * 95 - Semantically incorrect message 1763 * 96 - Invalid mandatory information 1764 * 97 - Message type non-existent or not implemented 1765 * 98 - Message not compatible with protocol state 1766 * 99 - Information element non-existent or not implemented 1767 * 100 - Conditional IE error 1768 * 101 - Message not compatible with protocol state 1769 * 111 - Protocol error, unspecified 1770 * ((const char **)response)[14] is the Primary Scrambling Code of the current 1771 * cell as described in TS 25.331, in hexadecimal 1772 * format, or NULL if unknown or not registered 1773 * to a UMTS network. 1774 * 1775 * Please note that registration state 4 ("unknown") is treated 1776 * as "out of service" in the Android telephony system 1777 * 1778 * Registration state 3 can be returned if Location Update Reject 1779 * (with cause 17 - Network Failure) is received repeatedly from the network, 1780 * to facilitate "managed roaming" 1781 * 1782 * Valid errors: 1783 * SUCCESS 1784 * RADIO_NOT_AVAILABLE 1785 * GENERIC_FAILURE 1786 */ 1787#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20 1788 1789/** 1790 * RIL_REQUEST_DATA_REGISTRATION_STATE 1791 * 1792 * Request current DATA registration state 1793 * 1794 * "data" is NULL 1795 * "response" is a "char **" 1796 * ((const char **)response)[0] is registration state 0-5 from TS 27.007 10.1.20 AT+CGREG 1797 * ((const char **)response)[1] is LAC if registered or NULL if not 1798 * ((const char **)response)[2] is CID if registered or NULL if not 1799 * ((const char **)response)[3] indicates the available data radio technology, 1800 * valid values as defined by RIL_RadioTechnology. 1801 * ((const char **)response)[4] if registration state is 3 (Registration 1802 * denied) this is an enumerated reason why 1803 * registration was denied. See 3GPP TS 24.008, 1804 * Annex G.6 "Additonal cause codes for GMM". 1805 * 7 == GPRS services not allowed 1806 * 8 == GPRS services and non-GPRS services not allowed 1807 * 9 == MS identity cannot be derived by the network 1808 * 10 == Implicitly detached 1809 * 14 == GPRS services not allowed in this PLMN 1810 * 16 == MSC temporarily not reachable 1811 * 40 == No PDP context activated 1812 * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be 1813 * established using RIL_REQUEST_SETUP_DATA_CALL. 1814 * 1815 * The values at offsets 6..10 are optional LTE location information in decimal. 1816 * If a value is unknown that value may be NULL. If all values are NULL, 1817 * none need to be present. 1818 * ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code. 1819 * ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier. 1820 * ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier. 1821 * ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity. 1822 * ((const char **)response)[10] is TADV, a 6-bit timing advance value. 1823 * 1824 * LAC and CID are in hexadecimal format. 1825 * valid LAC are 0x0000 - 0xffff 1826 * valid CID are 0x00000000 - 0x0fffffff 1827 * 1828 * Please note that registration state 4 ("unknown") is treated 1829 * as "out of service" in the Android telephony system 1830 * 1831 * Valid errors: 1832 * SUCCESS 1833 * RADIO_NOT_AVAILABLE 1834 * GENERIC_FAILURE 1835 */ 1836#define RIL_REQUEST_DATA_REGISTRATION_STATE 21 1837 1838/** 1839 * RIL_REQUEST_OPERATOR 1840 * 1841 * Request current operator ONS or EONS 1842 * 1843 * "data" is NULL 1844 * "response" is a "const char **" 1845 * ((const char **)response)[0] is long alpha ONS or EONS 1846 * or NULL if unregistered 1847 * 1848 * ((const char **)response)[1] is short alpha ONS or EONS 1849 * or NULL if unregistered 1850 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC) 1851 * or NULL if unregistered 1852 * 1853 * Valid errors: 1854 * SUCCESS 1855 * RADIO_NOT_AVAILABLE 1856 * GENERIC_FAILURE 1857 */ 1858#define RIL_REQUEST_OPERATOR 22 1859 1860/** 1861 * RIL_REQUEST_RADIO_POWER 1862 * 1863 * Toggle radio on and off (for "airplane" mode) 1864 * If the radio is is turned off/on the radio modem subsystem 1865 * is expected return to an initialized state. For instance, 1866 * any voice and data calls will be terminated and all associated 1867 * lists emptied. 1868 * 1869 * "data" is int * 1870 * ((int *)data)[0] is > 0 for "Radio On" 1871 * ((int *)data)[0] is == 0 for "Radio Off" 1872 * 1873 * "response" is NULL 1874 * 1875 * Turn radio on if "on" > 0 1876 * Turn radio off if "on" == 0 1877 * 1878 * Valid errors: 1879 * SUCCESS 1880 * RADIO_NOT_AVAILABLE 1881 * GENERIC_FAILURE 1882 */ 1883#define RIL_REQUEST_RADIO_POWER 23 1884 1885/** 1886 * RIL_REQUEST_DTMF 1887 * 1888 * Send a DTMF tone 1889 * 1890 * If the implementation is currently playing a tone requested via 1891 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone 1892 * should be played instead 1893 * 1894 * "data" is a char * containing a single character with one of 12 values: 0-9,*,# 1895 * "response" is NULL 1896 * 1897 * FIXME should this block/mute microphone? 1898 * How does this interact with local DTMF feedback? 1899 * 1900 * Valid errors: 1901 * SUCCESS 1902 * RADIO_NOT_AVAILABLE 1903 * GENERIC_FAILURE 1904 * 1905 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START 1906 * 1907 */ 1908#define RIL_REQUEST_DTMF 24 1909 1910/** 1911 * RIL_REQUEST_SEND_SMS 1912 * 1913 * Send an SMS message 1914 * 1915 * "data" is const char ** 1916 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed 1917 * by a length byte (as expected by TS 27.005) or NULL for default SMSC 1918 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string 1919 * less the SMSC address 1920 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2" 1921 * 1922 * "response" is a const RIL_SMS_Response * 1923 * 1924 * Based on the return error, caller decides to resend if sending sms 1925 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332) 1926 * and GENERIC_FAILURE means no retry (i.e. error cause is 500) 1927 * 1928 * Valid errors: 1929 * SUCCESS 1930 * RADIO_NOT_AVAILABLE 1931 * SMS_SEND_FAIL_RETRY 1932 * FDN_CHECK_FAILURE 1933 * GENERIC_FAILURE 1934 * 1935 * FIXME how do we specify TP-Message-Reference if we need to resend? 1936 */ 1937#define RIL_REQUEST_SEND_SMS 25 1938 1939 1940/** 1941 * RIL_REQUEST_SEND_SMS_EXPECT_MORE 1942 * 1943 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS, 1944 * except that more messages are expected to be sent soon. If possible, 1945 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command) 1946 * 1947 * "data" is const char ** 1948 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed 1949 * by a length byte (as expected by TS 27.005) or NULL for default SMSC 1950 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string 1951 * less the SMSC address 1952 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2" 1953 * 1954 * "response" is a const RIL_SMS_Response * 1955 * 1956 * Based on the return error, caller decides to resend if sending sms 1957 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332) 1958 * and GENERIC_FAILURE means no retry (i.e. error cause is 500) 1959 * 1960 * Valid errors: 1961 * SUCCESS 1962 * RADIO_NOT_AVAILABLE 1963 * SMS_SEND_FAIL_RETRY 1964 * GENERIC_FAILURE 1965 * 1966 */ 1967#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26 1968 1969 1970/** 1971 * RIL_REQUEST_SETUP_DATA_CALL 1972 * 1973 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status 1974 * return success it is added to the list of data calls and a 1975 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the 1976 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the 1977 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST 1978 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED. 1979 * 1980 * The RIL is expected to: 1981 * - Create one data call context. 1982 * - Create and configure a dedicated interface for the context 1983 * - The interface must be point to point. 1984 * - The interface is configured with one or more addresses and 1985 * is capable of sending and receiving packets. The prefix length 1986 * of the addresses must be /32 for IPv4 and /128 for IPv6. 1987 * - Must NOT change the linux routing table. 1988 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5] 1989 * number of simultaneous data call contexts. 1990 * 1991 * "data" is a const char ** 1992 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2... 1993 * for values above 2 this is RIL_RadioTechnology + 2. 1994 * ((const char **)data)[1] is a RIL_DataProfile (support is optional) 1995 * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will 1996 * override the one in the profile. NULL indicates no APN overrride. 1997 * ((const char **)data)[3] is the username for APN, or NULL 1998 * ((const char **)data)[4] is the password for APN, or NULL 1999 * ((const char **)data)[5] is the PAP / CHAP auth type. Values: 2000 * 0 => PAP and CHAP is never performed. 2001 * 1 => PAP may be performed; CHAP is never performed. 2002 * 2 => CHAP may be performed; PAP is never performed. 2003 * 3 => PAP / CHAP may be performed - baseband dependent. 2004 * ((const char **)data)[6] is the connection type to request must be one of the 2005 * PDP_type values in TS 27.007 section 10.1.1. 2006 * For example, "IP", "IPV6", "IPV4V6", or "PPP". 2007 * ((const char **)data)[7] Optional connection property parameters, format to be defined. 2008 * 2009 * "response" is a RIL_Data_Call_Response_v6 2010 * 2011 * FIXME may need way to configure QoS settings 2012 * 2013 * Valid errors: 2014 * SUCCESS should be returned on both success and failure of setup with 2015 * the RIL_Data_Call_Response_v6.status containing the actual status. 2016 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored. 2017 * 2018 * Other errors could include: 2019 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW, 2020 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED. 2021 * 2022 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL 2023 */ 2024#define RIL_REQUEST_SETUP_DATA_CALL 27 2025 2026 2027/** 2028 * RIL_REQUEST_SIM_IO 2029 * 2030 * Request SIM I/O operation. 2031 * This is similar to the TS 27.007 "restricted SIM" operation 2032 * where it assumes all of the EF selection will be done by the 2033 * callee. 2034 * 2035 * "data" is a const RIL_SIM_IO_v6 * 2036 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL, 2037 * or may specify a PIN2 for operations that require a PIN2 (eg 2038 * updating FDN records) 2039 * 2040 * "response" is a const RIL_SIM_IO_Response * 2041 * 2042 * Arguments and responses that are unused for certain 2043 * values of "command" should be ignored or set to NULL 2044 * 2045 * Valid errors: 2046 * SUCCESS 2047 * RADIO_NOT_AVAILABLE 2048 * GENERIC_FAILURE 2049 * SIM_PIN2 2050 * SIM_PUK2 2051 */ 2052#define RIL_REQUEST_SIM_IO 28 2053 2054/** 2055 * RIL_REQUEST_SEND_USSD 2056 * 2057 * Send a USSD message 2058 * 2059 * If a USSD session already exists, the message should be sent in the 2060 * context of that session. Otherwise, a new session should be created. 2061 * 2062 * The network reply should be reported via RIL_UNSOL_ON_USSD 2063 * 2064 * Only one USSD session may exist at a time, and the session is assumed 2065 * to exist until: 2066 * a) The android system invokes RIL_REQUEST_CANCEL_USSD 2067 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code 2068 * of "0" (USSD-Notify/no further action) or "2" (session terminated) 2069 * 2070 * "data" is a const char * containing the USSD request in UTF-8 format 2071 * "response" is NULL 2072 * 2073 * Valid errors: 2074 * SUCCESS 2075 * RADIO_NOT_AVAILABLE 2076 * FDN_CHECK_FAILURE 2077 * GENERIC_FAILURE 2078 * 2079 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD 2080 */ 2081 2082#define RIL_REQUEST_SEND_USSD 29 2083 2084/** 2085 * RIL_REQUEST_CANCEL_USSD 2086 * 2087 * Cancel the current USSD session if one exists 2088 * 2089 * "data" is null 2090 * "response" is NULL 2091 * 2092 * Valid errors: 2093 * SUCCESS 2094 * RADIO_NOT_AVAILABLE 2095 * GENERIC_FAILURE 2096 */ 2097 2098#define RIL_REQUEST_CANCEL_USSD 30 2099 2100/** 2101 * RIL_REQUEST_GET_CLIR 2102 * 2103 * Gets current CLIR status 2104 * "data" is NULL 2105 * "response" is int * 2106 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7 2107 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7 2108 * 2109 * Valid errors: 2110 * SUCCESS 2111 * RADIO_NOT_AVAILABLE 2112 * GENERIC_FAILURE 2113 */ 2114#define RIL_REQUEST_GET_CLIR 31 2115 2116/** 2117 * RIL_REQUEST_SET_CLIR 2118 * 2119 * "data" is int * 2120 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7 2121 * 2122 * "response" is NULL 2123 * 2124 * Valid errors: 2125 * SUCCESS 2126 * RADIO_NOT_AVAILABLE 2127 * GENERIC_FAILURE 2128 */ 2129#define RIL_REQUEST_SET_CLIR 32 2130 2131/** 2132 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 2133 * 2134 * "data" is const RIL_CallForwardInfo * 2135 * 2136 * "response" is const RIL_CallForwardInfo ** 2137 * "response" points to an array of RIL_CallForwardInfo *'s, one for 2138 * each distinct registered phone number. 2139 * 2140 * For example, if data is forwarded to +18005551212 and voice is forwarded 2141 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned 2142 * 2143 * If, however, both data and voice are forwarded to +18005551212, then 2144 * a single RIL_CallForwardInfo can be returned with the service class 2145 * set to "data + voice = 3") 2146 * 2147 * Valid errors: 2148 * SUCCESS 2149 * RADIO_NOT_AVAILABLE 2150 * GENERIC_FAILURE 2151 */ 2152#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33 2153 2154 2155/** 2156 * RIL_REQUEST_SET_CALL_FORWARD 2157 * 2158 * Configure call forward rule 2159 * 2160 * "data" is const RIL_CallForwardInfo * 2161 * "response" is NULL 2162 * 2163 * Valid errors: 2164 * SUCCESS 2165 * RADIO_NOT_AVAILABLE 2166 * GENERIC_FAILURE 2167 */ 2168#define RIL_REQUEST_SET_CALL_FORWARD 34 2169 2170 2171/** 2172 * RIL_REQUEST_QUERY_CALL_WAITING 2173 * 2174 * Query current call waiting state 2175 * 2176 * "data" is const int * 2177 * ((const int *)data)[0] is the TS 27.007 service class to query. 2178 * "response" is a const int * 2179 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled" 2180 * 2181 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1] 2182 * must follow, with the TS 27.007 service class bit vector of services 2183 * for which call waiting is enabled. 2184 * 2185 * For example, if ((const int *)response)[0] is 1 and 2186 * ((const int *)response)[1] is 3, then call waiting is enabled for data 2187 * and voice and disabled for everything else 2188 * 2189 * Valid errors: 2190 * SUCCESS 2191 * RADIO_NOT_AVAILABLE 2192 * GENERIC_FAILURE 2193 */ 2194#define RIL_REQUEST_QUERY_CALL_WAITING 35 2195 2196 2197/** 2198 * RIL_REQUEST_SET_CALL_WAITING 2199 * 2200 * Configure current call waiting state 2201 * 2202 * "data" is const int * 2203 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled" 2204 * ((const int *)data)[1] is the TS 27.007 service class bit vector of 2205 * services to modify 2206 * "response" is NULL 2207 * 2208 * Valid errors: 2209 * SUCCESS 2210 * RADIO_NOT_AVAILABLE 2211 * GENERIC_FAILURE 2212 */ 2213#define RIL_REQUEST_SET_CALL_WAITING 36 2214 2215/** 2216 * RIL_REQUEST_SMS_ACKNOWLEDGE 2217 * 2218 * Acknowledge successful or failed receipt of SMS previously indicated 2219 * via RIL_UNSOL_RESPONSE_NEW_SMS 2220 * 2221 * "data" is int * 2222 * ((int *)data)[0] is 1 on successful receipt 2223 * (basically, AT+CNMA=1 from TS 27.005 2224 * is 0 on failed receipt 2225 * (basically, AT+CNMA=2 from TS 27.005) 2226 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined 2227 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory 2228 * capacity exceeded) and 0xFF (unspecified error) are 2229 * reported. 2230 * 2231 * "response" is NULL 2232 * 2233 * FIXME would like request that specified RP-ACK/RP-ERROR PDU 2234 * 2235 * Valid errors: 2236 * SUCCESS 2237 * RADIO_NOT_AVAILABLE 2238 * GENERIC_FAILURE 2239 */ 2240#define RIL_REQUEST_SMS_ACKNOWLEDGE 37 2241 2242/** 2243 * RIL_REQUEST_GET_IMEI - DEPRECATED 2244 * 2245 * Get the device IMEI, including check digit 2246 * 2247 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY 2248 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE 2249 * 2250 * "data" is NULL 2251 * "response" is a const char * containing the IMEI 2252 * 2253 * Valid errors: 2254 * SUCCESS 2255 * RADIO_NOT_AVAILABLE (radio resetting) 2256 * GENERIC_FAILURE 2257 */ 2258 2259#define RIL_REQUEST_GET_IMEI 38 2260 2261/** 2262 * RIL_REQUEST_GET_IMEISV - DEPRECATED 2263 * 2264 * Get the device IMEISV, which should be two decimal digits 2265 * 2266 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY 2267 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE 2268 * 2269 * "data" is NULL 2270 * "response" is a const char * containing the IMEISV 2271 * 2272 * Valid errors: 2273 * SUCCESS 2274 * RADIO_NOT_AVAILABLE (radio resetting) 2275 * GENERIC_FAILURE 2276 */ 2277 2278#define RIL_REQUEST_GET_IMEISV 39 2279 2280 2281/** 2282 * RIL_REQUEST_ANSWER 2283 * 2284 * Answer incoming call 2285 * 2286 * Will not be called for WAITING calls. 2287 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case 2288 * instead 2289 * 2290 * "data" is NULL 2291 * "response" is NULL 2292 * 2293 * Valid errors: 2294 * SUCCESS 2295 * RADIO_NOT_AVAILABLE (radio resetting) 2296 * GENERIC_FAILURE 2297 */ 2298 2299#define RIL_REQUEST_ANSWER 40 2300 2301/** 2302 * RIL_REQUEST_DEACTIVATE_DATA_CALL 2303 * 2304 * Deactivate packet data connection and remove from the 2305 * data call list if SUCCESS is returned. Any other return 2306 * values should also try to remove the call from the list, 2307 * but that may not be possible. In any event a 2308 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An 2309 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be 2310 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL. 2311 * 2312 * "data" is const char ** 2313 * ((char**)data)[0] indicating CID 2314 * ((char**)data)[1] indicating Disconnect Reason 2315 * 0 => No specific reason specified 2316 * 1 => Radio shutdown requested 2317 * 2318 * "response" is NULL 2319 * 2320 * Valid errors: 2321 * SUCCESS 2322 * RADIO_NOT_AVAILABLE 2323 * GENERIC_FAILURE 2324 * 2325 * See also: RIL_REQUEST_SETUP_DATA_CALL 2326 */ 2327#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41 2328 2329/** 2330 * RIL_REQUEST_QUERY_FACILITY_LOCK 2331 * 2332 * Query the status of a facility lock state 2333 * 2334 * "data" is const char ** 2335 * ((const char **)data)[0] is the facility string code from TS 27.007 7.4 2336 * (eg "AO" for BAOC, "SC" for SIM lock) 2337 * ((const char **)data)[1] is the password, or "" if not required 2338 * ((const char **)data)[2] is the TS 27.007 service class bit vector of 2339 * services to query 2340 * ((const char **)data)[3] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 2341 * This is only applicable in the case of Fixed Dialing Numbers 2342 * (FDN) requests. 2343 * 2344 * "response" is an int * 2345 * ((const int *)response) 0 is the TS 27.007 service class bit vector of 2346 * services for which the specified barring facility 2347 * is active. "0" means "disabled for all" 2348 * 2349 * 2350 * Valid errors: 2351 * SUCCESS 2352 * RADIO_NOT_AVAILABLE 2353 * GENERIC_FAILURE 2354 * 2355 */ 2356#define RIL_REQUEST_QUERY_FACILITY_LOCK 42 2357 2358/** 2359 * RIL_REQUEST_SET_FACILITY_LOCK 2360 * 2361 * Enable/disable one facility lock 2362 * 2363 * "data" is const char ** 2364 * 2365 * ((const char **)data)[0] = facility string code from TS 27.007 7.4 2366 * (eg "AO" for BAOC) 2367 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock" 2368 * ((const char **)data)[2] = password 2369 * ((const char **)data)[3] = string representation of decimal TS 27.007 2370 * service class bit vector. Eg, the string 2371 * "1" means "set this facility for voice services" 2372 * ((const char **)data)[4] = AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 2373 * This is only applicable in the case of Fixed Dialing Numbers 2374 * (FDN) requests. 2375 * 2376 * "response" is int * 2377 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 2378 * 2379 * Valid errors: 2380 * SUCCESS 2381 * RADIO_NOT_AVAILABLE 2382 * GENERIC_FAILURE 2383 * 2384 */ 2385#define RIL_REQUEST_SET_FACILITY_LOCK 43 2386 2387/** 2388 * RIL_REQUEST_CHANGE_BARRING_PASSWORD 2389 * 2390 * Change call barring facility password 2391 * 2392 * "data" is const char ** 2393 * 2394 * ((const char **)data)[0] = facility string code from TS 27.007 7.4 2395 * (eg "AO" for BAOC) 2396 * ((const char **)data)[1] = old password 2397 * ((const char **)data)[2] = new password 2398 * 2399 * "response" is NULL 2400 * 2401 * Valid errors: 2402 * SUCCESS 2403 * RADIO_NOT_AVAILABLE 2404 * GENERIC_FAILURE 2405 * 2406 */ 2407#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44 2408 2409/** 2410 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 2411 * 2412 * Query current network selectin mode 2413 * 2414 * "data" is NULL 2415 * 2416 * "response" is int * 2417 * ((const int *)response)[0] is 2418 * 0 for automatic selection 2419 * 1 for manual selection 2420 * 2421 * Valid errors: 2422 * SUCCESS 2423 * RADIO_NOT_AVAILABLE 2424 * GENERIC_FAILURE 2425 * 2426 */ 2427#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45 2428 2429/** 2430 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 2431 * 2432 * Specify that the network should be selected automatically 2433 * 2434 * "data" is NULL 2435 * "response" is NULL 2436 * 2437 * This request must not respond until the new operator is selected 2438 * and registered 2439 * 2440 * Valid errors: 2441 * SUCCESS 2442 * RADIO_NOT_AVAILABLE 2443 * ILLEGAL_SIM_OR_ME 2444 * GENERIC_FAILURE 2445 * 2446 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and 2447 * no retries needed, such as illegal SIM or ME. 2448 * Returns GENERIC_FAILURE for all other causes that might be 2449 * fixed by retries. 2450 * 2451 */ 2452#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46 2453 2454/** 2455 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 2456 * 2457 * Manually select a specified network. 2458 * 2459 * "data" is const char * specifying MCCMNC of network to select (eg "310170") 2460 * "response" is NULL 2461 * 2462 * This request must not respond until the new operator is selected 2463 * and registered 2464 * 2465 * Valid errors: 2466 * SUCCESS 2467 * RADIO_NOT_AVAILABLE 2468 * ILLEGAL_SIM_OR_ME 2469 * GENERIC_FAILURE 2470 * 2471 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and 2472 * no retries needed, such as illegal SIM or ME. 2473 * Returns GENERIC_FAILURE for all other causes that might be 2474 * fixed by retries. 2475 * 2476 */ 2477#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47 2478 2479/** 2480 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 2481 * 2482 * Scans for available networks 2483 * 2484 * "data" is NULL 2485 * "response" is const char ** that should be an array of n*4 strings, where 2486 * n is the number of available networks 2487 * For each available network: 2488 * 2489 * ((const char **)response)[n+0] is long alpha ONS or EONS 2490 * ((const char **)response)[n+1] is short alpha ONS or EONS 2491 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC) 2492 * ((const char **)response)[n+3] is a string value of the status: 2493 * "unknown" 2494 * "available" 2495 * "current" 2496 * "forbidden" 2497 * 2498 * This request must not respond until the new operator is selected 2499 * and registered 2500 * 2501 * Valid errors: 2502 * SUCCESS 2503 * RADIO_NOT_AVAILABLE 2504 * GENERIC_FAILURE 2505 * 2506 */ 2507#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48 2508 2509/** 2510 * RIL_REQUEST_DTMF_START 2511 * 2512 * Start playing a DTMF tone. Continue playing DTMF tone until 2513 * RIL_REQUEST_DTMF_STOP is received 2514 * 2515 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing, 2516 * it should cancel the previous tone and play the new one. 2517 * 2518 * "data" is a char * 2519 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,# 2520 * "response" is NULL 2521 * 2522 * Valid errors: 2523 * SUCCESS 2524 * RADIO_NOT_AVAILABLE 2525 * GENERIC_FAILURE 2526 * 2527 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP 2528 */ 2529#define RIL_REQUEST_DTMF_START 49 2530 2531/** 2532 * RIL_REQUEST_DTMF_STOP 2533 * 2534 * Stop playing a currently playing DTMF tone. 2535 * 2536 * "data" is NULL 2537 * "response" is NULL 2538 * 2539 * Valid errors: 2540 * SUCCESS 2541 * RADIO_NOT_AVAILABLE 2542 * GENERIC_FAILURE 2543 * 2544 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START 2545 */ 2546#define RIL_REQUEST_DTMF_STOP 50 2547 2548/** 2549 * RIL_REQUEST_BASEBAND_VERSION 2550 * 2551 * Return string value indicating baseband version, eg 2552 * response from AT+CGMR 2553 * 2554 * "data" is NULL 2555 * "response" is const char * containing version string for log reporting 2556 * 2557 * Valid errors: 2558 * SUCCESS 2559 * RADIO_NOT_AVAILABLE 2560 * GENERIC_FAILURE 2561 * 2562 */ 2563#define RIL_REQUEST_BASEBAND_VERSION 51 2564 2565/** 2566 * RIL_REQUEST_SEPARATE_CONNECTION 2567 * 2568 * Separate a party from a multiparty call placing the multiparty call 2569 * (less the specified party) on hold and leaving the specified party 2570 * as the only other member of the current (active) call 2571 * 2572 * Like AT+CHLD=2x 2573 * 2574 * See TS 22.084 1.3.8.2 (iii) 2575 * TS 22.030 6.5.5 "Entering "2X followed by send" 2576 * TS 27.007 "AT+CHLD=2x" 2577 * 2578 * "data" is an int * 2579 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL 2580 * 2581 * "response" is NULL 2582 * 2583 * Valid errors: 2584 * SUCCESS 2585 * RADIO_NOT_AVAILABLE (radio resetting) 2586 * GENERIC_FAILURE 2587 */ 2588#define RIL_REQUEST_SEPARATE_CONNECTION 52 2589 2590 2591/** 2592 * RIL_REQUEST_SET_MUTE 2593 * 2594 * Turn on or off uplink (microphone) mute. 2595 * 2596 * Will only be sent while voice call is active. 2597 * Will always be reset to "disable mute" when a new voice call is initiated 2598 * 2599 * "data" is an int * 2600 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute" 2601 * 2602 * "response" is NULL 2603 * 2604 * Valid errors: 2605 * SUCCESS 2606 * RADIO_NOT_AVAILABLE (radio resetting) 2607 * GENERIC_FAILURE 2608 */ 2609 2610#define RIL_REQUEST_SET_MUTE 53 2611 2612/** 2613 * RIL_REQUEST_GET_MUTE 2614 * 2615 * Queries the current state of the uplink mute setting 2616 * 2617 * "data" is NULL 2618 * "response" is an int * 2619 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled" 2620 * 2621 * Valid errors: 2622 * SUCCESS 2623 * RADIO_NOT_AVAILABLE (radio resetting) 2624 * GENERIC_FAILURE 2625 */ 2626 2627#define RIL_REQUEST_GET_MUTE 54 2628 2629/** 2630 * RIL_REQUEST_QUERY_CLIP 2631 * 2632 * Queries the status of the CLIP supplementary service 2633 * 2634 * (for MMI code "*#30#") 2635 * 2636 * "data" is NULL 2637 * "response" is an int * 2638 * (int *)response)[0] is 1 for "CLIP provisioned" 2639 * and 0 for "CLIP not provisioned" 2640 * and 2 for "unknown, e.g. no network etc" 2641 * 2642 * Valid errors: 2643 * SUCCESS 2644 * RADIO_NOT_AVAILABLE (radio resetting) 2645 * GENERIC_FAILURE 2646 */ 2647 2648#define RIL_REQUEST_QUERY_CLIP 55 2649 2650/** 2651 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status 2652 * field in RIL_Data_Call_Response_v6. 2653 * 2654 * Requests the failure cause code for the most recently failed PDP 2655 * context or CDMA data connection active 2656 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE 2657 * 2658 * "data" is NULL 2659 * 2660 * "response" is a "int *" 2661 * ((int *)response)[0] is an integer cause code defined in TS 24.008 2662 * section 6.1.3.1.3 or close approximation 2663 * 2664 * If the implementation does not have access to the exact cause codes, 2665 * then it should return one of the values listed in 2666 * RIL_DataCallFailCause, as the UI layer needs to distinguish these 2667 * cases for error notification 2668 * and potential retries. 2669 * 2670 * Valid errors: 2671 * SUCCESS 2672 * RADIO_NOT_AVAILABLE 2673 * GENERIC_FAILURE 2674 * 2675 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE 2676 * 2677 * Deprecated use the status field in RIL_Data_Call_Response_v6. 2678 */ 2679 2680#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56 2681 2682/** 2683 * RIL_REQUEST_DATA_CALL_LIST 2684 * 2685 * Returns the data call list. An entry is added when a 2686 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a 2687 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied 2688 * when RIL_REQUEST_RADIO_POWER off/on is issued. 2689 * 2690 * "data" is NULL 2691 * "response" is an array of RIL_Data_Call_Response_v6 2692 * 2693 * Valid errors: 2694 * SUCCESS 2695 * RADIO_NOT_AVAILABLE (radio resetting) 2696 * GENERIC_FAILURE 2697 * 2698 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED 2699 */ 2700 2701#define RIL_REQUEST_DATA_CALL_LIST 57 2702 2703/** 2704 * RIL_REQUEST_RESET_RADIO - DEPRECATED 2705 * 2706 * Request a radio reset. The RIL implementation may postpone 2707 * the reset until after this request is responded to if the baseband 2708 * is presently busy. 2709 * 2710 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER 2711 * 2712 * "data" is NULL 2713 * "response" is NULL 2714 * 2715 * Valid errors: 2716 * SUCCESS 2717 * RADIO_NOT_AVAILABLE (radio resetting) 2718 * GENERIC_FAILURE 2719 * REQUEST_NOT_SUPPORTED 2720 */ 2721 2722#define RIL_REQUEST_RESET_RADIO 58 2723 2724/** 2725 * RIL_REQUEST_OEM_HOOK_RAW 2726 * 2727 * This request reserved for OEM-specific uses. It passes raw byte arrays 2728 * back and forth. 2729 * 2730 * It can be invoked on the Java side from 2731 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw() 2732 * 2733 * "data" is a char * of bytes copied from the byte[] data argument in java 2734 * "response" is a char * of bytes that will returned via the 2735 * caller's "response" Message here: 2736 * (byte[])(((AsyncResult)response.obj).result) 2737 * 2738 * An error response here will result in 2739 * (((AsyncResult)response.obj).result) == null and 2740 * (((AsyncResult)response.obj).exception) being an instance of 2741 * com.android.internal.telephony.gsm.CommandException 2742 * 2743 * Valid errors: 2744 * All 2745 */ 2746 2747#define RIL_REQUEST_OEM_HOOK_RAW 59 2748 2749/** 2750 * RIL_REQUEST_OEM_HOOK_STRINGS 2751 * 2752 * This request reserved for OEM-specific uses. It passes strings 2753 * back and forth. 2754 * 2755 * It can be invoked on the Java side from 2756 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings() 2757 * 2758 * "data" is a const char **, representing an array of null-terminated UTF-8 2759 * strings copied from the "String[] strings" argument to 2760 * invokeOemRilRequestStrings() 2761 * 2762 * "response" is a const char **, representing an array of null-terminated UTF-8 2763 * stings that will be returned via the caller's response message here: 2764 * 2765 * (String[])(((AsyncResult)response.obj).result) 2766 * 2767 * An error response here will result in 2768 * (((AsyncResult)response.obj).result) == null and 2769 * (((AsyncResult)response.obj).exception) being an instance of 2770 * com.android.internal.telephony.gsm.CommandException 2771 * 2772 * Valid errors: 2773 * All 2774 */ 2775 2776#define RIL_REQUEST_OEM_HOOK_STRINGS 60 2777 2778/** 2779 * RIL_REQUEST_SCREEN_STATE 2780 * 2781 * Indicates the current state of the screen. When the screen is off, the 2782 * RIL should notify the baseband to suppress certain notifications (eg, 2783 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude) 2784 * in an effort to conserve power. These notifications should resume when the 2785 * screen is on. 2786 * 2787 * "data" is int * 2788 * ((int *)data)[0] is == 1 for "Screen On" 2789 * ((int *)data)[0] is == 0 for "Screen Off" 2790 * 2791 * "response" is NULL 2792 * 2793 * Valid errors: 2794 * SUCCESS 2795 * GENERIC_FAILURE 2796 */ 2797#define RIL_REQUEST_SCREEN_STATE 61 2798 2799 2800/** 2801 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 2802 * 2803 * Enables/disables supplementary service related notifications 2804 * from the network. 2805 * 2806 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION. 2807 * 2808 * "data" is int * 2809 * ((int *)data)[0] is == 1 for notifications enabled 2810 * ((int *)data)[0] is == 0 for notifications disabled 2811 * 2812 * "response" is NULL 2813 * 2814 * Valid errors: 2815 * SUCCESS 2816 * RADIO_NOT_AVAILABLE 2817 * GENERIC_FAILURE 2818 * 2819 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION. 2820 */ 2821#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62 2822 2823/** 2824 * RIL_REQUEST_WRITE_SMS_TO_SIM 2825 * 2826 * Stores a SMS message to SIM memory. 2827 * 2828 * "data" is RIL_SMS_WriteArgs * 2829 * 2830 * "response" is int * 2831 * ((const int *)response)[0] is the record index where the message is stored. 2832 * 2833 * Valid errors: 2834 * SUCCESS 2835 * GENERIC_FAILURE 2836 * 2837 */ 2838#define RIL_REQUEST_WRITE_SMS_TO_SIM 63 2839 2840/** 2841 * RIL_REQUEST_DELETE_SMS_ON_SIM 2842 * 2843 * Deletes a SMS message from SIM memory. 2844 * 2845 * "data" is int * 2846 * ((int *)data)[0] is the record index of the message to delete. 2847 * 2848 * "response" is NULL 2849 * 2850 * Valid errors: 2851 * SUCCESS 2852 * GENERIC_FAILURE 2853 * 2854 */ 2855#define RIL_REQUEST_DELETE_SMS_ON_SIM 64 2856 2857/** 2858 * RIL_REQUEST_SET_BAND_MODE 2859 * 2860 * Assign a specified band for RF configuration. 2861 * 2862 * "data" is int * 2863 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically) 2864 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000) 2865 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900) 2866 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000) 2867 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000) 2868 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850) 2869 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)" 2870 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)" 2871 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)" 2872 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)" 2873 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)" 2874 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)" 2875 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)" 2876 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)" 2877 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)" 2878 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)" 2879 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)" 2880 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)" 2881 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)" 2882 * 2883 * "response" is NULL 2884 * 2885 * Valid errors: 2886 * SUCCESS 2887 * RADIO_NOT_AVAILABLE 2888 * GENERIC_FAILURE 2889 */ 2890#define RIL_REQUEST_SET_BAND_MODE 65 2891 2892/** 2893 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 2894 * 2895 * Query the list of band mode supported by RF. 2896 * 2897 * "data" is NULL 2898 * 2899 * "response" is int * 2900 * "response" points to an array of int's, the int[0] is the size of array, reset is one for 2901 * each available band mode. 2902 * 2903 * 0 for "unspecified" (selected by baseband automatically) 2904 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000) 2905 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900) 2906 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000) 2907 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000) 2908 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850) 2909 * 6 for "Cellular (800-MHz Band)" 2910 * 7 for "PCS (1900-MHz Band)" 2911 * 8 for "Band Class 3 (JTACS Band)" 2912 * 9 for "Band Class 4 (Korean PCS Band)" 2913 * 10 for "Band Class 5 (450-MHz Band)" 2914 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)" 2915 * 12 for "Band Class 7 (Upper 700-MHz Band)" 2916 * 13 for "Band Class 8 (1800-MHz Band)" 2917 * 14 for "Band Class 9 (900-MHz Band)" 2918 * 15 for "Band Class 10 (Secondary 800-MHz Band)" 2919 * 16 for "Band Class 11 (400-MHz European PAMR Band)" 2920 * 17 for "Band Class 15 (AWS Band)" 2921 * 18 for "Band Class 16 (US 2.5-GHz Band)" 2922 * 2923 * Valid errors: 2924 * SUCCESS 2925 * RADIO_NOT_AVAILABLE 2926 * GENERIC_FAILURE 2927 * 2928 * See also: RIL_REQUEST_SET_BAND_MODE 2929 */ 2930#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66 2931 2932/** 2933 * RIL_REQUEST_STK_GET_PROFILE 2934 * 2935 * Requests the profile of SIM tool kit. 2936 * The profile indicates the SAT/USAT features supported by ME. 2937 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111 2938 * 2939 * "data" is NULL 2940 * 2941 * "response" is a const char * containing SAT/USAT profile 2942 * in hexadecimal format string starting with first byte of terminal profile 2943 * 2944 * Valid errors: 2945 * RIL_E_SUCCESS 2946 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 2947 * RIL_E_GENERIC_FAILURE 2948 */ 2949#define RIL_REQUEST_STK_GET_PROFILE 67 2950 2951/** 2952 * RIL_REQUEST_STK_SET_PROFILE 2953 * 2954 * Download the STK terminal profile as part of SIM initialization 2955 * procedure 2956 * 2957 * "data" is a const char * containing SAT/USAT profile 2958 * in hexadecimal format string starting with first byte of terminal profile 2959 * 2960 * "response" is NULL 2961 * 2962 * Valid errors: 2963 * RIL_E_SUCCESS 2964 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 2965 * RIL_E_GENERIC_FAILURE 2966 */ 2967#define RIL_REQUEST_STK_SET_PROFILE 68 2968 2969/** 2970 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 2971 * 2972 * Requests to send a SAT/USAT envelope command to SIM. 2973 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111 2974 * 2975 * "data" is a const char * containing SAT/USAT command 2976 * in hexadecimal format string starting with command tag 2977 * 2978 * "response" is a const char * containing SAT/USAT response 2979 * in hexadecimal format string starting with first byte of response 2980 * (May be NULL) 2981 * 2982 * Valid errors: 2983 * RIL_E_SUCCESS 2984 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 2985 * RIL_E_GENERIC_FAILURE 2986 */ 2987#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69 2988 2989/** 2990 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 2991 * 2992 * Requests to send a terminal response to SIM for a received 2993 * proactive command 2994 * 2995 * "data" is a const char * containing SAT/USAT response 2996 * in hexadecimal format string starting with first byte of response data 2997 * 2998 * "response" is NULL 2999 * 3000 * Valid errors: 3001 * RIL_E_SUCCESS 3002 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 3003 * RIL_E_GENERIC_FAILURE 3004 */ 3005#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70 3006 3007/** 3008 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 3009 * 3010 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has 3011 * been initialized by ME already. (We could see the call has been in the 'call 3012 * list') So, STK application needs to accept/reject the call according as user 3013 * operations. 3014 * 3015 * "data" is int * 3016 * ((int *)data)[0] is > 0 for "accept" the call setup 3017 * ((int *)data)[0] is == 0 for "reject" the call setup 3018 * 3019 * "response" is NULL 3020 * 3021 * Valid errors: 3022 * RIL_E_SUCCESS 3023 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 3024 * RIL_E_GENERIC_FAILURE 3025 */ 3026#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71 3027 3028/** 3029 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER 3030 * 3031 * Connects the two calls and disconnects the subscriber from both calls. 3032 * 3033 * "data" is NULL 3034 * "response" is NULL 3035 * 3036 * Valid errors: 3037 * SUCCESS 3038 * RADIO_NOT_AVAILABLE (radio resetting) 3039 * GENERIC_FAILURE 3040 */ 3041#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72 3042 3043/** 3044 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 3045 * 3046 * Requests to set the preferred network type for searching and registering 3047 * (CS/PS domain, RAT, and operation mode) 3048 * 3049 * "data" is int * which is RIL_PreferredNetworkType 3050 * 3051 * "response" is NULL 3052 * 3053 * Valid errors: 3054 * SUCCESS 3055 * RADIO_NOT_AVAILABLE (radio resetting) 3056 * GENERIC_FAILURE 3057 * MODE_NOT_SUPPORTED 3058 */ 3059#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73 3060 3061/** 3062 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 3063 * 3064 * Query the preferred network type (CS/PS domain, RAT, and operation mode) 3065 * for searching and registering 3066 * 3067 * "data" is NULL 3068 * 3069 * "response" is int * 3070 * ((int *)reponse)[0] is == RIL_PreferredNetworkType 3071 * 3072 * Valid errors: 3073 * SUCCESS 3074 * RADIO_NOT_AVAILABLE 3075 * GENERIC_FAILURE 3076 * 3077 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 3078 */ 3079#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74 3080 3081/** 3082 * RIL_REQUEST_NEIGHBORING_CELL_IDS 3083 * 3084 * Request neighboring cell id in GSM network 3085 * 3086 * "data" is NULL 3087 * "response" must be a " const RIL_NeighboringCell** " 3088 * 3089 * Valid errors: 3090 * SUCCESS 3091 * RADIO_NOT_AVAILABLE 3092 * GENERIC_FAILURE 3093 */ 3094#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75 3095 3096/** 3097 * RIL_REQUEST_SET_LOCATION_UPDATES 3098 * 3099 * Enables/disables network state change notifications due to changes in 3100 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA). 3101 * Basically +CREG=2 vs. +CREG=1 (TS 27.007). 3102 * 3103 * Note: The RIL implementation should default to "updates enabled" 3104 * when the screen is on and "updates disabled" when the screen is off. 3105 * 3106 * "data" is int * 3107 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2) 3108 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1) 3109 * 3110 * "response" is NULL 3111 * 3112 * Valid errors: 3113 * SUCCESS 3114 * RADIO_NOT_AVAILABLE 3115 * GENERIC_FAILURE 3116 * 3117 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED 3118 */ 3119#define RIL_REQUEST_SET_LOCATION_UPDATES 76 3120 3121/** 3122 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 3123 * 3124 * Request to set the location where the CDMA subscription shall 3125 * be retrieved 3126 * 3127 * "data" is int * 3128 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource 3129 * 3130 * "response" is NULL 3131 * 3132 * Valid errors: 3133 * SUCCESS 3134 * RADIO_NOT_AVAILABLE 3135 * GENERIC_FAILURE 3136 * SIM_ABSENT 3137 * SUBSCRIPTION_NOT_AVAILABLE 3138 * 3139 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 3140 */ 3141#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77 3142 3143/** 3144 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 3145 * 3146 * Request to set the roaming preferences in CDMA 3147 * 3148 * "data" is int * 3149 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL 3150 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL 3151 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL 3152 * 3153 * "response" is NULL 3154 * 3155 * Valid errors: 3156 * SUCCESS 3157 * RADIO_NOT_AVAILABLE 3158 * GENERIC_FAILURE 3159 */ 3160#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78 3161 3162/** 3163 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 3164 * 3165 * Request the actual setting of the roaming preferences in CDMA in the modem 3166 * 3167 * "data" is NULL 3168 * 3169 * "response" is int * 3170 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL 3171 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL 3172 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL 3173 * 3174 * "response" is NULL 3175 * 3176 * Valid errors: 3177 * SUCCESS 3178 * RADIO_NOT_AVAILABLE 3179 * GENERIC_FAILURE 3180 */ 3181#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79 3182 3183/** 3184 * RIL_REQUEST_SET_TTY_MODE 3185 * 3186 * Request to set the TTY mode 3187 * 3188 * "data" is int * 3189 * ((int *)data)[0] is == 0 for TTY off 3190 * ((int *)data)[0] is == 1 for TTY Full 3191 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover) 3192 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover) 3193 * 3194 * "response" is NULL 3195 * 3196 * Valid errors: 3197 * SUCCESS 3198 * RADIO_NOT_AVAILABLE 3199 * GENERIC_FAILURE 3200 */ 3201#define RIL_REQUEST_SET_TTY_MODE 80 3202 3203/** 3204 * RIL_REQUEST_QUERY_TTY_MODE 3205 * 3206 * Request the setting of TTY mode 3207 * 3208 * "data" is NULL 3209 * 3210 * "response" is int * 3211 * ((int *)response)[0] is == 0 for TTY off 3212 * ((int *)response)[0] is == 1 for TTY Full 3213 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover) 3214 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover) 3215 * 3216 * "response" is NULL 3217 * 3218 * Valid errors: 3219 * SUCCESS 3220 * RADIO_NOT_AVAILABLE 3221 * GENERIC_FAILURE 3222 */ 3223#define RIL_REQUEST_QUERY_TTY_MODE 81 3224 3225/** 3226 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 3227 * 3228 * Request to set the preferred voice privacy mode used in voice 3229 * scrambling 3230 * 3231 * "data" is int * 3232 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask) 3233 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask) 3234 * 3235 * "response" is NULL 3236 * 3237 * Valid errors: 3238 * SUCCESS 3239 * RADIO_NOT_AVAILABLE 3240 * GENERIC_FAILURE 3241 */ 3242#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82 3243 3244/** 3245 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 3246 * 3247 * Request the setting of preferred voice privacy mode 3248 * 3249 * "data" is NULL 3250 * 3251 * "response" is int * 3252 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask) 3253 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask) 3254 * 3255 * "response" is NULL 3256 * 3257 * Valid errors: 3258 * SUCCESS 3259 * RADIO_NOT_AVAILABLE 3260 * GENERIC_FAILURE 3261 */ 3262#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83 3263 3264/** 3265 * RIL_REQUEST_CDMA_FLASH 3266 * 3267 * Send FLASH 3268 * 3269 * "data" is const char * 3270 * ((const char *)data)[0] is a FLASH string 3271 * 3272 * "response" is NULL 3273 * 3274 * Valid errors: 3275 * SUCCESS 3276 * RADIO_NOT_AVAILABLE 3277 * GENERIC_FAILURE 3278 * 3279 */ 3280#define RIL_REQUEST_CDMA_FLASH 84 3281 3282/** 3283 * RIL_REQUEST_CDMA_BURST_DTMF 3284 * 3285 * Send DTMF string 3286 * 3287 * "data" is const char ** 3288 * ((const char **)data)[0] is a DTMF string 3289 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use 3290 * default 3291 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use 3292 * default 3293 * 3294 * "response" is NULL 3295 * 3296 * Valid errors: 3297 * SUCCESS 3298 * RADIO_NOT_AVAILABLE 3299 * GENERIC_FAILURE 3300 * 3301 */ 3302#define RIL_REQUEST_CDMA_BURST_DTMF 85 3303 3304/** 3305 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 3306 * 3307 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum). 3308 * If the checksum is valid the 20 digit AKEY is written to NV, 3309 * replacing the existing AKEY no matter what it was before. 3310 * 3311 * "data" is const char * 3312 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9') 3313 * where the last 6 digits are a checksum of the 3314 * first 20, as specified in TR45.AHAG 3315 * "Common Cryptographic Algorithms, Revision D.1 3316 * Section 2.2" 3317 * 3318 * "response" is NULL 3319 * 3320 * Valid errors: 3321 * SUCCESS 3322 * RADIO_NOT_AVAILABLE 3323 * GENERIC_FAILURE 3324 * 3325 */ 3326#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86 3327 3328/** 3329 * RIL_REQUEST_CDMA_SEND_SMS 3330 * 3331 * Send a CDMA SMS message 3332 * 3333 * "data" is const RIL_CDMA_SMS_Message * 3334 * 3335 * "response" is a const RIL_SMS_Response * 3336 * 3337 * Based on the return error, caller decides to resend if sending sms 3338 * fails. The CDMA error class is derived as follows, 3339 * SUCCESS is error class 0 (no error) 3340 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure) 3341 * and GENERIC_FAILURE is error class 3 (permanent and no retry) 3342 * 3343 * Valid errors: 3344 * SUCCESS 3345 * RADIO_NOT_AVAILABLE 3346 * SMS_SEND_FAIL_RETRY 3347 * GENERIC_FAILURE 3348 * 3349 */ 3350#define RIL_REQUEST_CDMA_SEND_SMS 87 3351 3352/** 3353 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 3354 * 3355 * Acknowledge the success or failure in the receipt of SMS 3356 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 3357 * 3358 * "data" is const RIL_CDMA_SMS_Ack * 3359 * 3360 * "response" is NULL 3361 * 3362 * Valid errors: 3363 * SUCCESS 3364 * RADIO_NOT_AVAILABLE 3365 * GENERIC_FAILURE 3366 * 3367 */ 3368#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88 3369 3370/** 3371 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 3372 * 3373 * Request the setting of GSM/WCDMA Cell Broadcast SMS config. 3374 * 3375 * "data" is NULL 3376 * 3377 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo ** 3378 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *) 3379 * 3380 * Valid errors: 3381 * SUCCESS 3382 * RADIO_NOT_AVAILABLE 3383 * GENERIC_FAILURE 3384 * 3385 */ 3386#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89 3387 3388/** 3389 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 3390 * 3391 * Set GSM/WCDMA Cell Broadcast SMS config 3392 * 3393 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo ** 3394 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *) 3395 * 3396 * "response" is NULL 3397 * 3398 * Valid errors: 3399 * SUCCESS 3400 * RADIO_NOT_AVAILABLE 3401 * GENERIC_FAILURE 3402 * 3403 */ 3404#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90 3405 3406/** 3407 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 3408 * 3409* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS 3410 * 3411 * "data" is const int * 3412 * (const int *)data[0] indicates to activate or turn off the 3413 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1, 3414 * 0 - Activate, 1 - Turn off 3415 * 3416 * "response" is NULL 3417 * 3418 * Valid errors: 3419 * SUCCESS 3420 * RADIO_NOT_AVAILABLE 3421 * GENERIC_FAILURE 3422 * 3423 */ 3424#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91 3425 3426/** 3427 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 3428 * 3429 * Request the setting of CDMA Broadcast SMS config 3430 * 3431 * "data" is NULL 3432 * 3433 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo ** 3434 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *) 3435 * 3436 * Valid errors: 3437 * SUCCESS 3438 * RADIO_NOT_AVAILABLE 3439 * GENERIC_FAILURE 3440 * 3441 */ 3442#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92 3443 3444/** 3445 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 3446 * 3447 * Set CDMA Broadcast SMS config 3448 * 3449 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo ** 3450 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *) 3451 * 3452 * "response" is NULL 3453 * 3454 * Valid errors: 3455 * SUCCESS 3456 * RADIO_NOT_AVAILABLE 3457 * GENERIC_FAILURE 3458 * 3459 */ 3460#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93 3461 3462/** 3463 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 3464 * 3465 * Enable or disable the reception of CDMA Broadcast SMS 3466 * 3467 * "data" is const int * 3468 * (const int *)data[0] indicates to activate or turn off the 3469 * reception of CDMA Broadcast SMS, 0-1, 3470 * 0 - Activate, 1 - Turn off 3471 * 3472 * "response" is NULL 3473 * 3474 * Valid errors: 3475 * SUCCESS 3476 * RADIO_NOT_AVAILABLE 3477 * GENERIC_FAILURE 3478 * 3479 */ 3480#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94 3481 3482/** 3483 * RIL_REQUEST_CDMA_SUBSCRIPTION 3484 * 3485 * Request the device MDN / H_SID / H_NID. 3486 * 3487 * The request is only allowed when CDMA subscription is available. When CDMA 3488 * subscription is changed, application layer should re-issue the request to 3489 * update the subscription information. 3490 * 3491 * If a NULL value is returned for any of the device id, it means that error 3492 * accessing the device. 3493 * 3494 * "response" is const char ** 3495 * ((const char **)response)[0] is MDN if CDMA subscription is available 3496 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if 3497 * CDMA subscription is available, in decimal format 3498 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if 3499 * CDMA subscription is available, in decimal format 3500 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available 3501 * ((const char **)response)[4] is PRL version if CDMA subscription is available 3502 * 3503 * Valid errors: 3504 * SUCCESS 3505 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE 3506 */ 3507 3508#define RIL_REQUEST_CDMA_SUBSCRIPTION 95 3509 3510/** 3511 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 3512 * 3513 * Stores a CDMA SMS message to RUIM memory. 3514 * 3515 * "data" is RIL_CDMA_SMS_WriteArgs * 3516 * 3517 * "response" is int * 3518 * ((const int *)response)[0] is the record index where the message is stored. 3519 * 3520 * Valid errors: 3521 * SUCCESS 3522 * RADIO_NOT_AVAILABLE 3523 * GENERIC_FAILURE 3524 * 3525 */ 3526#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96 3527 3528/** 3529 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 3530 * 3531 * Deletes a CDMA SMS message from RUIM memory. 3532 * 3533 * "data" is int * 3534 * ((int *)data)[0] is the record index of the message to delete. 3535 * 3536 * "response" is NULL 3537 * 3538 * Valid errors: 3539 * SUCCESS 3540 * RADIO_NOT_AVAILABLE 3541 * GENERIC_FAILURE 3542 * 3543 */ 3544#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97 3545 3546/** 3547 * RIL_REQUEST_DEVICE_IDENTITY 3548 * 3549 * Request the device ESN / MEID / IMEI / IMEISV. 3550 * 3551 * The request is always allowed and contains GSM and CDMA device identity; 3552 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and 3553 * RIL_REQUEST_GET_IMEISV. 3554 * 3555 * If a NULL value is returned for any of the device id, it means that error 3556 * accessing the device. 3557 * 3558 * When CDMA subscription is changed the ESN/MEID may change. The application 3559 * layer should re-issue the request to update the device identity in this case. 3560 * 3561 * "response" is const char ** 3562 * ((const char **)response)[0] is IMEI if GSM subscription is available 3563 * ((const char **)response)[1] is IMEISV if GSM subscription is available 3564 * ((const char **)response)[2] is ESN if CDMA subscription is available 3565 * ((const char **)response)[3] is MEID if CDMA subscription is available 3566 * 3567 * Valid errors: 3568 * SUCCESS 3569 * RADIO_NOT_AVAILABLE 3570 * GENERIC_FAILURE 3571 */ 3572#define RIL_REQUEST_DEVICE_IDENTITY 98 3573 3574/** 3575 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 3576 * 3577 * Request the radio's system selection module to exit emergency 3578 * callback mode. RIL will not respond with SUCCESS until the modem has 3579 * completely exited from Emergency Callback Mode. 3580 * 3581 * "data" is NULL 3582 * 3583 * "response" is NULL 3584 * 3585 * Valid errors: 3586 * SUCCESS 3587 * RADIO_NOT_AVAILABLE 3588 * GENERIC_FAILURE 3589 * 3590 */ 3591#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99 3592 3593/** 3594 * RIL_REQUEST_GET_SMSC_ADDRESS 3595 * 3596 * Queries the default Short Message Service Center address on the device. 3597 * 3598 * "data" is NULL 3599 * 3600 * "response" is const char * containing the SMSC address. 3601 * 3602 * Valid errors: 3603 * SUCCESS 3604 * RADIO_NOT_AVAILABLE 3605 * GENERIC_FAILURE 3606 * 3607 */ 3608#define RIL_REQUEST_GET_SMSC_ADDRESS 100 3609 3610/** 3611 * RIL_REQUEST_SET_SMSC_ADDRESS 3612 * 3613 * Sets the default Short Message Service Center address on the device. 3614 * 3615 * "data" is const char * containing the SMSC address. 3616 * 3617 * "response" is NULL 3618 * 3619 * Valid errors: 3620 * SUCCESS 3621 * RADIO_NOT_AVAILABLE 3622 * GENERIC_FAILURE 3623 * 3624 */ 3625#define RIL_REQUEST_SET_SMSC_ADDRESS 101 3626 3627/** 3628 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 3629 * 3630 * Indicates whether there is storage available for new SMS messages. 3631 * 3632 * "data" is int * 3633 * ((int *)data)[0] is 1 if memory is available for storing new messages 3634 * is 0 if memory capacity is exceeded 3635 * 3636 * "response" is NULL 3637 * 3638 * Valid errors: 3639 * SUCCESS 3640 * RADIO_NOT_AVAILABLE 3641 * GENERIC_FAILURE 3642 * 3643 */ 3644#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102 3645 3646/** 3647 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 3648 * 3649 * Indicates that the StkSerivce is running and is 3650 * ready to receive RIL_UNSOL_STK_XXXXX commands. 3651 * 3652 * "data" is NULL 3653 * "response" is NULL 3654 * 3655 * Valid errors: 3656 * SUCCESS 3657 * RADIO_NOT_AVAILABLE 3658 * GENERIC_FAILURE 3659 * 3660 */ 3661#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103 3662 3663/** 3664 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 3665 * 3666 * Request to query the location where the CDMA subscription shall 3667 * be retrieved 3668 * 3669 * "data" is NULL 3670 * 3671 * "response" is int * 3672 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource 3673 * 3674 * Valid errors: 3675 * SUCCESS 3676 * RADIO_NOT_AVAILABLE 3677 * GENERIC_FAILURE 3678 * SUBSCRIPTION_NOT_AVAILABLE 3679 * 3680 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 3681 */ 3682#define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104 3683 3684/** 3685 * RIL_REQUEST_ISIM_AUTHENTICATION 3686 * 3687 * Request the ISIM application on the UICC to perform AKA 3688 * challenge/response algorithm for IMS authentication 3689 * 3690 * "data" is a const char * containing the challenge string in Base64 format 3691 * "response" is a const char * containing the response in Base64 format 3692 * 3693 * Valid errors: 3694 * SUCCESS 3695 * RADIO_NOT_AVAILABLE 3696 * GENERIC_FAILURE 3697 */ 3698#define RIL_REQUEST_ISIM_AUTHENTICATION 105 3699 3700/** 3701 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 3702 * 3703 * Acknowledge successful or failed receipt of SMS previously indicated 3704 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send 3705 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU. 3706 * 3707 * "data" is const char ** 3708 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK) 3709 * is "0" on failed receipt (send RP-ERROR) 3710 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format 3711 * 3712 * "response" is NULL 3713 * 3714 * Valid errors: 3715 * SUCCESS 3716 * RADIO_NOT_AVAILABLE 3717 * GENERIC_FAILURE 3718 */ 3719#define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106 3720 3721/** 3722 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 3723 * 3724 * Requests to send a SAT/USAT envelope command to SIM. 3725 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111. 3726 * 3727 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND: 3728 * the SW1 and SW2 status bytes from the UICC response are returned along with 3729 * the response data, using the same structure as RIL_REQUEST_SIM_IO. 3730 * 3731 * The RIL implementation shall perform the normal processing of a '91XX' 3732 * response in SW1/SW2 to retrieve the pending proactive command and send it 3733 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does. 3734 * 3735 * "data" is a const char * containing the SAT/USAT command 3736 * in hexadecimal format starting with command tag 3737 * 3738 * "response" is a const RIL_SIM_IO_Response * 3739 * 3740 * Valid errors: 3741 * RIL_E_SUCCESS 3742 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 3743 * RIL_E_GENERIC_FAILURE 3744 */ 3745#define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107 3746 3747/** 3748 * RIL_REQUEST_VOICE_RADIO_TECH 3749 * 3750 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only 3751 * when radio state is RADIO_STATE_ON 3752 * 3753 * "data" is NULL 3754 * "response" is int * 3755 * ((int *) response)[0] is of type const RIL_RadioTechnology 3756 * 3757 * Valid errors: 3758 * SUCCESS 3759 * RADIO_NOT_AVAILABLE 3760 * GENERIC_FAILURE 3761 */ 3762#define RIL_REQUEST_VOICE_RADIO_TECH 108 3763 3764/** 3765 * RIL_REQUEST_GET_CELL_INFO_LIST 3766 * 3767 * Request all of the current cell information known to the radio. The radio 3768 * must a list of all current cells, including the neighboring cells. If for a particular 3769 * cell information isn't known then the appropriate unknown value will be returned. 3770 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST. 3771 * 3772 * "data" is NULL 3773 * 3774 * "response" is an array of RIL_CellInfo. 3775 */ 3776#define RIL_REQUEST_GET_CELL_INFO_LIST 109 3777 3778/** 3779 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 3780 * 3781 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked. 3782 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported 3783 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue 3784 * a RIL_UNSOL_CELL_INFO_LIST. 3785 * 3786 * "data" is int * 3787 * ((int *)data)[0] is minimum time in milliseconds 3788 * 3789 * "response" is NULL 3790 * 3791 * Valid errors: 3792 * SUCCESS 3793 * RADIO_NOT_AVAILABLE 3794 * GENERIC_FAILURE 3795 */ 3796#define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110 3797 3798/** 3799 * RIL_REQUEST_SET_INITIAL_ATTACH_APN 3800 * 3801 * Set an apn to initial attach network 3802 * "response" is NULL 3803 * 3804 * Valid errors: 3805 * SUCCESS 3806 * RADIO_NOT_AVAILABLE (radio resetting) 3807 * GENERIC_FAILURE 3808 * SUBSCRIPTION_NOT_AVAILABLE 3809 */ 3810#define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111 3811 3812/** 3813 * RIL_REQUEST_IMS_REGISTRATION_STATE 3814 * 3815 * Request current IMS registration state 3816 * 3817 * "data" is NULL 3818 * 3819 * "response" is int * 3820 * ((int *)response)[0] is registration state: 3821 * 0 - Not registered 3822 * 1 - Registered 3823 * 3824 * If ((int*)response)[0] is = 1, then ((int *) response)[1] 3825 * must follow with IMS SMS format: 3826 * 3827 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily 3828 * 3829 * Valid errors: 3830 * SUCCESS 3831 * RADIO_NOT_AVAILABLE 3832 * GENERIC_FAILURE 3833 */ 3834#define RIL_REQUEST_IMS_REGISTRATION_STATE 112 3835 3836/** 3837 * RIL_REQUEST_IMS_SEND_SMS 3838 * 3839 * Send a SMS message over IMS 3840 * 3841 * "data" is const RIL_IMS_SMS_Message * 3842 * 3843 * "response" is a const RIL_SMS_Response * 3844 * 3845 * Based on the return error, caller decides to resend if sending sms 3846 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry. 3847 * In case of retry, data is encoded based on Voice Technology available. 3848 * 3849 * Valid errors: 3850 * SUCCESS 3851 * RADIO_NOT_AVAILABLE 3852 * SMS_SEND_FAIL_RETRY 3853 * FDN_CHECK_FAILURE 3854 * GENERIC_FAILURE 3855 * 3856 */ 3857#define RIL_REQUEST_IMS_SEND_SMS 113 3858 3859/** 3860 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 3861 * 3862 * Request APDU exchange on the basic channel. This command reflects TS 27.007 3863 * "generic SIM access" operation (+CSIM). The modem must ensure proper function 3864 * of GSM/CDMA, and filter commands appropriately. It should filter 3865 * channel management and SELECT by DF name commands. 3866 * 3867 * "data" is a const RIL_SIM_APDU * 3868 * "sessionid" field should be ignored. 3869 * 3870 * "response" is a const RIL_SIM_IO_Response * 3871 * 3872 * Valid errors: 3873 * SUCCESS 3874 * RADIO_NOT_AVAILABLE 3875 * GENERIC_FAILURE 3876 */ 3877#define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114 3878 3879/** 3880 * RIL_REQUEST_SIM_OPEN_CHANNEL 3881 * 3882 * Open a new logical channel and select the given application. This command 3883 * reflects TS 27.007 "open logical channel" operation (+CCHO). 3884 * 3885 * "data" is const char * and set to AID value, See ETSI 102.221 and 101.220. 3886 * 3887 * "response" is int * 3888 * ((int *)data)[0] contains the session id of the logical channel. 3889 * ((int *)data)[1] onwards may optionally contain the select response for the 3890 * open channel command with one byte per integer. 3891 * 3892 * Valid errors: 3893 * SUCCESS 3894 * RADIO_NOT_AVAILABLE 3895 * GENERIC_FAILURE 3896 * MISSING_RESOURCE 3897 * NO_SUCH_ELEMENT 3898 */ 3899#define RIL_REQUEST_SIM_OPEN_CHANNEL 115 3900 3901/** 3902 * RIL_REQUEST_SIM_CLOSE_CHANNEL 3903 * 3904 * Close a previously opened logical channel. This command reflects TS 27.007 3905 * "close logical channel" operation (+CCHC). 3906 * 3907 * "data" is int * 3908 * ((int *)data)[0] is the session id of logical the channel to close. 3909 * 3910 * "response" is NULL 3911 * 3912 * Valid errors: 3913 * SUCCESS 3914 * RADIO_NOT_AVAILABLE 3915 * GENERIC_FAILURE 3916 */ 3917#define RIL_REQUEST_SIM_CLOSE_CHANNEL 116 3918 3919/** 3920 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 3921 * 3922 * Exchange APDUs with a UICC over a previously opened logical channel. This 3923 * command reflects TS 27.007 "generic logical channel access" operation 3924 * (+CGLA). The modem should filter channel management and SELECT by DF name 3925 * commands. 3926 * 3927 * "data" is a const RIL_SIM_APDU* 3928 * 3929 * "response" is a const RIL_SIM_IO_Response * 3930 * 3931 * Valid errors: 3932 * SUCCESS 3933 * RADIO_NOT_AVAILABLE 3934 * GENERIC_FAILURE 3935 */ 3936#define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117 3937 3938/** 3939 * RIL_REQUEST_NV_READ_ITEM 3940 * 3941 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h. 3942 * This is used for device configuration by some CDMA operators. 3943 * 3944 * "data" is a const RIL_NV_ReadItem * 3945 * 3946 * "response" is const char * containing the contents of the NV item 3947 * 3948 * Valid errors: 3949 * SUCCESS 3950 * RADIO_NOT_AVAILABLE 3951 * GENERIC_FAILURE 3952 */ 3953#define RIL_REQUEST_NV_READ_ITEM 118 3954 3955/** 3956 * RIL_REQUEST_NV_WRITE_ITEM 3957 * 3958 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h. 3959 * This is used for device configuration by some CDMA operators. 3960 * 3961 * "data" is a const RIL_NV_WriteItem * 3962 * 3963 * "response" is NULL 3964 * 3965 * Valid errors: 3966 * SUCCESS 3967 * RADIO_NOT_AVAILABLE 3968 * GENERIC_FAILURE 3969 */ 3970#define RIL_REQUEST_NV_WRITE_ITEM 119 3971 3972/** 3973 * RIL_REQUEST_NV_WRITE_CDMA_PRL 3974 * 3975 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage. 3976 * This is used for device configuration by some CDMA operators. 3977 * 3978 * "data" is a const char * containing the PRL as a byte array 3979 * 3980 * "response" is NULL 3981 * 3982 * Valid errors: 3983 * SUCCESS 3984 * RADIO_NOT_AVAILABLE 3985 * GENERIC_FAILURE 3986 */ 3987#define RIL_REQUEST_NV_WRITE_CDMA_PRL 120 3988 3989/** 3990 * RIL_REQUEST_NV_RESET_CONFIG 3991 * 3992 * Reset the radio NV configuration to the factory state. 3993 * This is used for device configuration by some CDMA operators. 3994 * 3995 * "data" is int * 3996 * ((int *)data)[0] is 1 to reload all NV items 3997 * ((int *)data)[0] is 2 for erase NV reset (SCRTN) 3998 * ((int *)data)[0] is 3 for factory reset (RTN) 3999 * 4000 * "response" is NULL 4001 * 4002 * Valid errors: 4003 * SUCCESS 4004 * RADIO_NOT_AVAILABLE 4005 * GENERIC_FAILURE 4006 */ 4007#define RIL_REQUEST_NV_RESET_CONFIG 121 4008 4009 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION 4010 * FIXME This API needs to have more documentation. 4011 * 4012 * Selection/de-selection of a subscription from a SIM card 4013 * "data" is const RIL_SelectUiccSub* 4014 4015 * 4016 * "response" is NULL 4017 * 4018 * Valid errors: 4019 * SUCCESS 4020 * RADIO_NOT_AVAILABLE (radio resetting) 4021 * GENERIC_FAILURE 4022 * SUBSCRIPTION_NOT_SUPPORTED 4023 * 4024 */ 4025#define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122 4026 4027/** 4028 * RIL_REQUEST_ALLOW_DATA 4029 * 4030 * Tells the modem whether data calls are allowed or not 4031 * 4032 * "data" is int * 4033 * FIXME slotId and aid will be added. 4034 * ((int *)data)[0] is == 0 to allow data calls 4035 * ((int *)data)[0] is == 1 to disallow data calls 4036 * 4037 * "response" is NULL 4038 * 4039 * Valid errors: 4040 * 4041 * SUCCESS 4042 * RADIO_NOT_AVAILABLE (radio resetting) 4043 * GENERIC_FAILURE 4044 * 4045 */ 4046#define RIL_REQUEST_ALLOW_DATA 123 4047 4048/** 4049 * RIL_REQUEST_GET_HARDWARE_CONFIG 4050 * 4051 * Request all of the current hardware (modem and sim) associated 4052 * with the RIL. 4053 * 4054 * "data" is NULL 4055 * 4056 * "response" is an array of RIL_HardwareConfig. 4057 */ 4058#define RIL_REQUEST_GET_HARDWARE_CONFIG 124 4059 4060/** 4061 * RIL_REQUEST_SIM_AUTHENTICATION 4062 * 4063 * Returns the response of SIM Authentication through RIL to a 4064 * challenge request. 4065 * 4066 * "data" Base64 encoded string containing challenge: 4067 * int authContext; P2 value of authentication command, see P2 parameter in 4068 * 3GPP TS 31.102 7.1.2 4069 * char *authData; the challenge string in Base64 format, see 3GPP 4070 * TS 31.102 7.1.2 4071 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4, 4072 * NULL if no value 4073 * 4074 * "response" Base64 encoded strings containing response: 4075 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3 4076 * int sw2; 4077 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2 4078 */ 4079#define RIL_REQUEST_SIM_AUTHENTICATION 125 4080 4081/** 4082 * RIL_REQUEST_GET_DC_RT_INFO 4083 * 4084 * Requests the Data Connection Real Time Info 4085 * 4086 * "data" is NULL 4087 * 4088 * "response" is the most recent RIL_DcRtInfo 4089 * 4090 * Valid errors: 4091 * SUCCESS 4092 * RADIO_NOT_AVAILABLE 4093 * GENERIC_FAILURE 4094 * 4095 * See also: RIL_UNSOL_DC_RT_INFO_CHANGED 4096 */ 4097#define RIL_REQUEST_GET_DC_RT_INFO 126 4098 4099/** 4100 * RIL_REQUEST_SET_DC_RT_INFO_RATE 4101 * 4102 * This is the minimum number of milliseconds between successive 4103 * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate 4104 * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of 4105 * 0 means send as fast as possible. 4106 * 4107 * "data" The number of milliseconds as an int 4108 * 4109 * "response" is null 4110 * 4111 * Valid errors: 4112 * SUCCESS must not fail 4113 */ 4114#define RIL_REQUEST_SET_DC_RT_INFO_RATE 127 4115 4116/** 4117 * RIL_REQUEST_SET_DATA_PROFILE 4118 * 4119 * Set data profile in modem 4120 * "data" is an const RIL_DataProfileInfo ** 4121 * "datalen" is count * sizeof(const RIL_DataProfileInfo *) 4122 * "response" is NULL 4123 * 4124 * Valid errors: 4125 * SUCCESS 4126 * RADIO_NOT_AVAILABLE (radio resetting) 4127 * GENERIC_FAILURE 4128 * SUBSCRIPTION_NOT_AVAILABLE 4129 */ 4130#define RIL_REQUEST_SET_DATA_PROFILE 128 4131 4132/** 4133 * RIL_REQUEST_SHUTDOWN 4134 * 4135 * Device is shutting down. All further commands are ignored 4136 * and RADIO_NOT_AVAILABLE must be returned. 4137 * 4138 * "data" is null 4139 * "response" is NULL 4140 * 4141 * Valid errors: 4142 * SUCCESS 4143 * RADIO_NOT_AVAILABLE 4144 * GENERIC_FAILURE 4145 */ 4146#define RIL_REQUEST_SHUTDOWN 129 4147 4148/** 4149 * RIL_REQUEST_GET_RADIO_CAPABILITY 4150 * 4151 * Used to get phone radio capablility. 4152 * 4153 * "data" is int * 4154 * ((int *)data)[0] is the phone radio access family defined in 4155 * RadioAccessFamily. It's a bit mask value to represent the support type. 4156 * 4157 * Valid errors: 4158 * SUCCESS 4159 * RADIO_NOT_AVAILABLE 4160 * GENERIC_FAILURE 4161 */ 4162#define RIL_REQUEST_GET_RADIO_CAPABILITY 130 4163 4164/** 4165 * RIL_REQUEST_SET_RADIO_CAPABILITY 4166 * 4167 * Used to set the phones radio capability. Be VERY careful 4168 * using this request as it may cause some vendor modems to reset. Because 4169 * of the possible modem reset any RIL commands after this one may not be 4170 * processed. 4171 * 4172 * "data" is the RIL_RadioCapability structure 4173 * 4174 * "response" is the RIL_RadioCapability structure, used to feedback return status 4175 * 4176 * Valid errors: 4177 * SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds. 4178 * RADIO_NOT_AVAILABLE 4179 * GENERIC_FAILURE 4180 */ 4181#define RIL_REQUEST_SET_RADIO_CAPABILITY 131 4182 4183 4184/***********************************************************************/ 4185 4186 4187#define RIL_UNSOL_RESPONSE_BASE 1000 4188 4189/** 4190 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 4191 * 4192 * Indicate when value of RIL_RadioState has changed. 4193 * 4194 * Callee will invoke RIL_RadioStateRequest method on main thread 4195 * 4196 * "data" is NULL 4197 */ 4198 4199#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000 4200 4201 4202/** 4203 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 4204 * 4205 * Indicate when call state has changed 4206 * 4207 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread 4208 * 4209 * "data" is NULL 4210 * 4211 * Response should be invoked on, for example, 4212 * "RING", "BUSY", "NO CARRIER", and also call state 4213 * transitions (DIALING->ALERTING ALERTING->ACTIVE) 4214 * 4215 * Redundent or extraneous invocations are tolerated 4216 */ 4217#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001 4218 4219 4220/** 4221 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 4222 * 4223 * Called when the voice network state changed 4224 * 4225 * Callee will invoke the following requests on main thread: 4226 * 4227 * RIL_REQUEST_VOICE_REGISTRATION_STATE 4228 * RIL_REQUEST_OPERATOR 4229 * 4230 * "data" is NULL 4231 * 4232 * FIXME should this happen when SIM records are loaded? (eg, for 4233 * EONS) 4234 */ 4235#define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002 4236 4237/** 4238 * RIL_UNSOL_RESPONSE_NEW_SMS 4239 * 4240 * Called when new SMS is received. 4241 * 4242 * "data" is const char * 4243 * This is a pointer to a string containing the PDU of an SMS-DELIVER 4244 * as an ascii string of hex digits. The PDU starts with the SMSC address 4245 * per TS 27.005 (+CMT:) 4246 * 4247 * Callee will subsequently confirm the receipt of thei SMS with a 4248 * RIL_REQUEST_SMS_ACKNOWLEDGE 4249 * 4250 * No new RIL_UNSOL_RESPONSE_NEW_SMS 4251 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a 4252 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received 4253 */ 4254 4255#define RIL_UNSOL_RESPONSE_NEW_SMS 1003 4256 4257/** 4258 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 4259 * 4260 * Called when new SMS Status Report is received. 4261 * 4262 * "data" is const char * 4263 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT 4264 * as an ascii string of hex digits. The PDU starts with the SMSC address 4265 * per TS 27.005 (+CDS:). 4266 * 4267 * Callee will subsequently confirm the receipt of the SMS with a 4268 * RIL_REQUEST_SMS_ACKNOWLEDGE 4269 * 4270 * No new RIL_UNSOL_RESPONSE_NEW_SMS 4271 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a 4272 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received 4273 */ 4274 4275#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004 4276 4277/** 4278 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 4279 * 4280 * Called when new SMS has been stored on SIM card 4281 * 4282 * "data" is const int * 4283 * ((const int *)data)[0] contains the slot index on the SIM that contains 4284 * the new message 4285 */ 4286 4287#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005 4288 4289/** 4290 * RIL_UNSOL_ON_USSD 4291 * 4292 * Called when a new USSD message is received. 4293 * 4294 * "data" is const char ** 4295 * ((const char **)data)[0] points to a type code, which is 4296 * one of these string values: 4297 * "0" USSD-Notify -- text in ((const char **)data)[1] 4298 * "1" USSD-Request -- text in ((const char **)data)[1] 4299 * "2" Session terminated by network 4300 * "3" other local client (eg, SIM Toolkit) has responded 4301 * "4" Operation not supported 4302 * "5" Network timeout 4303 * 4304 * The USSD session is assumed to persist if the type code is "1", otherwise 4305 * the current session (if any) is assumed to have terminated. 4306 * 4307 * ((const char **)data)[1] points to a message string if applicable, which 4308 * should always be in UTF-8. 4309 */ 4310#define RIL_UNSOL_ON_USSD 1006 4311/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */ 4312 4313/** 4314 * RIL_UNSOL_ON_USSD_REQUEST 4315 * 4316 * Obsolete. Send via RIL_UNSOL_ON_USSD 4317 */ 4318#define RIL_UNSOL_ON_USSD_REQUEST 1007 4319 4320 4321/** 4322 * RIL_UNSOL_NITZ_TIME_RECEIVED 4323 * 4324 * Called when radio has received a NITZ time message 4325 * 4326 * "data" is const char * pointing to NITZ time string 4327 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt" 4328 */ 4329#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008 4330 4331/** 4332 * RIL_UNSOL_SIGNAL_STRENGTH 4333 * 4334 * Radio may report signal strength rather han have it polled. 4335 * 4336 * "data" is a const RIL_SignalStrength * 4337 */ 4338#define RIL_UNSOL_SIGNAL_STRENGTH 1009 4339 4340 4341/** 4342 * RIL_UNSOL_DATA_CALL_LIST_CHANGED 4343 * 4344 * "data" is an array of RIL_Data_Call_Response_v6 identical to that 4345 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list 4346 * of current data contexts including new contexts that have been 4347 * activated. A data call is only removed from this list when the 4348 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio 4349 * is powered off/on. 4350 * 4351 * See also: RIL_REQUEST_DATA_CALL_LIST 4352 */ 4353 4354#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010 4355 4356/** 4357 * RIL_UNSOL_SUPP_SVC_NOTIFICATION 4358 * 4359 * Reports supplementary service related notification from the network. 4360 * 4361 * "data" is a const RIL_SuppSvcNotification * 4362 * 4363 */ 4364 4365#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011 4366 4367/** 4368 * RIL_UNSOL_STK_SESSION_END 4369 * 4370 * Indicate when STK session is terminated by SIM. 4371 * 4372 * "data" is NULL 4373 */ 4374#define RIL_UNSOL_STK_SESSION_END 1012 4375 4376/** 4377 * RIL_UNSOL_STK_PROACTIVE_COMMAND 4378 * 4379 * Indicate when SIM issue a STK proactive command to applications 4380 * 4381 * "data" is a const char * containing SAT/USAT proactive command 4382 * in hexadecimal format string starting with command tag 4383 * 4384 */ 4385#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013 4386 4387/** 4388 * RIL_UNSOL_STK_EVENT_NOTIFY 4389 * 4390 * Indicate when SIM notifies applcations some event happens. 4391 * Generally, application does not need to have any feedback to 4392 * SIM but shall be able to indicate appropriate messages to users. 4393 * 4394 * "data" is a const char * containing SAT/USAT commands or responses 4395 * sent by ME to SIM or commands handled by ME, in hexadecimal format string 4396 * starting with first byte of response data or command tag 4397 * 4398 */ 4399#define RIL_UNSOL_STK_EVENT_NOTIFY 1014 4400 4401/** 4402 * RIL_UNSOL_STK_CALL_SETUP 4403 * 4404 * Indicate when SIM wants application to setup a voice call. 4405 * 4406 * "data" is const int * 4407 * ((const int *)data)[0] contains timeout value (in milliseconds) 4408 */ 4409#define RIL_UNSOL_STK_CALL_SETUP 1015 4410 4411/** 4412 * RIL_UNSOL_SIM_SMS_STORAGE_FULL 4413 * 4414 * Indicates that SMS storage on the SIM is full. Sent when the network 4415 * attempts to deliver a new SMS message. Messages cannot be saved on the 4416 * SIM until space is freed. In particular, incoming Class 2 messages 4417 * cannot be stored. 4418 * 4419 * "data" is null 4420 * 4421 */ 4422#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016 4423 4424/** 4425 * RIL_UNSOL_SIM_REFRESH 4426 * 4427 * Indicates that file(s) on the SIM have been updated, or the SIM 4428 * has been reinitialized. 4429 * 4430 * In the case where RIL is version 6 or older: 4431 * "data" is an int * 4432 * ((int *)data)[0] is a RIL_SimRefreshResult. 4433 * ((int *)data)[1] is the EFID of the updated file if the result is 4434 * SIM_FILE_UPDATE or NULL for any other result. 4435 * 4436 * In the case where RIL is version 7: 4437 * "data" is a RIL_SimRefreshResponse_v7 * 4438 * 4439 * Note: If the SIM state changes as a result of the SIM refresh (eg, 4440 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 4441 * should be sent. 4442 */ 4443#define RIL_UNSOL_SIM_REFRESH 1017 4444 4445/** 4446 * RIL_UNSOL_CALL_RING 4447 * 4448 * Ring indication for an incoming call (eg, RING or CRING event). 4449 * There must be at least one RIL_UNSOL_CALL_RING at the beginning 4450 * of a call and sending multiple is optional. If the system property 4451 * ro.telephony.call_ring.multiple is false then the upper layers 4452 * will generate the multiple events internally. Otherwise the vendor 4453 * ril must generate multiple RIL_UNSOL_CALL_RING if 4454 * ro.telephony.call_ring.multiple is true or if it is absent. 4455 * 4456 * The rate of these events is controlled by ro.telephony.call_ring.delay 4457 * and has a default value of 3000 (3 seconds) if absent. 4458 * 4459 * "data" is null for GSM 4460 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA 4461 */ 4462#define RIL_UNSOL_CALL_RING 1018 4463 4464/** 4465 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 4466 * 4467 * Indicates that SIM state changes. 4468 * 4469 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread 4470 4471 * "data" is null 4472 */ 4473#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019 4474 4475/** 4476 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 4477 * 4478 * Called when new CDMA SMS is received 4479 * 4480 * "data" is const RIL_CDMA_SMS_Message * 4481 * 4482 * Callee will subsequently confirm the receipt of the SMS with 4483 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 4484 * 4485 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until 4486 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received 4487 * 4488 */ 4489#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020 4490 4491/** 4492 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 4493 * 4494 * Called when new Broadcast SMS is received 4495 * 4496 * "data" can be one of the following: 4497 * If received from GSM network, "data" is const char of 88 bytes 4498 * which indicates each page of a CBS Message sent to the MS by the 4499 * BTS as coded in 3GPP 23.041 Section 9.4.1.2. 4500 * If received from UMTS network, "data" is const char of 90 up to 1252 4501 * bytes which contain between 1 and 15 CBS Message pages sent as one 4502 * packet to the MS by the BTS as coded in 3GPP 23.041 Section 9.4.2.2. 4503 * 4504 */ 4505#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021 4506 4507/** 4508 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 4509 * 4510 * Indicates that SMS storage on the RUIM is full. Messages 4511 * cannot be saved on the RUIM until space is freed. 4512 * 4513 * "data" is null 4514 * 4515 */ 4516#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022 4517 4518/** 4519 * RIL_UNSOL_RESTRICTED_STATE_CHANGED 4520 * 4521 * Indicates a restricted state change (eg, for Domain Specific Access Control). 4522 * 4523 * Radio need send this msg after radio off/on cycle no matter it is changed or not. 4524 * 4525 * "data" is an int * 4526 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values. 4527 */ 4528#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023 4529 4530/** 4531 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 4532 * 4533 * Indicates that the radio system selection module has 4534 * autonomously entered emergency callback mode. 4535 * 4536 * "data" is null 4537 * 4538 */ 4539#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024 4540 4541/** 4542 * RIL_UNSOL_CDMA_CALL_WAITING 4543 * 4544 * Called when CDMA radio receives a call waiting indication. 4545 * 4546 * "data" is const RIL_CDMA_CallWaiting * 4547 * 4548 */ 4549#define RIL_UNSOL_CDMA_CALL_WAITING 1025 4550 4551/** 4552 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 4553 * 4554 * Called when CDMA radio receives an update of the progress of an 4555 * OTASP/OTAPA call. 4556 * 4557 * "data" is const int * 4558 * For CDMA this is an integer OTASP/OTAPA status listed in 4559 * RIL_CDMA_OTA_ProvisionStatus. 4560 * 4561 */ 4562#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026 4563 4564/** 4565 * RIL_UNSOL_CDMA_INFO_REC 4566 * 4567 * Called when CDMA radio receives one or more info recs. 4568 * 4569 * "data" is const RIL_CDMA_InformationRecords * 4570 * 4571 */ 4572#define RIL_UNSOL_CDMA_INFO_REC 1027 4573 4574/** 4575 * RIL_UNSOL_OEM_HOOK_RAW 4576 * 4577 * This is for OEM specific use. 4578 * 4579 * "data" is a byte[] 4580 */ 4581#define RIL_UNSOL_OEM_HOOK_RAW 1028 4582 4583/** 4584 * RIL_UNSOL_RINGBACK_TONE 4585 * 4586 * Indicates that nework doesn't have in-band information, need to 4587 * play out-band tone. 4588 * 4589 * "data" is an int * 4590 * ((int *)data)[0] == 0 for stop play ringback tone. 4591 * ((int *)data)[0] == 1 for start play ringback tone. 4592 */ 4593#define RIL_UNSOL_RINGBACK_TONE 1029 4594 4595/** 4596 * RIL_UNSOL_RESEND_INCALL_MUTE 4597 * 4598 * Indicates that framework/application need reset the uplink mute state. 4599 * 4600 * There may be situations where the mute state becomes out of sync 4601 * between the application and device in some GSM infrastructures. 4602 * 4603 * "data" is null 4604 */ 4605#define RIL_UNSOL_RESEND_INCALL_MUTE 1030 4606 4607/** 4608 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 4609 * 4610 * Called when CDMA subscription source changed. 4611 * 4612 * "data" is int * 4613 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource 4614 */ 4615#define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031 4616 4617/** 4618 * RIL_UNSOL_CDMA_PRL_CHANGED 4619 * 4620 * Called when PRL (preferred roaming list) changes. 4621 * 4622 * "data" is int * 4623 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION 4624 */ 4625#define RIL_UNSOL_CDMA_PRL_CHANGED 1032 4626 4627/** 4628 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 4629 * 4630 * Called when Emergency Callback Mode Ends 4631 * 4632 * Indicates that the radio system selection module has 4633 * proactively exited emergency callback mode. 4634 * 4635 * "data" is NULL 4636 * 4637 */ 4638#define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033 4639 4640/** 4641 * RIL_UNSOL_RIL_CONNECTED 4642 * 4643 * Called the ril connects and returns the version 4644 * 4645 * "data" is int * 4646 * ((int *)data)[0] is RIL_VERSION 4647 */ 4648#define RIL_UNSOL_RIL_CONNECTED 1034 4649 4650/** 4651 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 4652 * 4653 * Indicates that voice technology has changed. Contains new radio technology 4654 * as a data in the message. 4655 * 4656 * "data" is int * 4657 * ((int *)data)[0] is of type const RIL_RadioTechnology 4658 * 4659 */ 4660#define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035 4661 4662/** 4663 * RIL_UNSOL_CELL_INFO_LIST 4664 * 4665 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned 4666 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE. 4667 * 4668 * "data" is NULL 4669 * 4670 * "response" is an array of RIL_CellInfo. 4671 */ 4672#define RIL_UNSOL_CELL_INFO_LIST 1036 4673 4674/** 4675 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 4676 * 4677 * Called when IMS registration state has changed 4678 * 4679 * To get IMS registration state and IMS SMS format, callee needs to invoke the 4680 * following request on main thread: 4681 * 4682 * RIL_REQUEST_IMS_REGISTRATION_STATE 4683 * 4684 * "data" is NULL 4685 * 4686 */ 4687#define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037 4688 4689/** 4690 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 4691 * 4692 * Indicated when there is a change in subscription status. 4693 * This event will be sent in the following scenarios 4694 * - subscription readiness at modem, which was selected by telephony layer 4695 * - when subscription is deactivated by modem due to UICC card removal 4696 * - When network invalidates the subscription i.e. attach reject due to authentication reject 4697 * 4698 * "data" is const int * 4699 * ((const int *)data)[0] == 0 for Subscription Deactivated 4700 * ((const int *)data)[0] == 1 for Subscription Activated 4701 * 4702 */ 4703#define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038 4704 4705/** 4706 * RIL_UNSOL_SRVCC_STATE_NOTIFY 4707 * 4708 * Called when Single Radio Voice Call Continuity(SRVCC) 4709 * progress state has changed 4710 * 4711 * "data" is int * 4712 * ((int *)data)[0] is of type const RIL_SrvccState 4713 * 4714 */ 4715 4716#define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039 4717 4718/** 4719 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED 4720 * 4721 * Called when the hardware configuration associated with the RILd changes 4722 * 4723 * "data" is an array of RIL_HardwareConfig 4724 * 4725 */ 4726#define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040 4727 4728/** 4729 * RIL_UNSOL_DC_RT_INFO_CHANGED 4730 * 4731 * Sent when the DC_RT_STATE changes but the time 4732 * between these messages must not be less than the 4733 * value set by RIL_REQUEST_SET_DC_RT_RATE. 4734 * 4735 * "data" is the most recent RIL_DcRtInfo 4736 * 4737 */ 4738#define RIL_UNSOL_DC_RT_INFO_CHANGED 1041 4739 4740/** 4741 * RIL_UNSOL_RADIO_CAPABILITY 4742 * 4743 * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes. 4744 * Returns the phone radio capability exactly as 4745 * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the 4746 * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY. 4747 * 4748 * "data" is the RIL_RadioCapability structure 4749 */ 4750#define RIL_UNSOL_RADIO_CAPABILITY 1042 4751 4752/***********************************************************************/ 4753 4754#if defined(ANDROID_MULTI_SIM) 4755/** 4756 * RIL_Request Function pointer 4757 * 4758 * @param request is one of RIL_REQUEST_* 4759 * @param data is pointer to data defined for that RIL_REQUEST_* 4760 * data is owned by caller, and should not be modified or freed by callee 4761 * @param t should be used in subsequent call to RIL_onResponse 4762 * @param datalen the length of data 4763 * 4764 */ 4765typedef void (*RIL_RequestFunc) (int request, void *data, 4766 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id); 4767 4768/** 4769 * This function should return the current radio state synchronously 4770 */ 4771typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id); 4772 4773#else 4774/* Backward compatible */ 4775 4776/** 4777 * RIL_Request Function pointer 4778 * 4779 * @param request is one of RIL_REQUEST_* 4780 * @param data is pointer to data defined for that RIL_REQUEST_* 4781 * data is owned by caller, and should not be modified or freed by callee 4782 * @param t should be used in subsequent call to RIL_onResponse 4783 * @param datalen the length of data 4784 * 4785 */ 4786typedef void (*RIL_RequestFunc) (int request, void *data, 4787 size_t datalen, RIL_Token t); 4788 4789/** 4790 * This function should return the current radio state synchronously 4791 */ 4792typedef RIL_RadioState (*RIL_RadioStateRequest)(); 4793 4794#endif 4795 4796 4797/** 4798 * This function returns "1" if the specified RIL_REQUEST code is 4799 * supported and 0 if it is not 4800 * 4801 * @param requestCode is one of RIL_REQUEST codes 4802 */ 4803 4804typedef int (*RIL_Supports)(int requestCode); 4805 4806/** 4807 * This function is called from a separate thread--not the 4808 * thread that calls RIL_RequestFunc--and indicates that a pending 4809 * request should be cancelled. 4810 * 4811 * On cancel, the callee should do its best to abandon the request and 4812 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point. 4813 * 4814 * Subsequent calls to RIL_onRequestComplete for this request with 4815 * other results will be tolerated but ignored. (That is, it is valid 4816 * to ignore the cancellation request) 4817 * 4818 * RIL_Cancel calls should return immediately, and not wait for cancellation 4819 * 4820 * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007 4821 * interface 4822 * 4823 * @param t token wants to be canceled 4824 */ 4825 4826typedef void (*RIL_Cancel)(RIL_Token t); 4827 4828typedef void (*RIL_TimedCallback) (void *param); 4829 4830/** 4831 * Return a version string for your RIL implementation 4832 */ 4833typedef const char * (*RIL_GetVersion) (void); 4834 4835typedef struct { 4836 int version; /* set to RIL_VERSION */ 4837 RIL_RequestFunc onRequest; 4838 RIL_RadioStateRequest onStateRequest; 4839 RIL_Supports supports; 4840 RIL_Cancel onCancel; 4841 RIL_GetVersion getVersion; 4842} RIL_RadioFunctions; 4843 4844typedef struct { 4845 char *apn; 4846 char *protocol; 4847 int authtype; 4848 char *username; 4849 char *password; 4850} RIL_InitialAttachApn; 4851 4852typedef struct { 4853 int authContext; /* P2 value of authentication command, see P2 parameter in 4854 3GPP TS 31.102 7.1.2 */ 4855 char *authData; /* the challenge string in Base64 format, see 3GPP 4856 TS 31.102 7.1.2 */ 4857 char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4, 4858 NULL if no value. */ 4859} RIL_SimAuthentication; 4860 4861#ifdef RIL_SHLIB 4862struct RIL_Env { 4863 /** 4864 * "t" is parameter passed in on previous call to RIL_Notification 4865 * routine. 4866 * 4867 * If "e" != SUCCESS, then response can be null/is ignored 4868 * 4869 * "response" is owned by caller, and should not be modified or 4870 * freed by callee 4871 * 4872 * RIL_onRequestComplete will return as soon as possible 4873 */ 4874 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e, 4875 void *response, size_t responselen); 4876 4877#if defined(ANDROID_MULTI_SIM) 4878 /** 4879 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_* 4880 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_* 4881 * 4882 * "data" is owned by caller, and should not be modified or freed by callee 4883 */ 4884 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id); 4885#else 4886 /** 4887 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_* 4888 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_* 4889 * 4890 * "data" is owned by caller, and should not be modified or freed by callee 4891 */ 4892 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen); 4893#endif 4894 /** 4895 * Call user-specifed "callback" function on on the same thread that 4896 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies 4897 * a relative time value at which the callback is invoked. If relativeTime is 4898 * NULL or points to a 0-filled structure, the callback will be invoked as 4899 * soon as possible 4900 */ 4901 4902 void (*RequestTimedCallback) (RIL_TimedCallback callback, 4903 void *param, const struct timeval *relativeTime); 4904}; 4905 4906 4907/** 4908 * RIL implementations must defined RIL_Init 4909 * argc and argv will be command line arguments intended for the RIL implementation 4910 * Return NULL on error 4911 * 4912 * @param env is environment point defined as RIL_Env 4913 * @param argc number of arguments 4914 * @param argv list fo arguments 4915 * 4916 */ 4917const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv); 4918 4919#else /* RIL_SHLIB */ 4920 4921/** 4922 * Call this once at startup to register notification routine 4923 * 4924 * @param callbacks user-specifed callback function 4925 */ 4926void RIL_register (const RIL_RadioFunctions *callbacks); 4927 4928 4929/** 4930 * 4931 * RIL_onRequestComplete will return as soon as possible 4932 * 4933 * @param t is parameter passed in on previous call to RIL_Notification 4934 * routine. 4935 * @param e error code 4936 * if "e" != SUCCESS, then response can be null/is ignored 4937 * @param response is owned by caller, and should not be modified or 4938 * freed by callee 4939 * @param responselen the length of response in byte 4940 */ 4941void RIL_onRequestComplete(RIL_Token t, RIL_Errno e, 4942 void *response, size_t responselen); 4943 4944#if defined(ANDROID_MULTI_SIM) 4945/** 4946 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_* 4947 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_* 4948 * "data" is owned by caller, and should not be modified or freed by callee 4949 * @param datalen the length of data in byte 4950 */ 4951 4952void RIL_onUnsolicitedResponse(int unsolResponse, const void *data, 4953 size_t datalen, RIL_SOCKET_ID socket_id); 4954#else 4955/** 4956 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_* 4957 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_* 4958 * "data" is owned by caller, and should not be modified or freed by callee 4959 * @param datalen the length of data in byte 4960 */ 4961 4962void RIL_onUnsolicitedResponse(int unsolResponse, const void *data, 4963 size_t datalen); 4964#endif 4965 4966/** 4967 * Call user-specifed "callback" function on on the same thread that 4968 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies 4969 * a relative time value at which the callback is invoked. If relativeTime is 4970 * NULL or points to a 0-filled structure, the callback will be invoked as 4971 * soon as possible 4972 * 4973 * @param callback user-specifed callback function 4974 * @param param parameter list 4975 * @param relativeTime a relative time value at which the callback is invoked 4976 */ 4977 4978void RIL_requestTimedCallback (RIL_TimedCallback callback, 4979 void *param, const struct timeval *relativeTime); 4980 4981 4982#endif /* RIL_SHLIB */ 4983 4984#ifdef __cplusplus 4985} 4986#endif 4987 4988#endif /*ANDROID_RIL_H*/ 4989