pcan gatewaybus backend for "python-can"
Project description
PCAN Gateway Plugin Packages
Target Device : PCAN-Ethernet Gateway
PCAN-Ethernet Gateway Configuration
in user manual, custom gateway procol is presented.
in Route Configuration Page, add Routing IP Addresses both side(CAN->Ethernet, Ethernet->CAN)
Install Plugin Package
# install from PyPI
$ pip3 install python-pcan-gatewaybus
or
# local installation
$ git clone https://github.com/ys-oh/python-can-gatewaybus
$ cd python-can-gatewaybus
$ pip3 install .
Usage
import can
bus = can.Bus(bustype='gateway', channel='<local ip>:<local port>,<remote ip>:<remote port>')
...
or
import can
can.rc['interface'] = 'gateway'
can.rc['channel'] = '<local ip>:<local port>,<remote ip>:<remote port>'
bus = can.Bus()
...
in 'channel' argument represent Route Addres in PCAN-Ethernet Gateway Routing Configurations.
local address (ip:port)
- receive address from PCAN-Ethernet Gateway
- e.g. 192.168.1.1:4000
remote address (ip:port)
- transmit address to PCAN-Ethernet Gateway
- e.g. 192.168.1.10:3999
if you config routing in Device (device ip : 192.168.1.1)
Transmit Channel (CAN->Ethernet) : TCP, 192.168.1.1:3999
Recieve Channle (Ethernet->CAN) : TCP, :4000
your channel is
...
can.rc['channel'] = '192.168.1.1:3999,192.168.1.1:4000'
...
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
pcan-gatewaybus-0.0.1.tar.gz
(21.2 kB
view details)
Built Distribution
File details
Details for the file pcan-gatewaybus-0.0.1.tar.gz
.
File metadata
- Download URL: pcan-gatewaybus-0.0.1.tar.gz
- Upload date:
- Size: 21.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4786f0a57cfef598b23ddc7b24d81ca666f1c081dac894fcb397e1bb70e1aa0c |
|
MD5 | 48b6d7a7959f928b77509186a798a33c |
|
BLAKE2b-256 | e20a94f05ec07a7e672238ffaf2b1c0df6bba180cb382bb243a2162b2134f594 |
File details
Details for the file pcan_gatewaybus-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: pcan_gatewaybus-0.0.1-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f52210051962cb1a5ba6d7d42fb361314f063ff4dfff9520f351a57f251e054e |
|
MD5 | 7a6d98933ef6e9baa1d0075f347cd76e |
|
BLAKE2b-256 | d01876b7809a8100d13e7b3600a82bb7a3b2f83693bfda959f23dc49875303b1 |