Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
larryzhang 2cde143f39 修改:1. doc,2. Swift Demo il y a 2 ans
Swift_TpmsBleSDKDemo 修改:1. doc,2. Swift Demo il y a 2 ans
TPMSBleSDKDemo 干掉验证用的Key和Secret il y a 4 ans
README.md 修改:1. doc,2. Swift Demo il y a 2 ans
README_CN.md 修改:1. doc,2. Swift Demo il y a 2 ans

README.md

TPMSBleSDK instructions

中文版

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

|v1.1.1 |2023/06/26 |Larry| Document filing |

Table of Contents

1st、The conditions of use

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

    2nd、Use

  • Import TPSMSleSDK.framework into the Xcode project.

  • Add “Privacy-Bluetooth Always Usage Description” to the info.plist file;

  • Import “#import ” to the controller you want to use, and follow the “” protocol.

  • Set delegate

    [ELTPMSBleManager shareManager].delegate = self;
    

    5.Implementing proxy method

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

3rd、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”.

4th、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.