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
This is a general purpose Python module to provide a bi-directional frame-based streaming protocol for low-speed embedded applications, such as serial connected devices. It allowes the receiver to 'jump into' a stream of data frames. Every frame starts with a preamble, so the receiver can synchronize. Any mismatch in checksum will the receiver.
7
+
This is a general purpose Python module to provide a bi-directional frame-based
8
+
streaming protocol for low-speed embedded applications, such as serial
9
+
connected devices. It allowes the receiver to 'jump into' a stream of data
10
+
frames. Every frame starts with a preamble, so the receiver can synchronize.
8
11
9
12
A payload is optional.
10
13
@@ -22,28 +25,40 @@ X = Body payload (max. 65536 bytes)
22
25
Y = CRC32 checksum over header + body
23
26
```
24
27
25
-
The flags field can have arbitrary values, but the following flags are reserved.
28
+
The flags field can have arbitrary values, but the following flags are
29
+
reserved.
26
30
27
31
*`0x01 = RESET`
28
32
*`0x02 = ERROR`
29
33
*`0x04 = PRIORITY`
30
34
31
-
Error correction is not implemented and the bytes are not aligned. The endianness is customizable.
35
+
Error correction is not implemented and the bytes are not aligned. The
36
+
endianness is customizable.
32
37
33
38
## State chart diagram
34
39
Below is a simplified statechart diagram of the receiver.
35
40

36
41
37
42
## Installation
38
-
The latest development version can be installed via `pip install git+https://github.com/basilfx/python-tinylink`.
39
-
40
-
## Tests
41
-
Tests can be executed with `nosetests`. Check the `tests/` folder for more information.
43
+
The latest development version can be installed via
A simple serial CLI is included. When installed, run `tinylink /dev/tty.PORT_HERE` to start it. You can use it to send raw bytes via the link and display what comes back.
47
+
A simple serial CLI is included. When installed, run
48
+
`tinylink /dev/tty.PORT_HERE` to start it. You can use it to send raw bytes via
49
+
the link and display what comes back.
50
+
51
+
The CLI supports so-called modifiers to modify the outgoing data. For example,
52
+
the input `\flags=1 hello world` would send a reset frame with the value
53
+
'hello world'.
45
54
46
55
PySerial is required to run this CLI.
47
56
57
+
## Tests
58
+
To run the tests, please clone this repository and run `poetry run pytest`.
59
+
60
+
## Contributing
61
+
See the [`CONTRIBUTING.md`](CONTRIBUTING.md) file.
62
+
48
63
## License
49
-
See the `LICENSE` file (MIT license).
64
+
See the [`LICENSE.md`](LICENSE.md) file (MIT license).
0 commit comments