The SIM interface is used to access the Subscriber Identification Module (SIM) plugged as a card into the GSM device. Use it to authenticate yourself against the GSM network and read/store data from/to the embedded SIM card memory. Limited support for accessing the on-card phonebook and messagebook is provided.
org.freesmartphone.GSM.SIM
Description: Retrieve the authentication status for the SIM card.
This maps to the GSM 07.07 command +CPIN=?, see 3GPP TS 07.07 Chapter 8.3.
The authentication status for the SIM card. Values to expect:
Description: Send authentication code (PIN) for the SIM card.
This maps to the GSM 07.07 command +CPIN="(pin)", see 3GPP TS 07.07 Chapter 8.3.
The authentication code.
Description: Send unlock code (PUK) and new authentication code (PIN).
This maps to the GSM 07.07 command +CPIN="(puk)","(new_pin)", see 3GPP TS 07.07 Chapter 8.3.
The unlock code.
s: new_pinThe new authentication code.
Description: Change the authentication code.
This maps to the GSM 07.07 command +CPWD="SC","(old_pin)","(new_pin)", see 3GPP TS 07.07 Chapter 7.5.
The old authentication code.
s: new_pinThe new authentication code.
Description: Enable or disable checking for the SIM card authentification on startup.
This maps to the GSM 07.07 command +CLCK,"SC",(check),"(pin)", see 3GPP TS 07.07 Chapter 7.4.
True, to turn SIM card authentification on. False, to turn it off.
s: pinA valid authentication code.
Description: Retrieve whether the SIM card checks for authentification on startup.
This maps to the GSM 07.07 command +CLCK,"SC",2, see 3GPP TS 07.07 Chapter 7.4.
True, if SIM card authentification is turned on. False, otherwise.
Description: Retrieve whether the SIM data can be accessed.
Implementation of this command is optional. Implementing this method does not free from raising Busy when appropriate.
True, if the data files on the SIM can be accessed. False, otherwise.
Description: Get information about the IMSI, the subscriber numbers, and the country code of the SIM card.
This can map to the following GSM 07.07 commands:
Information about the SIM card. Required tuples are:
Description: Send a generic SIM command to the SIM card.
This maps to the GSM 07.07 command +CSIM=(command), see 3GPP TS 07.07 Chapter 8.17.
The command to send, encoded as described in GSM 11.11.
The result of the command, encoded as described in GSM 11.11.
Description: Send a restricted SIM command to the SIM card.
This maps to the GSM 07.07 command +CRSM=(command),(fileid),(p1),(p2),(p3),(data), see 3GPP TS 07.07 Chapter 8.18.
The command to send. Valid values are:
The identifier of an elementary datafile on SIM. Mandatory for every command except STATUS.
i: p1Parameter 1 passed to the SIM. Mandatory for every command except STATUS and GET RESPONSE.
i: p2Parameter 1 passed to the SIM. Mandatory for every command except STATUS and GET RESPONSE.
i: p3Parameter 1 passed to the SIM. Mandatory for every command except STATUS and GET RESPONSE.
s: dataThe command data to the SIM, encoded as described in GSM 11.11.
The result of the command, encoded as described in GSM 11.11.
Description: Retrieve the homezones coordinates, if stored on the SIM.
This maps to the GSM 07.07 command +CRSM=176,28512,0,0,123, see 3GPP TS 07.07 Chapter 8.17.
An array containing up to four homezones in Gauss-Krueger coordinates. The array contains of four-tuples with the following format:
Description: Retrieve the name of the SIM issuer, if stored on the SIM.
This maps to the GSM 07.07 command +CRSM=176,28486,0,0,17, see 3GPP TS 07.07 Chapter 8.17.
The name of the SIM issuer. This can be an actual network provider or a mobile virtual network operator (MVNO).
Description: Retrieve the list of known providers, if stored on the SIM. Note that this needs an unlocked SIM on some devices. Additionally, some devices have a fallback table in ROM that gets sent when the SIM is not unlocked while other devices only use a ROM-based table.
This maps to the GSM 07.07 command +COPN, see 3GPP TS 07.07 Chapter 7.19.
An map containing of known providers as tuples. The key is the provider code (mccmnc), the value is the alphanumerical provider name.
Description: Retrieve the list of available phonebooks on the SIM.
This maps to the GSM 07.07 command +CPBS=?, see 3GPP TS 07.07 Chapter 8.12.
The available phonebooks, if any. Expected values are:
Description: Request information about the SIM phonebook.
This maps to the GSM 07.07 command +CPBR=?, see 3GPP TS 07.07 Chapter 8.12.
The phonebook storage category. See ListPhonebooks for valid categories.
Information about the SIM phonebook storage. Tuples to expect:
Description: Retrieve all entries from the SIM phonebook.
This vaguely maps to the GSM 07.05 command +CPBR=(index1),(index2), see 3GPP TS 07.07 Chapter 8.12.
The phonebook storage category. See ListPhonebooks for a list of valid categories.
The phonebook entries. This is an array of three-tuples. Every entry has the following structure:
Description: Delete an entry in the SIM phonebook.
This maps to the GSM 07.07 command +CPBW=, see 3GPP TS 07.07 Chapter 8.14.
The phonebook storage category. See ListPhonebooks for a list of valid categories.
i: indexIndex of entry to delete.
Description: Store an entry in the SIM phonebook.
This maps to the GSM 07.07 command +CPBW=(index),"(name)",(number),(ntype), see 3GPP TS 07.07 Chapter 8.14.
The phonebook storage category. See ListPhonebooks for a list of valid categories.
i: indexThe index of the entry to store.
s: nameThe name corresponding to the number.
s: numberThe number corresponding to the name.
The phonebook storage category. See ListPhonebooks for a list of valid categories.
i: indexThe index of the entry to retrieve.
The name corresponding to the number.
s: numberThe number corresponding to the name.
Description: Request information about the SIM messagebook.
This maps to the GSM 07.05 command +CPMS="SM","SM","SM", see 3GPP TS 07.07 Chapter 3.2.2.
Information about the SIM messagebook storage. Tuples to expect:
Description: Retrieve all messages from the SIM messagebook that match a given category.
This vaguely maps to the GSM 07.05 command +CMGL="(category)", see 3GPP TS 07.07 Chapter 3.4.2.
The category of messages you want to receive. Valid categories are:
Messages matching the given category. This is an array of four-tuples. Every entry has the following structure:
Description: Retrieve phone number of SMS Center Number.
This maps to the GSM 07.05 command +CSCA?, see 3GPP TS 07.05 Chapter 3.3.1.
The SMS Center Number.
Description: Set phone number of SMS Center Number.
This maps to the GSM 07.05 command +CSCA=(number),(type), see 3GPP TS 07.05 Chapter 3.3.1.
The SMS Center Number.
Description: Delete a message in the SIM messagebook.
This maps to the GSM 07.05 command +CMGD=(index), see 3GPP TS 07.05 Chapter 3.5.4.
The storage index of the message to delete.
Description: Store a message in the SIM messagebook.
This maps to the GSM 07.05 command +CMGW=..., see 3GPP TS 07.05 Chapter 3.5.3.
The number of the recipient.
s: contentsThe contents of the message.
a{sv}: propertiesFor a list of valid properties see SendMessage
The index of the new message.
Description: Sends a message stored in the SIM messagebook.
This maps to the GSM 07.05 command +CMGS=(index)..., see 3GPP TS 07.05 Chapter 3.5.x.
The index of the message.
The given transaction index for this message.
s: timestampThe timestamp this message was received by the SMSC
Description: Retrieve a message from the SIM messagebook.
This can map to the GSM 07.05 command +CMGR=(index), see 3GPP TS 07.05 Chapter 3.4.3. It might also map to the GSM 07.05 command +CMGL=(storage_spec), see 3GPP TS 07.05 Chapter 3.4.2.
The index of the message to retrieve.
The category the message is in, one of ("read", "sent", "unread", "unsent").
s: sender_numberThe number of the sender.
s: contentsThe contents of the message.
a{sv}: propertiesThe one mandatory property is
Description: Sent, when the authentication status for the SIM card changes.
The authentication status for the SIM card. See GetAuthStatus for a list of expected values.
Description: Sent, when the data files on the SIM become (not) ready for access.
True, if the data files on the SIM can be accessed. False, otherwise.
Description: Sent, when a new message has been received and stored on the SIM card.
The storage index of the new message.
Description: Raised, if there is no SIM card present.
Description: Raised, if the SIM authentication code is not accepted.
Description: Raised, if the SIM has been deactivated or is otherwise not allowed to join a network.
Description: Raised, if a data record on the SIM is not present.
Description: Raised, if there is not enough space for a data record on the SIM.
Description: Raised, if the requested messagebook or phonebook entry is out of bounds.