Skip to content

Commit a9e0823

Browse files
author
Catalin Ioana
authored
Merge pull request #178 from pycom/pymesh2
[Pymesh] Corrected Lora.Mesh class, add link mobile app
2 parents ff777bc + f798927 commit a9e0823

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

content/firmwareapi/pycom/network/lora/pymesh.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ lora = LoRa(mode=LoRa.LORA, region=LoRa.EU868,
2020
frequency = 863000000, bandwidth=LoRa.BW_125KHZ, sf=7)
2121

2222
print("Enable Pymesh")
23-
pymesh = lora.Pymesh()
23+
pymesh = lora.Mesh()
2424

2525
# check node state inside Pymesh
2626
# PYMESH_ROLE_DISABLED = 0, ///< The Pymesh stack is disabled.
@@ -39,9 +39,9 @@ For various other Pymesh examples, check the [Pymesh Chapter](/pymesh).
3939

4040
## Constructor
4141

42-
#### class network.LoRa.Pymesh(\*, key=masterkey)
42+
#### class network.LoRa.Mesh(\*, key=masterkey)
4343

44-
This constructor `network.LoRa.Pymesh()` creates and configures the Pymesh object.
44+
This constructor `network.LoRa.Mesh()` creates and configures the Pymesh object.
4545

4646
By default, the key is `0134C0DE1AB51234C0DE1AB5CA1A110F`.
4747

@@ -53,7 +53,7 @@ from network import LoRa
5353

5454
lora = LoRa(mode=LoRa.LORAWAN, region=LoRa.EU868)
5555
masterkey = ubinascii.unhexlify("112233")
56-
pymesh = lora.Pymesh(key=masterkey)
56+
pymesh = lora.Mesh(key=masterkey)
5757

5858
# as test, the masterkey can be printed
5959
>>> print("masterkey:", pymesh.cli("masterkey"))
@@ -65,7 +65,7 @@ masterkey: 11223300000000000000000000000000
6565
#### pymesh.deinit()
6666

6767
This destroys the Pymesh task. Any further Pymesh commands will return no answer.
68-
To recreate the Pymesh, use the `LoRa.Pymesh()` constructor.
68+
To recreate the Pymesh, use the `LoRa.Mesh()` constructor.
6969

7070
```python
7171

content/pymesh/lib-ble-rpc.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ aliases:
44
- pymesh/simple-example
55
---
66

7+
## Overview
8+
9+
The Pymesh mobile application is available [here for both iOS and Android platforms](https://github.com/pycom/pycom-libraries/tree/master/pymesh/mobile_app). It can be used to connect over BLE to a Pymesh node. It also allows users to find out network information.
10+
711
## RPC protocol
812

913
It is implemented in [ble_rpc.py](https://github.com/pycom/pycom-libraries/blob/master/lib/pymesh/lib/ble_rpc.py).
@@ -44,7 +48,8 @@ This returns the list of pairs that form a mesh connection, as shown bellow:
4448

4549
#### get_node_info(mac_id = ' ')
4650

47-
This returns the node data for a specified mac address, or own data if `mac_id` is not specified. Node data is dictionary with the following structure:
51+
This returns the node data for a specified MAC address, or returns own data if the `mac_id` is not specified. The node data is given as a dictionary with the following structure:
52+
4853
```
4954
{
5055
'ip': 4c00, # last 2bytes from the ip v6 RLOC16 address

content/pymesh/simple-example.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ aliases:
66

77
## What is Pymesh micropython library?
88

9-
The Pymesh Micropython library is a set of frozen scripts in the Pymesh firmware binary release (which has not yet been released).
9+
The Pymesh Micropython library is a set of frozen scripts in the Pymesh firmware binary release.
1010

11-
[Open-source on github](https://github.com/pycom/pycom-libraries/tree/master/lib/pymesh)
11+
[Open-source on github](https://github.com/pycom/pycom-libraries/tree/master/pymesh/pymesh_frozen)
1212

1313
It allows users to access Pymesh in a few lines of code, as shown in the following code snippet.
1414

15+
Additionally, users can install the Pymesh mobile application which is available [here for both iOS and Android platforms](https://github.com/pycom/pycom-libraries/tree/master/pymesh/mobile_app). It allows users to connect over BLE to a Pymesh node and find out network information.
16+
1517
```python
1618

1719
import pycom

0 commit comments

Comments
 (0)