You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
# Revision History
2
2
3
3
* 4.0.0
4
-
- The node category is now Network rather than Input and Output.
4
+
- The node category is now `Network` rather than `Input` and `Output`.
5
5
- Improve stability on Linux by introducing BlueZ 5 D-Bus API
6
-
- On Linux, this node no longer depends on HCI socket library.
6
+
- On Linux, this node is no longer dependent on the HCI socket library, which has lots of problematic issues that caused inconsistent results with old BlueZ CLI tools.
7
7
- Note that when Node-RED process is run by non-root user, add the user to `bluetooth` group so to access BlueZ D-Bus API. For example, run `sudo usermod -G bluetooth -a pi` prior to starting the process if it's run by `pi` user.
8
8
- BlueZ's BLE scanning seems to detect devices having `random` address type. But not sure if such devices work with this node properly.
9
9
- Tested on Raspbian (4.19.97-v7l+) and Raspberry Pi 3/4.
Copy file name to clipboardExpand all lines: README.md
+15-14Lines changed: 15 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,19 @@
1
1
node-red-contrib-generic-ble
2
2
===
3
3
4
-
A Node-RED node for providing access to generic BLE peripheral devices via GATT.
4
+
A Node-RED node for providing access to generic BLE **peripheral** devices via GATT.
5
5
6
6
As of v4.0.0, this node is optmized for Linux with BlueZ 5 D-Bus API (HCI socket is no longer used on Linux).
7
-
macOS and Windows should work as nothing is modified for these platforms.
7
+
macOS and Windows should still work as nothing is modified for these platforms.
8
8
9
9
Supported operations are as follows:
10
10
11
11
- Read
12
12
- Write
13
13
- Write without Response
14
-
- Notify (Subscribing the Notify event)
14
+
- Notify (Subscribing the Notify events)
15
15
16
-
In this version, the node status values are as follows:
16
+
The node status modes are as follows:
17
17
18
18
-`missing` the configured BLE peripheral device is missing. When the device is discovered, the state transitions to `disconnected`. The `disconnected` device may transiton to `missing` again when RSSI is invalidated (Linux only)
19
19
-`disconnected` when the configured BLE peripheral device is found but not conncted
@@ -22,15 +22,16 @@ In this version, the node status values are as follows:
22
22
-`disconnecting` when the configured BLE peripheral device is being disconnecting
23
23
-`error` when unexpected error occurs
24
24
25
-
Known issue for Linux BlueZ D-Bus API:
25
+
Known issues for Linux BlueZ D-Bus API:
26
26
27
-
- It seems the local name in advertisement packet isn't transferred to `LocalName` property in org.bluez.Device1 BlueZ D-Bus API. With HCI socket implementaion, the local name was resolved. So the local name can be resolved on macOS and Windows.
27
+
- Unlike the oler version, **you must set the process owner's permission properly and manually**. Non-root user's Node-RED process will fail to get this node working. Read `Installation Note (Linux)` below.
28
+
- It seems the local name in advertisement packet isn't transferred to `LocalName` property in org.bluez.Device1 BlueZ D-Bus API. With the HCI socket implementaion, the local name was resolved. So the local name can be resolved on macOS and Windows.
28
29
29
30
# How to use
30
31
31
32
## How to configure a new BLE peripheral device
32
33
33
-
At first, drag either a `generic ble in` node or a `generic ble out` node to the workspace from the node palette and double-click the node. And you can find the following dialog. Here, click the pencil icon (`1`) to add a new BLE peripheral or edit the existing one.
34
+
At first, drag either a `Generic BLE in` node or a `Generic BLE out` node to the workspace from the node palette and double-click the node. And you can find the following dialog. Here, click the pencil icon (`1`) to add a new BLE peripheral or edit the existing one.
34
35
35
36

36
37
@@ -46,21 +47,21 @@ As soon as you check it, `Scan Result` select box and `Apply` button appear. The
46
47
47
48
Chosoe one of the listed devices and then click `Apply` to populate `Local Name`, `MAC` and `UUID` input text boxes. Clicking `Apply` button also triggers GATT characteristics discovery as well.
48
49
49
-
The following picure shows the `Apply` button clicking result. `GATT Characteristics` has a characteristic list of the selected device. When you see `(not available)` message in the box, check if the device is NOT sleeping (a sleeping device fails to respond to connect request) and click `Apply` again.
50
+
The following picure shows the `Apply` button clicking results. `GATT Characteristics` has a characteristic list of the selected device. When you see `(not available)` message in the box, check if the device is NOT sleeping (a sleeping device fails to respond to a connect request) and click `Apply` again.
50
51
51
52
`GATT Characteristics` must be populated as the node uses the list to verify if a given characteristic UUID is valid on performing `Read`, `Write` and `Subscribe` requests.
52
53
53
-
Click `Add` (`3`) to save the information when everything is ok.
54
+
Click `Add` (`3`) to save the information when everything is OK.
54
55
55
56

56
57
57
-
OK. Now back to `Generic BLE out` node.
58
+
Now back to `Generic BLE out` node.
58
59
Click `Done` (`4`) to finish the `Generic BLE out` node settings.
59
60
60
-
You can import an example flow from the menu icon(`三`) > Import > Examples > node-red-contrib-generic-ble > 01-read-write.
61
-
62
61

63
62
63
+
You can also import an example flow from the menu icon(`三`) > Import > Examples > node-red-contrib-generic-ble > 01-read-write for learning more about this node.
64
+
64
65
## How to translate gatttool command into flow
65
66
66
67
In this example, we show how to describe `gatttool` commands for characteristic value write and read with Generic BLE nodes.
@@ -176,7 +177,7 @@ You can import [the example flow](examples/01-read-write.json) on Node-RED UI.
176
177
177
178
# Installation Note (Linux)
178
179
179
-
The Node-RED process owner must belong to `bluetooth` group.
180
+
The Node-RED process owner must belong to `bluetooth` group in order to access BlueZ D-Bus API, otherwise this node doesn't work at all because of bluetoothd permission issue.
180
181
For example, if you're going to run the process by `pi` user, run the following command.
181
182
182
183
```
@@ -197,7 +198,7 @@ cd ~/.node-red
197
198
npm install node-red-contrib-generic-ble
198
199
```
199
200
200
-
Then restart Node-RED process.
201
+
Then restart Node-RED process. Again, for Linux users, read the above chapter `Installation Note (Linux)` to get this node working.
0 commit comments