picolan 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- picolan-1.0.0/MANIFEST.in +4 -0
- picolan-1.0.0/PKG-INFO +116 -0
- picolan-1.0.0/README.md +69 -0
- picolan-1.0.0/docs/tool.md +101 -0
- picolan-1.0.0/pyproject.toml +29 -0
- picolan-1.0.0/setup.cfg +4 -0
- picolan-1.0.0/tools/LICENSE +21 -0
- picolan-1.0.0/tools/picolan.egg-info/PKG-INFO +116 -0
- picolan-1.0.0/tools/picolan.egg-info/SOURCES.txt +11 -0
- picolan-1.0.0/tools/picolan.egg-info/dependency_links.txt +1 -0
- picolan-1.0.0/tools/picolan.egg-info/entry_points.txt +2 -0
- picolan-1.0.0/tools/picolan.egg-info/top_level.txt +1 -0
- picolan-1.0.0/tools/picolan.py +888 -0
picolan-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: picolan
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Update, find and monitor RP2350 + W5500 boards that run the picolan library, over Ethernet
|
|
5
|
+
Author: Avi Raviv
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
9
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
10
|
+
Classifier: Topic :: Software Development :: Embedded Systems
|
|
11
|
+
Requires-Python: >=3.9
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: tools/LICENSE
|
|
14
|
+
Dynamic: license-file
|
|
15
|
+
|
|
16
|
+
# picolan command-line tool
|
|
17
|
+
|
|
18
|
+
The `picolan` command finds, updates and monitors boards that run the picolan firmware library, over Ethernet. You do not need the source code, PlatformIO or a GitHub account.
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
Requirement: Python 3.9 or later. The tool uses only the Python standard library.
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
pip install picolan
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Update: `pip install -U picolan`. Check the version: `picolan --version`.
|
|
29
|
+
|
|
30
|
+
| System | Status |
|
|
31
|
+
|---|---|
|
|
32
|
+
| Linux | Tested. All network interfaces are used. |
|
|
33
|
+
| Windows | Supported. Not yet tested on hardware. |
|
|
34
|
+
| macOS | Default network interface only. Not tested. |
|
|
35
|
+
|
|
36
|
+
## Connect the PC
|
|
37
|
+
|
|
38
|
+
1. Connect the PC to the network of the boards.
|
|
39
|
+
2. Give the PC an IP address in the subnet of the boards. Example: boards on 192.168.1.x/24, PC on 192.168.1.50/24.
|
|
40
|
+
3. Run `picolan nodes`.
|
|
41
|
+
|
|
42
|
+
`picolan nodes` also finds boards in another subnet. An update needs an IP route to the board.
|
|
43
|
+
|
|
44
|
+
## Update a system from a release bundle
|
|
45
|
+
|
|
46
|
+
A bundle is a zip file. It holds one firmware image per product and a manifest with the SHA-256 of each image.
|
|
47
|
+
|
|
48
|
+
1. Copy the bundle to the PC, for example `release-v6.4.0.zip`.
|
|
49
|
+
2. Run `picolan nodes`. Make sure that each product of the bundle appears once.
|
|
50
|
+
3. Run `picolan push release-v6.4.0.zip`.
|
|
51
|
+
|
|
52
|
+
For each image, the tool:
|
|
53
|
+
|
|
54
|
+
1. Finds the one board that runs the product of the image.
|
|
55
|
+
2. Sends the image. The board restarts on the new firmware.
|
|
56
|
+
3. Waits until the new firmware has run for 10 s, then confirms it.
|
|
57
|
+
4. Checks that the board runs the new firmware.
|
|
58
|
+
|
|
59
|
+
The tool updates the boards one at a time. It stops at the first failure. At the end it prints one result line per board.
|
|
60
|
+
|
|
61
|
+
| Situation | Result |
|
|
62
|
+
|---|---|
|
|
63
|
+
| A product of the bundle has no board, or more than one board | Nothing is installed. |
|
|
64
|
+
| An image was changed after the bundle was made | Nothing is installed. |
|
|
65
|
+
| A board already runs the image | Skipped. Use `--reinstall` to install again. |
|
|
66
|
+
| The new firmware fails | The board restores its previous firmware by itself. The tool stops. |
|
|
67
|
+
|
|
68
|
+
## Commands
|
|
69
|
+
|
|
70
|
+
| Command | Use |
|
|
71
|
+
|---|---|
|
|
72
|
+
| `picolan nodes` | List the boards: product, chip ID, IP, build, state. |
|
|
73
|
+
| `picolan push <files>` | Update boards from `.bin` files or bundles. |
|
|
74
|
+
| `picolan logs` | Show the log of a board. Ctrl+C to stop. |
|
|
75
|
+
| `picolan wipe` | Erase the stored data of a board (LittleFS and EEPROM). The firmware stays. |
|
|
76
|
+
| `picolan reboot` | Restart a board. |
|
|
77
|
+
| `picolan blink [seconds]` | Blink the LED of a board, if the firmware has one configured. |
|
|
78
|
+
| `picolan bundle -o <zip> <files>` | Make a bundle from `.bin` files. |
|
|
79
|
+
|
|
80
|
+
## Select a board
|
|
81
|
+
|
|
82
|
+
`logs`, `wipe`, `reboot` and `blink` act on one board. With one board on the network, no option is necessary. Otherwise add `--node`:
|
|
83
|
+
|
|
84
|
+
```sh
|
|
85
|
+
picolan --node motor-controller logs # product name
|
|
86
|
+
picolan --node 192.168.1.4 reboot
|
|
87
|
+
picolan --node 5C82 wipe # chip ID or a unique prefix of it
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The value must match exactly one board, or the tool stops.
|
|
91
|
+
|
|
92
|
+
## Install log
|
|
93
|
+
|
|
94
|
+
The tool adds one line per board to an install log:
|
|
95
|
+
|
|
96
|
+
| System | File |
|
|
97
|
+
|---|---|
|
|
98
|
+
| Linux | `~/.local/state/picolan/install.log` |
|
|
99
|
+
| Windows | `%LOCALAPPDATA%\picolan\install.log` |
|
|
100
|
+
|
|
101
|
+
Example line:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
2026-11-14T19:02:58+0200 result=OK chip=5C829BF5E4BF9E53 ip=192.168.1.33 product=sensor-hub from=a1b2c3d/2B393BC5 to=d4e5f6a/585622FA release=my-system/v6.4.0 source=release-v6.4.0.zip:sensor-hub.bin
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
`result` is `OK`, `FAILED`, `SKIPPED` or `UNCONFIRMED`. Use `--log <file>` or the environment variable `PICOLAN_LOG` for another file, and `--no-log` for none.
|
|
108
|
+
|
|
109
|
+
## Network options
|
|
110
|
+
|
|
111
|
+
| Option | Use |
|
|
112
|
+
|---|---|
|
|
113
|
+
| `--iface <name or IP>` | Use only this network interface. Linux: interface name, for example `eth0`. Any system: a local IPv4 address. Repeatable. |
|
|
114
|
+
| `PICOLAN_IFACE=eth0,eth1` | The same, as an environment variable. |
|
|
115
|
+
|
|
116
|
+
Port: 8208, UDP (discovery, commands, log) and TCP (firmware transfer).
|
picolan-1.0.0/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# picolan
|
|
2
|
+
|
|
3
|
+
Update Raspberry Pi Pico 2 (RP2350) boards with a WIZnet W5500 over Ethernet.
|
|
4
|
+
|
|
5
|
+
- `pio run -t push` replaces the USB cable for updates.
|
|
6
|
+
- A new firmware that fails is rolled back automatically.
|
|
7
|
+
- Your application keeps its own Ethernet code.
|
|
8
|
+
- Boards are found by product name, IP or chip ID.
|
|
9
|
+
- Logs over Ethernet: `pio run -t logs`.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
Add to `platformio.ini`:
|
|
14
|
+
|
|
15
|
+
```ini
|
|
16
|
+
board = wiznet_5500_evb_pico2
|
|
17
|
+
board_build.filesystem_size = 1m
|
|
18
|
+
lib_deps = git@github.com:macushla-robotics/picolan.git#v1.0.0
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Add to your code
|
|
22
|
+
|
|
23
|
+
```cpp
|
|
24
|
+
#include <PicoLan.h>
|
|
25
|
+
|
|
26
|
+
void loop() {
|
|
27
|
+
PicoLan.loop(); // on every pass of the loop that uses Ethernet
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
For log lines that also reach the network, write `LanLog.println(...)` in place of `Serial.println(...)`.
|
|
32
|
+
|
|
33
|
+
## Commands
|
|
34
|
+
|
|
35
|
+
| Task | Command |
|
|
36
|
+
|---|---|
|
|
37
|
+
| Update the board | `pio run -t push` |
|
|
38
|
+
| Show the log | `pio run -t logs` |
|
|
39
|
+
| List the boards | `pio run -t nodes` |
|
|
40
|
+
| Erase stored data (the firmware stays) | `pio run -t wipe` |
|
|
41
|
+
| Blink the LED | `pio run -t blink` |
|
|
42
|
+
|
|
43
|
+
A command acts on the one board that runs this project. With more boards of the same project, add `--upload-port <IP or chip ID>`.
|
|
44
|
+
|
|
45
|
+
## First installation
|
|
46
|
+
|
|
47
|
+
The first firmware must go over USB:
|
|
48
|
+
|
|
49
|
+
1. Connect USB and Ethernet.
|
|
50
|
+
2. Run `pio run -t upload`.
|
|
51
|
+
3. Run `pio run -t nodes` to see the board.
|
|
52
|
+
|
|
53
|
+
## Updates without PlatformIO
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
pip install picolan
|
|
57
|
+
picolan push firmware.bin
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
See [docs/tool.md](docs/tool.md).
|
|
61
|
+
|
|
62
|
+
## Documentation
|
|
63
|
+
|
|
64
|
+
- [docs/guide.md](docs/guide.md): how picolan works, options, limits
|
|
65
|
+
- [docs/tool.md](docs/tool.md): the `picolan` command
|
|
66
|
+
- [docs/protocol.md](docs/protocol.md): network protocol
|
|
67
|
+
- [docs/testing.md](docs/testing.md): test report
|
|
68
|
+
|
|
69
|
+
The `picolan` command (`tools/picolan.py`) is MIT licensed: [tools/LICENSE](tools/LICENSE).
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# picolan command-line tool
|
|
2
|
+
|
|
3
|
+
The `picolan` command finds, updates and monitors boards that run the picolan firmware library, over Ethernet. You do not need the source code, PlatformIO or a GitHub account.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
Requirement: Python 3.9 or later. The tool uses only the Python standard library.
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
pip install picolan
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Update: `pip install -U picolan`. Check the version: `picolan --version`.
|
|
14
|
+
|
|
15
|
+
| System | Status |
|
|
16
|
+
|---|---|
|
|
17
|
+
| Linux | Tested. All network interfaces are used. |
|
|
18
|
+
| Windows | Supported. Not yet tested on hardware. |
|
|
19
|
+
| macOS | Default network interface only. Not tested. |
|
|
20
|
+
|
|
21
|
+
## Connect the PC
|
|
22
|
+
|
|
23
|
+
1. Connect the PC to the network of the boards.
|
|
24
|
+
2. Give the PC an IP address in the subnet of the boards. Example: boards on 192.168.1.x/24, PC on 192.168.1.50/24.
|
|
25
|
+
3. Run `picolan nodes`.
|
|
26
|
+
|
|
27
|
+
`picolan nodes` also finds boards in another subnet. An update needs an IP route to the board.
|
|
28
|
+
|
|
29
|
+
## Update a system from a release bundle
|
|
30
|
+
|
|
31
|
+
A bundle is a zip file. It holds one firmware image per product and a manifest with the SHA-256 of each image.
|
|
32
|
+
|
|
33
|
+
1. Copy the bundle to the PC, for example `release-v6.4.0.zip`.
|
|
34
|
+
2. Run `picolan nodes`. Make sure that each product of the bundle appears once.
|
|
35
|
+
3. Run `picolan push release-v6.4.0.zip`.
|
|
36
|
+
|
|
37
|
+
For each image, the tool:
|
|
38
|
+
|
|
39
|
+
1. Finds the one board that runs the product of the image.
|
|
40
|
+
2. Sends the image. The board restarts on the new firmware.
|
|
41
|
+
3. Waits until the new firmware has run for 10 s, then confirms it.
|
|
42
|
+
4. Checks that the board runs the new firmware.
|
|
43
|
+
|
|
44
|
+
The tool updates the boards one at a time. It stops at the first failure. At the end it prints one result line per board.
|
|
45
|
+
|
|
46
|
+
| Situation | Result |
|
|
47
|
+
|---|---|
|
|
48
|
+
| A product of the bundle has no board, or more than one board | Nothing is installed. |
|
|
49
|
+
| An image was changed after the bundle was made | Nothing is installed. |
|
|
50
|
+
| A board already runs the image | Skipped. Use `--reinstall` to install again. |
|
|
51
|
+
| The new firmware fails | The board restores its previous firmware by itself. The tool stops. |
|
|
52
|
+
|
|
53
|
+
## Commands
|
|
54
|
+
|
|
55
|
+
| Command | Use |
|
|
56
|
+
|---|---|
|
|
57
|
+
| `picolan nodes` | List the boards: product, chip ID, IP, build, state. |
|
|
58
|
+
| `picolan push <files>` | Update boards from `.bin` files or bundles. |
|
|
59
|
+
| `picolan logs` | Show the log of a board. Ctrl+C to stop. |
|
|
60
|
+
| `picolan wipe` | Erase the stored data of a board (LittleFS and EEPROM). The firmware stays. |
|
|
61
|
+
| `picolan reboot` | Restart a board. |
|
|
62
|
+
| `picolan blink [seconds]` | Blink the LED of a board, if the firmware has one configured. |
|
|
63
|
+
| `picolan bundle -o <zip> <files>` | Make a bundle from `.bin` files. |
|
|
64
|
+
|
|
65
|
+
## Select a board
|
|
66
|
+
|
|
67
|
+
`logs`, `wipe`, `reboot` and `blink` act on one board. With one board on the network, no option is necessary. Otherwise add `--node`:
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
picolan --node motor-controller logs # product name
|
|
71
|
+
picolan --node 192.168.1.4 reboot
|
|
72
|
+
picolan --node 5C82 wipe # chip ID or a unique prefix of it
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The value must match exactly one board, or the tool stops.
|
|
76
|
+
|
|
77
|
+
## Install log
|
|
78
|
+
|
|
79
|
+
The tool adds one line per board to an install log:
|
|
80
|
+
|
|
81
|
+
| System | File |
|
|
82
|
+
|---|---|
|
|
83
|
+
| Linux | `~/.local/state/picolan/install.log` |
|
|
84
|
+
| Windows | `%LOCALAPPDATA%\picolan\install.log` |
|
|
85
|
+
|
|
86
|
+
Example line:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
2026-11-14T19:02:58+0200 result=OK chip=5C829BF5E4BF9E53 ip=192.168.1.33 product=sensor-hub from=a1b2c3d/2B393BC5 to=d4e5f6a/585622FA release=my-system/v6.4.0 source=release-v6.4.0.zip:sensor-hub.bin
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
`result` is `OK`, `FAILED`, `SKIPPED` or `UNCONFIRMED`. Use `--log <file>` or the environment variable `PICOLAN_LOG` for another file, and `--no-log` for none.
|
|
93
|
+
|
|
94
|
+
## Network options
|
|
95
|
+
|
|
96
|
+
| Option | Use |
|
|
97
|
+
|---|---|
|
|
98
|
+
| `--iface <name or IP>` | Use only this network interface. Linux: interface name, for example `eth0`. Any system: a local IPv4 address. Repeatable. |
|
|
99
|
+
| `PICOLAN_IFACE=eth0,eth1` | The same, as an environment variable. |
|
|
100
|
+
|
|
101
|
+
Port: 8208, UDP (discovery, commands, log) and TCP (firmware transfer).
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "picolan"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Update, find and monitor RP2350 + W5500 boards that run the picolan library, over Ethernet"
|
|
9
|
+
readme = "docs/tool.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
license-files = ["tools/LICENSE"]
|
|
12
|
+
authors = [{name = "Avi Raviv"}]
|
|
13
|
+
requires-python = ">=3.9"
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"Operating System :: POSIX :: Linux",
|
|
17
|
+
"Operating System :: Microsoft :: Windows",
|
|
18
|
+
"Topic :: Software Development :: Embedded Systems",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
[project.scripts]
|
|
22
|
+
picolan = "picolan:main"
|
|
23
|
+
|
|
24
|
+
[tool.setuptools]
|
|
25
|
+
package-dir = {"" = "tools"}
|
|
26
|
+
py-modules = ["picolan"]
|
|
27
|
+
|
|
28
|
+
[tool.setuptools.dynamic]
|
|
29
|
+
version = {attr = "picolan.__version__"}
|
picolan-1.0.0/setup.cfg
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Avi Raviv
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: picolan
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Update, find and monitor RP2350 + W5500 boards that run the picolan library, over Ethernet
|
|
5
|
+
Author: Avi Raviv
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
9
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
10
|
+
Classifier: Topic :: Software Development :: Embedded Systems
|
|
11
|
+
Requires-Python: >=3.9
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: tools/LICENSE
|
|
14
|
+
Dynamic: license-file
|
|
15
|
+
|
|
16
|
+
# picolan command-line tool
|
|
17
|
+
|
|
18
|
+
The `picolan` command finds, updates and monitors boards that run the picolan firmware library, over Ethernet. You do not need the source code, PlatformIO or a GitHub account.
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
Requirement: Python 3.9 or later. The tool uses only the Python standard library.
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
pip install picolan
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Update: `pip install -U picolan`. Check the version: `picolan --version`.
|
|
29
|
+
|
|
30
|
+
| System | Status |
|
|
31
|
+
|---|---|
|
|
32
|
+
| Linux | Tested. All network interfaces are used. |
|
|
33
|
+
| Windows | Supported. Not yet tested on hardware. |
|
|
34
|
+
| macOS | Default network interface only. Not tested. |
|
|
35
|
+
|
|
36
|
+
## Connect the PC
|
|
37
|
+
|
|
38
|
+
1. Connect the PC to the network of the boards.
|
|
39
|
+
2. Give the PC an IP address in the subnet of the boards. Example: boards on 192.168.1.x/24, PC on 192.168.1.50/24.
|
|
40
|
+
3. Run `picolan nodes`.
|
|
41
|
+
|
|
42
|
+
`picolan nodes` also finds boards in another subnet. An update needs an IP route to the board.
|
|
43
|
+
|
|
44
|
+
## Update a system from a release bundle
|
|
45
|
+
|
|
46
|
+
A bundle is a zip file. It holds one firmware image per product and a manifest with the SHA-256 of each image.
|
|
47
|
+
|
|
48
|
+
1. Copy the bundle to the PC, for example `release-v6.4.0.zip`.
|
|
49
|
+
2. Run `picolan nodes`. Make sure that each product of the bundle appears once.
|
|
50
|
+
3. Run `picolan push release-v6.4.0.zip`.
|
|
51
|
+
|
|
52
|
+
For each image, the tool:
|
|
53
|
+
|
|
54
|
+
1. Finds the one board that runs the product of the image.
|
|
55
|
+
2. Sends the image. The board restarts on the new firmware.
|
|
56
|
+
3. Waits until the new firmware has run for 10 s, then confirms it.
|
|
57
|
+
4. Checks that the board runs the new firmware.
|
|
58
|
+
|
|
59
|
+
The tool updates the boards one at a time. It stops at the first failure. At the end it prints one result line per board.
|
|
60
|
+
|
|
61
|
+
| Situation | Result |
|
|
62
|
+
|---|---|
|
|
63
|
+
| A product of the bundle has no board, or more than one board | Nothing is installed. |
|
|
64
|
+
| An image was changed after the bundle was made | Nothing is installed. |
|
|
65
|
+
| A board already runs the image | Skipped. Use `--reinstall` to install again. |
|
|
66
|
+
| The new firmware fails | The board restores its previous firmware by itself. The tool stops. |
|
|
67
|
+
|
|
68
|
+
## Commands
|
|
69
|
+
|
|
70
|
+
| Command | Use |
|
|
71
|
+
|---|---|
|
|
72
|
+
| `picolan nodes` | List the boards: product, chip ID, IP, build, state. |
|
|
73
|
+
| `picolan push <files>` | Update boards from `.bin` files or bundles. |
|
|
74
|
+
| `picolan logs` | Show the log of a board. Ctrl+C to stop. |
|
|
75
|
+
| `picolan wipe` | Erase the stored data of a board (LittleFS and EEPROM). The firmware stays. |
|
|
76
|
+
| `picolan reboot` | Restart a board. |
|
|
77
|
+
| `picolan blink [seconds]` | Blink the LED of a board, if the firmware has one configured. |
|
|
78
|
+
| `picolan bundle -o <zip> <files>` | Make a bundle from `.bin` files. |
|
|
79
|
+
|
|
80
|
+
## Select a board
|
|
81
|
+
|
|
82
|
+
`logs`, `wipe`, `reboot` and `blink` act on one board. With one board on the network, no option is necessary. Otherwise add `--node`:
|
|
83
|
+
|
|
84
|
+
```sh
|
|
85
|
+
picolan --node motor-controller logs # product name
|
|
86
|
+
picolan --node 192.168.1.4 reboot
|
|
87
|
+
picolan --node 5C82 wipe # chip ID or a unique prefix of it
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The value must match exactly one board, or the tool stops.
|
|
91
|
+
|
|
92
|
+
## Install log
|
|
93
|
+
|
|
94
|
+
The tool adds one line per board to an install log:
|
|
95
|
+
|
|
96
|
+
| System | File |
|
|
97
|
+
|---|---|
|
|
98
|
+
| Linux | `~/.local/state/picolan/install.log` |
|
|
99
|
+
| Windows | `%LOCALAPPDATA%\picolan\install.log` |
|
|
100
|
+
|
|
101
|
+
Example line:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
2026-11-14T19:02:58+0200 result=OK chip=5C829BF5E4BF9E53 ip=192.168.1.33 product=sensor-hub from=a1b2c3d/2B393BC5 to=d4e5f6a/585622FA release=my-system/v6.4.0 source=release-v6.4.0.zip:sensor-hub.bin
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
`result` is `OK`, `FAILED`, `SKIPPED` or `UNCONFIRMED`. Use `--log <file>` or the environment variable `PICOLAN_LOG` for another file, and `--no-log` for none.
|
|
108
|
+
|
|
109
|
+
## Network options
|
|
110
|
+
|
|
111
|
+
| Option | Use |
|
|
112
|
+
|---|---|
|
|
113
|
+
| `--iface <name or IP>` | Use only this network interface. Linux: interface name, for example `eth0`. Any system: a local IPv4 address. Repeatable. |
|
|
114
|
+
| `PICOLAN_IFACE=eth0,eth1` | The same, as an environment variable. |
|
|
115
|
+
|
|
116
|
+
Port: 8208, UDP (discovery, commands, log) and TCP (firmware transfer).
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
MANIFEST.in
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
docs/tool.md
|
|
5
|
+
tools/LICENSE
|
|
6
|
+
tools/picolan.py
|
|
7
|
+
tools/picolan.egg-info/PKG-INFO
|
|
8
|
+
tools/picolan.egg-info/SOURCES.txt
|
|
9
|
+
tools/picolan.egg-info/dependency_links.txt
|
|
10
|
+
tools/picolan.egg-info/entry_points.txt
|
|
11
|
+
tools/picolan.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
picolan
|