Analysis of JieLi Bluetooth Chip's Key: Principle, Addition and Error Handling



I. Introduction

Many engineers often have deep doubts about Key - related issues when developing JieLi Bluetooth chips:

  1. What is a Key file?
  2. How is a Key file generated?
  3. Why is a Key file needed?
  4. How to add a Key file?
  5. How to handle relevant errors in actual development?

II. Detailed Description

The Key file of JieLi chips stems from its unique architecture mechanism, which has persisted for nearly 10 years. The following is a specific elaboration of Key - related issues:

2.1 What is a Key file?

Simply put, a Key file is a password file used to encrypt the chip and has no other functions.

2.2 How is a Key file generated? Who distributes it?

  • Key files are distributed by JieLi to each agent. Only JieLi has the authority to distribute Keys, and once distributed, they are fixed and cannot be modified.
  • After a Key file is burned into the chip, it cannot be modified or deleted.
  • There are only two ways to write a Key file into the chip:The one - to - two burner used in mass production.The one - to - eight burner used in mass production.

2.3 Why is a Key file needed?

To understand the role of Key, it is necessary to first understand the overall architecture of JieLi chips:

  • The architecture of JieLi chips is SOC, which is a combined product of a controller and a memory. Although it appears as one chip, there may be two or even three inside (such as early WIFI chips).The "controller" is designed by JieLi. It adopts the OTP mechanism. Fixed code is burned during production to guide the chip to read the content of the external spiflash into the ram for execution.The "memory" is purchased externally and is used to store user programs.
  • The reason why JieLi designs in this way is to reduce costs. Implementing a large - capacity rom program space on a single chip is costly. Choosing to expand the storage space externally and using spiflash with mature technology and low price can perfectly solve this problem. At the same time, in the early development of JieLi chips, there was a concept of switching banks. When the program executed to a new location, the flash code at the corresponding position was loaded into the ram for operation. At this time, the definition of global variables had to be specially processed. However, with the introduction of virtual memory mapping in current JieLi chips, the concept of switching banks no longer exists.

In summary, due to this special mechanism, a Key file (password) is essential. Without a Key, there is a risk that the program can be easily cracked. Others can obtain the chip, open it, read the bin file in the spiflash, and simply analyze it to crack the program because all the programs are stored in the built - in spiflash. After introducing a Key:

  • The "Key" is written into the internal controller of the chip through a batch burner, and then the bin file encrypted by the Key is burned into the built - in spiflash, which increases the difficulty of cracking.
  • The operation of encrypting the bin file is carried out when the JieLi development environment generates the program.
  • Even if the bin file of the flash is read out, it cannot be used because it is encrypted.
  • Even if the Key file (password) is known, it cannot be replicated because the obtained bin file cannot be reversed to the actual bin file.

2.4 How to add a Key file to the program

Take the AC695N series of chips as an example.

文章内容

The Key file needs to be obtained by contacting the supplier.

2.5 Handling of Key - file - related errors in actual development


文章内容

Error messages such as:

“错误:KEY不匹配!!

芯片没有被烧写过KEY,请删除“-key<keyfile>参数”

ERROR: Failed to parse device info, error info:ERR KEY

已复制 个文件。

错误:fw文件中已经存在要添加的文件。

1个文件。

错误:fw文件中已经存在要添加的文件。”


"Error: KEY does not match!!

The chip has not been burned with a KEY. Please delete the '-key<keyfile> parameter'

ERROR: Failed to parse device info, error info: ERR KEY

Files copied. 1 file.

Error: The file to be added already exists in the fw file.

Files copied. 1 file.

Error: The file to be added already exists in the fw file."


The reason for this error is that the target chip has not been burned with a Key, and a Key file has been added to the program, resulting in an inability to download. Refer to section 2.4 and delete the Key - adding operation to solve the problem.

III. Summary

Many engineers question the significance of Key, thinking it is cumbersome. In fact, they just haven't understood it deeply. It is hoped that this article's detailed explanation of the origin and necessity of Key can help everyone.

Tags: #JieLi Bluetooth Chip #Key File #Chip Encryption #Bluetooth Chip Development


评论

此博客中的热门博文

KT148A Voice Chip at Baidu Baike

KT148A Voice Chip Issue: Difficult to Play with Code Sending - Normal Playback After Grounding Pin 4, What’s the Reason?

KT1025A Dual-Mode Bluetooth Audio Chip Layout Description and Design Precautions