Skip to main content

Cyphal Network Investigation Console -- a minimal CLI for inspecting and exercising Cyphal networks.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cyphal_cynic-0.1.1.tar.gz (25.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cyphal_cynic-0.1.1-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file cyphal_cynic-0.1.1.tar.gz.

File metadata

  • Download URL: cyphal_cynic-0.1.1.tar.gz
  • Upload date:
  • Size: 25.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cyphal_cynic-0.1.1.tar.gz
Algorithm Hash digest
SHA256 95f5eee69ca7b51b8dde8af19840c176f1576dbef4a91180e5c5d584318c2684
MD5 993b031bae741c70b249b96f17b18149
BLAKE2b-256 3c88764cdec8c4c2f377e78279108183830edb6fe8062fa15dd1897ff9d174fd

See more details on using hashes here.

File details

Details for the file cyphal_cynic-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: cyphal_cynic-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cyphal_cynic-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2b8190cf13aef7e9539a966883149a64f0acd6c8f67b93306a8fedcc816d5701
MD5 50f29c62074006b9f6597f6b0e583e78
BLAKE2b-256 42da552a4150d3ad8bdbb186e325693a560c9d241055796aff60594e018daea1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page