UNPKG

react-native-obd-retriver

Version:

A React Native hook library to manage Bluetooth Low Energy connections and communication with ELM327 OBD-II adapters.

46 lines 1.24 kB
export interface BlePeripheral { id: string; name?: string; rssi?: number; } export interface Device extends BlePeripheral { advertising?: { isConnectable?: boolean; serviceUUIDs?: string[]; manufacturerData?: Buffer; serviceData?: Record<string, Buffer>; txPowerLevel?: number; }; } export interface UseBluetoothResult { sendCommand: (command: string, timeout?: number) => Promise<string>; error: Error | null; isAwaitingResponse: boolean; isScanning: boolean; isConnecting: boolean; isDisconnecting: boolean; isStreaming: boolean; lastSuccessfulCommandTimestamp: number | null; device: Device | null; discoveredDevices: Device[]; disconnect: () => Promise<void>; } export interface BluetoothHookResult { sendCommand: (command: string, timeout?: number) => Promise<string | null>; isConnected: boolean; device: Device | null; } export interface BluetoothDevice { id: string; name: string; isConnected: boolean; } export type BluetoothDeviceInfo = { id: string; name: string; }; export type BluetoothDeviceResponse = { id: string; name: string; }; //# sourceMappingURL=bluetooth-types.d.ts.map