Crates.io | verdigris |
lib.rs | verdigris |
version | 0.2.0 |
source | src |
created_at | 2016-06-05 00:43:30.978106 |
updated_at | 2023-07-27 11:38:20.539892 |
description | Browser application to explore, learn and debug CoAP |
homepage | |
repository | https://gitlab.com/chrysn/verdigris |
max_upload_size | |
id | 5288 |
size | 100,730 |
Verdigris is a demo of a CoAP GUI run in the browser communicating via WebSockets.
It aims to become usable as a generic CoAP client (possibly with some limited server functionality) that can be used from the browser for exploration, leaning and debugging.
Eventually it should be usable as a replacement for the venerable Copper browser plug-in that got overtaken by the browser plugin APIs. Unlike Copper, this runs purely as a website, and can not talk CoAP-over-UDP. Instead, it relies on a public or local cross proxy that is accessible using CoAP-over-WS, or possibly other browser-accessible transports.
Currently, it provides three distinct modes of operation:
In message exchanger mode, it can be used to generate CoAP requests by assembling them from options (or useing some of the preset ones), and shows any incoming responses in decoded form.
In color server mode, it provides a monochromous area whose color can be changed by CoAP clients. it registers at a Resource Directory1 with a given (initially random) endpoint name and asks to be reverse-proxied behind a globally reachable name.
The server also runs (but announces incompletely) the demo applications from coap-message-demos.
For example, it offers a resource /message/info
to which messages can be POSTed;
their content shows up in the browser console through the log
crate.
In color client mode, it connects to a Resource Directory1 via a proxy, looking for compatible resurces at a color server.
All discovered resources can be set (together or individually) to a selected color through the same proxy.
In the highly experimental Bluetooth Low Energy GATT mode, a device speaking CoAP-over-GATT can be accessed from a Chromium-based browser, and made available via the Resource Directory.
Run and host using cargo build --target wasm32-unknown-unknown --release && wasm-bindgen target/wasm32-unknown-unknown/release/verdigris.wasm --out-dir public/ --web && python3 -m http.server -d ./public 8080
,
and go to https://localhost:8080/.
The Python part can be replaced with any static web server.
Replacing the direct use of wasm-bindgen CLI
with trunk or wasm-pack only needs minor adjustments in the provided index.html
file;
see the project's history for some variations that have been used in the past.
The latest version is available online at https://chrysn.gitlab.io/verdigris/.
At startup, it connects to the one at https://rd.coap.amsuess.com/. ↩ ↩2