A socketCAN on TCP client/server
Project description
tcpcan
A socketCAN on TCP client/server
Usage
usage: tcpcan.py [-h] [--host HOST] [--port PORT] [--serve] [-v] canif
Tunnel SocketCAN on TCP.
positional arguments:
canif SocketCAN interface
optional arguments:
-h, --help show this help message and exit
--host HOST TCP host (default: localhost)
--port PORT TCP port (default: 20010)
--serve
-v, --verbose
Server
tcpcan vcan0 --serve
Client
tcpcan vcan0
Protocol
This section describes the protocol used by tcpcan. Every message has a two byte header containing a prefix (1 byte) and a length (1 byte). The protocol is big endian if nothing else is stated. A connection always starts with a protocol version negotiation using the Protocol version message. No other messages than Protocol version messages must be sent before a version agreement has been met.
Message header
| --------------- | ----------------- | --------------------------------- |
| Prefix (1 byte) | Length N (1 byte) | Prefix specific payload (N bytes) |
| --------------- | ----------------- | --------------------------------- |
Messages
| Prefix | Format | Description | Supported in version |
|---|---|---|---|
| v | I | Protocol version | 1 |
| d | B* | SocketCAN data, 16 B (can_frame) or 72 B (canfd_frame) | 1 |
Protocol version negotiation
A client initiates the negotiation by proposing a protocol version it supports, typically its highest supported version. The server responds with either the same version number as an acknowledgement that an agreement has been met or it proposes a lower version number. If the version number is lowered the negotiation continue until an agreement is made. If the version reaches 0, no agreement could be made and the connection is terminated. A communicating party must not respond to a Protocol version message if it contains the same version number as the party itself has proposed earlier.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tcpcan-0.0.2.tar.gz.
File metadata
- Download URL: tcpcan-0.0.2.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a862b033c8920275de7cb35640d9199a339e3624f89f0a44a57436d22dce4d23
|
|
| MD5 |
c9cf0873d1a8c6b1748d2b535cf7040c
|
|
| BLAKE2b-256 |
23aec8da3f19e83f58f12fa2a87a6e8bc81bf970c73566c7db0cb6d434a03b51
|
File details
Details for the file tcpcan-0.0.2-py3-none-any.whl.
File metadata
- Download URL: tcpcan-0.0.2-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e898815d9930b303fc569af0aa0324327ab8d44aa67d26d8fc837881f5265d8
|
|
| MD5 |
7bad1eb3348182807f4832868bc7ba6b
|
|
| BLAKE2b-256 |
ff7a5b42e91d5624b8b1058aa3657da1ccbbdac04c3652c99f923f6e1dc7e455
|