TelinkSigMeshLib
This library is a part of Telink Sig Mesh SDK. Published to GitHub for personal usage only. Visit the Telink Wiki to acquire the full SDK zip file and development handbooks.
Install / Use
/learn @thanhtunguet/TelinkSigMeshLibREADME
TelinkSigMeshLib
version: v3.3.2
About
The TelinkSigMeshLib library allows to provision、keybind and send messages to Bluetooth Mesh devices.
Bluetooth Mesh specification may be found here: https://www.bluetooth.com/specifications/mesh-specifications/
The library is compatible with version 1.0.1 of the Bluetooth Mesh Profile Specification.
Sample app
The sample application demonstrates how to use the library.
Supported features
- GATT provisioning with no oob devices and static oob devices that available in Bluetooth Mesh Profile 1.0.1.
- Fast provisioning with no oob devices that avilable the telink private protocol.
- Normal keybind:connect node -> read servers -> open notify -> set filter -> get composition -> appkey add -> bind model to appkey.
- Fast keybind(Default Bound, node need avilable the telink private protocol):connect node -> read servers -> open notify -> set filter -> appkey add.
- Control node with unicastAddress and groupAddress:onoff,light,temperature,level,HSL.
- Setting and clearing publication to a Model.
- Setting and removing subscriptions to a Model.
- Add node to group and delete node from group.
- Add LPN node.
- GATT OTA: nodes need avilable the telink private protocol.
- Scheduler models.
- Scene models.
- Proxy Filter.
Requirements
- Xcode 11.0 or newer.
- An iOS 9.0 or newer device with BLE capabilities.
Setting up the library
- copy folder
TelinkSigMeshLibto your project, thenLink Binary With LibrariestheTelinkSigMeshLib.framework.
Open API
-
- Start SDK.
[SDKLibCommand startMeshSDK];
-
- Set SDK log level.
[SigLogger.share setSDKLogLevel:SigLogLevelDebug];
-
- GATT add nodes API1 (auto add)
- (void)startAddDeviceWithNextAddress:(UInt16)address networkKey:(NSData *)networkKey netkeyIndex:(UInt16)netkeyIndex appkeyModel:(SigAppkeyModel *)appkeyModel unicastAddress:(UInt16)unicastAddress uuid:(nullable NSData *)uuid keyBindType:(KeyBindTpye)type productID:(UInt16)productID cpsData:(nullable NSData *)cpsData isAutoAddNextDevice:(BOOL)isAuto provisionSuccess:(addDevice_prvisionSuccessCallBack)provisionSuccess provisionFail:(ErrorBlock)provisionFail keyBindSuccess:(addDevice_keyBindSuccessCallBack)keyBindSuccess keyBindFail:(ErrorBlock)keyBindFail finish:(AddDeviceFinishCallBack)finish;
-
- GATT add node API2 (single add)
- (void)startAddDeviceWithNextAddress:(UInt16)address networkKey:(NSData *)networkKey netkeyIndex:(UInt16)netkeyIndex appkeyModel:(SigAppkeyModel *)appkeyModel peripheral:(CBPeripheral *)peripheral provisionType:(ProvisionTpye)provisionType staticOOBData:(nullable NSData *)staticOOBData keyBindType:(KeyBindTpye)type productID:(UInt16)productID cpsData:(nullable NSData *)cpsData provisionSuccess:(addDevice_prvisionSuccessCallBack)provisionSuccess provisionFail:(ErrorBlock)provisionFail keyBindSuccess:(addDevice_keyBindSuccessCallBack)keyBindSuccess keyBindFail:(ErrorBlock)keyBindFail;
-
- GATT add node API3: simple api (single add)
- (void)startAddDeviceWithSigAddConfigModel:(SigAddConfigModel *)configModel provisionSuccess:(addDevice_prvisionSuccessCallBack)provisionSuccess provisionFail:(ErrorBlock)provisionFail keyBindSuccess:(addDevice_keyBindSuccessCallBack)keyBindSuccess keyBindFail:(ErrorBlock)keyBindFail;
-
- Add nodes by fast provision
- (void)startFastProvisionWithProvisionAddress:(UInt16)provisionAddress productId:(UInt16)productId compositionData:(NSData *)compositionData currentConnectedNodeIsUnprovisioned:(BOOL)unprovisioned addSingleDeviceSuccessCallback:(AddSingleDeviceSuccessOfFastProvisionCallBack)singleSuccess finish:(ErrorBlock)finish;
-
- Start connect mesh network(this api will retry connect action every 5 seconds unless connect success or call
stopMeshConnectWithComplete:)
- Start connect mesh network(this api will retry connect action every 5 seconds unless connect success or call
- (void)startMeshConnectWithComplete:(nullable startMeshConnectResultBlock)complete;
-
- Stop connect mesh network
- (void)stopMeshConnectWithComplete:(nullable stopMeshConnectResultBlock)complete;
-
- Control node: OnOffSet(more control api in
SDKLibCommand)
- Control node: OnOffSet(more control api in
+ (SigMessageHandle *)genericOnOffSetWithDestination:(UInt16)destination isOn:(BOOL)isOn retryCount:(NSInteger)retryCount responseMaxCount:(NSInteger)responseMaxCount ack:(BOOL)ack successCallback:(responseGenericOnOffStatusMessageBlock)successCallback resultCallback:(resultBlock)resultCallback;
-
- Send ini command API1(api reference c-lib SDK, iniData like "a3ff000000000200ffffc21102c4020100".)
+ (nullable NSError *)sendOpINIData:(NSData *)iniData successCallback:(responseAllMessageBlock)successCallback resultCallback:(resultBlock)resultCallback;
-
- Send ini command API2
+ (nullable NSError *)sendIniCommandModel:(IniCommandModel *)model successCallback:(responseAllMessageBlock)successCallback resultCallback:(resultBlock)resultCallback;
-
- Message's live from TelinkSigMeshLib(developer need set
SigMeshLib.share.delegateForDeveloper = self;)
- Message's live from TelinkSigMeshLib(developer need set
12.1. APP did Receive Message from node.
- (void)didReceiveMessage:(SigMeshMessage *)message sentFromSource:(UInt16)source toDestination:(UInt16)destination;
12.2. APP did Send Message to node.
- (void)didSendMessage:(SigMeshMessage *)message fromLocalElement:(SigElementModel *)localElement toDestination:(UInt16)destination;
12.3. APP failed To Send Message.
- (void)failedToSendMessage:(SigMeshMessage *)message fromLocalElement:(SigElementModel *)localElement toDestination:(UInt16)destination error:(NSError *)error;
12.4. APP did Receive SigProxyConfiguration Message from node.
- (void)didReceiveSigProxyConfigurationMessage:(SigProxyConfigurationMessage *)message sentFromSource:(UInt16)source toDestination:(UInt16)destination;
SigMesh iOS SDK of Telink Semiconductor (Shanghai) Co., Ltd.
Related Skills
node-connect
349.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.7kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
