npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@csllc/cs-mb-ble

v1.0.4

Published

NodeJS module that interfaces with Control Solutions LLC CS1814 BLE interfaces, and provides a connection interface for the cs-modbus module

Downloads

28

Readme

cs-mb-ble

NodeJS module that interfaces with Control Solutions LLC CS1814 BLE interfaces, and provides a connection interface for the cs-modbus module

CS1814 Bluetooth Low Energy description

The CS1814 acts as a Bluetooth LE peripheral, which exposes one or more of the following services:

Controller Service

uuid: 6765ed1f4de149e14771a14380c90000 The Controller Service exposes characteristics related to a device, which may be monitored by the central device. The interpretation of some characteristics is product-specific.

Characteristics:

  • Product (uuid 6765ed1f4de149e14771a14380c90003, (Read)) which contains a string identifying the product type. This product type is a primary means of determining how the rest of the characteristics and commands are to be interpreted.

  • Serial (uuid 6765ed1f4de149e14771a14380c90004, (Read)) which contains a string identifying the product.

  • Fault (uuid 6765ed1f4de149e14771a14380c90005, (Read, Notify)). Contains the device's fault information (interpreted according to the Product's user guide). The central device may subscribe to this characteristic to receive updates when the fault status changes.

  • Status1-5 (uuid 6765ed1f4de149e14771a14380c90006 to 6765ed1f4de149e14771a14380c9000a, (Read, Notify)). Contains the device's status information (interpreted according to the Product's user guide). The central device may subscribe to these characteristics to receive updates when status changes.

Command Service

uuid: 49535343fe7d4ae58fa99fafd205e455

The Command Service allows the central device to send commands to the peripheral device and receive responses.

Characteristics:

  • Send (uuid 49535343884143f4a8d4ecbe34729bb3, (Write))

  • Receive (uuid 495353431e4d4bd9ba6123c647249616, (Notify))

To send a command to the device, the Send characteristic is written with a header followed by a number of payload bytes. The header consists of 6 bytes:

Byte 0: transactionId (MSB) Byte 1: transactionId (LSB) Byte 2: protocol (MSB) Byte 3: protocol (LSB) Byte 4: payload length (MSB) Byte 5: payload length (LSB)

The transactionId is assigned by the central device; the peripheral simply includes it in the corresponding response. This can be used by the central device to match responses to the commands that were sent.

The protocol is 0x0000 for MODBUS type messages.

The payload length is the number of bytes that follow the header. For MODBUS (protocol 0x0000) messages, the payload must be at least 2 bytes (a unit ID and function code).

The peripheral device accepts payload lengths up to at least 120 bytes. Payloads longer than the maximum are silently discarded.

The peripheral device will notify the Receive characteristic with a response when the command has been processed. The response consists of a header (containing the same transactionId and protocol as the request) as well as the payload length and payload bytes.

The maximum delay to process a command varies by the type of peripheral; consult device documentation for expected command processing delays.

The peripheral accepts at least two commands at a time, which are processed in order. Sending more than two commands without waiting for a response may result in the extra commands being silently ignored by the peripheral.