Skip to main content

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 protocol is presented.

in Route Configuration Page, add Routing IP Addresses both side(CAN->Ethernet, Ethernet->CAN)


Install Plugin Package

# install from PyPI
$ pip3 install 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


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.2.tar.gz (21.1 kB view hashes)

Uploaded Source

Built Distribution

pcan_gatewaybus-0.0.2-py3-none-any.whl (21.0 kB view hashes)

Uploaded Python 3

Supported by

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