@mmote/niimblue-node 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,7 +11,7 @@ Windows:
11
11
  * Windows 10
12
12
  * Bluetooth adapter (TP-LINK UB500)
13
13
  * USB serial connection
14
- * Printers: B1, D110
14
+ * Printers: B1, D110, B21_C2B, B21_PRO
15
15
 
16
16
  Mac:
17
17
 
@@ -19,6 +19,8 @@ Mac:
19
19
  * Integrated Bluetooth adapter
20
20
  * Printer: D110
21
21
 
22
+ [Protocol tested with these models (niimbluelib repo)](https://github.com/MultiMote/niimbluelib/issues/1).
23
+
22
24
  Usage example:
23
25
 
24
26
  * [src/service.ts](src/service.ts)
@@ -99,6 +101,12 @@ B1 serial, long parameter names (will resize image to fit 50x30 label, keeping a
99
101
  niimblue-cli print --debug --transport serial --address COM8 --print-task B1 --print-direction top --label-width 384 --label-height 240 label_15x30.png
100
102
  ```
101
103
 
104
+ B21_PRO BLE, long parameter names (will resize image to fit 50x30 300dpi label, don't keep aspect ratio):
105
+
106
+ ```bash
107
+ niimblue-cli print --debug --transport ble --address c3:16:13:04:06:18 --print-task D110M_V4 --print-direction top --label-width 584 --label-height 354 --image-fit fill label_15x30.png
108
+ ```
109
+
102
110
  B1 firmware upgrade via serial:
103
111
 
104
112
  ```bash
@@ -119,4 +127,6 @@ Enable debug logging, set host and port, enable CORS:
119
127
  niimblue-cli server -d -h 0.0.0.0 -p 5000 --cors
120
128
  ```
121
129
 
130
+ See [sharp docs](https://sharp.pixelplumbing.com/api-resize/) for image resize options.
131
+
122
132
  [Server API docs](https://niimnode-docs.pages.dev/server/)
package/dist/utils.js CHANGED
@@ -66,7 +66,7 @@ const printImage = async (client, printTaskName, encoded, options) => {
66
66
  catch (e) {
67
67
  console.error(e);
68
68
  }
69
- await client.abstraction.printEnd();
69
+ await printTask.printEnd();
70
70
  };
71
71
  exports.printImage = printImage;
72
72
  const loadImageFromBase64 = async (b64) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmote/niimblue-node",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "Headless clients for niimbluelib. Command line interface, simple REST server are also included.",
5
5
  "keywords": [
6
6
  "command-line",
@@ -9,6 +9,7 @@
9
9
  "niimbot",
10
10
  "niimbot-d110",
11
11
  "niimbot-b1",
12
+ "niimbot-b21",
12
13
  "bluetooth",
13
14
  "serial"
14
15
  ],
@@ -39,7 +40,7 @@
39
40
  "dependencies": {
40
41
  "@abandonware/noble": "^1.9.2-26",
41
42
  "@commander-js/extra-typings": "^12.1.0",
42
- "@mmote/niimbluelib": "0.0.1-alpha.26",
43
+ "@mmote/niimbluelib": "0.0.1-alpha.29",
43
44
  "async-mutex": "^0.5.0",
44
45
  "commander": "^12.1.0",
45
46
  "serialport": "^12.0.0",