> 5.8 | AT^SCSL Customer SIM Lock

> AT^SCSL is a Siemens defined command especially designed to manage the Customer SIM Lock feature. This feature allows application manufacturers to lock a mobile to specific operators by activating a Network Personalization ("PN"). If the lock is enabled the mobile will accept only SIM cards from the given operators.
> The Customer SIM Lock is protected by two different passwords:

> • | <password> = Network Personalisation password "CM" defined with AT^SPWD and necessary for programming the Customer SIM Lock with AT^SCSL.

> • | <PUK> = Lock/Unlock Code defined with AT^SCSL and used to set the Customer SIM Lock with AT^SCSL. Also used to deactivate a given lock or activate a new one via AT+CLCK or AT^SLCK. The PUK may be provisioned to the end user.

> The AT^SCSL write command serves to configure a Customer SIM Lock and to query the current settings.
> Syntax

> Test Command AT^SCSL=?
> Response(s)
> OK

> Write Command AT^SCSL=<facility>, <action>, <password>[, <PUK>, <data>]
> Response(s)
> OK
> ERROR
> CME ERROR
> If <action>= 2 and command successful:
> ^SCSL: <data>[:<data>:<data>: ...]
> If <action>= 2 and operator list is empty:
> ^SCSL:

> Reference(s) |  | PIN |  | ASC0 | ASC1 | USB | MUX1 | MUX2 | MUX3 |  |  | Charge | Q | Last
> Siemens |  | - |  | + | + | + | + | + | + |  |  | - | + | -

> Parameter Description

> <facility>(str)

> “PN“
> Network Personalisation (= Customer SIM Lock)

> <action>(num)

> Set or remove a Customer SIM Lock, or list the locks currently activated.
> 0
> Remove the given Customer SIM Lock from ME.
> Required parameters: <facility>="PN", <action>=0, <password>.
> Removing the Customer SIM Lock deletes both the <PUK> and all <data>, i.e. the entire list of operators.
> 1
> Write Customer SIM Lock data to the ME and activate the lock.
> Required parameters: <facility>="PN", <action>=1, <password>, <PUK>, <data>.
> 2
> Retrieve the list of operators the ME is currently locked to.
> Required parameters: <facility>="PN", <action>=2, <password>.

> <password>(str)

> Password for programming the Customer SIM Lock.
> 8-digit "CM" password for the facility "PN" that needs to be created with AT^SPWD (see note below for further details). This password is mandatory for each operation performed with AT^SCSL.

> <PUK>(str)

> PUK created and required when entering the Customer SIM Lock data with AT^SCSL, i.e. if <action>=1. Also used to deactivate a given "PN" lock or to activate a new "PN" lock for another SIM card via AT+CLCK or AT^SLCK.
> The length of the <PUK> is also 8 digits.
> Each time the AT^SCSL write command is issued with parameter <action>=1 you are free to use the same <PUK> or to set a new one. In any case, a new <PUK> overwrites the previous one.

> <data>(str)

> Data of the allowed network operators.
> Each operator code consists of the "Mobile Country Code" MCC and the "Mobile Network Code" MNC, both separated by a dot, e.g. MCC1.MNC1. If more than one operator is entered on the same line, then a colon must be set between each operator code, e.g. MCC1.MNC1:MCC2.MNC2:MCC3.MNC3. For example, for the three operators T-Mobile D, Vodafone D2 and E-Plus you would enter the following data: 262.01:262.02:262.03
> Note that each time the AT^SCSL write command is executed using the parameter <action>=1 the existing operator codes will not be overwritten, but all new data will be added to the list. This applies no matter whether the same operator code is already listed, i.e. entering the same operator again causes double entries.
> The maximum number of entries in the operator list is 50.
> Notes

> • | The use of the Customer SIM lock features may be restricted by existing facility locks. For example it is not possible to enable Customer SIM lock while the "PS" device lock is in place.

> • | All parameters of AT^SCSL as well as the "CM" password of AT^SPWD can be used no matter whether or not the SIM card is inserted or PIN authentication has been done. This allows the application manufacturer to set the "CM" password and activate the Customer SIM Lock during the production process.

> • | The Customer SIM Lock takes effect after the AT^SCSL write command was successfully executed with parameter <action>=1. Then, after the reboot, the mobile will accept only SIM cards from the supported operators.

> • | To remove the Customer SIM Lock use the write command AT^SCSL with <action>=0 and <password>: AT^SCSL="PN",0,password. This will delete both the <PUK> and the list of operators. The mobile will accept any SIM card.

