Skip to main content

Cynic

Cyphal Network Investigation Console

PyPI Forum


Cynic is a simple command-line tool for inspecting and exercising Cyphal networks.

Cynic is built for use with Cyphal v1.1, which introduces named topics. It is fully interoperable with Cyphal/CAN v1.0 via pinned topics, where the topic name is constructed from its subject-ID, like 1234#1234.

Usage

Install:

pip install cyphal-cynic

Run cn --help for full usage info, or read the code -- it is simple and compact. Some basic examples are shown below.

List topics visible in the network

cn ls
cn --can=can0 ls
cn --can=COM8 --bitrate=125000 ls

Publish/subscribe

printf '\x01\x02' | cn pub topic/foo
cn sub -o raw topic/foo > messages.bin

Set defaults per directory in cynic.toml, or use environment variables:

can = "/dev/serial/by-id/usb-Zubax*Babel*if00"  # or SocketCAN iface name
bitrate = 1_000_000
dsdl_root = ["/home/user/public_regulated_data_types/uavcan", "/home/user/zubax_dsdl"]

RPC/streaming

Send a request, print response(s):

cn req topic/foo/bar --io=zubax/primitive/String1K.1.0.dsdl -- 'Hello world!'

Showcase

Firmware update via Cyphal/CAN

Put this in ./cynic.toml so that you don't have to say --can=slcan0 with every command (optional):

can = "slcan0"  # Can also be a file wildcard for SLCAN

Run the file server in the background (or in a second terminal); the topic name here is arbitrarily chosen as fwupd:

cn fs fwupd &

Command the remote node to download the specified firmware file from topic fwupd:

echo 'upd com.zubax.fluxgrip-1-1.0.41c608fbec4f54d9.16c6d0fc4c1e972a.app.release.bin fwupd' | \
    cn pub -i ~/zubax/zubax_dsdl/zubax/primitive/String256.1.0.dsdl command

Release files for cyphal-cynic 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cyphal-cynic 0.2.1
File Size Uploaded
cyphal_cynic-0.2.1.tar.gz 28.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cyphal-cynic 0.2.1
File Interpreter ABI Platform
cyphal_cynic-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 43.1 kB

Release files / cyphal_cynic-0.2.1.tar.gz

Download URL cyphal_cynic-0.2.1.tar.gz
Size 28.8 kB
Tags Source
SHA-256 checksum
How to use checksums
66cbabc73d9b4e42bbfa052f1d0db58e3e2317541cfefc3944debc9b3585b020
BLAKE2b-256 checksum
How to use checksums
0661f35fd99314bd049aca5774512d762f14d084546f94210c3c3bc7fc509955
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / cyphal_cynic-0.2.1-py3-none-any.whl

Download URL cyphal_cynic-0.2.1-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd646df9a944b9c83fe0e19b76e68c6dc60aade317ff014922ec0d6e33880f34
BLAKE2b-256 checksum
How to use checksums
789eb3162931562cc6e4efadb35636623714c2beac542e23355d82c23cd43e11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page