Device Commands
After connecting, use the Device object to collect live data, synchronize stored data, and configure the device.
How SDK commands work
The Device object represents one active connection. Await an asynchronous command before starting an operation that depends on it.
Disconnecting ends commands running for that connection, including background jobs. Offline recording settings are preserved. Start live collection again after each connection.
Asynchronous Device commands return the ID of the process handling them and throw an exception if the device rejects the command. Handle failures when awaiting the command. Reconfiguring or stopping an existing process returns its ID. After a timeout the result is unknown, because the device may still execute the command; the methods below are safe to repeat.
Commands without a process ID
- Setting the device clock uses the Bluetooth Current Time characteristic without starting a process.
- Older firmware returns no process ID for collection (before 3.6.0) or synchronization (before 2.2.18).
- Stopping synchronization returns no process ID if the SDK has no synchronization PID.
Available methods
Use these methods instead of raw shell commands whenever possible:
| Operation | What it controls |
|---|---|
collect(...) | Starts or reconfigures live streaming and chooses what the device records after disconnecting. See Data Types and Events. In Unity, use SetCollectSignals(...) and StartCollectAllAsync(). |
stopCollect() / stop_collect() | Stops live streaming without changing offline storage settings or deleting stored data. |
startSynchronization() / start_synchronization() | Starts transferring historical data from internal memory. See Reading Data from Internal Memory. |
stopSynchronization() / stop_synchronization() | Stops historical data transfer. Live collection continues. |
clearSynchronization() / clear_synchronization() | Deletes historical data stored in internal memory. |
setTime(...) / set_time(...) | Sets the device clock from a Unix timestamp in seconds. |
Additional configuration
To change settings such as LED brightness or ECG sampling frequency, see Configuration.