Device scanning
Due to the lack of Telink documentation for mobile app's SDK (both Android and iOS version), this module reuses SDK module from the sample apps that can be downloaded via this link http://wiki.telink-semi.cn/wiki/chip-series/TLSR825x-Series/
You can also browse and download the source code of the sample apps (iOS and Android) and the native libraries (iOS and Android, too):
-
TelinkMeshBle
: https://github.com/thanhtunguet/TelinkBleMeshSample Android app
-
TelinkBleMeshLib
: https://github.com/thanhtunguet/TelinkBleMeshLibMesh library for Android
-
TelinkSigMesh
: https://github.com/thanhtunguet/TelinkSigMeshSample iOS app
-
TelinkSigMeshLib
: https://github.com/thanhtunguet/TelinkSigMeshLibMesh library for iOS
Disclaimer: Theses source code above are downloaded from and belong to Telink Wiki. I uploaded the source code to GitHub to download them easier.
- Start adding all devices:
TelinkBle.startAddingAllDevices();
- Listen to event when new device found:
React.useEffect(() => {
return TelinkBle.onDeviceFound((device: DeviceInfo) => {
// do something with this device
});
}, [])
- Listen to event when scanning process completed
React.useEffect(() => {
return TelinkBle.onScanningTimeout(() => {
// update app's UI
});
}, [])