![]() |
Tuya iOS Smart Life App SDK 5.15.0
|
ThingSmartBLEManager provides methods to manage Bluetooth LE devices by using multiple functions, such as activation, device control, and OTA updates. More...
#import <ThingSmartBLEManager.h>
Class Methods | |
(instancetype) | + sharedInstance |
The single instance. More... | |
(instancetype) | + sharedInstance |
The single instance. More... | |
Properties | |
BOOL | isPoweredOn |
A Boolean value that indicates whether the mobile phone's Bluetooth is enabled or disabled. More... | |
BOOL | disableBLECapability |
Whether to disable bluetooth. Default NO. More... | |
id< ThingSmartBLEManagerDelegate > | delegate |
The delegate for scanning and notifications of Bluetooth status changes. More... | |
id< ThingSmartBLELocalDataDelegate > | localDataDelegate |
id< ThingSmartBLEAlexaAudioDelegate > | alexaAudioDelegate |
id< ThingSmartBLEAudioNotifyDelegate > | commonAudioDelegate |
id< ThingBLEFindMacDelegate > | findMacDelegatel |
ThingFailureHandler | failureHandler |
void(^ | success )(id deviceModel) |
NSString * | currentDialogId |
NSMutableDictionary * | resultDic |
ThingBLEScanHandler | scanHandler |
ThingSmartBLEManager provides methods to manage Bluetooth LE devices by using multiple functions, such as activation, device control, and OTA updates.
The types of OTA updates: firmware and MCU.
Definition at line 174 of file ThingSmartBLEManager.h.
- (void) activateExtendedModule: | (NSString *) | devId | |
automatic: | (BOOL) | automatic | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
Activate the extended module. If it is WiFi, it will return an error because the SSID and password are not entered
devId | device id |
automatic | activate mode. If NO, need to wait for the result of MQTT response activation |
success | If successfully activated, this block is called. |
failure | If activation fails, this block calls back an error |
Provided by category ThingSmartBLEManager(Biz).
- (void) activateExtendedModule: | (NSString *) | devId | |
automatic: | (BOOL) | automatic | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
Activate the extended module. If it is WiFi, it will return an error because the SSID and password are not entered
devId | device id |
automatic | activate mode. If NO, need to wait for the result of MQTT response activation |
success | If successfully activated, this block is called. |
failure | If activation fails, this block calls back an error |
Provided by category ThingSmartBLEManager(Biz).
- (void) activateExtendedWiFiModule: | (NSString *) | devId | |
automatic: | (BOOL) | automatic | |
ssid: | (NSString *) | ssid | |
password: | (NSString *) | pwd | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
Activate the extended WiFi module. SSID and password required.
devId | device id |
automatic | activate mode. If NO, need to wait for the result of MQTT response activation |
ssid | WiFi SSID |
pwd | WiFi password |
success | If successfully activated, this block is called. |
failure | If activation fails, this block calls back an error |
Provided by category ThingSmartBLEManager(Biz).
- (void) activateExtendedWiFiModule: | (NSString *) | devId | |
automatic: | (BOOL) | automatic | |
ssid: | (NSString *) | ssid | |
password: | (NSString *) | pwd | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
Activate the extended WiFi module. SSID and password required.
devId | device id |
automatic | activate mode. If NO, need to wait for the result of MQTT response activation |
ssid | WiFi SSID |
pwd | WiFi password |
success | If successfully activated, this block is called. |
failure | If activation fails, this block calls back an error |
Provided by category ThingSmartBLEManager(Biz).
- (void) activatorDualDeviceWithBleChannel: | (ThingBLEAdvModel *) | advModel | |
homeId: | (long long) | homeId | |
token: | (NSString *) | token | |
success: | (void(^)(ThingSmartDeviceModel *deviceModel)) | success | |
failure: | (ThingFailureError) | failure | |
Activates the Bluetooth mode for a dual-mode device.
advModel | The device advertisement model. |
homeId | The ID of the current home. |
token | The token. |
success | Called when the task is finished. DeviceModel is returned. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(PlugPlay).
- (void) activatorDualDeviceWithBleChannel: | (ThingBLEAdvModel *) | advModel | |
homeId: | (long long) | homeId | |
token: | (NSString *) | token | |
success: | (void(^)(ThingSmartDeviceModel *deviceModel)) | success | |
failure: | (ThingFailureError) | failure | |
Activates the Bluetooth mode for a dual-mode device.
advModel | The device advertisement model. |
homeId | The ID of the current home. |
token | The token. |
success | Called when the task is finished. DeviceModel is returned. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(PlugPlay).
- (void) activatorZigbeeSubDeviceWithBleChannel: | (id< ThingBLEDeviceInfoProtocol >) | dev | |
homeId: | (long long) | homeId | |
success: | (ThingSuccessID) | success | |
failure: | (ThingFailureError) | failure | |
Provided by category ThingSmartBLEManager(PlugPlay).
- (void) activatorZigbeeSubDeviceWithBleChannel: | (id< ThingBLEDeviceInfoProtocol >) | dev | |
homeId: | (long long) | homeId | |
success: | (ThingSuccessID) | success | |
failure: | (ThingFailureError) | failure | |
Provided by category ThingSmartBLEManager(PlugPlay).
- (void) activeBLE: | (ThingBLEAdvModel *) | deviceInfo | |
homeId: | (long long) | homeId | |
success: | (nullable void(^)(ThingSmartDeviceModel *deviceModel)) | success | |
failure: | (nullable ThingFailureHandler) | failure | |
Activates the Bluetooth LE device.
deviceInfo | The advertisingData model for the Bluetooth LE device. |
homeId | The ID for the current home. |
success | Called when the task is finished. DeviceModel is returned. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) activeBLE: | (ThingBLEAdvModel *) | deviceInfo | |
homeId: | (long long) | homeId | |
success: | (nullable void(^)(ThingSmartDeviceModel *deviceModel)) | success | |
failure: | (nullable ThingFailureHandler) | failure | |
Activates the Bluetooth LE device.
deviceInfo | The advertisingData model for the Bluetooth LE device. |
homeId | The ID for the current home. |
success | Called when the task is finished. DeviceModel is returned. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) activeBLEWithAdvertisingData: | (NSData *) | advertisingData | |
homeId: | (long long) | homeId | |
success: | (void(^)(ThingSmartDeviceModel *deviceModel)) | success | |
failure: | (ThingFailureHandler) | failure | |
Activates the Bluetooth LE device.
advertisingData | The advertisingData model for the Bluetooth LE device. |
homeId | The ID for the current home. |
success | Called when the task is finished. DeviceModel is returned. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) activeBLEWithAdvertisingData: | (NSData *) | advertisingData | |
homeId: | (long long) | homeId | |
success: | (void(^)(ThingSmartDeviceModel *deviceModel)) | success | |
failure: | (ThingFailureHandler) | failure | |
Activates the Bluetooth LE device.
advertisingData | The advertisingData model for the Bluetooth LE device. |
homeId | The ID for the current home. |
success | Called when the task is finished. DeviceModel is returned. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) activeBLEWithDevice: | (id< ThingBLEDeviceInfoProtocol >) | deviceInfo | |
handlerDelegate: | (id< ThingSmartBLEActiveDelegate >) | handlerDelegate | |
Active device.
- (void) activeBLEWithDevice: | (id< ThingBLEDeviceInfoProtocol >) | deviceInfo | |
handlerDelegate: | (id< ThingSmartBLEActiveDelegate >) | handlerDelegate | |
Active device.
- (void) activeBLEWithUUID: | (NSString *) | uuid | |
homeId: | (long long) | homeId | |
productKey: | (NSString *) | productKey | |
success: | (nullable void(^)(ThingSmartDeviceModel *deviceModel)) | success | |
failure: | ("This method is) | deprecated | |
(Use ThingSmartBLEManager::activeBLE:homeId:success:failure instead") | __deprecated_msg | ||
Activates the Bluetooth LE device.
uuid | The UUID of the device. |
homeId | The ID of the current home. |
productKey | The product ID of the device. |
success | Called when the task is finished. DeviceModel is returned. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) activeBLEWithUUID: | (NSString *) | uuid | |
homeId: | (long long) | homeId | |
productKey: | (NSString *) | productKey | |
success: | (nullable void(^)(ThingSmartDeviceModel *deviceModel)) | success | |
failure: | ("This method is) | deprecated | |
(Use ThingSmartBLEManager::activeBLE:homeId:success:failure instead") | __deprecated_msg | ||
Activates the Bluetooth LE device.
uuid | The UUID of the device. |
homeId | The ID of the current home. |
productKey | The product ID of the device. |
success | Called when the task is finished. DeviceModel is returned. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) activeDualDeviceWifiChannel: | (NSString *) | devId | |
ssid: | (NSString *) | ssid | |
password: | (NSString *) | password | |
timeout: | (NSTimeInterval) | timeout | |
success: | (void(^)(ThingSmartDeviceModel *deviceModel)) | success | |
failure: | (ThingFailureError) | failure | |
Activates the Wi-Fi channel of a dual-mode device for which the Bluetooth channel is activated.
devId | The device ID. |
ssid | The name of the router. |
password | The password for the device. |
timeout | The timeout value. |
success | Called when the task is finished. DeviceModel is returned. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(PlugPlay).
- (void) activeDualDeviceWifiChannel: | (NSString *) | devId | |
ssid: | (NSString *) | ssid | |
password: | (NSString *) | password | |
timeout: | (NSTimeInterval) | timeout | |
success: | (void(^)(ThingSmartDeviceModel *deviceModel)) | success | |
failure: | (ThingFailureError) | failure | |
Activates the Wi-Fi channel of a dual-mode device for which the Bluetooth channel is activated.
devId | The device ID. |
ssid | The name of the router. |
password | The password for the device. |
timeout | The timeout value. |
success | Called when the task is finished. DeviceModel is returned. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(PlugPlay).
- (void) appApplyLaunch: | (NSString *) | uuid |
The app requests to start a big data transfer.
uuid | The UUID of the device. |
Provided by category ThingSmartBLEManager(Channel).
- (void) appApplyLaunch: | (NSString *) | uuid |
The app requests to start a big data transfer.
uuid | The UUID of the device. |
Provided by category ThingSmartBLEManager(Channel).
- (BOOL) appMandatoryTrans: | (NSString *) | uuid |
The app forcibly terminates data transmission.
uuid | The UUID of the device. |
Provided by category ThingSmartBLEManager(Channel).
- (BOOL) appMandatoryTrans: | (NSString *) | uuid |
The app forcibly terminates data transmission.
uuid | The UUID of the device. |
Provided by category ThingSmartBLEManager(Channel).
- (void) bindSlaveDeviceWithSlaveDeviceId: | (NSString *) | slaveDeviceId | |
masterDeviceId: | (NSString *) | masterDeviceId | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
Bind master-slave devices
slaveDeviceId | slave device id @par5rDeviceId master device id |
success | If successfully bind, this block is called. |
failure | If bind fails, this block calls back an error |
Provided by category ThingSmartBLEManager(Biz).
- (void) bindSlaveDeviceWithSlaveDeviceId: | (NSString *) | slaveDeviceId | |
masterDeviceId: | (NSString *) | masterDeviceId | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
Bind master-slave devices
slaveDeviceId | slave device id @par5rDeviceId master device id |
success | If successfully bind, this block is called. |
failure | If bind fails, this block calls back an error |
Provided by category ThingSmartBLEManager(Biz).
- (BOOL) bleCapabilityIsSupport: | (ThingSmartBLECapability) | i | |
hex: | (NSString *) | hex | |
Get Bluetooth device capability value.This method is used to analyze the Bluetooth capability of the device.
i | Enumeration value of Bluetooth capability to be obtained |
hex | The ability to analyze |
- (BOOL) bleCapabilityIsSupport: | (ThingSmartBLECapability) | i | |
hex: | (NSString *) | hex | |
Get Bluetooth device capability value.This method is used to analyze the Bluetooth capability of the device.
i | Enumeration value of Bluetooth capability to be obtained |
hex | The ability to analyze |
- (id< ThingSmartBLEVoiceDelegate >) buildVoiceEntityWithType: | (ThingSmartVoiceType) | voiceType |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (id< ThingSmartBLEVoiceDelegate >) buildVoiceEntityWithType: | (ThingSmartVoiceType) | voiceType |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (BOOL) checkBLEStatus |
- (BOOL) checkBLEStatus |
- (void) clearAuthorizationToken: | (NSString *) | deviceId | |
success: | (ThingSuccessHandler) | success | |
failure: | (ThingFailureError) | failure | |
alexa clear AuthorizationToken
deviceId | device id |
success | success |
failure | failure |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) clearAuthorizationToken: | (NSString *) | deviceId | |
success: | (ThingSuccessHandler) | success | |
failure: | (ThingFailureError) | failure | |
alexa clear AuthorizationToken
deviceId | device id |
success | success |
failure | failure |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) connectBLEWithUUID: | (NSString *) | uuid | |
productKey: | (NSString *) | productKey | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureHandler) | failure | |
Connects to a device.
uuid | The UUID of the device. |
productKey | The product ID of the device. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) connectBLEWithUUID: | (NSString *) | uuid | |
productKey: | (NSString *) | productKey | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureHandler) | failure | |
Connects to a device.
uuid | The UUID of the device. |
productKey | The product ID of the device. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) connectWithDeviceInfo: | (id< ThingBLEDeviceInfoProtocol >) | deviceInfo | |
capability: | (NSUInteger) | capability | |
productId: | (NSString *) | productId | |
localKey: | (NSString *) | localKey | |
configMetas: | (NSDictionary *) | configMetas | |
handlerDelegate: | (id< ThingSmartBLEActiveDelegate >) | handlerDelegate | |
scanHandler: | (nullable ThingBLEScanHandler) | scanHandler | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureHandler) | failure | |
- (void) connectWithDeviceInfo: | (id< ThingBLEDeviceInfoProtocol >) | deviceInfo | |
capability: | (NSUInteger) | capability | |
productId: | (NSString *) | productId | |
localKey: | (NSString *) | localKey | |
configMetas: | (NSDictionary *) | configMetas | |
handlerDelegate: | (id< ThingSmartBLEActiveDelegate >) | handlerDelegate | |
scanHandler: | (nullable ThingBLEScanHandler) | scanHandler | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureHandler) | failure | |
- (void) connectWithDeviceInfo: | (id< ThingBLEDeviceInfoProtocol >) | deviceInfo | |
localKey: | ("This method is) | deprecated | |
(please use connectWithDeviceInfo:localKey:secKey:sign:") | __deprecated_msg | ||
- (void) connectWithDeviceInfo: | (id< ThingBLEDeviceInfoProtocol >) | deviceInfo | |
localKey: | ("This method is) | deprecated | |
(please use connectWithDeviceInfo:localKey:secKey:sign:") | __deprecated_msg | ||
- (void) connectWithDeviceInfo: | (id< ThingBLEDeviceInfoProtocol >) | deviceInfo | |
localKey: | (NSString *) | localKey | |
secKey: | (nullable NSString *) | secKey | |
sign: | (NSString *) | sign | |
- (void) connectWithDeviceInfo: | (id< ThingBLEDeviceInfoProtocol >) | deviceInfo | |
localKey: | (NSString *) | localKey | |
secKey: | (nullable NSString *) | secKey | |
sign: | (NSString *) | sign | |
- (void) connectWithDeviceInfo: | (id< ThingBLEDeviceInfoProtocol >) | deviceInfo | |
localKey: | (NSString *) | localKey | |
secKey: | (nullable NSString *) | secKey | |
sign: | (NSString *) | sign | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureHandler) | failure | |
- (void) connectWithDeviceInfo: | (id< ThingBLEDeviceInfoProtocol >) | deviceInfo | |
localKey: | (NSString *) | localKey | |
secKey: | (nullable NSString *) | secKey | |
sign: | (NSString *) | sign | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureHandler) | failure | |
- (void) connectWithParamsModel: | (ThingSmartBleConnectParams *) | paramsModel | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureHandler) | failure | |
- (void) connectWithParamsModel: | (ThingSmartBleConnectParams *) | paramsModel | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureHandler) | failure | |
- (void) connectWithUUID: | (NSString *) | uuid | |
capability: | (NSUInteger) | capability | |
productId: | (NSString *) | productId | |
localKey: | (NSString *) | localKey | |
configMetas: | (NSDictionary *) | configMetas | |
handlerDelegate: | (id< ThingSmartBLEActiveDelegate >) | handlerDelegate | |
scanHandler: | (nullable ThingBLEScanHandler) | handler | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | ("This method is) | deprecated | |
(Use connectWithDeviceInfo:capability:productId:localKey:configMetas:handlerDelegate:scanHandler:success:failure:instead") | __deprecated_msg | ||
- (void) connectWithUUID: | (NSString *) | uuid | |
capability: | (NSUInteger) | capability | |
productId: | (NSString *) | productId | |
localKey: | (NSString *) | localKey | |
configMetas: | (NSDictionary *) | configMetas | |
handlerDelegate: | (id< ThingSmartBLEActiveDelegate >) | handlerDelegate | |
scanHandler: | (nullable ThingBLEScanHandler) | handler | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | ("This method is) | deprecated | |
(Use connectWithDeviceInfo:capability:productId:localKey:configMetas:handlerDelegate:scanHandler:success:failure:instead") | __deprecated_msg | ||
- (void) deleteBleBigDataChannel: | (NSString *) | devId | |
success: | (ThingSuccessHandler) | success | |
failure: | (ThingFailureError) | failure | |
Send delete command to the BLE device, which delete data in device and will delete cache data. @Param devId The device Id for the device.
success | When successfully, this block will be called success. |
failure | This block will be called if some error occurred. |
Provided by category ThingSmartBLEManager(BigData).
- (void) deleteBleBigDataChannel: | (NSString *) | devId | |
success: | (ThingSuccessHandler) | success | |
failure: | (ThingFailureError) | failure | |
Send delete command to the BLE device, which delete data in device and will delete cache data. @Param devId The device Id for the device.
success | When successfully, this block will be called success. |
failure | This block will be called if some error occurred. |
Provided by category ThingSmartBLEManager(BigData).
- (BOOL) deviceStatueWithUUID: | (NSString *) | uuid |
Returns the local connection status of the Bluetooth LE device by device UUID.
uuid | The UUID of the device. |
Provided by category ThingSmartBLEManager(Biz).
- (BOOL) deviceStatueWithUUID: | (NSString *) | uuid |
Returns the local connection status of the Bluetooth LE device by device UUID.
uuid | The UUID of the device. |
Provided by category ThingSmartBLEManager(Biz).
- (void) disconnectAllBleDevicesExcludeDevIds: | (nullable NSArray< NSString * > *) | excludeDevIds |
Disconnect all ble devices exclud some devices.
excludeDevIds | no need disconnect ble devices. |
Provided by category ThingSmartBLEManager(Biz).
- (void) disconnectAllBleDevicesExcludeDevIds: | (nullable NSArray< NSString * > *) | excludeDevIds |
Disconnect all ble devices exclud some devices.
excludeDevIds | no need disconnect ble devices. |
Provided by category ThingSmartBLEManager(Biz).
- (void) disconnectBLEWithUUID: | (NSString *) | uuid | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
Disconnects a device.
uuid | The UUID of the device. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) disconnectBLEWithUUID: | (NSString *) | uuid | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
Disconnects a device.
uuid | The UUID of the device. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) disconnectWithDeviceInfo: | (id< ThingBLEDeviceInfoProtocol >) | deviceInfo | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
Disconnect device
deviceInfo | The deviceInfo. |
success | When disconnect successfully, this block will be called success. |
failure | This block will be called if some error occurred. |
- (void) disconnectWithDeviceInfo: | (id< ThingBLEDeviceInfoProtocol >) | deviceInfo | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
Disconnect device
deviceInfo | The deviceInfo. |
success | When disconnect successfully, this block will be called success. |
failure | This block will be called if some error occurred. |
- (void) disconnectWithUUID: | (NSString *) | uuid | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | ("This method is) | deprecated | |
(Use disconnectWithDeviceInfo:success:failure:instead") | __deprecated_msg | ||
Disconnect device
uuid | The UUID for the device. |
success | When disconnect successfully, this block will be called success. |
failure | This block will be called if some error occurred. |
- (void) disconnectWithUUID: | (NSString *) | uuid | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | ("This method is) | deprecated | |
(Use disconnectWithDeviceInfo:success:failure:instead") | __deprecated_msg | ||
Disconnect device
uuid | The UUID for the device. |
success | When disconnect successfully, this block will be called success. |
failure | This block will be called if some error occurred. |
- (void) fetchResetKeyWithUUID: | (NSString *) | UUID | |
shortUrl: | (NSString *) | shortUrl | |
success: | (nullable ThingSmartBLEDevcieCheckHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
Provided by category ThingSmartBLEManager(QRCode).
- (void) fetchResetKeyWithUUID: | (NSString *) | UUID | |
shortUrl: | (NSString *) | shortUrl | |
success: | (nullable ThingSmartBLEDevcieCheckHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
Provided by category ThingSmartBLEManager(QRCode).
- (void) forceDeleteWithDeviceInfo: | (id< ThingBLEDeviceInfoProtocol >) | deviceInfo | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
- (void) forceDeleteWithDeviceInfo: | (id< ThingBLEDeviceInfoProtocol >) | deviceInfo | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
- (void) getAudioVoiceAuthorizationToken: | (ThingAudioTokenType) | type | |
deviceId: | (NSString *) | deviceId | |
success: | (ThingSuccessTokenModel) | success | |
failure: | (ThingFailureError) | failure | |
alexa audio voice AuthorizationToken
type | type |
deviceId | deviceId |
success | success |
failure | failure |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) getAudioVoiceAuthorizationToken: | (ThingAudioTokenType) | type | |
deviceId: | (NSString *) | deviceId | |
success: | (ThingSuccessTokenModel) | success | |
failure: | (ThingFailureError) | failure | |
alexa audio voice AuthorizationToken
type | type |
deviceId | deviceId |
success | success |
failure | failure |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) getBLECapabilityWithUUID: | (NSString *) | uuid | |
success: | (nullable ThingSuccessString) | success | |
failure: | (nullable ThingFailureError) | failure | |
Get device capability through Bluetooth channel.
uuid | The device uuid. |
success | Called when the task finishes successfully. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) getBLECapabilityWithUUID: | (NSString *) | uuid | |
success: | (nullable ThingSuccessString) | success | |
failure: | (nullable ThingFailureError) | failure | |
Get device capability through Bluetooth channel.
uuid | The device uuid. |
success | Called when the task finishes successfully. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (NSInteger) getExtModuleType: | (NSString *) | devId |
Provided by category ThingSmartBLEManager(Biz).
- (NSInteger) getExtModuleType: | (NSString *) | devId |
Provided by category ThingSmartBLEManager(Biz).
- (NSInteger) getPeripheralRSSI: | (NSString *) | uuid |
Returns the RSSI value of the Bluetooth LE device.
uuid | The UUID of the device. |
Provided by category ThingSmartBLEManager(Biz).
- (NSInteger) getPeripheralRSSI: | (NSString *) | uuid |
Returns the RSSI value of the Bluetooth LE device.
uuid | The UUID of the device. |
Provided by category ThingSmartBLEManager(Biz).
- (void) handActiveFittingWithMainDeviceId: | (NSString *) | deviceId |
Initiative activation fitting
deviceId | main device Id |
Provided by category ThingSmartBLEManager(Biz).
- (void) handActiveFittingWithMainDeviceId: | (NSString *) | deviceId |
Initiative activation fitting
deviceId | main device Id |
Provided by category ThingSmartBLEManager(Biz).
- (BOOL) isBLEChannelDeviceConnect: | (NSString *) | uuid |
Indicates whether the device is connected.
uuid | The UUID for the device. |
Provided by category ThingSmartBLEManager(Channel).
- (BOOL) isBLEChannelDeviceConnect: | (NSString *) | uuid |
Indicates whether the device is connected.
uuid | The UUID for the device. |
Provided by category ThingSmartBLEManager(Channel).
- (void) notifyWithDeviceId: | (NSString *) | deviceId | |
notifyValue: | (BOOL) | enabled | |
serviceUUID: | (NSString *) | serviceUUID | |
charactUUID: | (NSString *) | characteristicUUID | |
completion: | (ThingBLECentralCallback) | callback | |
setNotify to a Bluetooth device.
deviceId | device Id |
enabled | transmit data |
serviceUUID | the service value for service. |
characteristicUUID | he characteristic whose characteristic value will be notify. |
callback | callback |
Provided by category ThingSmartBLEManager(CustomChannel).
- (void) notifyWithDeviceId: | (NSString *) | deviceId | |
notifyValue: | (BOOL) | enabled | |
serviceUUID: | (NSString *) | serviceUUID | |
charactUUID: | (NSString *) | characteristicUUID | |
completion: | (ThingBLECentralCallback) | callback | |
setNotify to a Bluetooth device.
deviceId | device Id |
enabled | transmit data |
serviceUUID | the service value for service. |
characteristicUUID | he characteristic whose characteristic value will be notify. |
callback | callback |
Provided by category ThingSmartBLEManager(CustomChannel).
- (BOOL) otaUpgradeStatusWithUUID: | (NSString *) | uuid |
Get whether Bluetooth is currently being OTA upgraded.
uuid | The device uuid. |
Provided by category ThingSmartBLEManager(Biz).
- (BOOL) otaUpgradeStatusWithUUID: | (NSString *) | uuid |
Get whether Bluetooth is currently being OTA upgraded.
uuid | The device uuid. |
Provided by category ThingSmartBLEManager(Biz).
- (BOOL) pairBLEAdvertisingData: | (NSData *) | advertisingData |
- (BOOL) pairBLEAdvertisingData: | (NSData *) | advertisingData |
- (void) postBleBigDataChannel: | (NSString *) | devId | |
params: | (NSDictionary *) | paramsDict | |
progress: | (nullable ThingBLEBigDataProgressBlock) | progress | |
success: | (ThingSuccessDict) | success | |
failure: | (ThingFailureError) | failure | |
Sending parameters data to the BLE device, whilc make device report data through big data channels.
devId | The device Id for the device. |
paramsDict | A dictionary of parameter, defined by the protocol party. |
progress | This progress block will be called if report data revicein,progress value is 0-100. |
success | When successfully, this block will be called success. |
failure | This block will be called if some error occurred. |
Provided by category ThingSmartBLEManager(BigData).
- (void) postBleBigDataChannel: | (NSString *) | devId | |
params: | (NSDictionary *) | paramsDict | |
progress: | (nullable ThingBLEBigDataProgressBlock) | progress | |
success: | (ThingSuccessDict) | success | |
failure: | (ThingFailureError) | failure | |
Sending parameters data to the BLE device, whilc make device report data through big data channels.
devId | The device Id for the device. |
paramsDict | A dictionary of parameter, defined by the protocol party. |
progress | This progress block will be called if report data revicein,progress value is 0-100. |
success | When successfully, this block will be called success. |
failure | This block will be called if some error occurred. |
Provided by category ThingSmartBLEManager(BigData).
- (void) postBleBigDataChannel: | (NSString *) | devId | |
params: | (NSDictionary *) | paramsDict | |
receivedDpsProgress: | (nullable ThingBLEBigDataProgressBlock) | receivedDpsProgress | |
receivedDps: | (nullable void(^)(NSArray< NSDictionary * > *dpsArray)) | receivedDps | |
uploadClouldProgress: | (nullable ThingBLEBigDataProgressBlock) | uploadClouldProgress | |
success: | (ThingSuccessDict) | success | |
failure: | (ThingFailureError) | failure | |
Sending parameters data to the BLE device, whilc make device report data through big data channels.
devId | The device Id for the device. |
paramsDict | A dictionary of parameter, defined by the protocol party. |
receivedDpsProgress | This progress block will be called if report data revicein,progress value is 0-100. |
receivedDps | receivedDps will be called when the dps have been sent from device completed.. |
uploadClouldProgress | progress of upload cloud,progress value is 0-100. |
success | When successfully, this block will be called success. |
failure | This block will be called if some error occurred. |
Provided by category ThingSmartBLEManager(BigData).
- (void) postBleBigDataChannel: | (NSString *) | devId | |
params: | (NSDictionary *) | paramsDict | |
receivedDpsProgress: | (nullable ThingBLEBigDataProgressBlock) | receivedDpsProgress | |
receivedDps: | (nullable void(^)(NSArray< NSDictionary * > *dpsArray)) | receivedDps | |
uploadClouldProgress: | (nullable ThingBLEBigDataProgressBlock) | uploadClouldProgress | |
success: | (ThingSuccessDict) | success | |
failure: | (ThingFailureError) | failure | |
Sending parameters data to the BLE device, whilc make device report data through big data channels.
devId | The device Id for the device. |
paramsDict | A dictionary of parameter, defined by the protocol party. |
receivedDpsProgress | This progress block will be called if report data revicein,progress value is 0-100. |
receivedDps | receivedDps will be called when the dps have been sent from device completed.. |
uploadClouldProgress | progress of upload cloud,progress value is 0-100. |
success | When successfully, this block will be called success. |
failure | This block will be called if some error occurred. |
Provided by category ThingSmartBLEManager(BigData).
- (void) postBleBigDataChannel: | (NSString *) | devId | |
params: | (NSDictionary *) | paramsDict | |
success: | (ThingSuccessHandler) | success | |
failure: | ("This method is) | deprecated | |
(Use postBleBigDataChannel:params:progress:success:failure:instead") | __deprecated_msg | ||
Sending parameters data to the BLE device, whilc make device report data through big data channels.
devId | The device Id for the device. |
paramsDict | A dictionary of parameter, defined by the protocol party. |
success | When successfully, this block will be called success. |
failure | This block will be called if some error occurred. |
Provided by category ThingSmartBLEManager(BigData).
- (void) postBleBigDataChannel: | (NSString *) | devId | |
params: | (NSDictionary *) | paramsDict | |
success: | (ThingSuccessHandler) | success | |
failure: | ("This method is) | deprecated | |
(Use postBleBigDataChannel:params:progress:success:failure:instead") | __deprecated_msg | ||
Sending parameters data to the BLE device, whilc make device report data through big data channels.
devId | The device Id for the device. |
paramsDict | A dictionary of parameter, defined by the protocol party. |
success | When successfully, this block will be called success. |
failure | This block will be called if some error occurred. |
Provided by category ThingSmartBLEManager(BigData).
- (void) publishAudioEndpoint: | (NSString *) | deviceId | |
dialogId: | (NSString *) | dialogId | |
alexa audio endpoint
deviceId | device id |
dialogId | dialog id |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) publishAudioEndpoint: | (NSString *) | deviceId | |
dialogId: | (NSString *) | dialogId | |
alexa audio endpoint
deviceId | device id |
dialogId | dialog id |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) publishAudioMD5Token: | (NSString *) | md5Token | |
token: | (NSString *) | token | |
deviceId: | ("This method is) | deprecated | |
(Use publishAudioMD5Token:token:deviceId:success:failure:instead") | __deprecated_msg | ||
alexa md5 token
md5Token | md5Token |
token | token |
deviceId | device id |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) publishAudioMD5Token: | (NSString *) | md5Token | |
token: | (NSString *) | token | |
deviceId: | ("This method is) | deprecated | |
(Use publishAudioMD5Token:token:deviceId:success:failure:instead") | __deprecated_msg | ||
alexa md5 token
md5Token | md5Token |
token | token |
deviceId | device id |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) publishAudioMD5Token: | (NSString *) | md5Token | |
token: | (NSString *) | token | |
deviceId: | (NSString *) | deviceId | |
success: | (ThingSuccessHandler) | success | |
failure: | (ThingFailureError) | failure | |
Pulish alexa md5 token
md5Token | md5 token |
token | token |
deviceId | deviceId |
success | success |
failure | failure |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) publishAudioMD5Token: | (NSString *) | md5Token | |
token: | (NSString *) | token | |
deviceId: | (NSString *) | deviceId | |
success: | (ThingSuccessHandler) | success | |
failure: | (ThingFailureError) | failure | |
Pulish alexa md5 token
md5Token | md5 token |
token | token |
deviceId | deviceId |
success | success |
failure | failure |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) publishAudioProvideSpeech: | (NSString *) | deviceId | |
dialogId: | (NSString *) | dialogId | |
alexa provide speech
deviceId | device id |
dialogId | dialog id |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) publishAudioProvideSpeech: | (NSString *) | deviceId | |
dialogId: | (NSString *) | dialogId | |
alexa provide speech
deviceId | device id |
dialogId | dialog id |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) publishAudioResult: | (id) | result | |
type: | (ThingAudioResultType) | type | |
deviceId: | (NSString *) | deviceId | |
alexa audio result
result | result |
type | type |
deviceId | device id |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) publishAudioResult: | (id) | result | |
type: | (ThingAudioResultType) | type | |
deviceId: | (NSString *) | deviceId | |
alexa audio result
result | result |
type | type |
deviceId | device id |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) publishAudioSpeechState: | (ThingSmartAudioState) | state | |
deviceId: | (NSString *) | deviceId | |
alex speech state
state | state |
deviceId | devic id |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) publishAudioSpeechState: | (ThingSmartAudioState) | state | |
deviceId: | (NSString *) | deviceId | |
alex speech state
state | state |
deviceId | devic id |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) publishAudioStartSpeech: | (int) | status | |
deviceId: | (NSString *) | deviceId | |
dialogId: | (NSString *) | dialogId | |
alexa start speedch
status | status |
deviceId | deviceId |
dialogId | dialog Id |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) publishAudioStartSpeech: | (int) | status | |
deviceId: | (NSString *) | deviceId | |
dialogId: | (NSString *) | dialogId | |
alexa start speedch
status | status |
deviceId | deviceId |
dialogId | dialog Id |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) publishAudioStopSpeech: | (ThingAudioErrorCode) | errorCode | |
deviceId: | (NSString *) | deviceId | |
dialogId: | (NSString *) | dialogId | |
alexa stop speech
errorCode | error code |
deviceId | device Id |
dialogId | dialog Id |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) publishAudioStopSpeech: | (ThingAudioErrorCode) | errorCode | |
deviceId: | (NSString *) | deviceId | |
dialogId: | (NSString *) | dialogId | |
alexa stop speech
errorCode | error code |
deviceId | device Id |
dialogId | dialog Id |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) publishBleTransparentData: | (NSString *) | devId | |
data: | (NSData *) | data | |
success: | (nullable ThingSuccessData) | success | |
failure: | (nullable ThingFailureError) | failure | |
Publishes the transmitted data.
devId | The device ID. |
data | The data to be transmitted to the device. |
success | The data that is returned by the device. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) publishBleTransparentData: | (NSString *) | devId | |
data: | (NSData *) | data | |
success: | (nullable ThingSuccessData) | success | |
failure: | (nullable ThingFailureError) | failure | |
Publishes the transmitted data.
devId | The device ID. |
data | The data to be transmitted to the device. |
success | The data that is returned by the device. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) publishBleTransparentDataWithDeviceInfo: | (id< ThingBLEDeviceInfoProtocol >) | deviceInfo | |
data: | (NSData *) | data | |
success: | (nullable ThingSuccessData) | success | |
failure: | (nullable ThingFailureError) | failure | |
Publish the transmitted data.
deviceInfo | The deviceInfo. |
data | Data to be transmitted to the device. |
success | Transmission data returned by the device. |
failure | This block will be called if some error occurred. |
- (void) publishBleTransparentDataWithDeviceInfo: | (id< ThingBLEDeviceInfoProtocol >) | deviceInfo | |
data: | (NSData *) | data | |
success: | (nullable ThingSuccessData) | success | |
failure: | (nullable ThingFailureError) | failure | |
Publish the transmitted data.
deviceInfo | The deviceInfo. |
data | Data to be transmitted to the device. |
success | Transmission data returned by the device. |
failure | This block will be called if some error occurred. |
- (void) publishBleTransparentDataWithUUID: | (NSString *) | uuid | |
data: | (NSData *) | data | |
success: | (nullable ThingSuccessData) | success | |
failure: | ("This method is) | deprecated | |
(Use publishBleTransparentDataWithDeviceInfo:data:success:failure:instead") | __deprecated_msg | ||
Publish the transmitted data.
uuid | The UUID for the device. |
data | Data to be transmitted to the device. |
success | Transmission data returned by the device. |
failure | This block will be called if some error occurred. |
- (void) publishBleTransparentDataWithUUID: | (NSString *) | uuid | |
data: | (NSData *) | data | |
success: | (nullable ThingSuccessData) | success | |
failure: | ("This method is) | deprecated | |
(Use publishBleTransparentDataWithDeviceInfo:data:success:failure:instead") | __deprecated_msg | ||
Publish the transmitted data.
uuid | The UUID for the device. |
data | Data to be transmitted to the device. |
success | Transmission data returned by the device. |
failure | This block will be called if some error occurred. |
- (void) publishFileWithDevId: | (NSString *) | devId | |
fileId: | (NSInteger) | fileId | |
fileIdentifier: | (NSString *) | fileIdentifier | |
fileVersion: | (NSInteger) | fileVersion | |
fileData: | (NSData *) | fileData | |
fileType: | (unsigned int) | fileType | |
progressBlock: | (nullable void(^)(float progress)) | progressBlock | |
success: | (ThingSuccessHandler) | success | |
failure: | (ThingFailureError) | failure | |
File transfer
devId | The device ID. |
fileId | The file ID. |
fileIdentifier | The file identifier. |
fileVersion | The file version. |
fileData | The file data. |
fileType | The file type. If you do not contract filetype with hardware,please use the "-(void)publishFileWithDevId:fileId:fileIdentifier:fileVersion:fileData:progressBlock:success:failure:" api without filetype. |
progressBlock | The progress callback |
success | Called when the task is finished. DeviceModel is returned. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) publishFileWithDevId: | (NSString *) | devId | |
fileId: | (NSInteger) | fileId | |
fileIdentifier: | (NSString *) | fileIdentifier | |
fileVersion: | (NSInteger) | fileVersion | |
fileData: | (NSData *) | fileData | |
fileType: | (unsigned int) | fileType | |
progressBlock: | (nullable void(^)(float progress)) | progressBlock | |
success: | (ThingSuccessHandler) | success | |
failure: | (ThingFailureError) | failure | |
File transfer
devId | The device ID. |
fileId | The file ID. |
fileIdentifier | The file identifier. |
fileVersion | The file version. |
fileData | The file data. |
fileType | The file type. If you do not contract filetype with hardware,please use the "-(void)publishFileWithDevId:fileId:fileIdentifier:fileVersion:fileData:progressBlock:success:failure:" api without filetype. |
progressBlock | The progress callback |
success | Called when the task is finished. DeviceModel is returned. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) publishFileWithDevId: | (NSString *) | devId | |
fileId: | (NSInteger) | fileId | |
fileIdentifier: | (NSString *) | fileIdentifier | |
fileVersion: | (NSInteger) | fileVersion | |
fileData: | (NSData *) | fileData | |
progressBlock: | (nullable void(^)(float progress)) | progressBlock | |
success: | (ThingSuccessHandler) | success | |
failure: | (ThingFailureError) | failure | |
File transfer
devId | The device ID. |
fileId | The file ID. |
fileIdentifier | The file identifier. |
fileVersion | The file version. |
fileData | The file data. |
progressBlock | The progress callback |
success | Called when the task is finished. DeviceModel is returned. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) publishFileWithDevId: | (NSString *) | devId | |
fileId: | (NSInteger) | fileId | |
fileIdentifier: | (NSString *) | fileIdentifier | |
fileVersion: | (NSInteger) | fileVersion | |
fileData: | (NSData *) | fileData | |
progressBlock: | (nullable void(^)(float progress)) | progressBlock | |
success: | (ThingSuccessHandler) | success | |
failure: | (ThingFailureError) | failure | |
File transfer
devId | The device ID. |
fileId | The file ID. |
fileIdentifier | The file identifier. |
fileVersion | The file version. |
fileData | The file data. |
progressBlock | The progress callback |
success | Called when the task is finished. DeviceModel is returned. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) publishIoTTransparentData: | (NSData *) | data | |
devId: | (NSString *) | devId | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
Publish data to the BLE device eg: scene data
data | data |
devId | The device Id for the device. |
success | When publish successfully, this block will be called success. |
failure | This block will be called if some error occurred. |
Provided by category ThingSmartBLEManager(Biz).
- (void) publishIoTTransparentData: | (NSData *) | data | |
devId: | (NSString *) | devId | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
Publish data to the BLE device eg: scene data
data | data |
devId | The device Id for the device. |
success | When publish successfully, this block will be called success. |
failure | This block will be called if some error occurred. |
Provided by category ThingSmartBLEManager(Biz).
- (void) publishQueryDpCommand: | (NSString *) | devId | |
dpIds: | (NSArray *) | dpIds | |
success: | (nullable ThingSuccessBOOL) | success | |
failure: | (nullable ThingFailureError) | failure | |
Queries the device DP data through Bluetooth channels.
devId | The device ID. |
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. |
Provided by category ThingSmartBLEManager(Biz).
- (void) publishQueryDpCommand: | (NSString *) | devId | |
dpIds: | (NSArray *) | dpIds | |
success: | (nullable ThingSuccessBOOL) | success | |
failure: | (nullable ThingFailureError) | failure | |
Queries the device DP data through Bluetooth channels.
devId | The device ID. |
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. |
Provided by category ThingSmartBLEManager(Biz).
- (void) publishQueryDpCommandWithDeviceInfo: | (id< ThingBLEDeviceInfoProtocol >) | deviceInfo | |
dpIds: | (nullable NSArray *) | dpIds | |
success: | (nullable ThingSuccessBOOL) | success | |
failure: | (nullable ThingFailureError) | failure | |
Query device dp data by Bluetooth channel. ( support 0x0003 / 0x0004 / 0x801E^0x000E )
deviceInfo | The deviceInfo. |
dpsData | Array of dpId's to be queried. |
success | When query successfully, this block will be called. |
failure | This block will be called if some error occurred. |
- (void) publishQueryDpCommandWithDeviceInfo: | (id< ThingBLEDeviceInfoProtocol >) | deviceInfo | |
dpIds: | (nullable NSArray *) | dpIds | |
success: | (nullable ThingSuccessBOOL) | success | |
failure: | (nullable ThingFailureError) | failure | |
Query device dp data by Bluetooth channel. ( support 0x0003 / 0x0004 / 0x801E^0x000E )
deviceInfo | The deviceInfo. |
dpsData | Array of dpId's to be queried. |
success | When query successfully, this block will be called. |
failure | This block will be called if some error occurred. |
- (void) publishQueryDpCommandWithDeviceInfo: | (id< ThingBLEDeviceInfoProtocol >) | deviceInfo | |
dpsData: | (NSMutableData *) | dpsData | |
success: | (nullable ThingSuccessBOOL) | success | |
failure: | ("This method is) | deprecated | |
(Use publishQueryDpCommandWithDeviceInfo:dpIds:success:failure:instead") | __deprecated_msg | ||
Query device dp data by Bluetooth channel.
deviceInfo | The deviceInfo. |
dpsData | Array of dpId's to be queried. |
success | When query successfully, this block will be called. |
failure | This block will be called if some error occurred. |
- (void) publishQueryDpCommandWithDeviceInfo: | (id< ThingBLEDeviceInfoProtocol >) | deviceInfo | |
dpsData: | (NSMutableData *) | dpsData | |
success: | (nullable ThingSuccessBOOL) | success | |
failure: | ("This method is) | deprecated | |
(Use publishQueryDpCommandWithDeviceInfo:dpIds:success:failure:instead") | __deprecated_msg | ||
Query device dp data by Bluetooth channel.
deviceInfo | The deviceInfo. |
dpsData | Array of dpId's to be queried. |
success | When query successfully, this block will be called. |
failure | This block will be called if some error occurred. |
- (void) publishQueryDpCommandWithUUID: | (NSString *) | uuid | |
dpsData: | (NSMutableData *) | dpsData | |
success: | (nullable ThingSuccessBOOL) | success | |
failure: | ("This method is) | deprecated | |
(Use publishQueryDpCommandWithDeviceInfo:dpsData:success:failure:instead") | __deprecated_msg | ||
Query device dp data by Bluetooth channel.
uuid | The UUID for the device. |
dpsData | Array of dpId's to be queried. |
success | When query successfully, this block will be called. |
failure | This block will be called if some error occurred. |
- (void) publishQueryDpCommandWithUUID: | (NSString *) | uuid | |
dpsData: | (NSMutableData *) | dpsData | |
success: | (nullable ThingSuccessBOOL) | success | |
failure: | ("This method is) | deprecated | |
(Use publishQueryDpCommandWithDeviceInfo:dpsData:success:failure:instead") | __deprecated_msg | ||
Query device dp data by Bluetooth channel.
uuid | The UUID for the device. |
dpsData | Array of dpId's to be queried. |
success | When query successfully, this block will be called. |
failure | This block will be called if some error occurred. |
- (void) publishSystemTimeWithDeviceId: | (NSString *) | deviceId |
Update system time to device
deviceId | The device id |
Provided by category ThingSmartBLEManager(Biz).
- (void) publishSystemTimeWithDeviceId: | (NSString *) | deviceId |
Update system time to device
deviceId | The device id |
Provided by category ThingSmartBLEManager(Biz).
- (void) publishTransparentData: | (NSData *) | data | |
devId: | (NSString *) | devId | |
success: | (ThingSuccessHandler) | success | |
failure: | (ThingFailureError) | failure | |
Send transparent data (Support multiple packages).
data | Transparent data. |
devId | The device Id for the device. |
success | Called when the task finishes successfully. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) publishTransparentData: | (NSData *) | data | |
devId: | (NSString *) | devId | |
success: | (ThingSuccessHandler) | success | |
failure: | (ThingFailureError) | failure | |
Send transparent data (Support multiple packages).
data | Transparent data. |
devId | The device Id for the device. |
success | Called when the task finishes successfully. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) queryBLEDualModeBTInfoWithDeviceId: | (NSString *) | deviceId | |
success: | (void(^)(ThingBLEDualModeBTModel *btModel)) | success | |
failure: | (ThingFailureError) | failure | |
Get BT information, such as name ,macaddress,connect status.
deviceId | The device id |
success | Called when the task is finished. btModel is returned. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(DualModeBT).
- (void) queryBLEDualModeBTInfoWithDeviceId: | (NSString *) | deviceId | |
success: | (void(^)(ThingBLEDualModeBTModel *btModel)) | success | |
failure: | (ThingFailureError) | failure | |
Get BT information, such as name ,macaddress,connect status.
deviceId | The device id |
success | Called when the task is finished. btModel is returned. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(DualModeBT).
- (void) queryDeviceInfoWithUUID: | (NSString *) | uuid | |
productId: | (NSString *) | productId | |
success: | (nullable ThingSuccessDict) | success | |
failure: | (nullable ThingFailureError) | failure | |
Queries the device information before activation
uuid | The UUID of the device. |
productId | The product ID for the device. |
success | Called when the task is finished. A dictionary of device information is returned. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) queryDeviceInfoWithUUID: | (NSString *) | uuid | |
productId: | (NSString *) | productId | |
success: | (nullable ThingSuccessDict) | success | |
failure: | (nullable ThingFailureError) | failure | |
Queries the device information before activation
uuid | The UUID of the device. |
productId | The product ID for the device. |
success | Called when the task is finished. A dictionary of device information is returned. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) queryNameWithUUID: | (NSString *) | uuid | |
productKey: | (NSString *) | productKey | |
success: | (nullable void(^)(NSString *name)) | success | |
failure: | ("This method is) | deprecated | |
(Use ThingSmartBLEManager::queryDeviceInfoWithUUID:productKey:success:failure instead") | __deprecated_msg | ||
Queries the device information before the activation.
uuid | The UUID of the device. |
productKey | The product ID for the device. |
success | Called when the task is finished. The device name string is returned. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) queryNameWithUUID: | (NSString *) | uuid | |
productKey: | (NSString *) | productKey | |
success: | (nullable void(^)(NSString *name)) | success | |
failure: | ("This method is) | deprecated | |
(Use ThingSmartBLEManager::queryDeviceInfoWithUUID:productKey:success:failure instead") | __deprecated_msg | ||
Queries the device information before the activation.
uuid | The UUID of the device. |
productKey | The product ID for the device. |
success | Called when the task is finished. The device name string is returned. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(Biz).
- (void) querySlaveDpsWithSlaveDeviceId: | (NSString *) | slaveDeviceId | |
success: | (nullable ThingSuccessBOOL) | success | |
failure: | (nullable ThingFailureError) | failure | |
Query all slave device dps under the master device
slaveDeviceId | master deviceId |
success | success |
failure | failure |
Provided by category ThingSmartBLEManager(Biz).
- (void) querySlaveDpsWithSlaveDeviceId: | (NSString *) | slaveDeviceId | |
success: | (nullable ThingSuccessBOOL) | success | |
failure: | (nullable ThingFailureError) | failure | |
Query all slave device dps under the master device
slaveDeviceId | master deviceId |
success | success |
failure | failure |
Provided by category ThingSmartBLEManager(Biz).
- (void) querySlaveInfoWithMasterDeviceId: | (NSString *) | masterDeviceId | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
Query all slave device information under the master device
masterDeviceId | master deviceId |
success | success |
failure | failure |
Provided by category ThingSmartBLEManager(Biz).
- (void) querySlaveInfoWithMasterDeviceId: | (NSString *) | masterDeviceId | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
Query all slave device information under the master device
masterDeviceId | master deviceId |
success | success |
failure | failure |
Provided by category ThingSmartBLEManager(Biz).
- (void) readWithDeviceId: | (NSString *) | deviceId | |
serviceUUID: | (NSString *) | serviceUUID | |
charactUUID: | (NSString *) | characteristicUUID | |
completion: | (ThingBLECentralCallback) | callback | |
Read data from a Bluetooth device.
deviceId | device Id |
serviceUUID | Reads the service value for service. |
characteristicUUID | Reads the characteristic value for characteristic. |
callback | callback |
Provided by category ThingSmartBLEManager(CustomChannel).
- (void) readWithDeviceId: | (NSString *) | deviceId | |
serviceUUID: | (NSString *) | serviceUUID | |
charactUUID: | (NSString *) | characteristicUUID | |
completion: | (ThingBLECentralCallback) | callback | |
Read data from a Bluetooth device.
deviceId | device Id |
serviceUUID | Reads the service value for service. |
characteristicUUID | Reads the characteristic value for characteristic. |
callback | callback |
Provided by category ThingSmartBLEManager(CustomChannel).
- (void) recordBleConnectEventWithDevId: | (NSString *) | devId | |
src: | (NSInteger) | src | |
actId: | (nullable NSString *) | actId | |
extra: | (nullable NSDictionary *) | extra | |
Record ble connect event.
Provided by category ThingSmartBLEManager(Biz).
- (void) recordBleConnectEventWithDevId: | (NSString *) | devId | |
src: | (NSInteger) | src | |
actId: | (nullable NSString *) | actId | |
extra: | (nullable NSDictionary *) | extra | |
Record ble connect event.
Provided by category ThingSmartBLEManager(Biz).
- (void) scanActivatedDeviceWithTimeInterval: | (NSTimeInterval) | interval | |
scanHandler: | (ThingSuccessString) | scanHandle | |
finishHandler: | (ThingSuccessHandler) | finishHandle | |
Starts listening for broadcast packages for active Bluetooth LE devices during interval
interval | scan time.If interval < 0, set it to the default 40s |
scanHandle | called when find ble device broadcast,return devId of find device |
finishHandle | called when the task is finished |
Provided by category ThingSmartBLEManager(Biz).
- (void) scanActivatedDeviceWithTimeInterval: | (NSTimeInterval) | interval | |
scanHandler: | (ThingSuccessString) | scanHandle | |
finishHandler: | (ThingSuccessHandler) | finishHandle | |
Starts listening for broadcast packages for active Bluetooth LE devices during interval
interval | scan time.If interval < 0, set it to the default 40s |
scanHandle | called when find ble device broadcast,return devId of find device |
finishHandle | called when the task is finished |
Provided by category ThingSmartBLEManager(Biz).
- (void) scanQRCodeToResetDeviceWithUUID: | (NSString *) | UUID | |
encryptedAuthKey: | (NSString *) | encryptedAuthKey | |
random: | (NSString *) | random | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
Provided by category ThingSmartBLEManager(QRCode).
- (void) scanQRCodeToResetDeviceWithUUID: | (NSString *) | UUID | |
encryptedAuthKey: | (NSString *) | encryptedAuthKey | |
random: | (NSString *) | random | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
Provided by category ThingSmartBLEManager(QRCode).
- (void) sendAlexaSuccessWithDeviceId: | (NSString *) | deviceId | |
andToken: | (NSString *) | token | |
alexa success device id
deviceId | device id |
token | token |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) sendAlexaSuccessWithDeviceId: | (NSString *) | deviceId | |
andToken: | (NSString *) | token | |
alexa success device id
deviceId | device id |
token | token |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) sendOTAPack: | (NSData *) | otaData | |
deviceModel: | (ThingSmartDeviceModel *) | deviceModel | |
upgradeModel: | (ThingSmartFirmwareUpgradeModel *) | upgradeModel | |
success: | (ThingSuccessHandler) | success | |
failure: | (ThingFailureError) | failure | |
Send OTA package to upgrade firmware.
otaData | otaData. |
deviceModel | Device Model. |
upgradeModel | Firmware upgrade model. |
success | Called when the task finishes successfully. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(OTA).
- (void) sendOTAPack: | (NSData *) | otaData | |
deviceModel: | (ThingSmartDeviceModel *) | deviceModel | |
upgradeModel: | (ThingSmartFirmwareUpgradeModel *) | upgradeModel | |
success: | (ThingSuccessHandler) | success | |
failure: | (ThingFailureError) | failure | |
Send OTA package to upgrade firmware.
otaData | otaData. |
deviceModel | Device Model. |
upgradeModel | Firmware upgrade model. |
success | Called when the task finishes successfully. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(OTA).
- (void) sendOTAPack: | (NSString *) | uuid | |
otaData: | (NSData *) | otaData | |
success: | (ThingSuccessHandler) | success | |
failure: | ("This method is) | deprecated | |
(Use ThingSmartBLEManager::sendOTAPack:deviceModel:upgradeModel:success:failure:instead") | __deprecated_msg | ||
Sends an OTA package to update the firmware.
The value of otaData
can be obtained from ThingSmartFirmwareUpgradeModel. You can get ThingSmartFirmwareUpgradeModel by using getFirmwareUpgradeInfo:failure: (ThingSmartDevice).
uuid | The UUID of the device. |
otaData | The OTA package data. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(OTA).
- (void) sendOTAPack: | (NSString *) | uuid | |
otaData: | (NSData *) | otaData | |
success: | (ThingSuccessHandler) | success | |
failure: | ("This method is) | deprecated | |
(Use ThingSmartBLEManager::sendOTAPack:deviceModel:upgradeModel:success:failure:instead") | __deprecated_msg | ||
Sends an OTA package to update the firmware.
The value of otaData
can be obtained from ThingSmartFirmwareUpgradeModel. You can get ThingSmartFirmwareUpgradeModel by using getFirmwareUpgradeInfo:failure: (ThingSmartDevice).
uuid | The UUID of the device. |
otaData | The OTA package data. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(OTA).
- (void) sendOTAPack: | (NSString *) | uuid | |
pid: | (NSString *) | pid | |
otaData: | (NSData *) | otaData | |
otaType: | (ThingSmartBLEOTAType) | otaType | |
otaVersion: | (NSString *) | otaVersion | |
success: | (ThingSuccessHandler) | success | |
failure: | ("This method is) | deprecated | |
(Use ThingSmartBLEManager::sendOTAPack:deviceModel:upgradeModel:success:failure:instead") | __deprecated_msg | ||
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).
uuid | The UUID of the device. |
pid | The product ID of the device. |
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. |
Provided by category ThingSmartBLEManager(OTA).
- (void) sendOTAPack: | (NSString *) | uuid | |
pid: | (NSString *) | pid | |
otaData: | (NSData *) | otaData | |
otaType: | (ThingSmartBLEOTAType) | otaType | |
otaVersion: | (NSString *) | otaVersion | |
success: | (ThingSuccessHandler) | success | |
failure: | ("This method is) | deprecated | |
(Use ThingSmartBLEManager::sendOTAPack:deviceModel:upgradeModel:success:failure:instead") | __deprecated_msg | ||
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).
uuid | The UUID of the device. |
pid | The product ID of the device. |
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. |
Provided by category ThingSmartBLEManager(OTA).
- (void) sendOTAPack: | (NSString *) | uuid | |
pid: | (NSString *) | pid | |
otaData: | (NSData *) | otaData | |
success: | (ThingSuccessHandler) | success | |
failure: | ("This method is) | deprecated | |
(Use ThingSmartBLEManager::sendOTAPack:deviceModel:upgradeModel:success:failure:instead") | __deprecated_msg | ||
Sends an OTA package to update the firmware.
The value of otaData
can be obtained from ThingSmartFirmwareUpgradeModel. You can get ThingSmartFirmwareUpgradeModel by using getFirmwareUpgradeInfo:failure: (ThingSmartDevice).
uuid | The UUID of the device. |
pid | The product ID of the device. |
otaData | The OTA package data. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(OTA).
- (void) sendOTAPack: | (NSString *) | uuid | |
pid: | (NSString *) | pid | |
otaData: | (NSData *) | otaData | |
success: | (ThingSuccessHandler) | success | |
failure: | ("This method is) | deprecated | |
(Use ThingSmartBLEManager::sendOTAPack:deviceModel:upgradeModel:success:failure:instead") | __deprecated_msg | ||
Sends an OTA package to update the firmware.
The value of otaData
can be obtained from ThingSmartFirmwareUpgradeModel. You can get ThingSmartFirmwareUpgradeModel by using getFirmwareUpgradeInfo:failure: (ThingSmartDevice).
uuid | The UUID of the device. |
pid | The product ID of the device. |
otaData | The OTA package data. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
Provided by category ThingSmartBLEManager(OTA).
- (void) sendPacketInfoWithDev: | (id< ThingBLEDeviceInfoProtocol >) | dev | |
data: | (NSData *) | data | |
type: | (ThingBLEConfigType) | type | |
packageMaxSize: | (NSInteger) | maxSize | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
- (void) sendPacketInfoWithDev: | (id< ThingBLEDeviceInfoProtocol >) | dev | |
data: | (NSData *) | data | |
type: | (ThingBLEConfigType) | type | |
packageMaxSize: | (NSInteger) | maxSize | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
- (void) setAlarmClockWithAlarmClockModel: | (ThingBLEAudioAlarmClockModel *) | model | |
deviceId: | (NSString *) | deviceId | |
success: | (ThingSuccessHandler) | success | |
failure: | (ThingFailureError) | failure | |
alexa set alarm clock
model | clockModel |
deviceId | device id |
success | success |
failure | failure |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) setAlarmClockWithAlarmClockModel: | (ThingBLEAudioAlarmClockModel *) | model | |
deviceId: | (NSString *) | deviceId | |
success: | (ThingSuccessHandler) | success | |
failure: | (ThingFailureError) | failure | |
alexa set alarm clock
model | clockModel |
deviceId | device id |
success | success |
failure | failure |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) setCompletionBlock: | (TPBleResultBlock) | block | |
uuid: | (NSString *) | uuid | |
Sets the callback when the transfer is completed.
block | Called when the task is finished. |
uuid | The UUID of the device. |
Provided by category ThingSmartBLEManager(Channel).
- (void) setCompletionBlock: | (TPBleResultBlock) | block | |
uuid: | (NSString *) | uuid | |
Sets the callback when the transfer is completed.
block | Called when the task is finished. |
uuid | The UUID of the device. |
Provided by category ThingSmartBLEManager(Channel).
- (void) setNotificationStatus: | (int) | notifyFlag | |
isPermanentVision: | (BOOL) | isPermanentVision | |
isPlayAudio: | (BOOL) | isPlayAudio | |
deviceId: | (NSString *) | deviceId | |
success: | (ThingSuccessHandler) | success | |
failure: | (ThingFailureError) | failure | |
alexa notification status
notifyFlag | notify Flag |
isPermanentVision | permanent vision |
isPlayAudio | play audio |
deviceId | device id |
success | success |
failure | failure |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) setNotificationStatus: | (int) | notifyFlag | |
isPermanentVision: | (BOOL) | isPermanentVision | |
isPlayAudio: | (BOOL) | isPlayAudio | |
deviceId: | (NSString *) | deviceId | |
success: | (ThingSuccessHandler) | success | |
failure: | (ThingFailureError) | failure | |
alexa notification status
notifyFlag | notify Flag |
isPermanentVision | permanent vision |
isPlayAudio | play audio |
deviceId | device id |
success | success |
failure | failure |
Provided by category ThingSmartBLEManager(AlexaVoice).
- (void) setScanDelegate: | ("This method is) | deprecated | |
(the scan delegate is already set at initialization time") | __deprecated_msg | ||
- (void) setScanDelegate: | ("This method is) | deprecated | |
(the scan delegate is already set at initialization time") | __deprecated_msg | ||
+ (instancetype) sharedInstance |
The single instance.
+ (instancetype) sharedInstance |
The single instance.
- (void) startBleBeaconListening |
start ble beacon scan,the dp data will be reported if scanned. The data of all ble beacon devices in the current account will be scanned.
Provided by category ThingSmartBLEManager(Biz).
- (void) startBleBeaconListening |
start ble beacon scan,the dp data will be reported if scanned. The data of all ble beacon devices in the current account will be scanned.
Provided by category ThingSmartBLEManager(Biz).
- (void) startBleBeaconListeningWithDeviceId: | (NSString *) | deviceId |
start ble beacon scan
deviceId | The device id |
Provided by category ThingSmartBLEManager(Biz).
- (void) startBleBeaconListeningWithDeviceId: | (NSString *) | deviceId |
start ble beacon scan
deviceId | The device id |
Provided by category ThingSmartBLEManager(Biz).
- (void) startCommRodScan |
Provided by category ThingSmartBLEManager(CommRod).
- (void) startCommRodScan |
Provided by category ThingSmartBLEManager(CommRod).
- (void) startEnhancedQRListenWithCache: | (BOOL) | cache | |
handler: | (ThingBLEScanHandler) | handler | |
configNotify: | (id< ThingSmartBLEConfigPackageNotify >) | notify | |
scanType: | (ThingBLEScanType) | scanType | |
增强扫码设备扫描
cache | 是否清理已扫描到的设备 |
handler | 设备扫描之后需要处理的业务功能 |
notify | 接收蓝牙业务回调 |
scanType | 扫描类型 |
- (void) startEnhancedQRListenWithCache: | (BOOL) | cache | |
handler: | (ThingBLEScanHandler) | handler | |
configNotify: | (id< ThingSmartBLEConfigPackageNotify >) | notify | |
scanType: | (ThingBLEScanType) | scanType | |
增强扫码设备扫描
cache | 是否清理已扫描到的设备 |
handler | 设备扫描之后需要处理的业务功能 |
notify | 接收蓝牙业务回调 |
scanType | 扫描类型 |
- (void) startListenCore: | (BOOL) | cache | |
handler: | (nullable ThingBLEScanHandler) | handler | |
configNotify: | (id< ThingSmartBLEConfigPackageNotify >) | notify | |
scanType: | (ThingBLEScanType) | scanType | |
开始设备扫描
cache | 是否清理已扫描到的设备 |
handler | 设备扫描之后需要处理的业务功能 |
notify | 接收蓝牙业务回调 |
scanType | 扫描类型 |
- (void) startListenCore: | (BOOL) | cache | |
handler: | (nullable ThingBLEScanHandler) | handler | |
configNotify: | (id< ThingSmartBLEConfigPackageNotify >) | notify | |
scanType: | (ThingBLEScanType) | scanType | |
开始设备扫描
cache | 是否清理已扫描到的设备 |
handler | 设备扫描之后需要处理的业务功能 |
notify | 接收蓝牙业务回调 |
scanType | 扫描类型 |
- (void) startListening: | (BOOL) | clearCache |
Starts listening for broadcast packages for Bluetooth LE devices.
If an inactive device is scanned, the device information is returned by didDiscoveryDeviceWithDeviceInfo: (ThingSmartBLEManagerDelegate-p)
.
If an active device is scanned, the device is automatically connected.
clearCache | Specifies whether to clean up the broadcast packets of scanned devices. |
Provided by category ThingSmartBLEManager(Biz).
- (void) startListening: | (BOOL) | clearCache |
Starts listening for broadcast packages for Bluetooth LE devices.
If an inactive device is scanned, the device information is returned by didDiscoveryDeviceWithDeviceInfo: (ThingSmartBLEManagerDelegate-p)
.
If an active device is scanned, the device is automatically connected.
clearCache | Specifies whether to clean up the broadcast packets of scanned devices. |
Provided by category ThingSmartBLEManager(Biz).
- (void) startListeningWithType: | (ThingBLEScanType) | scanType | |
cacheStatu: | (BOOL) | clearCache | |
Starts listening for broadcast packages for Bluetooth LE devices.
If an inactive device is scanned, the device information is returned by didDiscoveryDeviceWithDeviceInfo: (ThingSmartBLEManagerDelegate-p)
.
If an active device is scanned, the device is automatically connected.
scanType | Specifies whether to scan type. Noraml type is general device. QRCode type is supports code scanning devices. |
clearCache | Specifies whether to clean up the broadcast packets of scanned devices. |
Provided by category ThingSmartBLEManager(Biz).
- (void) startListeningWithType: | (ThingBLEScanType) | scanType | |
cacheStatu: | (BOOL) | clearCache | |
Starts listening for broadcast packages for Bluetooth LE devices.
If an inactive device is scanned, the device information is returned by didDiscoveryDeviceWithDeviceInfo: (ThingSmartBLEManagerDelegate-p)
.
If an active device is scanned, the device is automatically connected.
scanType | Specifies whether to scan type. Noraml type is general device. QRCode type is supports code scanning devices. |
clearCache | Specifies whether to clean up the broadcast packets of scanned devices. |
Provided by category ThingSmartBLEManager(Biz).
- (void) startListeningWithUUID: | (NSString *) | UUID |
Provided by category ThingSmartBLEManager(QRCode).
- (void) startListeningWithUUID: | (NSString *) | UUID |
Provided by category ThingSmartBLEManager(QRCode).
- (void) startListeningWithUUID: | (NSString *) | UUID | |
success: | (nullable void(^)(id< ThingBLEDeviceInfoProtocol > devInfo)) | success | |
failure: | (nullable ThingFailureHandler) | failure | |
Provided by category ThingSmartBLEManager(QRCode).
- (void) startListeningWithUUID: | (NSString *) | UUID | |
success: | (nullable void(^)(id< ThingBLEDeviceInfoProtocol > devInfo)) | success | |
failure: | (nullable ThingFailureHandler) | failure | |
Provided by category ThingSmartBLEManager(QRCode).
- (void) startScanWithInterval: | (NSTimeInterval) | interval | |
scanHandler: | (ThingBLEScanHandler) | scanHandle | |
finishHandler: | (ThingSuccessHandler) | finishHandle | |
Ble device scan with time out
interval | timeout |
scanHandle | 设备扫描之后需要处理的业务功能 |
finishHandle | failure description |
- (void) startScanWithInterval: | (NSTimeInterval) | interval | |
scanHandler: | (ThingBLEScanHandler) | scanHandle | |
finishHandler: | (ThingSuccessHandler) | finishHandle | |
Ble device scan with time out
interval | timeout |
scanHandle | 设备扫描之后需要处理的业务功能 |
finishHandle | failure description |
- (void) stopBleBeaconListening |
stop ble beacon scan
Provided by category ThingSmartBLEManager(Biz).
- (void) stopBleBeaconListening |
stop ble beacon scan
Provided by category ThingSmartBLEManager(Biz).
- (void) stopBleBeaconListeningWithDeviceId: | (NSString *) | deviceId |
stop ble beacon scan
deviceId | The device id |
Provided by category ThingSmartBLEManager(Biz).
- (void) stopBleBeaconListeningWithDeviceId: | (NSString *) | deviceId |
stop ble beacon scan
deviceId | The device id |
Provided by category ThingSmartBLEManager(Biz).
- (void) stopFileTransfer: | (NSString *) | devId |
- (void) stopFileTransfer: | (NSString *) | devId |
- (void) stopListenCore: | (BOOL) | clearCache |
- (void) stopListenCore: | (BOOL) | clearCache |
- (void) stopListening: | (BOOL) | clearCache |
Stop listening for broadcast packages for BLE devices.
clearCache | Specifies whether to clean up the broadcast packets of scanned devices. |
Provided by category ThingSmartBLEManager(Biz).
- (void) stopListening: | (BOOL) | clearCache |
Stop listening for broadcast packages for BLE devices.
clearCache | Specifies whether to clean up the broadcast packets of scanned devices. |
Provided by category ThingSmartBLEManager(Biz).
- (void(^)) success | (id) | deviceModel |
- (void) switchZigbeeSubDeviceToZigbeeActivator: | (id< ThingBLEDeviceInfoProtocol >) | dev | |
homeId: | (long long) | homeId | |
success: | (ThingSuccessHandler) | success | |
failure: | (ThingFailureError) | failure | |
Provided by category ThingSmartBLEManager(PlugPlay).
- (void) switchZigbeeSubDeviceToZigbeeActivator: | (id< ThingBLEDeviceInfoProtocol >) | dev | |
homeId: | (long long) | homeId | |
success: | (ThingSuccessHandler) | success | |
failure: | (ThingFailureError) | failure | |
Provided by category ThingSmartBLEManager(PlugPlay).
- (void) unBindSlaveDeviceWithSlaveDeviceId: | (NSString *) | slaveDeviceId | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
Unbind master_slave devices
slaveDeviceId | slave device id |
success | If successfully Unbind, this block is called. |
failure | If Unbind fails, this block calls back an error |
Provided by category ThingSmartBLEManager(Biz).
- (void) unBindSlaveDeviceWithSlaveDeviceId: | (NSString *) | slaveDeviceId | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
Unbind master_slave devices
slaveDeviceId | slave device id |
success | If successfully Unbind, this block is called. |
failure | If Unbind fails, this block calls back an error |
Provided by category ThingSmartBLEManager(Biz).
- (void) writeWithDeviceId: | (NSString *) | deviceId | |
data: | (NSData *) | data | |
serviceUUID: | (NSString *) | serviceUUID | |
charactUUID: | (NSString *) | characteristicUUID | |
completion: | (ThingBLECentralWriteCallback) | callback | |
Writes data to a Bluetooth device.
deviceId | device Id |
data | transmit data |
serviceUUID | write the service value for service. |
characteristicUUID | The characteristic whose characteristic value will be written. |
callback | callback,when callback is nil,CBCharacteristicWriteType is CBCharacteristicWriteWithoutResponse,else CBCharacteristicWriteType is CBCharacteristicWriteWithResponse. |
Provided by category ThingSmartBLEManager(CustomChannel).
- (void) writeWithDeviceId: | (NSString *) | deviceId | |
data: | (NSData *) | data | |
serviceUUID: | (NSString *) | serviceUUID | |
charactUUID: | (NSString *) | characteristicUUID | |
completion: | (ThingBLECentralWriteCallback) | callback | |
Writes data to a Bluetooth device.
deviceId | device Id |
data | transmit data |
serviceUUID | write the service value for service. |
characteristicUUID | The characteristic whose characteristic value will be written. |
callback | callback,when callback is nil,CBCharacteristicWriteType is CBCharacteristicWriteWithoutResponse,else CBCharacteristicWriteType is CBCharacteristicWriteWithResponse. |
Provided by category ThingSmartBLEManager(CustomChannel).
|
readwritenonatomicweak |
Definition at line 190 of file ThingSmartBLEManager.h.
|
readwritenonatomicweak |
Definition at line 192 of file ThingSmartBLEManager.h.
|
readwritenonatomiccopy |
Definition at line 203 of file ThingSmartBLEManager.h.
|
readwritenonatomicweak |
The delegate for scanning and notifications of Bluetooth status changes.
Definition at line 186 of file ThingSmartBLEManager.h.
|
readwritenonatomicassign |
Whether to disable bluetooth. Default NO.
Definition at line 183 of file ThingSmartBLEManager.h.
|
readwritenonatomiccopy |
Definition at line 197 of file ThingSmartBLEManager.h.
|
readwritenonatomicweak |
Definition at line 195 of file ThingSmartBLEManager.h.
|
readnonatomicassign |
A Boolean value that indicates whether the mobile phone's Bluetooth is enabled or disabled.
Definition at line 180 of file ThingSmartBLEManager.h.
|
readwritenonatomicweak |
Definition at line 188 of file ThingSmartBLEManager.h.
|
readwritenonatomicstrong |
Definition at line 205 of file ThingSmartBLEManager.h.
|
readwritenonatomicstrong |
Definition at line 209 of file ThingSmartBLEManager.h.
|
readwritenonatomiccopy |