Configuration scheme of SIM-ME lock on MTK Platform

Source: Internet
Author: User
Tags network function

 

The MTK platform has been well supported by some carrier's network lock requirements. The vast majority of overseas requirements can be achieved by directly configuring relevant files. Here, we will briefly describe the configuration method without analyzing the principles.

Related Data Structure Analysis:

The data structures related to the SML lock network configuration in modem include:

 

Sml_context_struct: SML context,

Cat: SML type, MTK platform currently supports 7 lock Network (Network lock, network subset lock, service provider lock, reset ate lock, imsi lock, linked NS-SP lock, linked SIM-C lock)

Key: Modem-side unlock key Configuration

Code_cat_n: Network lock network parameter configuration

Code_cat_ns: Network subset lock network parameter configuration

......

 

Sml_category_meta_struct: Lock network type

State: Locked, with the following enumerated values:

Typedef Enum {

Sml_state_null,

Sml_state_lock,

Sml_state_unlock,

Sml_state_autolock,

Sml_state_disable

} Sml_state_enum;

Generally, you can lock the configuration sml_state_lock (0x01) for this category. Otherwise, select sml_state_unlock (0x02.

Retry_count: the number of retries allowed.

Autolock_count:

Num: The number of valid sets in the lock network parameter table.

 

Sml_control_key_struct: Unlock key

State: sml_key_empty/sml_key_set,

Here we use the consistent value sml_key_set (0x01 ),

Key: Unlock the key value.

 

How to complete the lock network function (configure related values)
  • Code Configuration:

The files involved mainly include:

Figure 1 files related to the lock network configuration in modem

Through the analysis of the main data structure of SIM-ME lock, we can simply configure a lock network requirement, such as the requirement of Mico telcel: configure the network lock of 334020/00101.

L configure Cat:

 

Chart 2 SML configuration (1)

The four parameters are: the lock status (sml_state_lock), the number of retries (based on requirements), autolock (currently unified as 0), and the number of valid lock networks (if the lock is 46000/46002, write 2)

 

L configuration key:

 

Chart 3 SML configuration (2)

Parameter: key status (sml_key_set), decryption key (currently agreed to be set to 35574126)

 

L configure the lock Network List: Write the MCC/MNC value to be locked in the demand table.

 

Chart 4 SML configuration (3)

For two MNC, the last one can directly add F.

So far, the configuration of the modem code has been completed. So easy!

 

 

  • Use meta tool to configure the lock Network

Read nvram_ef_sml_lid after the meta tool is connected to the terminal.

 

Chart 5 meta read SML Parameters

Through tools, we can directly modify relevant parameters. Mainly include:

Cat [0]: State -- 0x01 (locked network), 0x02 (unlocked network); retry_count -- number of unlocked times; num -- code_cat_n, number of valid Sets

Code_cat_n: configure the lock Network List

 

 

Configure lock network parameters through production tools on the production line
  • Preliminary configuration file design:

Based on the above analysis, the initial design of the lock network configuration file format is as follows:

<Windsmlconf>

<Windcateindex> 0 </windcateindex> // The value of the lock network type ranges from 0 to 6, corresponding to 7 lock network modes. If the network is locked, the value is 0.

<Windcategory> // determine which cat to configure based on the previous index

<State> 0x01/0x02 </State> // lock status (01 locked, 02 unlocked)

<Retry-count> </retry-count> // unlock times

<Autolock-count> 0x00 </autolock-count> // fixed to 0

<Num> </num> // Number of valid combinations

</Windcategory>

<Windcode>

<Item> XX </item> // details all lock lists

......

</Windcode>

</Windsmlconf>

 

Example: (the lock Network Requirement of Mexico telcel)

<Windsmlconf>

<Windcateindex> 0 </windcateindex>

<Windcategory>

<State> 1 </State>

<Retry-count> 5 </retry-count>

<Autolock-count> 0 </autolock-count>

<Num> 2 </num>

</Windcategory>

<Windcode>

<Item> 334020 </item>

<Item> 00101f </item>

</Windcode>

</Windsmlconf>

 

 

  • Update the configuration file design:

When data is erased, all data is cleared to 0, which makes some parameters that use the default value meaningless.

After discussion with colleagues in the production department, all the lock network parameters are written into the configuration file, and code_cat_n is extended to 15 elements for future expansion. As follows:

[Simlockcfg]

Magic_head = 0x000000cc // magic_head

Windcateindex = 0 // The value of the lock network category is 0-6, which corresponds to seven lock network modes. If the network is locked, the value is 0.

State = 1 // lock status (01 locked, 02 unlocked)

Retry-Count = 5 // unlock times

Autolock-Count = 0 // fixed to 0

Num = 4 // Number of valid Sets

Key_state = 1 // The key status of the modem, fixed to 1

Key = 0x53751462ffffffff // modem-side key, which is fixed to this value

Item1 = 334020 // detail all lock lists

......

Magic_tail = 0x26598088 // magic_tail

 

Simlockmodel = 1 // 1 indicates a common algorithm, and 2 indicates a yoigo Unlock algorithm.

 

Meta:

 

Configuration scheme of SIM-ME lock on MTK Platform

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.