Skip to content

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 running commands, such as a synchronization. Offline recording continues. Start live collection again after each connection.

The asynchronous methods below return the ID of the process handling them. When the device rejects a command, they throw an error that names the cause, such as sync: busy, and carries the reason. 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; collect, stopCollect and clearSynchronization are safe to repeat.

Rejection reasons ​

ValueReasonMeaning
1UNKNOWN_COMMANDThe device does not know the command.
2NO_FREE_SLOTNo free process slot.
3OUT_OF_MEMORYThe device is out of memory.
4COMMAND_TOO_LONGThe command is too long.
5INVALID_ARGUMENTThe device rejected the arguments.
6BUSYThe command conflicts with the device state, for example clearSynchronization() during a synchronization.
7NO_SUCH_PROCESSkill found no such process.
8NOT_PERMITTEDkill is not permitted.
9NOT_CONNECTEDNo client or a stale session.
10SHUTTING_DOWNThe device is stopping its processes.
-1UNKNOWNThe firmware does not report the reason.

Available methods ​

Use these methods instead of raw shell commands whenever possible:

OperationWhat it controls
collect(...)Starts or reconfigures live streaming and events, and chooses what the device records while it does not stream live. 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. See Clearing stored data.
setTime(...) / set_time(...)Sets the device clock from a Unix timestamp in seconds. The SDK also sets it when it connects.

Additional configuration ​

To change settings such as LED brightness or ECG sampling frequency, see Configuration.