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: README.md
+34-2Lines changed: 34 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,10 +18,11 @@ These are environmental variables for systemwidely configuring this node:
18
18
|----------|-------------|
19
19
|`GENERIC_BLE_CONNECTION_TIMEOUT_MS`| Connection Timeout in milliseconds. 5s by default |
20
20
|`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 |
22
23
|`GENERIC_BLE_MAX_REQUESTS`| The length of Read/Write operation queues. 10 by default |
23
24
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`.
The above command performs `hciconfig hci0 reset` as well. So you don't have to run `hciconfig` command separately.
62
63
64
+
# How to use
63
65
66
+
## How to configure a new BLE peripheral
64
67
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
+

71
+
72
+
Then the new config node dialog appears like this.
73
+
74
+

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
+

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
+

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.
0 commit comments