Skip to content

Node.js clients for niimbluelib, NIIMBOT CLI interface, NIIMBOT print server

Notifications You must be signed in to change notification settings

MultiMote/niimbluelib-headless

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f1c67a7 · Feb 19, 2025

History

20 Commits
Feb 19, 2025
Jan 10, 2025
Sep 14, 2024
Feb 19, 2025
Oct 22, 2024
Sep 14, 2024
Oct 22, 2024
Feb 19, 2025
Feb 19, 2025
Dec 7, 2024
Sep 14, 2024

Repository files navigation

NiimBlueLib-Headless NPM

niimbluelib client implementations for not-browser use.

Command line interface, simple REST server are also included.

Tested with:

  • Windows 10
  • Bluetooth adapter (TP-LINK UB500)
  • USB serial connection
  • Printers: B1, D110

Usage example:

Install

Global (for cli usage):

npm i -g @mmote/niimbluelib-headless

node-gyp is required to install bluetooth-serial-port dependency. It requires working compiler installed on your system.

See node-gyp and bluetooth-serial-port installation.

Command-line usage

While development:

npm run cli <options>

If installed as package globally:

niimblue-cli <options>

Available options:

niimblue-cli help print
niimblue-cli help info
niimblue-cli help server
niimblue-cli help flash

Examples

B1 serial:

niimblue-cli print -d -t serial -a COM8 -p B1 -o top label_15x30.png

B1 Bluetooth:

niimblue-cli print -d -t bluetooth -a 07:27:03:17:6E:82 -p B1 -o top label_15x30.png

D110 Bluetooth:

niimblue-cli print -d -t bluetooth -a 03:26:03:C3:F9:11 -p D110 -o left label_15x30.png

B1 firmware upgrade via serial:

niimblue-cli flash -t serial -a COM8 -n 5.14 -f path/to/B1_5.14.bin

Server mode

Warning

This is experimental feature.

You can start the server with:

niimblue-cli server

Enable debug logging, set host and port:

niimblue-cli server -d -h 0.0.0.0 -p 5000

See request examples in server-test.http.

About

Node.js clients for niimbluelib, NIIMBOT CLI interface, NIIMBOT print server

Topics

Resources

Stars

Watchers

Forks