Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
iot_user 9117582a48 干掉验证用的Key和Secret 4 роки тому
TPMSBleSDKDemo 干掉验证用的Key和Secret 4 роки тому
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.