CustomDeviceSpec
Plain, JSON-shaped declaration of a Bluetooth device the SDK has no class for.
Kind: Interface
Package: @ovok/native
Import
import { CustomDeviceSpec } from '@ovok/native/bt-management';
TypeScript shape
interface CustomDeviceSpec {
id?: string;
nameMatch?: string | RegExp;
matchByService?: boolean;
oneReadingPerConnection?: boolean;
sessionPolicy?: CustomSessionPolicy;
clockSync?: ClockSyncCapability;
stuckDataTimeoutMs: number;
services: CustomServiceSpec[];
preferredMtu?: number;
lepu?: CustomLepuSpec;
tmb?: CustomTmbSpec;
}
This is a type-level export; it has no call parameters.
Public members
| Member | Type | Details |
|---|---|---|
id | string | Optional. Reported back as deviceData.name. Built-in names are reserved. |
nameMatch | string | RegExp | Optional. Advertised BLE name. Omit for a service-matched declaration. |
matchByService | boolean | Optional. Match by one of this declaration's service UUIDs when the peripheral has no name. |
oneReadingPerConnection | boolean | Optional. Report one result, then stay quiet until the next connection. |
sessionPolicy | CustomSessionPolicy | Optional. Aggregate valid live samples into one result when the session ends. |
clockSync | ClockSyncCapability | Optional. Declares the clock capability when a custom protocol has been verified. |
stuckDataTimeoutMs | number | Milliseconds without a usable frame before the read is abandoned. 1000-6000000. |
services | CustomServiceSpec[] | — |
preferredMtu | number | Optional. MTU to ask for once connected. A larger one carries a frame in fewer notifications and a command in fewer writes. Omit it to keep whatever the platform negotiates. |
lepu | CustomLepuSpec | Optional. Declares the Lepu/Viatom framed protocol, which brings its own frame reader and its own command sequence. A declaration with this needs no services[].write: commands are built rather than written down, and are addressed through lepu.write. |
tmb | CustomTmbSpec | Optional. Declares the TMB blood-pressure history protocol used by Viatom BP families. |
Learn the workflow
Continue with Bluetooth for the workflow context and examples.