#import <ThingSmartBLEDeviceProtocol.h>
◆ connectWithDeviceInfo:success:failure: [1/2]
Connects to a device.
- Parameters
-
deviceInfo | The Thing Bluetooth LE-based device object. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
◆ connectWithDeviceInfo:success:failure: [2/2]
Connects to a device.
- Parameters
-
deviceInfo | The Thing Bluetooth LE-based device object. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
◆ deviceOnlineState: [1/2]
Returns the local connection status of the Bluetooth LE device by deviceInfo.
- Parameters
-
deviceInfo | The Thing Bluetooth LE-based device object. |
- Returns
- The local connection status of the Bluetooth LE device.
◆ deviceOnlineState: [2/2]
Returns the local connection status of the Bluetooth LE device by deviceInfo.
- Parameters
-
deviceInfo | The Thing Bluetooth LE-based device object. |
- Returns
- The local connection status of the Bluetooth LE device.
◆ disconnectWithDeviceInfo:success:failure: [1/2]
Disconnects a device.
- Parameters
-
deviceInfo | The Thing Bluetooth LE-based device object. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
◆ disconnectWithDeviceInfo:success:failure: [2/2]
Disconnects a device.
- Parameters
-
deviceInfo | The Thing Bluetooth LE-based device object. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
◆ getBLECapabilityWithUUID:success:failure: [1/2]
Ability to acquire Bluetooth device: hexadecimal.
- Parameters
-
uuid | The device uuid. |
success | Called when the task finishes successfully. |
failure | Called when the task is interrupted by an error. |
◆ getBLECapabilityWithUUID:success:failure: [2/2]
Ability to acquire Bluetooth device: hexadecimal.
- Parameters
-
uuid | The device uuid. |
success | Called when the task finishes successfully. |
failure | Called when the task is interrupted by an error. |
◆ hasScannedBLEDeviceWithUUID: [1/2]
- (BOOL) hasScannedBLEDeviceWithUUID: |
|
(NSString *) |
uuid |
|
Has scanned the target device.
- Parameters
-
◆ hasScannedBLEDeviceWithUUID: [2/2]
- (BOOL) hasScannedBLEDeviceWithUUID: |
|
(NSString *) |
uuid |
|
Has scanned the target device.
- Parameters
-
◆ peripheralRSSI: [1/2]
Returns the Received Signal Strength Indicator (RSSI) value of the Bluetooth LE device.
- Parameters
-
deviceInfo | The Thing Bluetooth LE-based device object. |
- Returns
- The RSSI value of the Bluetooth LE device.
◆ peripheralRSSI: [2/2]
Returns the Received Signal Strength Indicator (RSSI) value of the Bluetooth LE device.
- Parameters
-
deviceInfo | The Thing Bluetooth LE-based device object. |
- Returns
- The RSSI value of the Bluetooth LE device.
◆ publishDpsWithDeviceInfo:dps:success:failure: [1/2]
Sends a DP.
- Parameters
-
deviceInfo | The Thing Bluetooth LE-based device object. |
dps | The DP dictionary. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
◆ publishDpsWithDeviceInfo:dps:success:failure: [2/2]
Sends a DP.
- Parameters
-
deviceInfo | The Thing Bluetooth LE-based device object. |
dps | The DP dictionary. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
◆ publishQueryDpCommand:dpIds:success:failure: [1/2]
Queries device DP data through Bluetooth channels.
- Parameters
-
deviceInfo | The Thing Bluetooth LE-based device object. |
dpIds | The array of DP IDs to be queried. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
◆ publishQueryDpCommand:dpIds:success:failure: [2/2]
Queries device DP data through Bluetooth channels.
- Parameters
-
deviceInfo | The Thing Bluetooth LE-based device object. |
dpIds | The array of DP IDs to be queried. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
◆ removeWithDeviceInfo:success:failure: [1/2]
Removes a device.
- Parameters
-
deviceInfo | The Thing Bluetooth LE-based device object. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
◆ removeWithDeviceInfo:success:failure: [2/2]
Removes a device.
- Parameters
-
deviceInfo | The Thing Bluetooth LE-based device object. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
◆ resetWithDeviceInfo:success:failure: [1/2]
Restores factory settings
- Parameters
-
deviceInfo | The Thing Bluetooth LE-based device object. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
◆ resetWithDeviceInfo:success:failure: [2/2]
Restores factory settings
- Parameters
-
deviceInfo | The Thing Bluetooth LE-based device object. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
◆ sendOTAPackWithDeviceInfo:otaData:otaType:otaVersion:success:failure: [1/2]
Sends an OTA package to update the firmware.
The values of otaData
, otaType
, and otaVersion
can be obtained from ThingSmartFirmwareUpgradeModel. You can get ThingSmartFirmwareUpgradeModel by using getFirmwareUpgradeInfo:failure: (ThingSmartDevice).
- Note
- Your device must be connected over Bluetooth before the update.
- Parameters
-
deviceInfo | The Thing Bluetooth LE-based device object. |
otaData | The OTA package data. |
otaType | The OTA update type. |
otaVersion | The OTA version. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
◆ sendOTAPackWithDeviceInfo:otaData:otaType:otaVersion:success:failure: [2/2]
Sends an OTA package to update the firmware.
The values of otaData
, otaType
, and otaVersion
can be obtained from ThingSmartFirmwareUpgradeModel. You can get ThingSmartFirmwareUpgradeModel by using getFirmwareUpgradeInfo:failure: (ThingSmartDevice).
- Note
- Your device must be connected over Bluetooth before the update.
- Parameters
-
deviceInfo | The Thing Bluetooth LE-based device object. |
otaData | The OTA package data. |
otaType | The OTA update type. |
otaVersion | The OTA version. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
The documentation for this protocol was generated from the following files:
- /Users/humtong/Downloads/Pods_副本/ThingSmartBLECoreKit/Build/ThingSmartBLECoreKit.xcframework/ios-arm64_x86_64-simulator/ThingSmartBLECoreKit.framework/Headers/ThingSmartBLEDeviceProtocol.h
- /Users/humtong/Downloads/Pods_副本/ThingSmartBLECoreKit/Build/ThingSmartBLECoreKit.xcframework/ios-arm64/ThingSmartBLECoreKit.framework/Headers/ThingSmartBLEDeviceProtocol.h