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
The BLE_Mesh library provides support for connecting to a BLE Mesh Network with various Server and Client models. Currently, Node cannot be configured as Provisioner.
9
-
The library is under development, its current limitations:
10
-
11
-
- Only one Element (primary) can be added to the Node.
12
-
- Supported Models:
13
-
* Configuration Server Model (automatically generated together with primary Element)
14
-
* Generic OnOff Server Model
15
-
* Generic OnOff Client Model
16
-
* Generic Level Server Model
17
-
* Generic Level Client Model
18
-
* Sensor Server Model
19
-
* Sensor Client Model
20
-
21
-
- Supported OOB authentication types:
22
-
* No OOB
23
-
* Output OOB
24
-
25
-
- Supported Node Features:
26
-
* GATT Proxy
27
-
* Relay
28
-
29
-
- Recommended Mobile Applications:
30
-
* nRF Mesh (iOS and Android)
31
-
* Silicon Labs Bluetoth Mesh (iOS)
32
-
* ST BLE Mesh (Android)
33
-
* EspBLEMesh (Android)
8
+
The Pymesh BLE library provides support for connecting to a BLE Mesh Network with various Server and Client models.
9
+
10
+
For examples, please check the section [Pymesh BLE Examples](/tutorials/all/ble_mesh).
11
+
12
+
Pymesh BLE features:
13
+
14
+
* Supported Models:
15
+
* Configuration Server Model (automatically generated together with primary Element)
16
+
* Generic OnOff Server Model
17
+
* Generic OnOff Client Model
18
+
* Generic Level Server Model
19
+
* Generic Level Client Model
20
+
* Sensor Server Model
21
+
* Sensor Client Model
22
+
* Supported OOB authentication types:
23
+
* No OOB
24
+
* Output OOB
25
+
* Supported Node Features:
26
+
* GATT Proxy
27
+
* Relay
28
+
* Only one Element (primary) can be added to the Node.
29
+
* Node cannot be configured as Provisioner and a mobile application should be used for Provisioning process
30
+
* nRF Mesh (iOS and Android)
31
+
* Silicon Labs Bluetoth Mesh (iOS)
32
+
* ST BLE Mesh (Android)
33
+
* EspBLEMesh (Android)
34
34
35
35
36
36
## Methods of BLE_Mesh class
@@ -42,7 +42,7 @@ Initializes the BLE Mesh module with the pre-configured Elements and Models.
42
42
*`name` is the name which will be used to identify the device during Provisioning
43
43
*`auth` is the Out-Of-Band (OOB) method. Currently `BLE_Mesh.OOB_OUTPUT` is supported. Without specifying this argument, `NO_OOB` will be used during provisioning.
44
44
*`callback` is the callback to be registered. It must have the following arguments:
45
-
*`event` returns current event of provisioning.
45
+
*`event` returns current event of provisioning.
46
46
*`oob_pass` returns the generated pass in case of `BLE_Mesh.OOB_OUTPUT`.
Copy file name to clipboardExpand all lines: content/tutorials/all/ble_mesh.md
+72-14Lines changed: 72 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,35 @@
1
1
---
2
-
title: "BLE Mesh"
2
+
title: "Pymesh BLE Examples"
3
3
aliases:
4
4
- tutorials/all/ble_mesh.html
5
5
- tutorials/all/ble_mesh.md
6
6
- chapter/tutorials/all/ble_mesh
7
7
---
8
8
9
-
BLE Mesh module enables many-to-many device connections, based on Bluetooth module.
9
+
Pymesh BLE module enables many-to-many device connections, based on the Bluetooth module.
10
+
11
+
For the API, please check the section [Pymesh BLE API](/firmwareapi/pycom/network/bluetooth/ble_mesh/).
12
+
13
+
## Generic OnOff Example
14
+
Generic OnOff model is one of the simplest model in BLE Mesh.
15
+
16
+
This model illustrates the light-switches (OnOff Client) and light-bulbs (OnOff Server). In other words, the Client can send on/off commands to one/all nodes, and the Server is records state changes based on these commands.
17
+
18
+
### OnOff Server
19
+
20
+
OnOff Server has one boolean State. Server can Get, Set or send Status about this State to Client(s).
21
+
22
+
In the example below, during Provisioning, `Output OOB` can be selected. LED is yellow in case of Not-provisioned, and green in case of Provisioned state.
23
+
24
+
Changing the State of Server, LED's light is green or red.
10
25
11
-
# Generic OnOff Example
12
-
Generic OnOff model is simplest model in BLE Mesh, makes it possible for one device to switch other devices on or off.
13
-
## OnOff Server
14
-
OnOff Server has one bool State. Server can Get, Set or send Status abour this State to Client(s). In the example below, during Provisioning, `Output OOB` can be selected, LED is yellow in case of Unprovisioned, and green in case of Provisioned state. Changing the State of Server, LED's light is green or red.
# transmit the change of state broadcasting in the Mesh
146
+
147
+
model_client.set_state(False, 0xFFFF)
148
+
model_client.set_state(True, 0xFFFF)
149
+
150
+
# or to a unique server
151
+
model_client.set_state(False, 3)
152
+
model_client.set_state(True, 5)
153
+
154
+
"""
102
155
```
103
-
# Sensor Example
156
+
157
+
## Sensor Example
104
158
In case of Sensor Models, State of Server can be modified only by Server itself, Client can only Get the State by calling Client's Get, or by Servers Status call, but cannot modify the Server's State.
105
-
## Sensor Server
106
-
In this example Server takes a time measurement every 1 seconds, and send a Status message every 5 seconds, after became Provisioned.
159
+
160
+
### Sensor Server
161
+
In this example Server takes a time measurement every 1 seconds, and send a Status message every 5 seconds, after it was provisioned.
0 commit comments