1
- Notes on Unix version.
2
-
3
1
# Introduction
4
2
5
3
This library provides a resilient full duplex communication link between a WiFi
@@ -14,6 +12,8 @@ Python objects to be exchanged. Guaranteed message delivery is available.
14
12
15
13
This project is a collaboration between Peter Hinch and Kevin Köck.
16
14
15
+ As of July 2020 it has been updated to use (and require) ` uasyncio ` V3.
16
+
17
17
# 0. MicroPython IOT application design
18
18
19
19
IOT (Internet of Things) systems commonly comprise a set of endpoints on a WiFi
@@ -96,7 +96,15 @@ but one which persists through outages and offers guaranteed message delivery.
96
96
2.1 [ Protocol] ( ./README.md#21-protocol )
97
97
3 . [ Files and packages] ( ./README.md#3-files-and-packages )
98
98
3.1 [ Installation] ( ./README.md#31-installation )
99
+   ;  ;  ;  ;  ; 3.1.1 [ Existing users] ( ./README.md#311-existing_users )
100
+   ;  ;  ;  ;  ; 3.1.2 [ Firmware and dependency] ( ./README.md#312-firmware-and-dependency )
101
+   ;  ;  ;  ;  ; 3.1.3 [ Preconditions for demos] ( ./README.md#313-preconditions-for-demos )
99
102
3.2 [ Usage] ( ./README.md#32-usage )
103
+   ;  ;  ;  ;  ; 3.2.1 [ The main demo] ( ./README.md#321-the-main-demo )
104
+   ;  ;  ;  ;  ; 3.2.2 [ The remote control demo] ( ./README.md#322-the-remote-control-demo )
105
+   ;  ;  ;  ;  ; 3.2.3 [ Quality of Service demo] ( ./README.md#323-quality-of-service-demo )
106
+   ;  ;  ;  ;  ; 3.2.4 [ The fast qos demo] ( ./README.md#324-the-fast-qos-demo )
107
+   ;  ;  ;  ;  ; 3.2.5 [ Troubleshooting the demos] ( ./README.md#325-troubleshooting-the-demos )
100
108
4 . [ Client side applications] ( ./README.md#4-client-side-applications )
101
109
4.1 [ The Client class] ( ./README.md#41-the-client-class )
102
110
4.1.1 [ Initial Behaviour] ( ./README.md#411-initial-behaviour )
@@ -187,7 +195,7 @@ This section describes the installation of the library and the demos. The
187
195
ESP8266 has limited RAM: there are specific recommendations for installation on
188
196
that platform.
189
197
190
- #### Existing users
198
+ ### 3.1.1 Existing users
191
199
192
200
It is recommended to remove the old version and re-install as below.
193
201
@@ -196,7 +204,7 @@ event loop argument is no longer required or accepted in `Client` and `Server`
196
204
constructors. The directory structure has changed, requiring minor changes to
197
205
` import ` statements.
198
206
199
- #### Firmware/Dependency
207
+ ### 3.1.2 Firmware and dependency
200
208
201
209
On ESP8266, RAM can be saved by building firmware from source, freezing
202
210
` client.py ` as bytecode. If this is not done, it is necessary to
@@ -235,7 +243,7 @@ use of `client.mpy`:
235
243
rm /pyboard/iot/client.py
236
244
```
237
245
238
- #### Preconditions for demos
246
+ ### 3.1.3 Preconditions for demos
239
247
240
248
The demo programs store client configuration data in a file ` local.py ` . Each
241
249
demo has its own ` local.py ` located in the directory of the demo code. This
@@ -265,7 +273,7 @@ MicroPython.
265
273
266
274
## 3.2 Usage
267
275
268
- #### The main demo
276
+ ### 3.2.1 The main demo
269
277
270
278
This illustrates up to four clients communicating with the server. The demo
271
279
expects the clients to have ID's in the range 1 to 4: if using multiple clients
@@ -284,7 +292,7 @@ On each client run:
284
292
import iot.examples.c_app
285
293
```
286
294
287
- #### The remote control demo
295
+ ### 3.2.2 The remote control demo
288
296
289
297
This shows one ESP8266 controlling another. The transmitter should have a
290
298
pushbutton between GPIO 0 and gnd, both should have an LED on GPIO 2.
@@ -305,7 +313,7 @@ import iot.remote.c_comms_tx
305
313
import iot.remote.c_comms_rx
306
314
```
307
315
308
- #### The standard qos ( Quality of service) demo
316
+ ### 3.2.3 Quality of Service demo
309
317
310
318
This test program verifies that each message (in each direction) is received
311
319
exactly once. On the server navigate to the parent directory of ` iot ` and run:
@@ -321,7 +329,7 @@ On the client, after editing `/pyboard/qos/local.py`, run:
321
329
import iot.qos.c_qos
322
330
```
323
331
324
- #### The fast qos demo
332
+ ### 3.2.4 The fast qos demo
325
333
326
334
This tests the option of concurrent ` qos ` writes. This is an advanced feature
327
335
discussed in [ section 7.1] ( ./README.md#71-the-wait-argument ) . To run the demo,
@@ -338,7 +346,7 @@ On the client, after editing `/pyboard/qos/local.py`, run:
338
346
import iot.qos.c_qos_fast
339
347
```
340
348
341
- #### Troubleshooting the demos
349
+ ### 3.2.5 Troubleshooting the demos
342
350
343
351
If ` local.py ` specifies an SSID, on startup the demo programs will pause
344
352
indefinitely if unable to connect to the WiFi. If ` SSID ` is an empty string the
0 commit comments