Guide to Adding BLE Connection Passcodes for the KT1025A Bluetooth Chip

Introduction

The BLE function of the KT1025A Bluetooth chip supports connection passcodes. By default, the passcode is fixed at 6 digits, and its length cannot be changed. In the default program, the passcode is set to 123456. Please note that each digit must be in the range 0–9 and must not exceed this range.

However, it is important to note a limitation of BLE: even with a passcode set, certain apps may bypass it.

Therefore, it is recommended to implement an interactive encryption mechanism between your app and the Bluetooth chip after a connection is established. For example, after a successful connection, the app can send a data frame to the Bluetooth chip, which then parses and replies according to a predefined protocol. If no correct reply is received, the device can be considered unauthorized.


AT Command Instructions

文章内容

  1. Set the passcode Command:  AT  +BN  Format:  AT  +BN[passcode]  (up to 6 digits) Example:  AT  +BN889988
  2. Restore factory settings If you forget the passcode, you can reset the chip to factory defaults using: Command:  AT  +CW
  3. Power-on notification When powered on, the chip will automatically report the current BLE connection passcode in the format:  TN  +[passcode]  Example:  TN  +889988
  4. Query the passcode manually You can also actively query the current passcode. Refer to the example below:

文章内容



Summary

While the KT1025A supports BLE connection passcodes for basic security, developers are encouraged to add an additional layer of protection through custom encryption after connection. This helps ensure that only trusted apps can communicate with the device.

Always remember to store your passcode securely. If lost, use the AT  +CW

评论

此博客中的热门博文

KT148A Voice Chip at Baidu Baike

KT148A Voice Chip: A Powerful Tool to Enhance the User Experience of Smart Soymilk Makers