bluetooth-serial-port 3.0.2 → 3.0.4-beta.11

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.
Files changed (58) hide show
  1. package/README.md +14 -6
  2. package/lib/bluetooth-serial-port.js +8 -4
  3. package/lib/device-inquiry.js +3 -4
  4. package/package.json +20 -8
  5. package/prebuilds/bluetooth-serial-port-v3.0.4-node-v108-linux-arm64.tar.gz +0 -0
  6. package/prebuilds/linux-x64/BluetoothSerialPort.abi108.node +0 -0
  7. package/prebuilds/linux-x64/BluetoothSerialPort.abi115.node +0 -0
  8. package/prebuilds/linux-x64/BluetoothSerialPort.abi127.node +0 -0
  9. package/prebuilds/linux-x64/BluetoothSerialPort.abi137.node +0 -0
  10. package/prebuilds/linux-x64/BluetoothSerialPortServer.abi108.node +0 -0
  11. package/prebuilds/linux-x64/BluetoothSerialPortServer.abi115.node +0 -0
  12. package/prebuilds/linux-x64/BluetoothSerialPortServer.abi127.node +0 -0
  13. package/prebuilds/linux-x64/BluetoothSerialPortServer.abi137.node +0 -0
  14. package/prebuilds/win32-x64/BluetoothSerialPort.abi108.node +0 -0
  15. package/prebuilds/win32-x64/BluetoothSerialPort.abi115.node +0 -0
  16. package/prebuilds/win32-x64/BluetoothSerialPort.abi127.node +0 -0
  17. package/prebuilds/win32-x64/BluetoothSerialPort.abi137.node +0 -0
  18. package/scripts/create-prebuilds.js +42 -0
  19. package/scripts/download-prebuilds.js +98 -0
  20. package/scripts/load-native.js +39 -0
  21. package/src/linux/BTSerialPortBinding.cc +1 -0
  22. package/src/linux/DeviceINQ.cc +7 -1
  23. package/src/windows/BTSerialPortBinding.cc +1 -0
  24. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv.h +0 -1724
  25. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv.h.blob +0 -0
  26. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@darwin.h +0 -61
  27. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@darwin.h.blob +0 -0
  28. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@errno.h +0 -443
  29. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@errno.h.blob +0 -0
  30. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@threadpool.h +0 -37
  31. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@threadpool.h.blob +0 -0
  32. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@unix.h +0 -491
  33. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@unix.h.blob +0 -0
  34. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@version.h +0 -43
  35. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@version.h.blob +0 -0
  36. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@DeviceINQ.h +0 -78
  37. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@DeviceINQ.h.blob +0 -0
  38. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@linux@BTSerialPortBinding.cc +0 -404
  39. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@linux@BTSerialPortBinding.cc.blob +0 -0
  40. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@linux@BluetoothSerialPort.cc +0 -23
  41. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@linux@BluetoothSerialPort.cc.blob +0 -0
  42. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@linux@DeviceINQ.cc +0 -369
  43. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@linux@DeviceINQ.cc.blob +0 -0
  44. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@windows@BluetoothHelpers.h +0 -24
  45. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@windows@BluetoothHelpers.h.blob +0 -0
  46. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@windows@DeviceINQ.cc +0 -527
  47. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@windows@DeviceINQ.cc.blob +0 -0
  48. package/.circleci/config.yml +0 -47
  49. package/.github/dependabot.yml +0 -11
  50. package/Dockerfile +0 -6
  51. package/Dockerfile.bk +0 -13
  52. package/RELEASE_NOTES.md +0 -212
  53. package/appveyor.yml +0 -38
  54. package/examples/async.js +0 -15
  55. package/examples/paired.js +0 -5
  56. package/examples/sync.js +0 -15
  57. package/qemu-arm-static +0 -0
  58. package/test/index.js +0 -32
