Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
iot_user c7dc112eed 123 5 лет назад
TPMSBleSDKDemo Update message 5 лет назад
BleTpms_SDK_Demo_URL.pdf First version 5 лет назад
README.md markdown修改 5 лет назад
README_CN.md markdown修改3 5 лет назад
TPMSBleSDK - iOS_English.docx Update message 5 лет назад
TPMSBleSDK - iOS中文.docx 增加markdown说明文档 5 лет назад
TPMSBleSDK发布说明.doc First version 5 лет назад

README.md

TPMSBleSDK instructions

中文版

Version Update time Author Update information
v1.0 2019/07/08 JosonXiong Preliminary version

Table of Contents

一、The conditions of use

  • Minimum version iOS 8.0
  • The Bluetooth version used by the device requires 4.0 and above.

    二、Use

  • Apply the key and secret of sdk, application address: http://sdk.aicare.net.cn;

  • Add “Privacy-Bluetooth Always Usage Description” to the info.plist file; 3.Import TPSMSleSDK.framework into the Xcode project.

  • Enter the following code in AppDelegate: ```

    import

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {     // Override point for customization after application launch.     [ELTPMSBleManager setAppKey:@“key” appSecret:@“secret”];     return YES; }

    5.Set the bitcode of the build setting to NO
    6.Import "#import <TPMSBleSDK/ELTPMSBleManager.h>" to the controller you want to use, and follow the "<ELTPMSBleManagerDelegate>" protocol.
    7.Set delegate
    

    [ELTPMSBleManager shareManager].delegate = self;

    8.Implementing proxy method
    

    -(void)TPMSBleManagerUpdateBleState:(TPMSBluetoothState)state; -(void)TPMSBleManagerReceiveData:(ELTPMSDataModel *_Nonnull)model; ```

三、Get broadcast data

1.Determine if the phone Bluetooth is available

Proxy method:

-(void)TPMSBleManagerUpdateBleState:(TPMSBluetoothState)state;

Get the current Bluetooth status Or

[ELTPMSBleManager shareManager].isOn

Get current Bluetooth enabled is available;

2.Start scanning

[[ELTPMSBleManager shareManager] startScan];

3.Stop scanning

[[ELTPMSBleManager shareManager] stopScan];

4.Method description

-(void)TPMSBleManagerUpdateBleState:(TPMSBluetoothState)state;

This method is used to get the current state of Bluetooth, where the parameter “state” is an enumeration TPMSBluetoothState    The enumerated elements include: TPMSBluetoothStateAvailable (Bluetooth on TPMSBluetoothStateUnavailable), TPMSBluetoothStateBroadcasting, TPMSBluetoothStateStopBroadcasting

 -(void)TPMSBleManagerReceiveData:(ELTPMSDataModel *_Nonnull)model;

This method is used to call back the TPMS Bluetooth module broadcast data. The model is an ELTPMSDataModel data model. For details on the ELTPMSDataModel class, please see “Remarks”.

四、Remarks

ELTPMSDataModel(Broadcast data model) |Type |Parameter |Description| |---- |-------: |----------:| |ELTPMSDataType|type|Type of data| |int|classID|Product number| |double|v|Voltage coefficient (unit: V)| |double |p|Pressure coefficient (unit: kPa)| |int |t|Temperature coefficient (unit: °C)| |ELTPMSDeviceState|state|Tire pressure status| |int| mcuVersion|MCU version number| |int |startCount|Operation counts| |int |stopCount| Number of sneak stops| |NSString|bleVersion|Bluetooth version number| |NSString |macAddress|MAC address| |NSString| name|Bluetooth name| |NSInteger|createTime|Time when data was received|

ELTPMSHeader.h(head File) Provide tire pressure unit, temperature unit, and the conversion method between units and the name symbol of the corresponding unit.