CAN over network bridge for Python
Project description
Creates a CAN over TCP/IP bridge for use with python-can.
Installation
Install using pip:
$ pip install python-can-remote
Usage
Start server from command line:
$ python -m can_remote --interface=virtual --channel=0 --bitrate=500000
Create python-can bus:
import can
# Create a connection to server. Any config is passed to server.
bus = can.Bus('ws://localhost:54701/',
bustype='remote',
bitrate=500000,
receive_own_messages=True)
# Send messages
msg = can.Message(arbitration_id=0x12345, data=[1,2,3,4,5,6,7,8])
bus.send(msg)
# Receive messages
msg2 = bus.recv(1)
print(msg2)
# Disconnect
bus.shutdown()
Web interface
There is also a basic web interface for inspecting the CAN traffic using a browser. It is available on the same address using HTTP, e.g. http://localhost:54701/.
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 python_can_remote-0.2.4.tar.gz.
File metadata
- Download URL: python_can_remote-0.2.4.tar.gz
- Upload date:
- Size: 192.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b11b8fedec25e1913ce5d4242e3e87723c981e94aa1158f0655afa1ec2784573
|
|
| MD5 |
57426650f03c0834f2aa8b67e4b7c855
|
|
| BLAKE2b-256 |
8fa9a702c17cbdfc06acc9ab53176a716c47cea41ce8b36e4ca2debfd4e00dec
|
File details
Details for the file python_can_remote-0.2.4-py3-none-any.whl.
File metadata
- Download URL: python_can_remote-0.2.4-py3-none-any.whl
- Upload date:
- Size: 190.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
683fee953f44fcb98dcd4ede6d49134061ce053e5b37472b52b6e10f76b2bae7
|
|
| MD5 |
5c01b28e2486b50d03795c794ef59ad8
|
|
| BLAKE2b-256 |
9340ad4f45d82866bad70dd35b75c9ba66afd6210a0bd7d5fb5a527e904d1ab8
|