package/RELEASE_NOTES.md DELETED
@@ -1,212 +0,0 @@
1
- ## RELEASE NOTES
2
-
3
- ### 3.0.1
4
-
5
- * Fixes typescript definition for `listPairedDevices`.
6
-
7
- ### 3.0.0
8
-
9
- * Fixes building issues with recent version of NodeJS.
10
- * Drops support for Darwin / MacOS for the moment. If you want to use the module on a Mac please install v2.2.7.
11
-
12
- ### 2.2.7
13
-
14
- * Changes node version to `lts` in the Dockerfile
15
-
16
- ### 2.2.6
17
-
18
- * Adds support for node v12
19
- * Node v6 and v7 are no longer supported
20
-
21
- ### 2.2.5
22
-
23
- * Fixes issue #97 where the server process does not exit correctly.
24
-
25
- ### 2.2.4
26
-
27
- * Fixes an error where the module would not return correctly when parameter assertion would fail.
28
-
29
- ### 2.2.3
30
-
31
- * Fixes regression when closing a connection
32
-
33
- ### 2.2.2
34
-
35
- * Adds the status code to the error message when a connection fails
36
- * Fixes typescript example
37
-
38
- ### 2.2.1
39
-
40
- * Fixes regression
41
-
42
- ### 2.2.0
43
-
44
- * Adds support for multiple serial port servers [#197](https://github.com/eelcocramer/node-bluetooth-serial-port/pull/197)
45
-
46
- ### 2.1.8
47
-
48
- * Fixes issue #193 where, on Linux, not all bytes where written to the connection. In this fix the Linux implementation now mimics the other implementations.
49
-
50
- ### 2.1.7
51
-
52
- * Adds support for node v10
53
-
54
- ### 2.1.6
55
-
56
- * Fixes an issue on Windows and Linux where `close` would not terminate a connection properly.
57
- * Improves the README.
58
-
59
- ### 2.1.5
60
-
61
- * Fixes an issue in the typescript definitions.
62
- * Fixes an issue where, on Windows, `listPairedDevices` is showing unpaired devices.
63
-
64
- ### 2.1.4
65
-
66
- * Removes erroneous print statement
67
- * Adds `on` to the TypeScript declaration file
68
-
69
- ### 2.1.3
70
-
71
- * Implements `listPairedDevices` on Windows
72
- * Fixes a memory leak that occurs when trying to reconnect to a device repeatedly
73
- * Adds support for TypeScript
74
- * Removes support for node v0.10, v0.12 and iojs
75
- * Adds support for node v7
76
-
77
- ### 2.1.2
78
-
79
- * `listen()` method will not exit until there's an explicit call to `close()`.
80
- * If a client disconnects, `listen()` can still handle new connections.
81
- * Calling `listen()` more than once is not allowed.
82
- * Better error handling in the server part.
83
- * New server and client test in the experiments folder
84
-
85
- ### 2.1.1
86
-
87
- * Fixes a segmentation fault that can occur on OSX
88
-
89
- ### 2.1.0
90
-
91
- * Adds asynchronous searching for devices
92
- * Asynchronous searching replaces the old synchronous `inquire` function so without touching your code you will be using the asynchronous search function.
93
- * Moves synchronous searching for devices to a new `inquireSync` function
94
-
95
- ### 2.0.0
96
-
97
- * Improvements and API changes of the experimental RFCOMM server socket (Linux only)
98
- * No changes in the client
99
-
100
- ### 1.3.1
101
-
102
- * Fixes compilation problem on Windows.
103
- * Adds experimental RFCOMM server socket (Linux only)
104
-
105
- ### 1.2.6
106
-
107
- * Fixes a critical [runtime error](https://github.com/eelcocramer/node-bluetooth-serial-port/issues/83) on all platforms.
108
- * Improves travis build.
109
-
110
- ### 1.2.5
111
-
112
- * Compatible to NodeJS 4.x
113
- * Dockerfile to test build Linux from OSX or Win
114
-
115
- ### 1.2.4
116
-
117
- * The release notes for previous version have moved to [a separate file](RELEASE_NOTES.md).
118
- * Fixes an issue where the `Error` object is passed in the 2nd argument of the callback function when a `write` is called before the remote device was connected.
119
- * Fixes a [segfault on OSX](https://github.com/eelcocramer/node-bluetooth-serial-port/issues/74).
120
- * Fixes a [buffer overflow on OSX](https://github.com/eelcocramer/node-bluetooth-serial-port/issues/76).
121
-
122
- ### 1.2.3
123
-
124
- * [Updates nan](https://github.com/eelcocramer/node-bluetooth-serial-port/pull/67) for io.js 2.x.x compatibility.
125
-
126
- ### 1.2.2
127
-
128
- * Adds [cross-platform continues integration](https://github.com/eelcocramer/node-bluetooth-serial-port/pull/58) to the repository. Thanks @mackwic.
129
- * [Re-enables windows](https://github.com/eelcocramer/node-bluetooth-serial-port/issues/53) support.
130
- * Fixes an issue where [pipes and file descriptors are leaked](https://github.com/eelcocramer/node-bluetooth-serial-port/issues/57) when a connection could not be established.
131
-
132
- ### 1.2.1
133
-
134
- * Fixes issues compile issues on OS X and Linux when using newer versions of [nan](https://github.com/rvagg/nan).
135
-
136
- ### 1.2.0
137
-
138
- > *PLEASE NOTE* This release is not yet available for the Windows platform because the [compilation needs to be verified first](https://github.com/eelcocramer/node-bluetooth-serial-port/issues/53). As there are no major functional changes this release and the release, hopefully, will fix major issues on OSX I decided to go forward without Windows support for the moment. This will hopefully be fixed in the next release. I will update as soon as possible.
139
-
140
- * Fixes an [issue on OSX](https://github.com/eelcocramer/node-bluetooth-serial-port/issues/46) where multiple reads would result into a corrupted read buffer.
141
- * [Improves](https://github.com/eelcocramer/node-bluetooth-serial-port/issues/51) the implementation of the Bluetooth worker on OSX.
142
- * Better [performance](https://github.com/eelcocramer/node-bluetooth-serial-port/issues/35) while writing to the Bluetooth connection on OSX.
143
- * Keeps the [reader loop from reading from a closed connection]((https://github.com/eelcocramer/node-bluetooth-serial-port/issues/47).
144
- * Will work on both node v0.8.x, v0.10.x and node v0.11.x on OSX and Linux (Windows to be done).
145
- * When trying to write to closed connection the `write` function will not throw an exception anymore but will call the callback as per documentation.
146
- * Adds a `closed` event that fires when a connection is closed either by the user or remotely.
147
-
148
- ### 1.1.4
149
-
150
- * Fixes an compile issue on Windows.
151
-
152
- ### 1.1.3
153
-
154
- * Fixes [segfault](https://github.com/eelcocramer/node-bluetooth-serial-port/pull/29) that occurs when a buffer is invalidated by the garbage collector.
155
- * Adds experimental support for listing paired devices.
156
-
157
- ### 1.1.2
158
-
159
- * Updates the documentation to reflect the changes made in version 1.1.0.
160
-
161
- ### 1.1.1
162
-
163
- * Fixes typo in readme.
164
-
165
- ### 1.1.0
166
-
167
- * Fixes [buffer overflow on close()](https://github.com/eelcocramer/node-bluetooth-serial-port/pull/26) in Mac OSX.
168
- * Adds failure callback that is called when no channel can be found.
169
- * Fixes an [issue on Mac OSX](https://github.com/eelcocramer/node-bluetooth-serial-port/issues/23) where a write action would fail when the MTU was exceeded.
170
- * Fixes an [issue on Mac OSX](https://github.com/eelcocramer/node-bluetooth-serial-port/issues/24) where data would not be written asynchronously.
171
-
172
- ### 1.0.5
173
-
174
- * Updates the code example in the README.
175
- * Adds `win32` to the supported OS'es in the `package.json`.
176
-
177
- ### 1.0.4
178
-
179
- * Added windows support.
180
-
181
- ### 1.0.3
182
-
183
- * Fixes an [issue on Linux](https://github.com/eelcocramer/node-bluetooth-serial-port/pull/11) where reading from a closed or reset connection would result into a SEGFAULT.
184
-
185
- ### 1.0.2
186
-
187
- * Updates the documentation.
188
- * Fixes an issue where memory is freed incorrectly after closing a connection on OS X.
189
- * Improves the timeout mechanism that is used for getting the Bluetooth service records on a remote device on OS X.
190
-
191
- ### 1.0.1
192
-
193
- * No code changes, only updates the documentation.
194
-
195
- ### 1.0.0
196
-
197
- * Makes the write function asynchrone.
198
- * Takes a [Buffer](http://nodejs.org/api/buffer.html) as the input for the write function in favor of a String.
199
- * Reads data into a [Buffer](http://nodejs.org/api/buffer.html) object instead of using a String.
200
- * Improves error handling when calling the native addon.
201
-
202
- ### 0.2.1
203
-
204
- * Fixes issue where calling `close` on a connection would result in an `Abort trap: 6` error on OS X.
205
-
206
- ### 0.2.0
207
-
208
- * Experimental support for OS X!
209
- * `findSerialPortChannel` does not invoke callback anymore when no channel was found.
210
- * `found` event now emits the Bluetooth address as the value of the name parameter `name` when the name of the device could not be determined (used to be `[undefined]`).
211
-
212
-
package/appveyor.yml DELETED
@@ -1,38 +0,0 @@
1
- environment:
2
- # Visual Studio Version
3
- MSVS_VERSION: 2017
4
- # Test against these versions of Node.js and io.js
5
- matrix:
6
- # node.js
7
- - nodejs_version: "14"
8
- - nodejs_version: "16"
9
- - nodejs_version: "18"
10
-
11
-
12
- platform:
13
- - x64
14
-
15
- # Install scripts. (runs after repo cloning)
16
- install:
17
- # Get the latest stable version of Node.js or io.js
18
- - ps: Install-Product node $env:nodejs_version $env:Platform
19
- # install modules
20
- - node --version
21
- - npm -g install npm@latest
22
- - npm --version
23
- - node -e "console.log(process.arch);"
24
- #- if "%PLATFORM%" == "x64" SET PATH=C:\Python27-x64;%PATH%
25
- #- if "%PLATFORM%" == "x86" SET PATH=C:\python27;%PATH%
26
- - npm install node-gyp
27
- - npm update
28
- - npm run install-debug
29
-
30
- # Post-install test scripts.
31
- test_script:
32
- # run tests
33
- - node_modules\.bin\node-gyp configure
34
- - node_modules\.bin\node-gyp build
35
- - node test\index.js
36
-
37
- # Don't actually build.
38
- build: off
package/examples/async.js DELETED
@@ -1,15 +0,0 @@
1
- const BluetoothSerialPort = require('../lib/bluetooth-serial-port');
2
-
3
- const rfcomm = new BluetoothSerialPort.BluetoothSerialPort();
4
-
5
- rfcomm.on('found', function (address, name) {
6
- console.log('found device:', name, 'with address:', address);
7
- });
8
-
9
- rfcomm.on('finished', function () {
10
- console.log('inquiry finished');
11
- });
12
-
13
- console.log('start inquiry');
14
- rfcomm.inquire();
15
- console.log('should be displayed before the end of inquiry');
@@ -1,5 +0,0 @@
1
- const BluetoothSerialPort = require('../lib/bluetooth-serial-port');
2
- const rfcomm = new BluetoothSerialPort.BluetoothSerialPort();
3
- rfcomm.listPairedDevices(function (list) {
4
- console.log(JSON.stringify(list,null,2));
5
- });
package/examples/sync.js DELETED
@@ -1,15 +0,0 @@
1
- const BluetoothSerialPort = require('../lib/bluetooth-serial-port');
2
-
3
- const rfcomm = new BluetoothSerialPort.BluetoothSerialPort();
4
-
5
- rfcomm.on('found', function (address, name) {
6
- console.log('found device:', name, 'with address:', address);
7
- });
8
-
9
- rfcomm.on('finished', function () {
10
- console.log('inquiry finished');
11
- });
12
-
13
- console.log('start inquiry');
14
- rfcomm.inquireSync();
15
- console.log('should be displayed after the end of inquiry');
package/qemu-arm-static DELETED
Binary file
package/test/index.js DELETED
@@ -1,32 +0,0 @@
1
- var bt = require('../lib/bluetooth-serial-port.js');
2
- var Bt = new bt.BluetoothSerialPort();
3
-
4
- console.log('Checking client...');
5
-
6
- [
7
- 'inquire', 'findSerialPortChannel', 'connect', 'write', 'on', 'close'
8
- ].forEach(function(fun) {
9
- if (typeof Bt[fun] !== 'function')
10
- throw new Error("Assert failed: " + fun +
11
- "should be a function but is " + (typeof Bt[fun]));
12
- });
13
-
14
- console.log('Ok!');
15
-
16
- if (process.platform === 'linux') {
17
- console.log('Checking server...');
18
-
19
- var ServerBt = new bt.BluetoothSerialPortServer();
20
- [
21
- 'listen', 'write', 'on', 'close'
22
- ].forEach(function(fun) {
23
- if (typeof ServerBt[fun] !== 'function')
24
- throw new Error("Assert failed: " + fun +
25
- "should be a function but is " + (typeof ServerBt[fun]));
26
- });
27
-
28
- console.log('Ok!');
29
- }
30
-
31
- process.exit(0);
32
-