CAN over network bridge for Python
Project description
Creates a CAN over TCP/IP bridge for use with python-can.
Usage
Start server from command line:
$ python -m can_remote --interface=virtual --channel=0 --bitrate=500000
Create python-can bus:
import can
import can_remote
# Create a connection to server. Any config is passed to server.
bus = can_remote.RemoteBus('ws://localhost:54701/', bitrate=500000)
# 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()
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
File details
Details for the file python-can-remote-0.1.0.tar.gz.
File metadata
- Download URL: python-can-remote-0.1.0.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25d2d2701af5abbf24c8a137ee6913a735ca04b0b9fcb68c0ce78d9d90cfe17c
|
|
| MD5 |
3d97fce8af241ca8e501fb1493295851
|
|
| BLAKE2b-256 |
1d1119d3528130c812acf9e87e0625d539d15b9d428ee56a34e42245349cd270
|