Skip to content

Commit 0f8a568

Browse files
author
Daisuke Baba
committed
Add how to configure a new BLE node
1 parent 3659a12 commit 0f8a568

File tree

5 files changed

+34
-2
lines changed

5 files changed

+34
-2
lines changed

README.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ These are environmental variables for systemwidely configuring this node:
1818
|----------|-------------|
1919
| `GENERIC_BLE_CONNECTION_TIMEOUT_MS` | Connection Timeout in milliseconds. 5s by default |
2020
| `GENERIC_BLE_CONCURRENT_CONNECTIONS` | Number of Concurrent BLE connections. 1 by default |
21-
| `GENERIC_BLE_READ_WRITE_INTERVAL_MS` | Read/Write operation interval in milliseconds. 50ms by default | `GENERIC_BLE_NOTIFY_WAIT_MS` | Default waiting time for listening notify events. 300 by default |
21+
| `GENERIC_BLE_READ_WRITE_INTERVAL_MS` | Read/Write operation interval in milliseconds. 50ms by default |
22+
| `GENERIC_BLE_NOTIFY_WAIT_MS` | Default waiting time for listening notify events. 300 by default |
2223
| `GENERIC_BLE_MAX_REQUESTS` | The length of Read/Write operation queues. 10 by default |
2324

24-
You can easily get started by importing the example flow shown below.
25+
You can easily get started with importing the example flow from the menu icon > `Import` > `Examples` > `generic ble`.
2526

2627
# How to install
2728

@@ -60,8 +61,39 @@ sudo systemctl restart candy-red
6061
```
6162
The above command performs `hciconfig hci0 reset` as well. So you don't have to run `hciconfig` command separately.
6263

64+
# How to use
6365

66+
## How to configure a new BLE peripheral
6467

68+
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.
69+
70+
![ble in node](images/ble1.png)
71+
72+
Then the new config node dialog appears like this.
73+
74+
![ble config node](images/ble2.png)
75+
76+
The `Scan Result` shows the scanned BLE peripherals. It can be empty when no peripherals are found.
77+
78+
In order for the dialog to list your device, turn BLE on prior to open the dialog. Close the dialog then re-open it if you'd like to get the latest scan result.
79+
80+
By default, you have to enter either MAC address or UUID manually to configure your BLE peripheral. However, by checking `Select from scan result`(`2`), you can choose the peripheral if it exists in the scan result.
81+
82+
![ble config node](images/ble3.png)
83+
84+
When you choose the peripheral, `GATT Characteristics` shows all characteristics discovered in it, and `Local Name`, `MAC` and `UUID` are automatically resolved as well.
85+
86+
If you cannot find your peripheral in the `Scan Result`, you can reload the result by closing this dialog and re-opening it as described above.
87+
88+
Click `Add` (`3`) when the information on the dialog looks good.
89+
90+
![ble config node](images/ble4.png)
91+
92+
Click `Done` (`4`) to finish the `ble in` node settings.
93+
94+
# Example Flow
95+
96+
You can import [the example flow](examples/01.read-write.json) on Node-RED UI. You need to change Generic BLE config node named `nRF5x` or add a new config node for your device.
6597

6698
# Appendix
6799

images/ble1.png

70.5 KB
Loading

images/ble2.png

124 KB
Loading

images/ble3.png

164 KB
Loading

images/ble4.png

67 KB
Loading

0 commit comments

Comments
 (0)