summaryrefslogtreecommitdiffstats
path: root/drivers/isimodem/sim.h
diff options
context:
space:
mode:
authorAki Niemi <aki.niemi@nokia.com>2010-01-08 10:53:42 +0200
committerAki Niemi <aki.niemi@nokia.com>2010-01-11 10:51:00 +0200
commitc03cdaed9a16559e40360a601c07dbfacbce24ad (patch)
tree8e1f7a30b4495ba61eb5aaabab966eff74f54815 /drivers/isimodem/sim.h
parent06afe598f542eb4dc8a17fb4e80bf440f85f7e27 (diff)
downloadofono-c03cdaed9a16559e40360a601c07dbfacbce24ad.tar.bz2
Split ISI codepoints to separate files
Also, adding infrastructure for debugging ISI messages, with APIs for turning most common fields into human readable string format.
Diffstat (limited to 'drivers/isimodem/sim.h')
-rw-r--r--drivers/isimodem/sim.h147
1 files changed, 147 insertions, 0 deletions
diff --git a/drivers/isimodem/sim.h b/drivers/isimodem/sim.h
new file mode 100644
index 00000000..68ee8745
--- /dev/null
+++ b/drivers/isimodem/sim.h
@@ -0,0 +1,147 @@
+/*
+ * This file is part of oFono - Open Source Telephony
+ *
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __ISIMODEM_SIM_H
+#define __ISIMODEM_SIM_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define PN_SIM 0x09
+#define SIM_TIMEOUT 5
+#define SIM_MAX_IMSI_LENGTH 15
+
+enum sim_isi_cause {
+ SIM_SERV_NOT_AVAIL = 0x00,
+ SIM_SERV_OK = 0x01,
+ SIM_SERV_PIN_VERIFY_REQUIRED = 0x02,
+ SIM_SERV_PIN_REQUIRED = 0x03,
+ SIM_SERV_SIM_BLOCKED = 0x04,
+ SIM_SERV_SIM_PERMANENTLY_BLOCKED = 0x05,
+ SIM_SERV_SIM_DISCONNECTED = 0x06,
+ SIM_SERV_SIM_REJECTED = 0x07,
+ SIM_SERV_LOCK_ACTIVE = 0x08,
+ SIM_SERV_AUTOLOCK_CLOSED = 0x09,
+ SIM_SERV_AUTOLOCK_ERROR = 0x0A,
+ SIM_SERV_INIT_OK = 0x0B,
+ SIM_SERV_INIT_NOT_OK = 0x0C,
+ SIM_SERV_WRONG_OLD_PIN = 0x0D,
+ SIM_SERV_PIN_DISABLED = 0x0E,
+ SIM_SERV_COMMUNICATION_ERROR = 0x0F,
+ SIM_SERV_UPDATE_IMPOSSIBLE = 0x10,
+ SIM_SERV_NO_SECRET_CODE_IN_SIM = 0x11,
+ SIM_SERV_PIN_ENABLE_OK = 0x12,
+ SIM_SERV_PIN_DISABLE_OK = 0x13,
+ SIM_SERV_WRONG_UNBLOCKING_KEY = 0x15,
+ SIM_SERV_ILLEGAL_NUMBER = 0x2E,
+ SIM_SERV_NOT_OK = 0x1C,
+ SIM_SERV_PN_LIST_ENABLE_OK = 0x1E,
+ SIM_SERV_PN_LIST_DISABLE_OK = 0x1F,
+ SIM_SERV_NO_PIN = 0x20,
+ SIM_SERV_PIN_VERIFY_OK = 0x21,
+ SIM_SERV_PIN_BLOCKED = 0x22,
+ SIM_SERV_PIN_PERM_BLOCKED = 0x23,
+ SIM_SERV_DATA_NOT_AVAIL = 0x24,
+ SIM_SERV_IN_HOME_ZONE = 0x25,
+ SIM_SERV_STATE_CHANGED = 0x27,
+ SIM_SERV_INF_NBR_READ_OK = 0x28,
+ SIM_SERV_INF_NBR_READ_NOT_OK = 0x29,
+ SIM_SERV_IMSI_EQUAL = 0x2A,
+ SIM_SERV_IMSI_NOT_EQUAL = 0x2B,
+ SIM_SERV_INVALID_LOCATION = 0x2C,
+ SIM_SERV_STA_SIM_REMOVED = 0x35,
+ SIM_SERV_SECOND_SIM_REMOVED_CS = 0x36,
+ SIM_SERV_CONNECTED_INDICATION_CS = 0x37,
+ SIM_SERV_SECOND_SIM_CONNECTED_CS = 0x38,
+ SIM_SERV_PIN_RIGHTS_LOST_IND_CS = 0x39,
+ SIM_SERV_PIN_RIGHTS_GRANTED_IND_CS = 0x3A,
+ SIM_SERV_INIT_OK_CS = 0x3B,
+ SIM_SERV_INIT_NOT_OK_CS = 0x3C,
+ SIM_FDN_ENABLED = 0x19,
+ SIM_FDN_DISABLED = 0x1A,
+ SIM_SERV_INVALID_FILE = 0x45,
+ SIM_SERV_DATA_AVAIL = 0x4F,
+ SIM_SERV_ICC_EQUAL = 0x49,
+ SIM_SERV_ICC_NOT_EQUAL = 0x4A,
+ SIM_SERV_SIM_NOT_INITIALISED = 0x4B,
+ SIM_SERV_SERVICE_NOT_AVAIL = 0x50,
+ SIM_SERV_FDN_STATUS_ERROR = 0x57,
+ SIM_SERV_FDN_CHECK_PASSED = 0x58,
+ SIM_SERV_FDN_CHECK_FAILED = 0x59,
+ SIM_SERV_FDN_CHECK_DISABLED = 0x5A,
+ SIM_SERV_FDN_CHECK_NO_FDN_SIM = 0x5B,
+ SIM_STA_ISIM_AVAILEBLE_PIN_REQUIRED = 0x5C,
+ SIM_STA_ISIM_AVAILEBLE = 0x5D,
+ SIM_STA_USIM_AVAILEBLE = 0x5E,
+ SIM_STA_SIM_AVAILEBLE = 0x5F,
+ SIM_STA_ISIM_NOT_INITIALIZED = 0x60,
+ SIM_STA_IMS_READY = 0x61,
+ SIM_STA_APP_DATA_READ_OK = 0x96,
+ SIM_STA_APP_ACTIVATE_OK = 0x97,
+ SIM_STA_APP_ACTIVATE_NOT_OK = 0x98,
+ SIM_SERV_NOT_DEFINED = 0xF9,
+ SIM_SERV_NOSERVICE = 0xFA,
+ SIM_SERV_NOTREADY = 0xFB,
+ SIM_SERV_ERROR = 0xFC,
+ SIM_SERV_CIPHERING_INDICATOR_DISPLAY_REQUIRED = 0x30,
+ SIM_SERV_CIPHERING_INDICATOR_DISPLAY_NOT_REQUIRED = 0x31,
+ SIM_SERV_FILE_NOT_AVAILABLE = 0x4D
+};
+
+enum sim_subblock {
+ SIM_PB_INFO_REQUEST = 0xE4,
+ SIM_PB_STATUS = 0xFB,
+ SIM_PB_LOCATION = 0xFE,
+ SIM_PB_LOCATION_SEARCH = 0xFF
+};
+
+enum sim_pb_type {
+ SIM_PB_ADN = 0xC8
+};
+
+enum sim_pb_tag {
+ SIM_PB_ANR = 0xCA,
+ SIM_PB_EMAIL = 0xDD,
+ SIM_PB_SNE = 0xF7
+};
+
+enum sim_message_id {
+ SIM_IMSI_REQ_READ_IMSI = 0x1D,
+ SIM_IMSI_RESP_READ_IMSI = 0x1E,
+ SIM_SERV_PROV_NAME_REQ = 0x21,
+ SIM_SERV_PROV_NAME_RESP = 0x22,
+ SIM_PB_REQ_SIM_PB_READ = 0xDC,
+ SIM_PB_RESP_SIM_PB_READ = 0xDD,
+ SIM_COMMON_MESSAGE = 0xF0
+};
+
+enum sim_service_type {
+ SIM_ST_READ_SERV_PROV_NAME = 0x2C,
+ SIM_PB_READ = 0x0F,
+ READ_IMSI = 0x2D
+};
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif /* __ISIMODEM_SIM_H */