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: content/pymesh/lib-api.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,9 @@ aliases:
8
8
9
9
This Micropython library is included as frozen scripts in the Pymesh firmware release.
10
10
11
-
Code is open-sourced in [pycom-libraries repository](https://github.com/pycom/pycom-libraries/tree/master/lib/pymesh).
11
+
The code is open-sourced in [pycom-libraries repository](https://github.com/pycom/pycom-libraries/tree/master/lib/pymesh).
12
12
13
-
It is easily customisable and contributions are highly recommend using [Github PRs](https://github.com/pycom/pycom-libraries/pulls).
13
+
It is easily customisable and contributions are welcome using [Github PRs](https://github.com/pycom/pycom-libraries/pulls).
14
14
15
15
### Main features
16
16
@@ -40,7 +40,7 @@ A simple example of usage is in the [main.py](https://github.com/pycom/pycom-lib
40
40
41
41
## Specifications
42
42
43
-
It can be easily customised, by modifying any file from [/lib folder](https://github.com/pycom/pycom-libraries/tree/master/lib/pymesh/lib) and flashing it to the board. Automatically the uploaded file will be executed instead of the _frozen_ one, already embedded into the binary firmware.
43
+
It can be easily customised, by modifying any file from [/lib folder](https://github.com/pycom/pycom-libraries/tree/master/lib/pymesh/lib) and flashing it to the board. The uploaded file will automatically be executed instead of the _frozen_ one, which is already embedded into the binary firmware.
44
44
45
45
### Structure
46
46
@@ -55,9 +55,9 @@ It can be easily customised, by modifying any file from [/lib folder](https://gi
55
55
* setting BLE server
56
56
* auxiliary files:
57
57
*`pymesh-debug.py`
58
-
* debugging on levels, allowing dynamically changing debug level
58
+
* debugging on multiple levels, allowing dynamically changing the current debug level
59
59
*`pymesh-config.py`
60
-
* reading/writing Pymesh configuration file
60
+
* reading/writing the Pymesh configuration file
61
61
*`gps.py`
62
62
* maintaining location coordinates, as an extension `Pytrack` GPS can be used
Copy file name to clipboardExpand all lines: content/pymesh/lib-cli.md
+15-13Lines changed: 15 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,9 @@ aliases:
6
6
7
7
## Overview
8
8
9
-
The Pymesh micropython library is included as frozen in the Pymesh firmware releases.
9
+
The Pymesh micropython library is included as a `frozen python script` in the Pymesh firmware releases.
10
10
11
-
Instead of REPL, a specific Pymesh CLI is interpreting commands and it is recognised, by starting with`>`.
11
+
Instead of REPL, a specific Pymesh CLI interprets commands. This is shown by `>`.
12
12
13
13
The CLI is executed on a separate thread inside the Pymesh library.
14
14
@@ -25,10 +25,10 @@ List of available commands
25
25
ip - display current IPv6 unicast addresses
26
26
mac - set or display the current LoRa MAC address
27
27
self - display all info about current node
28
-
mml - display the Mesh Mac List (MAC of all nodes inside this Mesh), also inquires Leader
29
-
mp - display the Mesh Pairs (Pairs of all nodes connections), also inquires Leader
28
+
mml - display the Mesh Mac List (MAC of all nodes inside this Mesh)
29
+
mp - display the Mesh Pairs (pairs of all nodes connections)
30
30
s - send message
31
-
ws - verifies if message sent was acknowledged
31
+
ws - verifies if the message sent was acknowledged
32
32
rm - verifies if any message was received
33
33
sleep - deep-sleep
34
34
br - enable/disable or display the current Border Router functionality
@@ -75,7 +75,7 @@ deepsleep_init
75
75
Cleanup code, all Alarms cb should be stopped
76
76
Going to deepsleep for 10 seconds
77
77
```
78
-
This puts the device in deepsleep for designated number of seconds.
78
+
This puts the device into deepsleep for a designated number of seconds.
79
79
80
80
```
81
81
>buf
@@ -110,20 +110,22 @@ This executes an Openthread CLI command. The list of CLI commands is [here](http
110
110
>mac
111
111
1
112
112
```
113
-
This shows LoRa MAC, this address is used as unique identifier in the Pymesh. Bellow there's a section on how to set MAC specific MAC address (useful for debugging, the MAC could be consecutive small numbers like `0x1`, `0x2`, `...`)
113
+
This shows the LoRa MAC or sets it to a known value. This address is used as a unique identifier within the Pymesh.
114
+
115
+
This can be useful for debugging and the MAC could be set to consecutive small numbers, such as `0x1`, `0x2`, ...
114
116
115
117
```
116
118
>mml
117
119
mesh_mac_list [1, 6, 2]
118
120
```
119
-
This shows the list of all MAC Nodes attached to Pymesh. It inquires Leader, which centralises this data.
121
+
This shows the list of all MAC Nodes attached to Pymesh. It inquires the Leader, which centralises this data.
120
122
121
123
```
122
124
>mp
123
125
Send pack: 0xF3 to IP fdde:ad00:beef:0:0:ff:fe00:fc00
124
126
last_mesh_pairs [[2, 6, -87], [1, 6, -77]]
125
127
```
126
-
This shows Mesh Pairs list, with each direct connected nodes (by their MAC address) and the averaged RSSI value.
128
+
This shows the Mesh Pairs list. It lists each directly connected node (by their MAC address) and the averaged RSSI value.
127
129
128
130
```
129
131
>mni
@@ -143,15 +145,15 @@ True
143
145
PACK_MESSAGE_ACK received
144
146
1945883 ================= ACK RECEIVED :) :) :)
145
147
```
146
-
This sends text messages to another Node inside Pymesh. The messaging waits for acknowledgement (ACK message type) from the destination node.
148
+
This sends text messages to another Node within the Pymesh. The messaging node waits for acknowledgement (ACK message type) from the destination node.
147
149
148
150
```
149
151
>ws
150
152
(to)<1
151
153
ACK? mac 1, id 12345 => 1
152
154
True
153
155
```
154
-
This shows if a message was acknowledged by the destination Node.
156
+
This shows if the message was acknowledged by the destination Node.
This sends a packet to an IP address external of the Pymesh. This packet will be received by the designated Border Router and it can be further forwarded to another network interface, like: BLE, Wifi, Sigfox or Cellular (Fipy only).
212
+
This sends a packet to an external IP address, outside of the Pymesh. The packet will be received by the designated Border Router and it can be further forwarded to another network interface, such as: BLE, Wifi, Sigfox or Cellular (Fipy only).
Copy file name to clipboardExpand all lines: content/pymesh/licence.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,15 +10,15 @@ In order to receive access to the Pymesh firmware releases (for Lopy4, Fipy, L01
10
10
<!-- <a href="/gitbook/assets/specsheets/Pycom_002_Specsheets_LoPy4_v2.pdf" target="\_blank"> the Pymesh LICENCE PDF document </a> -->
11
11
12
12
1. Complete the Pymesh LICENCE PDF document(not yet available), sign it and send us by [this email](mailto:catalin@pycom.io?subject=[Pymesh_LICENCE]).
13
-
1. You will receive on email an archive containing the images for all boards.
14
-
1. Extract the corresponding image, for example Lopy4.tar.gz, and upload the firmware to your board, using the [Pycom Firmware Update Tool](https://pycom.io/downloads/), like in the following image:
13
+
1. You will receive by email an archive containing the images for all boards.
14
+
1. Extract the corresponding image, for example Lopy4.tar.gz, and upload the firmware to your board, using the [Pycom Firmware Update Tool](https://pycom.io/downloads/), similar in the following image:
The simplest method to check if Pymesh class is successfully installed, just try this code directly in REPL:
21
+
The simplest way to check if the Pymesh class has been successfully installed is to try the following code, directly in REPL:
22
22
23
23
```python
24
24
>>>from network import LoRa
@@ -36,7 +36,7 @@ Q: **I've received an error, such as `(LoadProhibited). Exception was unhandled.
36
36
37
37
A: In some cases, the NVM partition needs to be formatted. For this a format of whole Flash Memory should be performed.
38
38
39
-
This can be done using the cli version of the Firmware Update Tool, so please navigate where this app was installed (search for pycom-fwtool-cli executable) and execute:
39
+
This can be done using the cli version of the `Firmware Update Tool`, so please navigate where the app was installed (search for pycom-fwtool-cli executable) and execute:
Copy file name to clipboardExpand all lines: content/pymesh/pymesh-br.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,19 +9,19 @@ aliases:
9
9
10
10
## Overview
11
11
12
-
The Border Router role, of a Node inside Pymesh, takes the traffic from the Pymesh and forwards it to the Cloud (Pymesh-external).
12
+
Any node inside of the Pymesh can take on the role as a Border Router, which takes the traffic from the Pymesh and forwards it to the Cloud (Pymesh-external).
13
13
14
14
Several things must be accomplished:
15
15
16
-
* The BR node should have connection with the Cloud, using another network interface (than LoRa-Pymesh), for example: BLE, Wifi or Cellular.
17
-
* The node has to be declared as BR, so all the other nodes send packets to it, with destination Cloud.
18
-
*Dynamically multiple nodes can be BR, each of them having different priorities levels (Normal, High or Low)
19
-
* The BR with the smallest routing cost is chosen.
20
-
* If multiple BR have the same routing cost, the priority level is used.
16
+
* The Border Router node should have connection with the Cloud. This should occur using another network interface (other than LoRa-Pymesh), for example: BLE, Wifi or Cellular.
17
+
* The node has to be declared as a Border Router, so that all the other nodes send packets to it. The final destination is the Cloud.
18
+
*To add flexibility, at runtime (dynamically), multiple nodes can act as Border Routers. Each of them can have different priority levels (Normal, High or Low).
19
+
* The Border Router with the smallest routing cost is selected.
20
+
* If multiple Border Routers have the same routing cost, then the priority level is used.
21
21
22
22
## Border Router using CLI
23
23
24
-
As explained in [Pymesh CLI - Border Router section](pymesh/lib-cli/#border-router-specific), using commands `br` and `brs`, a simple testing scenario can be easily implemented.
24
+
As explained in [Pymesh CLI - Border Router section](pymesh/lib-cli/#border-router-specific), using commands `br` and `brs`, a simple test scenario can be easily implemented.
Internally, the Border Router mechanism is implemented with the following steps:
56
56
57
-
*declare the BR network address prefix, like`2001:dead:beef:cafe::/64`
58
-
*this piece of information is sent to the `Leader` and the dataset will increase version (it will be updated)
59
-
*the dataset is propagated to all Pymesh nodes
60
-
*all the nodes will be assigned a random IPv6 unicast address with this network prefix (like`2001:dead:beef:cafe:1234:5678:9ABC:DEF0`)
61
-
*if a node sends data to an IPv6 which is external (it doesn't have prefix from Pymesh already existent networks, like `1:2:3::4`), this UDP datagram will be routed to the BR
62
-
*this UDP packet will have as source the random IPv6 from BR network address
63
-
*BR will receive the UDP datagrams for external with an appended header, which contains:
57
+
*Declare the Border Router network address prefix, for example`2001:dead:beef:cafe::/64`
58
+
*The network address prefix is then sent to the `Leader` and the dataset will increase the version, meaning that it will be updated.
59
+
*The dataset is propagated to all Pymesh nodes.
60
+
*All the nodes will be assigned a random IPv6 unicast address with this network prefix (for example`2001:dead:beef:cafe:1234:5678:9ABC:DEF0`)
61
+
*If a node sends data to an IPv6 which is external (meaning it doesn't have a prefix from already existent networks in Pymesh, for example `1:2:3::4`), then the UDP datagram will be routed to the Border Router
62
+
*This UDP packet will have as source the random IPv6 from BR network address
63
+
*The Border Router will receive the external UDP datagrams with an appended header, which contains:
64
64
* MAGIC byte: `0xBB`
65
65
* IPv6 destination as bytearray (16 bytes)
66
66
* port destination as 2 bytes (1-65535 values).
67
-
*the IPv6 destination is important so BR could actually route (forward) the UDP datagram content to the right interface (Wifi/BLE/cellular).
67
+
*The IPv6 destination is important, because it means that the Border Router can route (forward) the UDP datagram content to the correct interface (Wifi/BLE/cellular).
0 commit comments