The Kiiroo Control SDK allows easy connection and control of Kiiroo devices via Bluetooth. This SDK is designed to interact with devices using the Bluetooth Low Energy (BLE) protocol and supports a wide range of features, including battery level monitoring, device control, and over-the-air (OTA) firmware updates.
These features make Kiiroo devices easy to use for both end-users and developers, providing simple ways to control and configure them.
The SDK utilizes BLE services and characteristics to communicate with and control the device. Below are the key services and their respective characteristics:
00001400-0000-1000-8000-00805f9b34fb — the main service for controlling the device.
GATT_MANUFACTURER_NAME_UUID (0x2A29) — reads the manufacturer information.GATT_MODEL_NUMBER_UUID (0x2A24) — reads the model number.GATT_SERIAL_NUMBER_UUID (0x2A25) — retrieves the serial number of the device.GATT_BATTERY_LEVEL_UUID (0x2A19) — allows the device’s battery level to be read and notifications to be sent when the level changes.CHAR_X_UUID (0xFFF1)CHAR_Y_UUID (0xFFF2)CHAR_Z_UUID (0xFFF3)Although the SDK focuses on Bluetooth Control Mode, it also provides functionality for over-the-air (OTA) updates to keep the device firmware up-to-date.
GATT_OTA_DATA_UUID (0x1701) — used to read, write, and notify OTA data.GATT_OTA_CONTROL_UUID (0x1702) — sends control commands to initiate the OTA update process.By default, the MTU for BLE communication is 23 bytes across Android, iOS, and Windows. To optimize the performance of data transmission, especially during OTA updates, the MTU can be negotiated to a larger size, up to 255 bytes, to reduce the transfer time for large data packets.
This SDK is compatible with both React and React Native, providing flexibility for developers working on web or mobile applications:
kiiroo-control-react module is the main entry point for React applications.
@types/web-bluetooth and react.kiiroo-control-react-native module extends the functionality to React Native applications, integrating with react-native-ble-manager for Bluetooth management on mobile devices.Both SDKs come with a set of useful development scripts for building, testing, and linting:
build: Compiles the SDK into distributable bundles.test: Runs unit tests to ensure the SDK is functioning as expected.lint: Lints the TypeScript codebase to enforce code quality and consistency.Toy Control Service to adjust device settings, such as triggering vibration modes or resetting the device to factory settings.Kiiroo Control Bluetooth Service for React
Kiiroo Control Bluetooth Service for React Native
This SDK offers comprehensive BLE control for Kiiroo devices, including full device management through Bluetooth Control Mode, battery monitoring, and firmware updates.