The Bluetooth mesh manager supports common Bluetooth mesh management classes and enables multiple functions. For example, the classes can be called to create groups, send control commands, and remove devices.
More...
#import <ThingBLEMeshManager.h>
The Bluetooth mesh manager supports common Bluetooth mesh management classes and enables multiple functions. For example, the classes can be called to create groups, send control commands, and remove devices.
A large number of extension APIs are available to support various methods and scenarios.
Definition at line 91 of file ThingBLEMeshManager.h.
◆ activeMeshDevice: [1/2]
Activates a specific device.
- Parameters
-
deviceModel | The device model. |
◆ activeMeshDevice: [2/2]
Activates a specific device.
- Parameters
-
deviceModel | The device model. |
◆ activeMeshDeviceIncludeGateway: [1/2]
- (void) activeMeshDeviceIncludeGateway: |
|
(BOOL) |
includeGateway |
|
Activates the device.
- Parameters
-
includeGateway | Specifies whether to activate the gateway. If the value is set to yes , the scanned gateway device is activated and the sub-devices are not activated. If the value is set to no , all scanned sub-devices are activated and the gateway is not activated. |
◆ activeMeshDeviceIncludeGateway: [2/2]
- (void) activeMeshDeviceIncludeGateway: |
|
(BOOL) |
includeGateway |
|
Activates the device.
- Parameters
-
includeGateway | Specifies whether to activate the gateway. If the value is set to yes , the scanned gateway device is activated and the sub-devices are not activated. If the value is set to no , all scanned sub-devices are activated and the gateway is not activated. |
◆ addDeviceAddress:type:groupAddress: [1/2]
- (void) addDeviceAddress: |
|
(uint32_t) |
deviceAddress |
type: |
|
(NSString *) |
type |
groupAddress: |
|
(uint32_t) |
groupAddress |
|
|
| |
Adds a device to a group.
- Parameters
-
deviceAddress | The device address. |
type | The type. |
groupAddress | The group address. |
Provided by category ThingBLEMeshManager(Command).
◆ addDeviceAddress:type:groupAddress: [2/2]
- (void) addDeviceAddress: |
|
(uint32_t) |
deviceAddress |
type: |
|
(NSString *) |
type |
groupAddress: |
|
(uint32_t) |
groupAddress |
|
|
| |
Adds a device to a group.
- Parameters
-
deviceAddress | The device address. |
type | The type. |
groupAddress | The group address. |
Provided by category ThingBLEMeshManager(Command).
◆ clearScanData [1/2]
◆ clearScanData [2/2]
◆ deleteDeviceAddress:type:groupAddress: [1/2]
- (void) deleteDeviceAddress: |
|
(uint32_t) |
deviceAddress |
type: |
|
(NSString *) |
type |
groupAddress: |
|
(uint32_t) |
groupAddress |
|
|
| |
Removes a device from a group.
- Parameters
-
deviceAddress | The device address. |
type | The type. |
groupAddress | The group address. |
Provided by category ThingBLEMeshManager(Command).
◆ deleteDeviceAddress:type:groupAddress: [2/2]
- (void) deleteDeviceAddress: |
|
(uint32_t) |
deviceAddress |
type: |
|
(NSString *) |
type |
groupAddress: |
|
(uint32_t) |
groupAddress |
|
|
| |
Removes a device from a group.
- Parameters
-
deviceAddress | The device address. |
type | The type. |
groupAddress | The group address. |
Provided by category ThingBLEMeshManager(Command).
◆ deleteGroupAddress:type: [1/2]
- (void) deleteGroupAddress: |
|
(uint32_t) |
groupAddress |
type: |
|
(NSString *) |
type |
|
|
| |
Deletes a group from the mesh network.
- Parameters
-
groupAddress | The group address. |
type | The group type. |
Provided by category ThingBLEMeshManager(Command).
◆ deleteGroupAddress:type: [2/2]
- (void) deleteGroupAddress: |
|
(uint32_t) |
groupAddress |
type: |
|
(NSString *) |
type |
|
|
| |
Deletes a group from the mesh network.
- Parameters
-
groupAddress | The group address. |
type | The group type. |
Provided by category ThingBLEMeshManager(Command).
◆ findAllDevicesByVendorIdArray: [1/2]
- (NSMutableArray< NSString * > *) findAllDevicesByVendorIdArray: |
|
(NSArray *) |
vendorIdArray |
|
◆ findAllDevicesByVendorIdArray: [2/2]
- (NSMutableArray< NSString * > *) findAllDevicesByVendorIdArray: |
|
(NSArray *) |
vendorIdArray |
|
◆ getDeviceCountdownWithAddress:type: [1/2]
- (void) getDeviceCountdownWithAddress: |
|
(uint32_t) |
address |
type: |
|
(NSString *) |
type |
|
|
| |
Returns the countdown data of a device (exclusive for electrical devices).
- Parameters
-
address | The device address. |
type | The type. |
Provided by category ThingBLEMeshManager(Command).
◆ getDeviceCountdownWithAddress:type: [2/2]
- (void) getDeviceCountdownWithAddress: |
|
(uint32_t) |
address |
type: |
|
(NSString *) |
type |
|
|
| |
Returns the countdown data of a device (exclusive for electrical devices).
- Parameters
-
address | The device address. |
type | The type. |
Provided by category ThingBLEMeshManager(Command).
◆ getDevicesAddressWithGroupAddress:type: [1/2]
- (void) getDevicesAddressWithGroupAddress: |
|
(uint32_t) |
groupAddress |
type: |
|
(NSString *) |
type |
|
|
| |
Returns all devices in a group.
- Parameters
-
groupAddress | The group address. |
type | The group type. |
Provided by category ThingBLEMeshManager(Command).
◆ getDevicesAddressWithGroupAddress:type: [2/2]
- (void) getDevicesAddressWithGroupAddress: |
|
(uint32_t) |
groupAddress |
type: |
|
(NSString *) |
type |
|
|
| |
Returns all devices in a group.
- Parameters
-
groupAddress | The group address. |
type | The group type. |
Provided by category ThingBLEMeshManager(Command).
◆ getDeviceStatusAllWithAddress:type: [1/2]
- (void) getDeviceStatusAllWithAddress: |
|
(uint32_t) |
address |
type: |
|
(NSString *) |
type |
|
|
| |
Returns the status of a device, such as the RGB of a light.
- Parameters
-
address | The device address. |
type | The type. |
Provided by category ThingBLEMeshManager(Command).
◆ getDeviceStatusAllWithAddress:type: [2/2]
- (void) getDeviceStatusAllWithAddress: |
|
(uint32_t) |
address |
type: |
|
(NSString *) |
type |
|
|
| |
Returns the status of a device, such as the RGB of a light.
- Parameters
-
address | The device address. |
type | The type. |
Provided by category ThingBLEMeshManager(Command).
◆ getGroupAddressWithDeviceAddress:type: [1/2]
- (void) getGroupAddressWithDeviceAddress: |
|
(uint32_t) |
deviceAddress |
type: |
|
(NSString *) |
type |
|
|
| |
Returns the group address for the device.
- Parameters
-
deviceAddress | The device address. |
type | The type. |
Provided by category ThingBLEMeshManager(Command).
◆ getGroupAddressWithDeviceAddress:type: [2/2]
- (void) getGroupAddressWithDeviceAddress: |
|
(uint32_t) |
deviceAddress |
type: |
|
(NSString *) |
type |
|
|
| |
Returns the group address for the device.
- Parameters
-
deviceAddress | The device address. |
type | The type. |
Provided by category ThingBLEMeshManager(Command).
◆ getLightAllStatus [1/2]
- (void) getLightAllStatus |
|
|
|
◆ getLightAllStatus [2/2]
- (void) getLightAllStatus |
|
|
|
◆ getLightSceneModelWithAddress:type: [1/2]
- (void) getLightSceneModelWithAddress: |
|
(uint32_t) |
address |
type: |
|
(NSString *) |
type |
|
|
| |
Reads the scene mode of the light (exclusive for the lighting class).
- Parameters
-
address | The device address. |
type | The device size class. |
Provided by category ThingBLEMeshManager(Command).
◆ getLightSceneModelWithAddress:type: [2/2]
- (void) getLightSceneModelWithAddress: |
|
(uint32_t) |
address |
type: |
|
(NSString *) |
type |
|
|
| |
Reads the scene mode of the light (exclusive for the lighting class).
- Parameters
-
address | The device address. |
type | The device size class. |
Provided by category ThingBLEMeshManager(Command).
◆ getProductNameByProductId:completion: [1/2]
- (void) getProductNameByProductId: |
|
(NSString *) |
productId |
completion: |
|
(void(^)(NSString *)) |
completion |
|
|
| |
To get the mesh product name, you must associate the product with the app in advance. Otherwise, null is returned.
- Parameters
-
productId | The product ID. |
completion | Completes the callback. |
◆ getProductNameByProductId:completion: [2/2]
- (void) getProductNameByProductId: |
|
(NSString *) |
productId |
completion: |
|
(void(^)(NSString *)) |
completion |
|
|
| |
To get the mesh product name, you must associate the product with the app in advance. Otherwise, null is returned.
- Parameters
-
productId | The product ID. |
completion | Completes the callback. |
◆ getSensorStateWithAddress:dps:type: [1/2]
- (void) getSensorStateWithAddress: |
|
(uint32_t) |
deviceAddress |
dps: |
|
(NSArray *) |
dps |
type: |
|
(NSString *) |
type |
|
|
| |
Returns the state of the low-power contact sensor.
- Parameters
-
deviceAddress | The device address. |
dps | The DPs. |
type | The type. |
Provided by category ThingBLEMeshManager(Command).
◆ getSensorStateWithAddress:dps:type: [2/2]
- (void) getSensorStateWithAddress: |
|
(uint32_t) |
deviceAddress |
dps: |
|
(NSArray *) |
dps |
type: |
|
(NSString *) |
type |
|
|
| |
Returns the state of the low-power contact sensor.
- Parameters
-
deviceAddress | The device address. |
dps | The DPs. |
type | The type. |
Provided by category ThingBLEMeshManager(Command).
◆ isConnected [1/2]
◆ isConnected [2/2]
◆ isConnectOTAAddress
- (void(^)) isConnectOTAAddress |
|
(BOOL) |
isSuccess |
|
◆ kickoutLightWithAddress:type: [1/2]
- (void) kickoutLightWithAddress: |
|
(uint32_t) |
address |
type: |
|
(NSString *) |
type |
|
|
| |
Removes a device from the mesh network.
- Parameters
-
address | The device address. |
type | The type. |
Provided by category ThingBLEMeshManager(Command).
◆ kickoutLightWithAddress:type: [2/2]
- (void) kickoutLightWithAddress: |
|
(uint32_t) |
address |
type: |
|
(NSString *) |
type |
|
|
| |
Removes a device from the mesh network.
- Parameters
-
address | The device address. |
type | The type. |
Provided by category ThingBLEMeshManager(Command).
◆ rawDataAddDeviceAddress:groupAddress:type: [1/2]
- (NSString *) rawDataAddDeviceAddress: |
|
(uint32_t) |
deviceAddress |
groupAddress: |
|
(uint32_t) |
groupAddress |
type: |
|
(NSString *) |
type |
|
|
| |
Adds a device to a group.
- Parameters
-
deviceAddress | The device address. |
groupAddress | The group address. |
type | The type. |
Provided by category ThingBLEMeshManager(Raw).
◆ rawDataAddDeviceAddress:groupAddress:type: [2/2]
- (NSString *) rawDataAddDeviceAddress: |
|
(uint32_t) |
deviceAddress |
groupAddress: |
|
(uint32_t) |
groupAddress |
type: |
|
(NSString *) |
type |
|
|
| |
Adds a device to a group.
- Parameters
-
deviceAddress | The device address. |
groupAddress | The group address. |
type | The type. |
Provided by category ThingBLEMeshManager(Raw).
◆ rawDataCountDownWithAddress:type: [1/2]
- (NSString *) rawDataCountDownWithAddress: |
|
(uint32_t) |
address |
type: |
|
(NSString *) |
type |
|
|
| |
Returns the device countdown (exclusive for electrical devices).
- Parameters
-
address | Teh device address. |
type | The type. |
Provided by category ThingBLEMeshManager(Raw).
◆ rawDataCountDownWithAddress:type: [2/2]
- (NSString *) rawDataCountDownWithAddress: |
|
(uint32_t) |
address |
type: |
|
(NSString *) |
type |
|
|
| |
Returns the device countdown (exclusive for electrical devices).
- Parameters
-
address | Teh device address. |
type | The type. |
Provided by category ThingBLEMeshManager(Raw).
◆ rawDataDeleteDeviceAddress:groupAddress:type: [1/2]
- (NSString *) rawDataDeleteDeviceAddress: |
|
(uint32_t) |
deviceAddress |
groupAddress: |
|
(uint32_t) |
groupAddress |
type: |
|
(NSString *) |
type |
|
|
| |
Removes a device from a group.
- Parameters
-
deviceAddress | The device address. |
groupAddress | The group address. |
type | The type. |
Provided by category ThingBLEMeshManager(Raw).
◆ rawDataDeleteDeviceAddress:groupAddress:type: [2/2]
- (NSString *) rawDataDeleteDeviceAddress: |
|
(uint32_t) |
deviceAddress |
groupAddress: |
|
(uint32_t) |
groupAddress |
type: |
|
(NSString *) |
type |
|
|
| |
Removes a device from a group.
- Parameters
-
deviceAddress | The device address. |
groupAddress | The group address. |
type | The type. |
Provided by category ThingBLEMeshManager(Raw).
◆ rawDataDeleteGroupAddress:type: [1/2]
- (NSString *) rawDataDeleteGroupAddress: |
|
(uint32_t) |
groupAddress |
type: |
|
(NSString *) |
type |
|
|
| |
The commands are sent and controlled through the gateway. Deletes a group from the mesh network.
- Parameters
-
groupAddress | The group address. |
type | The type. |
Provided by category ThingBLEMeshManager(Raw).
◆ rawDataDeleteGroupAddress:type: [2/2]
- (NSString *) rawDataDeleteGroupAddress: |
|
(uint32_t) |
groupAddress |
type: |
|
(NSString *) |
type |
|
|
| |
The commands are sent and controlled through the gateway. Deletes a group from the mesh network.
- Parameters
-
groupAddress | The group address. |
type | The type. |
Provided by category ThingBLEMeshManager(Raw).
◆ rawDataGetDevicesAddressWithGroupAddress:type: [1/2]
- (NSString *) rawDataGetDevicesAddressWithGroupAddress: |
|
(uint32_t) |
groupAddress |
type: |
|
(NSString *) |
type |
|
|
| |
Returns all devices in the specified group.
- Parameters
-
groupAddress | The group address. |
type | The type. |
Provided by category ThingBLEMeshManager(Raw).
◆ rawDataGetDevicesAddressWithGroupAddress:type: [2/2]
- (NSString *) rawDataGetDevicesAddressWithGroupAddress: |
|
(uint32_t) |
groupAddress |
type: |
|
(NSString *) |
type |
|
|
| |
Returns all devices in the specified group.
- Parameters
-
groupAddress | The group address. |
type | The type. |
Provided by category ThingBLEMeshManager(Raw).
◆ rawDataGetStatusAllWithAddress:type: [1/2]
- (NSString *) rawDataGetStatusAllWithAddress: |
|
(uint32_t) |
address |
type: |
|
(NSString *) |
type |
|
|
| |
Returns the status of the specified device.
- Parameters
-
address | The device address. |
type | The type. |
Provided by category ThingBLEMeshManager(Raw).
◆ rawDataGetStatusAllWithAddress:type: [2/2]
- (NSString *) rawDataGetStatusAllWithAddress: |
|
(uint32_t) |
address |
type: |
|
(NSString *) |
type |
|
|
| |
Returns the status of the specified device.
- Parameters
-
address | The device address. |
type | The type. |
Provided by category ThingBLEMeshManager(Raw).
◆ rawDataKickoutLightWithAddress:type: [1/2]
- (NSString *) rawDataKickoutLightWithAddress: |
|
(uint32_t) |
address |
type: |
|
(NSString *) |
type |
|
|
| |
Kicks a device out of the mesh network.
- Parameters
-
address | The device address. |
type | The type. |
Provided by category ThingBLEMeshManager(Raw).
◆ rawDataKickoutLightWithAddress:type: [2/2]
- (NSString *) rawDataKickoutLightWithAddress: |
|
(uint32_t) |
address |
type: |
|
(NSString *) |
type |
|
|
| |
Kicks a device out of the mesh network.
- Parameters
-
address | The device address. |
type | The type. |
Provided by category ThingBLEMeshManager(Raw).
◆ readFirmwareFeature [1/2]
- (void) readFirmwareFeature |
|
|
|
Reads the firmware version number.
◆ readFirmwareFeature [2/2]
- (void) readFirmwareFeature |
|
|
|
Reads the firmware version number.
◆ sendCommand: [1/2]
Sends a command.
- Parameters
-
◆ sendCommand: [2/2]
Sends a command.
- Parameters
-
◆ sendOTAPackWithAddress:version:otaData:success:failure: [1/2]
Sends the update package.
- Parameters
-
address | The device address. |
version | The version. |
otaData | The OTA data. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
◆ sendOTAPackWithAddress:version:otaData:success:failure: [2/2]
Sends the update package.
- Parameters
-
address | The device address. |
version | The version. |
otaData | The OTA data. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
◆ setLightModelWithAddress:type:isGroup:param: [1/2]
- (void) setLightModelWithAddress: |
|
(uint32_t) |
address |
type: |
|
(NSString *) |
type |
isGroup: |
|
(BOOL) |
isGroup |
param: |
|
(NSArray< NSString * > *) |
param |
|
|
| |
Sets the mode of the light (exclusive for the lighting class).
- Parameters
-
address | The address. |
type | The device size class. |
isGroup | Indicates whether a group is used. |
param | The parameter. |
Provided by category ThingBLEMeshManager(Command).
◆ setLightModelWithAddress:type:isGroup:param: [2/2]
- (void) setLightModelWithAddress: |
|
(uint32_t) |
address |
type: |
|
(NSString *) |
type |
isGroup: |
|
(BOOL) |
isGroup |
param: |
|
(NSArray< NSString * > *) |
param |
|
|
| |
Sets the mode of the light (exclusive for the lighting class).
- Parameters
-
address | The address. |
type | The device size class. |
isGroup | Indicates whether a group is used. |
param | The parameter. |
Provided by category ThingBLEMeshManager(Command).
◆ sharedInstance [1/2]
+ (instancetype) sharedInstance |
|
|
|
◆ sharedInstance [2/2]
+ (instancetype) sharedInstance |
|
|
|
◆ startConfigWiFiWithSsid:pwd:token: [1/2]
- (void) startConfigWiFiWithSsid: |
|
(NSString *) |
ssid |
pwd: |
|
(NSString *) |
pwd |
token: |
|
(NSString *) |
token |
|
|
| |
Writes Wi-Fi information to the gateway. This method is automatically called after activation with the SDK.
- Parameters
-
ssid | The name of the router hotspot. |
pwd | The password of the router hotspot. |
token | The pairing token. |
◆ startConfigWiFiWithSsid:pwd:token: [2/2]
- (void) startConfigWiFiWithSsid: |
|
(NSString *) |
ssid |
pwd: |
|
(NSString *) |
pwd |
token: |
|
(NSString *) |
token |
|
|
| |
Writes Wi-Fi information to the gateway. This method is automatically called after activation with the SDK.
- Parameters
-
ssid | The name of the router hotspot. |
pwd | The password of the router hotspot. |
token | The pairing token. |
◆ startScanWithName:pwd:active:wifiAddress:otaAddress: [1/2]
- (void) startScanWithName: |
|
(NSString *) |
name |
pwd: |
|
(NSString *) |
pwd |
active: |
|
(BOOL) |
active |
wifiAddress: |
|
(uint32_t) |
wifiAddress |
otaAddress: |
|
(uint32_t) |
otaAddress |
|
|
| |
The mesh entrance. To pair the device, enter the default mesh name and password. In this case, only the value of -(void) blemeshmanager: (thingblemeshmanager *) manager didscaneddevice: (thingblemeshdevicemodel *) device;
is returned as the scanning result.
- Parameters
-
name | The mesh name. |
pwd | The mesh password. |
active | Specifies whether to activate the gateway for pairing. |
wifiAddress | The Wi-Fi address that is used for gateway pairing. Set the value to 0 for other operations. |
otaAddress | The device address for OTA updates. Set the value to 0 for other operations. |
◆ startScanWithName:pwd:active:wifiAddress:otaAddress: [2/2]
- (void) startScanWithName: |
|
(NSString *) |
name |
pwd: |
|
(NSString *) |
pwd |
active: |
|
(BOOL) |
active |
wifiAddress: |
|
(uint32_t) |
wifiAddress |
otaAddress: |
|
(uint32_t) |
otaAddress |
|
|
| |
The mesh entrance. To pair the device, enter the default mesh name and password. In this case, only the value of -(void) blemeshmanager: (thingblemeshmanager *) manager didscaneddevice: (thingblemeshdevicemodel *) device;
is returned as the scanning result.
- Parameters
-
name | The mesh name. |
pwd | The mesh password. |
active | Specifies whether to activate the gateway for pairing. |
wifiAddress | The Wi-Fi address that is used for gateway pairing. Set the value to 0 for other operations. |
otaAddress | The device address for OTA updates. Set the value to 0 for other operations. |
◆ stopActiveDevice [1/2]
- (void) stopActiveDevice |
|
|
|
Stops activating devices.
◆ stopActiveDevice [2/2]
- (void) stopActiveDevice |
|
|
|
Stops activating devices.
◆ stopScan [1/2]
◆ stopScan [2/2]
◆ authKey
The device authorization key (AuthKey) that is used for activation.
Definition at line 121 of file ThingBLEMeshManager.h.
◆ delegate
◆ isConnectOTAAddress
- (void(^ isConnectOTAAddress) (BOOL isSuccess)) |
|
readwritenonatomiccopy |
◆ isLogin
◆ isPoweredOn
◆ isWifiDevice
◆ otaAddress
Returns the node address of the device that receives and installs over-the-air (OTA) updates.
Definition at line 109 of file ThingBLEMeshManager.h.
◆ password
◆ productId
◆ ssid
◆ token
◆ uuid
◆ version
◆ wifiAddress
◆ wifiMac
The documentation for this class was generated from the following files:
- /Users/humtong/Downloads/Pods_副本/ThingSmartBLEMeshKit/Build/ThingSmartBLEMeshKit.xcframework/ios-arm64_x86_64-simulator/ThingSmartBLEMeshKit.framework/Headers/ThingBLEMeshManager.h
- /Users/humtong/Downloads/Pods_副本/ThingSmartBLEMeshKit/Build/ThingSmartBLEMeshKit.xcframework/ios-arm64/ThingSmartBLEMeshKit.framework/Headers/ThingBLEMeshManager.h