2.0.0-alpha.1 • Published 4 years ago

@novastar/serial v2.0.0-alpha.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

@novastar/serial

Serial binding for @novastar/codec.

Go to API documentation.

Installation

Using npm:

$ npm install --save @novastar/serial@next

or yarn:

$ yarn add @novastar/serial@next

Usage:

import { Request } from '@novastar/codec';
import serial, { findSendingCards } from '@novastar/serial';

const [port] = await findSendingCards();
const session = await serial.open(port.path);
const readReq = new Request(1);
readReq.deviceType = DeviceType.ReceivingCard;
readReq.address = 0x02000001;
readReq.port = 0;
const { data: [value] } = await session.connection.send(readReq);

// Close all serial sessions
serial.release();

The search for connected devices is carried out by the VID/PID pair. At the initial stage, it contains a pair for MCTRL300: '10c4', 'ea60'. Using the API, you can change the list of known devices.

2.2.0-alpha.0

7 months ago

2.1.0

1 year ago

2.0.0

1 year ago

2.0.0-alpha.12

1 year ago

2.0.0-alpha.11

2 years ago

2.0.0-alpha.10

3 years ago

2.0.0-alpha.9

3 years ago

2.0.0-alpha.7

3 years ago

2.0.0-alpha.3

4 years ago

2.0.0-alpha.5

4 years ago

2.0.0-alpha.6

4 years ago

2.0.0-alpha.0

4 years ago

2.0.0-alpha.1

4 years ago

2.0.0-alpha.2

4 years ago

1.0.8

4 years ago

1.0.7

5 years ago

1.0.5

5 years ago