Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

Commit 73f4a7f

Browse files
author
Catalin Ioana
committed
[Pymesh] Docs directed into docs.pycom.io
1 parent 6f6dbb4 commit 73f4a7f

File tree

1 file changed

+0
-163
lines changed

1 file changed

+0
-163
lines changed

pymesh/pymesh_frozen/README.md

Lines changed: 0 additions & 163 deletions
Original file line numberDiff line numberDiff line change
@@ -6,166 +6,3 @@ These scripts were created and tested on Lopy4 and Fipy, using the Pymesh binary
66
Official Pymesh docs: https://docs.pycom.io/pymesh/
77

88
Forum Pymesh announcements: https://forum.pycom.io/topic/4449/pymesh-updates
9-
10-
## Overview
11-
These scripts were created to prototype different features of Pymesh.
12-
13-
They are quite monolithic, as they were developed on par with firmware Pymesh development. Multiple improvement are foreseen to be further performed, into areas like modularity (BLE RPC is the main candidate). Also lots of code is executed in micropython threads, which have limited memory (they should be moved in the *main loop*). Maybe queues for RX/TX on Pymesh should be added, with automatic retransmissions until ACK.
14-
15-
### Important features
16-
* Start Pymesh over LoRa on 863Mhz, bandwidth 250kHz, spreading-factor 7 (check `pymesh_config.py` defaults).
17-
* Pymesh parameters are automatically saved in NVM, so in the next restart/deepsleep, the node will try to maintain its IP addresses and connections with neighbour nodes.
18-
* Start BLE server with name `PyGo (mac: <LoRa MAC>`
19-
* BLE is used with an RPC protocol, packed using `msgpack` library .
20-
* Internal CLI for controlling/triggering Pymesh features, as explained bellow.
21-
22-
## Color coding LED
23-
24-
The LED color represents the state of the node in the Mesh network.
25-
26-
Magenta - LEADER
27-
Green - ROUTER
28-
White - CHILD,
29-
Red - Searching / Detached from any Pymesh
30-
Cyan - SINGLE LEADER (no other Router in the same Pymesh)
31-
32-
## Internal CLI
33-
34-
```
35-
List of available commands
36-
ip - display current IPv6 unicast addresses
37-
mac - set or display the current LoRa MAC address
38-
self - display all info about current node
39-
mml - display the Mesh Mac List (MAC of all nodes inside this Mesh), also inquires Leader
40-
mp - display the Mesh Pairs (Pairs of all nodes connections), also inquires Leader
41-
s - send message
42-
ws - verifies if message sent was acknowledged
43-
rm - verifies if any message was received
44-
sleep - deep-sleep
45-
br - enable/disable or display the current Border Router functionality
46-
brs - send packet for Mesh-external, to BR, if any
47-
rst - reset NOW, including NVM Pymesh IPv6
48-
buf - display buffer info
49-
ot - sends command to openthread internal CLI
50-
debug - set debug level
51-
config - print config file contents
52-
```
53-
54-
```
55-
>mac
56-
1
57-
```
58-
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`, `...`)
59-
60-
```
61-
>mml
62-
mesh_mac_list [1, 6, 2]
63-
```
64-
Shows the list of all MAC Nodes included into Pymesh. Inquires Leader if doesn't have this info (or if too old). In about 5 sec, a new call will return the latest list.
65-
66-
```
67-
>mp
68-
Send pack: 0xF3 to IP fdde:ad00:beef:0:0:ff:fe00:fc00
69-
last_mesh_pairs [[2, 6, -87], [1, 6, -77]]
70-
```
71-
Shows Mesh Pairs list, with each direct connected nodes (by their MAC address) and the averaged RSSI value.
72-
73-
```
74-
>mni
75-
last_mesh_node_info {1: {"ip": 2048, "l": {"lng": 5.45313, "lat": 51.45}, "a": 10, "r": 3, "nn": 1, "nei": [[6, 55296, 3, -76, 23]]}, 6: {"ip": 55296, "l": {"lng": 5.45313, "lat": 51.45}, "a": 7, "r": 3, "nn": 2, "nei": [[2, 50176, 3, -89, 28], [1, 2048, 3, -77, 23]]}, 2: {"ip": 50176, "l": {"lng": 5.45313, "lat": 51.45}, "a": 7, "r": 3, "nn": 1, "nei": [[6, 55296, 3, -86, 25]]}}
76-
```
77-
Shows the properties for all the nodes in this Pymesh, together with its neighbors.
78-
79-
```
80-
>s
81-
(to)<1
82-
(txt)<Hello World!
83-
1945688: Send Msg ---------------------->>>>>>>>
84-
Added new message for 1: Hello World!
85-
Send pack: 0x10 to IP fdde:ad00:beef:0::1
86-
True
87-
>Incoming 13 bytes from fdde:ad00:beef:0:f67b:3d1e:f07:8341 (port 1234):
88-
PACK_MESSAGE_ACK received
89-
1945883 ================= ACK RECEIVED :) :) :)
90-
```
91-
Sends text messages to another Node inside Pymesh. The messaging waits for ACK from the destination node. If not received, it's resent after minimum 15 seconds.
92-
93-
*Sorry for the messy output and debug info.*
94-
95-
```
96-
ws
97-
(to)<1
98-
ACK? mac 1, id 12345 => 1
99-
True
100-
```
101-
Shows if a message was acknowledged by the destination Node.
102-
103-
```
104-
>rm
105-
{'b': (b'Hello World!',), 'id': 12345, 'ts': 3301, 'from': 6}
106-
```
107-
Shows the received messages.
108-
109-
```
110-
f
111-
(MAC to)<1
112-
(packsize)<500
113-
(filename, Enter for dog.jpg)<
114-
...
115-
Incoming 6 bytes from fdde:ad00:beef:0:160b:8542:2190:c864 (port 1234):
116-
PACK_FILE_SEND_ACK received
117-
6165 Bytes sent, time: 27 sec
118-
Done sending 6165 B in 27 sec
119-
```
120-
121-
*DISABLED*
122-
123-
Sends a file already stored in `/flash` (by default `/flash/dog.jpg`), specifying to which Node and in what chunk size (it can't be bigger than 500 Bytes, limit set in firmware).
124-
125-
At destination, the file is stored as `/flash/dog_rcv.jpg`.
126-
Picture files could be stored on Lopy4/Fipy using either Pymakr (over USB) or FTP.
127-
128-
*The file transfer is done naively, the file is not checked at destination, nor individual chunks right order is not verified. These should be addressed in further improvements.*
129-
130-
```
131-
>gs
132-
(lat)<2.3
133-
(lon)<4.5
134-
Gps: (2.3, 4.5)
135-
```
136-
137-
*DISABLED*
138-
139-
Sets localisation coordinates; useful where no Pytrack is used.
140-
141-
```
142-
>gg
143-
Gps: (2.2, 1.1)
144-
```
145-
146-
*DISABLED*
147-
148-
Shows latest GPS coordinates.
149-
150-
```
151-
> rst
152-
1
153-
```
154-
Resets the Pymesh parameters saved in NVM, and resets the Node.
155-
156-
```
157-
> rb
158-
```
159-
160-
*DISABLED*
161-
162-
### New commands to be detailed
163-
164-
* sleep - deep-sleep
165-
* br - enable/disable or display the current Border Router functionality
166-
* brs - send packet for Mesh-external, to BR, if any
167-
* rst - reset NOW, including NVM Pymesh IPv6
168-
* buf - display buffer info
169-
* ot - sends command to openthread internal CLI
170-
* debug - set debug level
171-
* config - print config file contents

0 commit comments

Comments
 (0)