Moxa V2426A-C7 [35/88] Epm 3112 driver installation

Moxa V2426A-C2-CT-T [35/88] Epm 3112 driver installation
V2400A Series Expansion Modules Software Installation and Programming Guide
4-15
}
EPM-3112 CAN Bus Interface
The EPM-3112 module provides V2400A series computers with a CAN bus interface. CAN is a broadcast serial
bus standard for connecting electronic control units (ECUs). Each node is able to send and receive messages,
but not simultaneously: a message (consisting primarily of an IDusually chosen to identify the
message-type/senderand up to eight message bytes) is transmitted serially onto the bus, one bit after
another. This signal-pattern codes the message (in NRZ) and is sensed by all nodes.
The Moxa EPM-3112 module provides the CAN bus interface for industrial CAN communication. Users can use
Moxa’s CAN library or the local GNU/Linux device control interface (ioctl) to program reads, writes, and controls
for CAN devices.
EPM-3112 Driver Installation
CAN is a serial bus protocol for connecting and controlling electronic devices in harsh environments. A CAN bus
connects ECUs (electronic control units) so that each node may send and receive messages that consist of an
ID (to identify the message-type and sender) and up to eight message bytes.
The Moxa EPM-3112 module provides the CAN bus interface for industrial CAN communication. The V2400A
series computer provides the SocketCAN interface for industrial CAN communication. The SocketCAN concept
extends the Berkeley sockets API in Linux by introducing a new protocol family, PF_CAN that coexists with
other protocol families like PF_INET for the Internet Protocol.
Users can use the file control interface to read, write, or control the CAN interface as a file for easy CAN
programming.
To install the EPM-3112 kernel module:
1. Use the
dpkg installer to install the v2400a-epm3112_1.0.0_amd64.deb package. This package will
automatically enable your EPM-3112 module to load at boot time:
Moxa: ~# dpkg -i v2400a-epm3112_1.0.0_amd64.deb
2. After installation, please reboot your device.
EPM-3112 Configuring the Socket CAN Interface
After the modules are loaded, use the ip link command to check the CAN device.
Moxa:~# ip link
can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT qlen 10
link/can
can1: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT qlen 10
link/can
The next step is to configure the CAN interface and start it as a standard net interface. Heres an example with
bitrate 12500:
# ip link set can0 up type can bitrate 12500
# ip link set can1 up type can bitrate 12500
After using the SocketCAN API, the SocketCAN information is located in /proc/net/can; use the following
command to determine the version:
# cat /proc/net/can/version
Use the following command to get the statistics:
# cat /proc/net/can/stats

Содержание

Скачать