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
@@ -10,18 +10,59 @@ Supported operations are as follows:
10
10
- Write without Response
11
11
- Notify
12
12
13
-
Read and Write operations are performed asynchronously and they're stored into the separate queues (read queue and write queue). Each queue has up to 10 operation requests. The parameter can be modified by providing `GENERIC_BLE_MAX_REQUESTS`.
13
+
Read and Write operations are performed asynchronously and they're stored into the separate queues (read queue and write queue). Each queue has up to 10 operation requests. The parameter can be modified by providing an environmental variable `GENERIC_BLE_MAX_REQUESTS`.
14
+
15
+
# How to use
16
+
17
+
## How to configure a new BLE peripheral
18
+
19
+
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.
20
+
21
+

22
+
23
+
Then the new config node dialog appears like this.
24
+
25
+

26
+
27
+
The `Scan Result` shows the scanned BLE peripherals. It can be empty when no peripherals are found.
28
+
29
+
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.
30
+
31
+
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.
32
+
33
+

34
+
35
+
When you choose the peripheral, `GATT Characteristics` shows all characteristics discovered in it, and `Local Name`, `MAC` and `UUID` are automatically resolved as well.
36
+
37
+
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.
38
+
39
+
Click `Add` (`3`) when the information on the dialog looks good.
40
+
41
+

42
+
43
+
Click `Done` (`4`) to finish the `ble in` node settings.
44
+
45
+
## BLE in and out nodes
46
+
47
+
See `info` tab for detail on the editor UI.
48
+
49
+
# Example Flow
50
+
51
+
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.
52
+
53
+
# Systemwide Configuration
14
54
15
55
These are environmental variables for systemwidely configuring this node:
16
56
17
57
| Variable | Description |
18
58
|----------|-------------|
19
59
|`GENERIC_BLE_CONNECTION_TIMEOUT_MS`| Connection Timeout in milliseconds. 5s by default |
20
60
|`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 |
61
+
|`GENERIC_BLE_READ_WRITE_INTERVAL_MS`| Read/Write operation interval in milliseconds. 50ms by default |
62
+
|`GENERIC_BLE_NOTIFY_WAIT_MS`| Default waiting time for listening notify events. 300 by default |
22
63
|`GENERIC_BLE_MAX_REQUESTS`| The length of Read/Write operation queues. 10 by default |
23
64
24
-
You can easily get started by importing the example flow shown below.
65
+
You can easily get started with importing the example flow from the menu icon > `Import` > `Examples` > `generic ble`.
0 commit comments