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