> • | Another way to operate the mobile with other SIM cards is to deactivate the Customer SIM Lock using the command AT+CLCK="PN",0,PUK. This will delete the list of operators specified with the Customer SIM Lock, but the <PUK> created for the Customer SIM Lock remains valid. The mobile will accept any SIM card.

> • | If the Customer SIM Lock is deactivated and, therefore, operable with any SIM card, the end user may use the <PUK> to set a new SIM lock. To do so, it is necessary to enter the command AT+CLCK="PN",1,PUK first, then insert a different SIM card and finally restart the mobile. When restarted, the mobile will read out and accept the list of operators of the currently inserted SIM card. As a result, a new Customer SIM Lock takes effect for the operator(s) listed on this SIM card.

> • | If the Customer SIM Lock is active, but the end user inserts an unsupported SIM card and enters PIN1 the mobile returns OK, although access to SIM related commands (such as dialing out, access to phonebooks, SMS etc.) will be denied. If then the read command AT+CPIN is executed the mobile will request the PH-NET PUK. In this case, you have two options: Use the AT+CPIN command to enter the correct <PUK> of the Customer SIM Lock. After this, the mobile can be operated with the new SIM card. As an alternative, re-insert the correct SIM card associated with the Customer SIM Lock and deactivate the lock via AT+CLCK="PN",0,PUK.

> • | If an invalid <password> or <PUK> is entered several times in succession, a delay incremented after each failed attempt will increase the time to wait before the next input is accepted. The delay follows the same timing algorithm specified for the PH-SIM PUK (Master Phone Code). For details regarding the delay see Section 5.1.1, What to do if PIN or password authentication fails?.

> Examples

> EXAMPLE 1 | Prerequisite for using the AT^SCSL command is a valid "CM" password created with AT^SPWD. Therefore, first check the "CM" password. A more detailed example can be found in Section 5.7, AT^SPWD.

> AT^SPWD="CM",, | Check that the "CM" password was already set.
> OK | Yes, the "CM" password is valid.

> EXAMPLE 2 | To check, configure and remove a "PN" lock (= Customer SIM Lock):

> AT^SCSL="PN",2,44444444 | Check the current status of the Customer SIM Lock. 44444444 is the "CM" password created with AT^SPWD. Operator list is still empty, Customer SIM Lock has not yet been set.
> ^SCSL:
> OK
> AT^SCSL="PN",1,44444444,12345678,262.01:262.02 | Set a "PN" Lock, where 44444444 = "CM" password, 12345678 = PH-NET PUK, 262.01 = MCC/MNC of German operator T-Mobile D and 262.02 = MCC/MNC of Vodafone D2.
> OK
> AT^SCSL="PN",2,44444444 | Check again.
> ^SCSL: 262.01:262.02 | The mobile is locked to the two network operators T-Mobile D and Vodafone D2.
> OK
> AT^SCSL="PN",1,44444444,12345678,262.03 | Add another operator (262.03 = MCC/MNC of German network operator E-Plus).
> OK
> AT^SCSL="PN",1,44444444,11223344,262.04 | Add another operator. In this case, a new PH-NET-PUK was used. Keep in mind that the new password overwrites the old one.
> OK
> AT^SCSL="PN",0,44444444 | Remove the Customer SIM Lock. Keep in mind that this action deletes the entire list of network operators contained in <data>. As a result, the mobile will accept any SIM card.
> OK

> EXAMPLE 3 | If the Customer SIM Lock is active, but the user inserts a different SIM card not supported by the list of operators defined in <data> the <PUK> must be at hand:

> AT^SCSL="PN",2,44444444 | For the purpose of this example, we check the current status of the Customer SIM Lock. The mobile lis locked to the German operators T-Molile D and Vodafone D2.
> ^SCSL: 262.01:262.02
> OK
> AT+CPIN=1111 | PIN1 is accepted and the mobile is operable, except for SIM related AT commands.
> OK
> AT+CMGF=1 | AT command that does not require SIM authentication.
> OK
> AT+CPBS? | Attempt to use a phonebook command.
> +CME ERROR: network personalisation PUK required | Access to phonebook fails because of lack of SIM data.
> AT+CPIN? | Check status of PIN authentication.
> +CPIN: PH-NET PUK | The mobile is waiting for the PH-NET-PUK.
> OK
> AT+CPIN=11223344 | PH-NET PUK is given with AT+CPIN. This action deletes the entire operator list and, thus, removes the Customer SIM Lock.
> OK
> AT+CPIN? | Query status of PIN authentication.
> +CPIN: READY
> OK
> AT^SCSL="PN",2,44444444 | Check the status of the Customer SIM Lock.
> ^SCSL: | Entire operator list is empty, Customer SIM Lock is no longer active.
> OK