summaryrefslogtreecommitdiffstats
path: root/include/telephony/ril.h
diff options
context:
space:
mode:
authorShishir Agrawal <shishir@google.com>2013-11-27 14:53:05 -0800
committerShishir Agrawal <shishir@google.com>2013-12-02 10:56:41 -0800
commit2458d8d1e56faae7b00511ceeab19730572c22d9 (patch)
tree72d58bd1b3b609026ec95d719bf55e0f141bd7ad /include/telephony/ril.h
parent2c464b0d9dbc759e4021b90029c4224adc1c8851 (diff)
downloadandroid_hardware_ril-2458d8d1e56faae7b00511ceeab19730572c22d9.tar.gz
android_hardware_ril-2458d8d1e56faae7b00511ceeab19730572c22d9.tar.bz2
android_hardware_ril-2458d8d1e56faae7b00511ceeab19730572c22d9.zip
RIL changes for supporting generic SIM communication.
The RIL interface adds 4 new commands: - RIL_REQUEST_SIM_TRANSMIT_BASIC (AT+CSIM - TS 27.007) - RIL_REQUEST_SIM_OPEN_CHANNEL (AT+CCHO - TS 27.007) - RIL_REQUEST_SIM_CLOSE_CHANNEL (AT+CCHC - TS 27.007) - RIL_REQUEST_SIM_TRANSMIT_CHANNEL (AT+CGLA - TS 27.007) The RIL version is also increased to 10 by this change. Change-Id: Iee4d950d37a6097493cd945e611c914c40827215
Diffstat (limited to 'include/telephony/ril.h')
-rw-r--r--include/telephony/ril.h101
1 files changed, 99 insertions, 2 deletions
diff --git a/include/telephony/ril.h b/include/telephony/ril.h
index 803d965..2539275 100644
--- a/include/telephony/ril.h
+++ b/include/telephony/ril.h
@@ -28,7 +28,7 @@
extern "C" {
#endif
-#define RIL_VERSION 9 /* Current version */
+#define RIL_VERSION 10 /* Current version */
#define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */
#define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
@@ -57,8 +57,10 @@ typedef enum {
location */
RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
- RIL_E_ILLEGAL_SIM_OR_ME = 15 /* network selection failed due to
+ RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to
illegal SIM or ME */
+ RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */
+ RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */
} RIL_Errno;
typedef enum {
@@ -320,6 +322,22 @@ typedef struct {
char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
} RIL_SIM_IO_v6;
+/* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
+ * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
+typedef struct {
+ int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
+ ignored for +CSIM command. */
+
+ /* Following fields are used to derive the APDU ("command" and "length"
+ values in TS 27.007 +CSIM and +CGLA commands). */
+ int cla;
+ int instruction;
+ int p1;
+ int p2;
+ int p3; /* A negative P3 implies a 4 byte APDU. */
+ char *data; /* May be NULL. In hex string format. */
+} RIL_SIM_APDU;
+
typedef struct {
int sw1;
int sw2;
@@ -3565,6 +3583,85 @@ typedef struct {
*/
#define RIL_REQUEST_IMS_SEND_SMS 113
+/**
+ * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
+ *
+ * Request APDU exchange on the basic channel. This command reflects TS 27.007
+ * "generic SIM access" operation (+CSIM). The modem must ensure proper function
+ * of GSM/CDMA, and filter commands appropriately. It should filter
+ * channel management and SELECT by DF name commands.
+ *
+ * "data" is a const RIL_SIM_APDU *
+ * "sessionid" field should be ignored.
+ *
+ * "response" is a const RIL_SIM_IO_Response *
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
+
+/**
+ * RIL_REQUEST_SIM_OPEN_CHANNEL
+ *
+ * Open a new logical channel and select the given application. This command
+ * reflects TS 27.007 "open logical channel" operation (+CCHO).
+ *
+ * "data" is const char * and set to AID value, See ETSI 102.221 and 101.220.
+ *
+ * "response" is int *
+ * ((int *)data)[0] contains the session id of the logical channel.
+ * A value of 0 indicates an invalid session id.
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ * MISSING_RESOURCE
+ * NO_SUCH_ELEMENT
+ */
+#define RIL_REQUEST_SIM_OPEN_CHANNEL 115
+
+/**
+ * RIL_REQUEST_SIM_CLOSE_CHANNEL
+ *
+ * Close a previously opened logical channel. This command reflects TS 27.007
+ * "close logical channel" operation (+CCHC).
+ *
+ * "data" is int *
+ * ((int *)data)[0] is the session id of logical the channel to close.
+ *
+ * "response" is NULL
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
+
+/**
+ * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
+ *
+ * Exchange APDUs with a UICC over a previously opened logical channel. This
+ * command reflects TS 27.007 "generic logical channel access" operation
+ * (+CGLA). The modem should filter channel management and SELECT by DF name
+ * commands.
+ *
+ * "data" is a const RIL_SIM_APDU*
+ *
+ * "response" is a const RIL_SIM_IO_Response *
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
+
+
/***********************************************************************/