iOS ailink secret tool
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
elinkthings c26597fc76 readme pirms 3 gadiem
AILinkSecretTool.framework 添加AILink广播设备解密方法 pirms 3 gadiem
AILinkSecretToolDemo 添加AILink广播设备解密方法 pirms 3 gadiem
ReadMe.md readme pirms 3 gadiem

ReadMe.md

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;

/// AILink broadcast equipment (eg:broadcast body fat scale, broadcast nutrition scale) decryption method
/// @param encryptData
+ (NSData *)broadcastDecryptTEA:(NSData * _Nonnull)encryptData cid:(Byte)cid vid:(Byte)vid pid:(Byte)pid;


@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;

/// AILink广播设备(广播体脂秤、广播营养秤)解密方法
/// @param encryptData 广播数据中加密数据
+ (NSData *)broadcastDecryptTEA:(NSData * _Nonnull)encryptData cid:(Byte)cid vid:(Byte)vid pid:(Byte)pid;

@end

五、使用方法

具体用法详见AILinkSecretToolDemo