iOS ailink secret tool
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ReadMe.md 2.5KB

AILinkSecretTool_iOS

1. Usage description

AILinkSecretTool.framework is a Bluetooth encryption and decryption toolkit developed using ObjectiveC on the iOS platform. The development toolkit can scan and connect to smart devices using AILink Bluetooth module, and is responsible for the handshake between App and Bluetooth module and the encryption and decryption of A7 data. .

2. Necessary condition

  • 1. Acquired AILink Bluetooth communication protocol
  • 2. Have smart devices that support AILink Bluetooth module
  • 3. Have knowledge of iOS native development and debugging

3. Applicable conditions

  • 1. Develop your own native platform app
  • 2. Use RN, Uniapp, Flutter and other cross-platform technologies to develop apps

4. SDK interface


@interface ELEncryptTool: NSObject

/**
 The app sends this A6 data to actively start a handshake with ble
 */
+(NSData *)handshake;

/**
 This method encrypts the A6 data of the ble test app and sends the app to the device, otherwise the device will disconnect the app
 */
+(NSData *)blueToothHandshakeWithData:(NSData *)receiveData;


/**
 A7 data encryption/decryption method
 */
+ (NSData *)encryptXOR:(NSData *)macXOR deviceTypeXOR:(NSData *)deviceTypeXOR withXORData:(NSData *)dataXOR;

@end

5. How to use

For specific usage, please refer to AILinkSecretToolDemo


AILinkSecretTool_iOS

一、用途说明

AILinkSecretTool.framework是在iOS平台使用ObjectiveC开发的蓝牙加解密工具包,该开发工具包能够扫描、连接使用AILink蓝牙模组的智能设备,负责App与蓝牙模组之间的握手与A7数据的加解密。

二、必备条件

  • 1. 已获取AILink蓝牙通讯协议
  • 2. 拥有支持AILink蓝牙模块的智能设备
  • 3. 具备iOS原生开发和调试知识

三、适用场景

  • 1. 开发自己的原生平台app
  • 2. 使用RN、Uniapp、Flutter等跨平台技术开发app

四、SDK提供接口


@interface ELEncryptTool : NSObject

/**
 app发送此A6数据主动开始与ble进行握手
 */
+(NSData *)handshake;

/**
 此方法将ble检验app的A6数据进行加密,app发给设备,否则设备将断开app
 */
+(NSData *)blueToothHandshakeWithData:(NSData *)receiveData;


/**
 A7数据加/解密方法
 */
+ (NSData *)encryptXOR:(NSData *)macXOR deviceTypeXOR:(NSData *)deviceTypeXOR withXORData:(NSData *)dataXOR;


@end

五、使用方法

具体用法详见AILinkSecretToolDemo