This release is a pre-release and may not be stable for production use.
wasptool
Talk to a wasp-os smart watch over Bluetooth: update its firmware, set its clock, send it notifications, copy files to and from it, or open a MicroPython prompt on it. It runs on Linux, macOS and Windows, and needs nothing but Python and bleak.
Install
From a wasp-os checkout:
uv tool install ./tools/wasptool
Use
wasptool scan # the watches in range
wasptool info # version, battery, memory, ...
wasptool info --json # the same, for scripts
wasptool rtc # how far off is the watch's clock?
wasptool rtc set # set it to this computer's time
wasptool notify "Build" "Passed" # show a notification
wasptool alarm # the alarms
wasptool alarm set 7:30 --days weekdays # add one, or change the one at 7:30
wasptool alarm unset 7:30 # remove it ("all" removes them all)
wasptool face # the watch faces, * marks the one in use
wasptool face PixelClock # use another one
wasptool update # update to the latest build, after asking
wasptool update --check # only show what's new
wasptool ota micropython.zip # update the firmware from a file
wasptool push apps/snake.py # copy a file to the watch
wasptool pull alarms.txt # and back
wasptool eval "print(wasp.watch.battery.voltage_mv())"
wasptool exec script.py
wasptool console # a MicroPython prompt (Ctrl-X exits)
wasptool reset [--bootloader]
With more than one watch around, pick one with --device NAME or
--device ADDRESS. Connecting is retried (--retries, 3 by default):
some radios, especially ones shared with Wi-Fi, fail the first attempt
now and again.
update gets the builds published on https://wasp-os.x14.nl/ (see
tools/publish.py), checks the firmware's sha256 against releases.json
and installs it like ota. Use --url for another site.
Commands exit with status 0 on success and 1 on failure; eval and
exec also exit with 1 when the code raises, with the traceback on
stderr.
How it works
The watch's console is the Nordic UART Service. wasptool runs Python on it through MicroPython's raw REPL, using raw-paste mode for flow control where the firmware has it (MicroPython 1.14 and later), and paced writes where it does not. Firmware updates use Nordic's legacy DFU protocol, which the PineTime bootloader speaks.
Metadata
Release files for wasptool 0.1.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wasptool-0.1.0a1.tar.gz | 18.4 kB | Without provenance | Details for wasptool-0.1.0a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wasptool-0.1.0a1-py3-none-any.whl | Python 3 | none | any | Details for wasptool-0.1.0a1-py3-none-any.whl |
Total release size: 40.3 kB
Release files / wasptool-0.1.0a1.tar.gz
| Download URL | wasptool-0.1.0a1.tar.gz |
|---|---|
| Size | 18.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
19f87bcce1c2294c3c264a3d7b255dde0de09d906e89c3422c010c934ad44eaf
|
|
BLAKE2b-256 checksum How to use checksums |
bd2bd268f92fffb2b0d6f6fc256185b04787a5703b65bbcb4e1ae0419015e7fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / wasptool-0.1.0a1-py3-none-any.whl
| Download URL | wasptool-0.1.0a1-py3-none-any.whl |
|---|---|
| Size | 21.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0769883053d2223bb4394f83780eabd94230ba9f764df2f468a23c6db1bb2f44
|
|
BLAKE2b-256 checksum How to use checksums |
4d1c9b14db5c7adf7d4556841d73a533aec656e4f8fec14b1eeb7dadca980210
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for wasptool 0.1.0a1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.