Moxa DA-682A-C7-W7E [67/112] Loading the defaults

Moxa DA-682A-C7-W7E [67/112] Loading the defaults
DA-682A Linux Softrware Programming Optional Modules
5-3
Loading the Defaults
To reset the ports to their defaults:
Edit /etc/udev/rules.d/96-moxa.rules.
moxa@Moxa:~# vi /etc/udev/rules.d/96-moxa.rules
# Example to set the device, DA-SP08-I-DB, 0x1393:0x1180 default as 485-2W mode interface
KERNEL=="ttyM0", RUN+="/bin/setinterface /dev/ttyM%n 1"
Edit the command line RUN+="/bin/setinterface /dev/ttyM%n 0”.
If you want to change the serial mode as RS-232, use the following parameter.
RUN+="/bin/setinterface /dev/ttyM%n 0"
If you want to change the serial mode as RS-485 2-wire, use the following parameter.
RUN+="/bin/setinterface /dev/ttyM%n 1"
If you want to change the serial mode as RS-422, use the following parameter.
RUN+="/bin/setinterface /dev/ttyM%n 2"
If you want to change the serial mode as RS-485 4-wire, use the following parameter.
RUN+="/bin/setinterface /dev/ttyM%n 3"
Reboot your computer.
moxa@Moxa:~# reboot
When the computer has been restarted, check if the setting has been loaded as the default value.
moxa@Moxa:~# setinterface /dev/ttyM0
Now setting is RS485-2WIRES interface.
moxa@Moxa:~#
ATTENTION
As the DA
-SP38 and DA-
SP08 use the same driver, mxser.ko, the /dev/ttyM* probing order is hard coded in the
driver. This means the card probing order is fixed. You have to install them in this order and the /dev/ttyM*
order will not be reverse.
1) Insert module DA
-SP08 into "Module A" of DA-682A.
2) Insert module DA
-SP38 into "Module B" of DA-682A.
Programming the LAN Module
The DA-682A can be inserted with the DA-LAN04-RJ LAN module, which uses the r8169 Ethernet driver. When
the system boots up, you can see the Ethernet interface in the ifconfig command.
moxa@Moxa:~# ifconfig
eth6 Link encap:Ethernet HWaddr 00:90:e8:00:e0:02
inet addr:192.168.9.127 Bcast:192.168.9.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:45 Base address:0x8000
eth7 Link encap:Ethernet HWaddr 00:90:e8:00:e0:03
inet addr:192.168.10.127 Bcast:192.168.10.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1

Содержание

Похожие устройства