Skip to content

Fitbit/pulse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Aug 17, 2022
ce4e21a · Aug 17, 2022

History

16 Commits
Aug 1, 2022
Jan 12, 2022
Jul 28, 2022
Jan 12, 2022
Jan 12, 2022
Jul 27, 2022
Jan 12, 2022
Jan 12, 2022
Jan 12, 2022
Jan 12, 2022
Jul 27, 2022
Jul 27, 2022
Jan 21, 2022
Jul 27, 2022
Aug 17, 2022
Jan 12, 2022
Jan 12, 2022
Jan 12, 2022

Repository files navigation

@fitbit/pulse

PULSE is a layered protocol stack. The link layer provides integrity-assured delivery of packet data. On top of the link layer is a suite of transport protocols which provide multiprotocol delivery of application datagrams with or without guaranteed reliable in-order delivery. Application protocols use one or more of the available transports to exchange datagrams between the firmware running on a board and a host workstation.

This repo provides a TypeScript implementation of the protocol stack with minimal dependencies.

Example usage:

import SerialPort from 'serialport';

const port = new SerialPort('/dev/cu.usbmodem01013');
const intf = Interface.create(port); // Port can be any duplex stream

intf.getLink(async link => {
  const transportType = 'reliable'; // reliable or bestEffort
  const port = 0x3e20; // Port number specific to your usage, must be <= 65535

  const socket = await link.openSocket(transportType, port);

  socket.on('data', msg => console.log(`RX data: ${msg}`));
  socket.send(Buffer.from('Hello world!'));
});

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published