English
English
简体中文
Register
Log In
English
English
简体中文
Register
Log In
Language
English
English
简体中文
Register
Log In

How to implement Bluetooth Beacon device provisioning?

Last Updated on2025-02-28 07:17:26
The Bluetooth beacon device uses the ThingSmartBeaconKit library for networking,
The related methods are all in the ThingSmartBeaconManager class.
The following methods will be mainly used:
1、@interface Current class ()<ThingSmartBeaconManagerDelegate>
2、[ThingSmartBeaconManager sharedInstance].delegate = self;
3、[[ThingSmartBeaconManager sharedInstance] startScan]; // Start searching for Beacons devices
4、// ThingSmartBeaconManagerDelegate Acquiring devices found by scanning
- (void)didDiscoveryDeviceWithDeviceInfo:(ThingBLEAdvModel *)deviceInfo {}
5、// Activate the Beacons device
[[ThingSmartBeaconManager sharedInstance] activateBeacon:beaconModel homeId:homeId success:^(ThingSmartDeviceModel * _Nonnull deviceModel) { } failure:^(NSError * _Nonnull error) { }];
6、[[ThingSmartBeaconManager sharedInstance] stopActivatingAllBeacons]; // Stop activating all Beacons devices
7、[[ThingSmartBeaconManager sharedInstance] stopScan]; // Stop scanning Beacons devices
Additionally, you can refer to Bluetooth device related integration documents to help you better and faster integrate the SDK.

Click for services and help

Help Center