-
public interface IThingBleManagerThing BLE operate manager. Provide basic ability of Thing BLE
-
-
Method Summary
Modifier and Type Method Description abstract voidnotifyNoneForScan()stop ble connect taskDeprecate abstract voidaddScanLinkTaskIds(String idJsonString)Reconnect the devices, if the BLE device is not connected, it will reconnect the device,if it is already connected, it will be ignored abstract voiddisconnectLinkedIds(List<String> ids)Disconnect device Bluetooth connection. abstract voidconnectBleDevice(List<BleConnectBuilder> builderList)* Reconnect the devices, if the BLE device is not connected, it will reconnect the device,if it is already connected, it will be ignored abstract voiddisconnectAllBleDevices()abstract voiddirectConnectBleDevice(BleConnectBuilder builder)direct connect the device form ble abstract voiddisconnectBleDevice(List<BleConnectBuilder> builderList)Disconnect device Bluetooth connection. abstract voidstartBleConfig(long homeId, String devUuid, Map<String, Object> params, IThingBleConfigListener configListener)Device activation function, when the device is scanned, you can use this method to activate. abstract voidstopBleConfig(String devUuid)stop activation abstract booleanisBleLocalOnline(String devId)Get the device‘s local online status abstract booleanisBleLocalOnlineByMaster(String devId)abstract voidremoveDeviceLocal(String devId, IResultCallback iControlCallback)Remove the Bluetooth device, the device will become to be activated if the device is online locally. abstract voidresetFactoryLocal(String devId, IResultCallback iControlCallback)Restore the factory settings of the Bluetooth device, the device will become to be activated if the device is locally online. abstract voidpublishDps(String devId, String dps, IResultCallback iControlCallback)send data points to device by bluetooth abstract voidqueryDps(String devId, List<String> dpList, IResultCallback iResultCallback)query data points from device by bluetooth abstract voidstartBleOta(String uuid, int type, String version, String binPackagePath, OnBleUpgradeListener listener)Upgrade the firmware of the device by bluetooth abstract voidstartBleOta(String uuid, String pid, int type, String version, String binPackagePath, OnBleUpgradeListener listener)abstract voidstartBleOta(BleOTABean otaBean, OnBleUpgradeListener listener)Upgrade the firmware of the device/Accessories by bluetooth abstract voidcancelBleOta(String uuid)Stop upgrading firmware abstract StringgetDeviceAllDps(String devId)Get the latest data points status of the current bluetooth device. abstract StringscanFilter(Array<byte> scan, String devName, String address)abstract voidreadBleRssi(String devId, BleRssiListener listener)get the rssi of the bluetooth device. abstract voidpostDataChannel(String devId, String command, DataChannelListener listener)abstract voidpostDataChannel(Map<String, Object> params, DataChannelListener listener)Big data channel of V4.1 protocal. abstract intgetConfigDeviceFlag(String uuid)abstract voidregisterBusinessLog(BleLogCallback logCallback)register business log , Can monitor internal communication logs. abstract voidunregisterBusinessLog(BleLogCallback logCallback)unregister business log. abstract voidregisterDeviceConnectStatus(String devId, BleConnectStatusListener statusListener)register device connection status changes abstract voidunregisterDevcieConnectStatus(String devId)unregister the monitor abstract voidregisterTransferListener(String devId, OnBleDataTransferListener listener)Register the custom data channel of some device, the custom data of the device will be returned through the monitoring abstract voidunregisterTransferListener(String devId, OnBleDataTransferListener listener)Unregister the custom data channel of some device abstract voidpublishTransferData(String devId, Array<byte> raw, IResultCallback iResultCallback)Send the custom data to the device abstract voidpublishSystemTimeWithDeviceId(String devId)Get the system time and send it to the device abstract voiduploadCacheDataToServer(String devId)upload dps cache data to server,such as when there is no network during data interaction, it will be cached abstract voidclearBleDataCache(List<String> devIdList)clear ble connect cache abstract voidclearBigDataChannelData(String devId, int type, IResultCallback callback)abstract List<DeviceRespBean.CommunicationModuleT>orderLocalCommunicationList(DeviceRespBean respBean)order the communication list abstract voidgetDeviceAttribute(String deviceId, OnDeviceAttributeListener listener)get device attribute from device info abstract voidregisterBleIotListener(OnBleIoTChannelListener listener)Register the iot data channel of some device, the iot data of the device will be returned through the monitoring abstract voidunregisterBleIotListener(OnBleIoTChannelListener listener)Unregister the iot data channel listener of some device abstract voidpublishIoTTransparentData(String deviceId, DevIotDataBean iotData, OnBleSendChannelListener listener)Send the iot data to the device abstract voidpublishTransparentData(String deviceId, Array<byte> data, OnBleSendChannelListener listener)push user business data to device by BLE abstract voidregisterBleRespListener(OnBleToDeviceListener listener)register a listener to accept data from device abstract voidunRegisterBleRespListener(OnBleToDeviceListener listener)abstract voidgetBluetoothState(String devId, IThingResultCallback<BluetoothBondStateBean> response)abstract voidbindSlaveDeviceToMaster(String masterDevId, String slaveDevId, IResultCallback callback)abstract voidunbindSlaveDeviceFromMaster(String masterDevId, String slaveDevId, IResultCallback callback)abstract voidactiveExtenModuleByBLEActived(String deviceId, IResultCallback iResultCallback)active exten module by BLE abstract voidactiveExtenModuleByBLEActived(String devId, Map<String, Object> params, IResultCallback callback)abstract intgetExtModuleType(String devId)abstract voidregisterExtModuleStatus(ExtModuleStatusListener listener)abstract voidunregisterExtModuleStatus(ExtModuleStatusListener listener)abstract voidpostFileTransfer(String devId, FileTransferInfo fileTransferInfo, ActionProgressResponse<Boolean> listener)Transfer files to the device abstract voidregisterDataLocalProcessingListener(OnDataLocalProcessingListener listener)abstract voidsetLocationWeatherAbility(IGetLocationWeather iGetLocationWeather)set location weather abstract voidsetLocationWeatherAbility(IGetCustomLocationWeather iGetLocationWeather)set location weather abstract voidsetHomeWeatherAbility(IGetHomeWeather iGetHomeWeather)set home weather abstract voidsetHomeWeatherAbility(IGetCustomHomeWeather iGetHomeWeather)set home weather abstract intreadRssiByCache(String uuid)abstract voidrecoverDeviceStatus(String uuid)abstract voidqueryWifiListForDeviceScan(QueryWifiSetting setting, IThingResultCallback<List<WiFiInfo>> callback)abstract voidfetchDeviceLog(String uuid, IThingResultCallback<Array<byte>> callback)abstract voidqueryActiveStatus(String uuid, IThingResultCallback<Array<byte>> callback)abstract BooleanisDeviceInOta(String deviceId)abstract intgetBleConnectAbility(String devId)abstract voidcheckBleWifiDeviceReset(CheckDeviceSetting setting, IThingResultCallback<CheckResultBean> callback)Whether it can be reset, and whether it still needs to be reset in the cloud-bound state abstract voidstartResetBleWifiDevice(ResetBleSetting setting, IResultCallback callback)Support Bluetooth scan code reset service abstract intgetBleExpandAttr(String devId)abstract voidrecordBleConnectEvent(String devId, int src, String traceId)Record ble connect event. abstract BWFlashPackagegetBWFlashPackage(String address)abstract voidgetRcs(IThingDataCallback<JSONObject> callback)-
-
Method Detail
-
notifyNoneForScan
@Deprecated() abstract void notifyNoneForScan()
stop ble connect taskDeprecate
-
addScanLinkTaskIds
@Deprecated() abstract void addScanLinkTaskIds(String idJsonString)
Reconnect the devices, if the BLE device is not connected, it will reconnect the device,if it is already connected, it will be ignored
- Parameters:
idJsonString- devId List to JsonString, The devId of the device you want to connect,new method connectBleDevice}
-
disconnectLinkedIds
@Deprecated() abstract void disconnectLinkedIds(List<String> ids)
Disconnect device Bluetooth connection.
- Parameters:
ids- devId List to JsonString ,The devId of the device you want to disconnect.
-
connectBleDevice
abstract void connectBleDevice(List<BleConnectBuilder> builderList)
* Reconnect the devices, if the BLE device is not connected, it will reconnect the device,if it is already connected, it will be ignored
- Parameters:
builderList- com.thingclips.smart.android.ble.builder.BleConnectBuilder
-
disconnectAllBleDevices
abstract void disconnectAllBleDevices()
-
directConnectBleDevice
abstract void directConnectBleDevice(BleConnectBuilder builder)
direct connect the device form ble
-
disconnectBleDevice
abstract void disconnectBleDevice(List<BleConnectBuilder> builderList)
Disconnect device Bluetooth connection.
- Parameters:
builderList- com.thingclips.smart.android.ble.builder.BleConnectBuilder
-
startBleConfig
abstract void startBleConfig(long homeId, String devUuid, Map<String, Object> params, IThingBleConfigListener configListener)
Device activation function, when the device is scanned, you can use this method to activate.
params:param.put("ssid", "xxxx"); //wifi ssidparam.put("password", "xxxxxx"); //wifi pwdparam.put("token", "xxxxxxxxxxxxx"); // user token
- Parameters:
homeId- current homeId ,Your device will be activated under the current home.devUuid- device's uuid getUuidparams- Activation parameters.configListener- callback IThingBleConfigListener
-
stopBleConfig
abstract void stopBleConfig(String devUuid)
stop activation
- Parameters:
devUuid- device's uuid getUuid
-
isBleLocalOnline
abstract boolean isBleLocalOnline(String devId)
Get the device‘s local online status
- Parameters:
devId- device id
-
isBleLocalOnlineByMaster
abstract boolean isBleLocalOnlineByMaster(String devId)
-
removeDeviceLocal
abstract void removeDeviceLocal(String devId, IResultCallback iControlCallback)
Remove the Bluetooth device, the device will become to be activated if the device is online locally.If the device is offline locally, there will be no effect
- Parameters:
devId- device IdiControlCallback- IResultCallback
-
resetFactoryLocal
abstract void resetFactoryLocal(String devId, IResultCallback iControlCallback)
Restore the factory settings of the Bluetooth device, the device will become to be activated if the device is locally online.If the device is offline locally, there will be no effect
- Parameters:
devId- device IdiControlCallback- IResultCallback
-
publishDps
abstract void publishDps(String devId, String dps, IResultCallback iControlCallback)
send data points to device by bluetooth
- Parameters:
devId- device Iddps- Data pointsiControlCallback- IResultCallback
-
queryDps
abstract void queryDps(String devId, List<String> dpList, IResultCallback iResultCallback)
query data points from device by bluetooth
- Parameters:
devId- device iddpList- Data point IdsiResultCallback- IResultCallback
-
startBleOta
@Deprecated() abstract void startBleOta(String uuid, int type, String version, String binPackagePath, OnBleUpgradeListener listener)
Upgrade the firmware of the device by bluetooth
- Parameters:
uuid- device uuid getUuidtype- 0: normal firmware 1:mcu firmwareversion- the version of the new firmwarebinPackagePath- the path of the downloaded firmware on the phone storagelistener- ota process callback OnBleUpgradeListener
-
startBleOta
@Deprecated() abstract void startBleOta(String uuid, String pid, int type, String version, String binPackagePath, OnBleUpgradeListener listener)
-
startBleOta
abstract void startBleOta(BleOTABean otaBean, OnBleUpgradeListener listener)
Upgrade the firmware of the device/Accessories by bluetooth
- Parameters:
otaBean- OTA device datalistener- ota process callback OnBleUpgradeListener
-
cancelBleOta
abstract void cancelBleOta(String uuid)
Stop upgrading firmware
- Parameters:
uuid- device uuid getUuid
-
getDeviceAllDps
abstract String getDeviceAllDps(String devId)
Get the latest data points status of the current bluetooth device. only for ble device
- Parameters:
devId- device id getDevId
-
scanFilter
@Deprecated() abstract String scanFilter(Array<byte> scan, String devName, String address)
-
readBleRssi
abstract void readBleRssi(String devId, BleRssiListener listener)
get the rssi of the bluetooth device.
If the device is connected, it can be obtained correctly, otherwise an error will be returned
- Parameters:
devId- device id getDevIdlistener- backback BleRssiListener
-
postDataChannel
@Deprecated() abstract void postDataChannel(String devId, String command, DataChannelListener listener)
-
postDataChannel
abstract void postDataChannel(Map<String, Object> params, DataChannelListener listener)
Big data channel of V4.1 protocal. Need equipment support.
This function can be used for transferring some large amounts of historical data
- Parameters:
params- The map of params.listener- Callback DataChannelListener
-
getConfigDeviceFlag
@Deprecated() abstract int getConfigDeviceFlag(String uuid)
-
registerBusinessLog
@Deprecated() abstract void registerBusinessLog(BleLogCallback logCallback)
register business log , Can monitor internal communication logs.
- Parameters:
logCallback- BleLogCallback
-
unregisterBusinessLog
@Deprecated() abstract void unregisterBusinessLog(BleLogCallback logCallback)
unregister business log.
- Parameters:
logCallback- the callback what you want unregister
-
registerDeviceConnectStatus
abstract void registerDeviceConnectStatus(String devId, BleConnectStatusListener statusListener)
register device connection status changes
- Parameters:
devId- device id getDevIdstatusListener- BleConnectStatusListener
-
unregisterDevcieConnectStatus
abstract void unregisterDevcieConnectStatus(String devId)
unregister the monitor
-
registerTransferListener
abstract void registerTransferListener(String devId, OnBleDataTransferListener listener)
Register the custom data channel of some device, the custom data of the device will be returned through the monitoring
- Parameters:
devId- device id getDevIdlistener- OnBleDataTransferListener
-
unregisterTransferListener
abstract void unregisterTransferListener(String devId, OnBleDataTransferListener listener)
Unregister the custom data channel of some device
- Parameters:
devId- device id getDevIdlistener- the listener what you want unregister
-
publishTransferData
abstract void publishTransferData(String devId, Array<byte> raw, IResultCallback iResultCallback)
Send the custom data to the device
- Parameters:
devId- device id getDevIdraw- the custom data defined with equipmentiResultCallback- send result IResultCallback
-
publishSystemTimeWithDeviceId
abstract void publishSystemTimeWithDeviceId(String devId)
Get the system time and send it to the device
- Parameters:
devId- device id getDevId
-
uploadCacheDataToServer
abstract void uploadCacheDataToServer(String devId)
upload dps cache data to server,such as when there is no network during data interaction, it will be cached
- Parameters:
devId- device id getDevId
-
clearBleDataCache
abstract void clearBleDataCache(List<String> devIdList)
clear ble connect cache
-
clearBigDataChannelData
abstract void clearBigDataChannelData(String devId, int type, IResultCallback callback)
-
orderLocalCommunicationList
abstract List<DeviceRespBean.CommunicationModuleT> orderLocalCommunicationList(DeviceRespBean respBean)
order the communication list
-
getDeviceAttribute
abstract void getDeviceAttribute(String deviceId, OnDeviceAttributeListener listener)
get device attribute from device info
- Parameters:
deviceId- device id getDevIdlistener- result callback OnDeviceAttributeListener
-
registerBleIotListener
abstract void registerBleIotListener(OnBleIoTChannelListener listener)
Register the iot data channel of some device, the iot data of the device will be returned through the monitoring
- Parameters:
listener- OnBleIoTChannelListener
-
unregisterBleIotListener
abstract void unregisterBleIotListener(OnBleIoTChannelListener listener)
Unregister the iot data channel listener of some device
- Parameters:
listener- the listener what you want unregister OnBleIoTChannelListener
-
publishIoTTransparentData
abstract void publishIoTTransparentData(String deviceId, DevIotDataBean iotData, OnBleSendChannelListener listener)
Send the iot data to the device
- Parameters:
deviceId- device id getDevIdiotData- the iot data defined with equipmentlistener- send result OnBleSendChannelListener
-
publishTransparentData
abstract void publishTransparentData(String deviceId, Array<byte> data, OnBleSendChannelListener listener)
push user business data to device by BLE
- Parameters:
deviceId- device iddata- user business data(such as timing data)listener- callback
-
registerBleRespListener
abstract void registerBleRespListener(OnBleToDeviceListener listener)
register a listener to accept data from device
- Parameters:
listener- listener
-
unRegisterBleRespListener
abstract void unRegisterBleRespListener(OnBleToDeviceListener listener)
-
getBluetoothState
abstract void getBluetoothState(String devId, IThingResultCallback<BluetoothBondStateBean> response)
-
bindSlaveDeviceToMaster
abstract void bindSlaveDeviceToMaster(String masterDevId, String slaveDevId, IResultCallback callback)
-
unbindSlaveDeviceFromMaster
abstract void unbindSlaveDeviceFromMaster(String masterDevId, String slaveDevId, IResultCallback callback)
-
activeExtenModuleByBLEActived
abstract void activeExtenModuleByBLEActived(String deviceId, IResultCallback iResultCallback)
active exten module by BLE
- Parameters:
deviceId- device IDiResultCallback- send result IResultCallback
-
activeExtenModuleByBLEActived
abstract void activeExtenModuleByBLEActived(String devId, Map<String, Object> params, IResultCallback callback)
-
getExtModuleType
abstract int getExtModuleType(String devId)
-
registerExtModuleStatus
abstract void registerExtModuleStatus(ExtModuleStatusListener listener)
-
unregisterExtModuleStatus
abstract void unregisterExtModuleStatus(ExtModuleStatusListener listener)
-
postFileTransfer
abstract void postFileTransfer(String devId, FileTransferInfo fileTransferInfo, ActionProgressResponse<Boolean> listener)
Transfer files to the device
- Parameters:
devId- device id getDevIdfileTransferInfo- File informationFileTransferInfolistener- file transfer result ActionProgressResponse
-
registerDataLocalProcessingListener
abstract void registerDataLocalProcessingListener(OnDataLocalProcessingListener listener)
-
setLocationWeatherAbility
@Deprecated() abstract void setLocationWeatherAbility(IGetLocationWeather iGetLocationWeather)
set location weather
- Parameters:
iGetLocationWeather- location weather from business layer
-
setLocationWeatherAbility
abstract void setLocationWeatherAbility(IGetCustomLocationWeather iGetLocationWeather)
set location weather
- Parameters:
iGetLocationWeather- location weather from business layer
-
setHomeWeatherAbility
@Deprecated() abstract void setHomeWeatherAbility(IGetHomeWeather iGetHomeWeather)
set home weather
- Parameters:
iGetHomeWeather- home weather from business layer
-
setHomeWeatherAbility
abstract void setHomeWeatherAbility(IGetCustomHomeWeather iGetHomeWeather)
set home weather
- Parameters:
iGetHomeWeather- home weather from business layer
-
readRssiByCache
@Deprecated() abstract int readRssiByCache(String uuid)
-
recoverDeviceStatus
abstract void recoverDeviceStatus(String uuid)
-
queryWifiListForDeviceScan
abstract void queryWifiListForDeviceScan(QueryWifiSetting setting, IThingResultCallback<List<WiFiInfo>> callback)
-
fetchDeviceLog
abstract void fetchDeviceLog(String uuid, IThingResultCallback<Array<byte>> callback)
-
queryActiveStatus
abstract void queryActiveStatus(String uuid, IThingResultCallback<Array<byte>> callback)
-
isDeviceInOta
abstract Boolean isDeviceInOta(String deviceId)
-
getBleConnectAbility
abstract int getBleConnectAbility(String devId)
-
checkBleWifiDeviceReset
abstract void checkBleWifiDeviceReset(CheckDeviceSetting setting, IThingResultCallback<CheckResultBean> callback)
Whether it can be reset, and whether it still needs to be reset in the cloud-bound state
-
startResetBleWifiDevice
abstract void startResetBleWifiDevice(ResetBleSetting setting, IResultCallback callback)
Support Bluetooth scan code reset service
-
getBleExpandAttr
abstract int getBleExpandAttr(String devId)
-
recordBleConnectEvent
abstract void recordBleConnectEvent(String devId, int src, String traceId)
Record ble connect event.
- Parameters:
devId- device idsrc- source, 1 means form lock paneltraceId- trace id, It is used to track the source of the event
-
getBWFlashPackage
abstract BWFlashPackage getBWFlashPackage(String address)
-
getRcs
abstract void getRcs(IThingDataCallback<JSONObject> callback)
-
-
-
-