react-native-serialport-bluetooth
Version:
comunicacao serialport e bluetooth para android
18 lines • 778 B
TypeScript
export interface Device {
readonly name: string;
readonly type: 'bluetooth' | 'usb';
readonly deviceId: number;
readonly vendorId: number;
readonly productId: number;
}
interface SerialportBluetoothAPI {
list(): Promise<Device[]>;
tryRequestPermission(deviceId: number): Promise<number>;
hasPermission(deviceId: number): Promise<boolean>;
open(deviceId: number, baudRate: number, dataBits: number, stopBits: number, parity: number, readWaitMillis: number, writeWaitMillis: number): Promise<number>;
send(deviceId: number, hexStr: string): Promise<null>;
close(deviceId: number): Promise<null>;
}
declare const SerialportBluetooth: SerialportBluetoothAPI;
export default SerialportBluetooth;
//# sourceMappingURL=native_module.d.ts.map