Skip to content

Commit 75b6ac6

Browse files
author
dbaba
committed
Update readme
1 parent 13479da commit 75b6ac6

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Revision History
22

33
* 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`.
55
- 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.
77
- 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.
88
- BlueZ's BLE scanning seems to detect devices having `random` address type. But not sure if such devices work with this node properly.
99
- Tested on Raspbian (4.19.97-v7l+) and Raspberry Pi 3/4.

README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
node-red-contrib-generic-ble
22
===
33

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.
55

66
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.
88

99
Supported operations are as follows:
1010

1111
- Read
1212
- Write
1313
- Write without Response
14-
- Notify (Subscribing the Notify event)
14+
- Notify (Subscribing the Notify events)
1515

16-
In this version, the node status values are as follows:
16+
The node status modes are as follows:
1717

1818
- `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)
1919
- `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:
2222
- `disconnecting` when the configured BLE peripheral device is being disconnecting
2323
- `error` when unexpected error occurs
2424

25-
Known issue for Linux BlueZ D-Bus API:
25+
Known issues for Linux BlueZ D-Bus API:
2626

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.
2829

2930
# How to use
3031

3132
## How to configure a new BLE peripheral device
3233

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.
3435

3536
![ble out node](images/ble1.png)
3637

@@ -46,21 +47,21 @@ As soon as you check it, `Scan Result` select box and `Apply` button appear. The
4647

4748
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.
4849

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.
5051

5152
`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.
5253

53-
Click `Add` (`3`) to save the information when everything is ok.
54+
Click `Add` (`3`) to save the information when everything is OK.
5455

5556
![ble config node](images/ble4.png)
5657

57-
OK. Now back to `Generic BLE out` node.
58+
Now back to `Generic BLE out` node.
5859
Click `Done` (`4`) to finish the `Generic BLE out` node settings.
5960

60-
You can import an example flow from the menu icon(``) > Import > Examples > node-red-contrib-generic-ble > 01-read-write.
61-
6261
![ble config node](images/ble5.png)
6362

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+
6465
## How to translate gatttool command into flow
6566

6667
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.
176177

177178
# Installation Note (Linux)
178179

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.
180181
For example, if you're going to run the process by `pi` user, run the following command.
181182

182183
```
@@ -197,7 +198,7 @@ cd ~/.node-red
197198
npm install node-red-contrib-generic-ble
198199
```
199200

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.
201202

202203
## CANDY RED users
203204

0 commit comments

Comments
 (0)