NPort 5610-8
Firmware Version: 3.3 Build 08042219
AirNet的GPS/QNH/AFTN使用Real COM Mode方式引接!
一、配置
这是moxa驱动的安装脚本:
Firmware Version: 3.3 Build 08042219
AirNet的GPS/QNH/AFTN使用Real COM Mode方式引接!
一、配置
这是moxa驱动的安装脚本:
function install_moxa_driver
{
if [ "$nodeApp" == "BSDP" ] ; then
index=$nodeNum
index=$(($index+4))
# echo index=$index
else
index=$nodeNum
fi
# grep [-abcEFGhHilLnqrsvVwxy][-A][-B][-C][-d][-e][-f][--help][范本样式][文件或目录...]
{
if [ "$nodeApp" == "BSDP" ] ; then
index=$nodeNum
index=$(($index+4))
# echo index=$index
else
index=$nodeNum
fi
# grep [-abcEFGhHilLnqrsvVwxy][-A][-B][-C][-d][-e][-f][--help][范本样式][文件或目录...]
nportIpAdd=`grep "NPORT$index\>" config/system/hosts_NetA |awk '{if(NF==2) print $1}'`
echo "install moxa driver..."
rm -rf /tmp/moxa
cp drivers/moxa/npreal2_1.14_Build_07062310.tgz /
cd /
tar zxvf npreal2_1.14_Build_07062310.tgz
(sleep 1;echo 1;) | /usr/lib/npreal2/driver/mxdelsvr $nportIpAdd > /dev/null 2
/usr/lib/npreal2/driver/mxuninst > /dev/null 2
cd /tmp/moxa
./mxinst SP1
rm -rf /tmp/moxa
cp drivers/moxa/npreal2_1.14_Build_07062310.tgz /
cd /
tar zxvf npreal2_1.14_Build_07062310.tgz
(sleep 1;echo 1;) | /usr/lib/npreal2/driver/mxdelsvr $nportIpAdd > /dev/null 2
/usr/lib/npreal2/driver/mxuninst > /dev/null 2
cd /tmp/moxa
./mxinst SP1
if [ "$nodeApp"="FDP" ] || [ "$nodeApp" = "MSDP" ] || [ "$nodeApp" = "BSDP" ] || [ "$nodeApp" = "ALR" ] ;then
cd /usr/lib/npreal2/driver
./mxaddsvr $nportIpAdd 8
./mxloadsvr
fi
rm -f /npreal2*.tgz
cd $pkgPath
}
cd /usr/lib/npreal2/driver
./mxaddsvr $nportIpAdd 8
./mxloadsvr
fi
rm -f /npreal2*.tgz
cd $pkgPath
}
通过Nport引接GPS、报文和QNH信号,将串口信号转为网络信号:Nport必须配置为real com方式。
安装驱动NPort Linux Real TTY Driver,安装脚本定义驱动目录:driverPath="/usr/lib/npreal2/driver"
!!!!!!!!!!!!!!!!!!!!!!!!!!!! NOTE 1!!!!!!!!!!!!!!!!!!!!!!!!!!!!
For Red Hat AS/ES/WS and Fedora Core1, extra argument is
needed: # /tmp/moxa/mxinst SP1
!!!!!!!!!!!!!!!!!!!!!!!!!!!! NOTE 1!!!!!!!!!!!!!!!!!!!!!!!!!!!!
For Red Hat AS/ES/WS and Fedora Core1, extra argument is
needed: # /tmp/moxa/mxinst SP1
!!!!!!!!!!!!!!!!!!!!!!!!!!!! NOTE 1!!!!!!!!!!!!!!!!!!!!!!!!!!!!
安装完驱动后在 "/usr/lib/npreal2/driver"目录产生以下文件:
- mxaddsvr (Add Server, map tty port)
- mxsetsec (Set secure communication mode)
- mxdelsvr (Delete Server, un-map tty port)
- mxloadsvr (Reload Server)
- mxuninst (Remove tty port and driver files)
- mxsetsec (Set secure communication mode)
- mxdelsvr (Delete Server, un-map tty port)
- mxloadsvr (Reload Server)
- mxuninst (Remove tty port and driver files)
需要完成TTY端口映射:
run "./mxaddsvr" to add tty port.:
语法:mxaddsvr [NPort IP Address] [Total Ports] ([Data port] [Cmd port])
In Example 1:
# cd /usr/lib/npreal2/driver
# ./mxaddsvr 192.168.3.4 16
# ./mxaddsvr 192.168.3.4 16
16 tty ports will be added, all with IP 192.168.3.4,
but with data ports equal to (950, 951, ..., 965), and command ports
equal to (966, 967, 968, ..., 981).
but with data ports equal to (950, 951, ..., 965), and command ports
equal to (966, 967, 968, ..., 981).
tty命名规则:
The driver difference under 2.6 and 2.4 kernel:
The cur* device is obsolete. That is,you can't use cum* device under kernel 2.6.
The cur* device is obsolete. That is,you can't use cum* device under kernel 2.6.
The tty name of the Real TTY driver is configured in npreal2d.cf.
The pre-defined tty name is ttyrXX, and the callout name is curXX.
The naming convention is illustrated as follows:
The pre-defined tty name is ttyrXX, and the callout name is curXX.
The naming convention is illustrated as follows:
Nport Server TTY Name Callout Name(
标注
名称)
1st(4port) ttyr00 - ttyr03 cur00 - cur03
2nd(8port) ttyr04 - ttyr0b cur04 - cur0b
3rd(16port) ttyr0c - ttyr1b cur0c - cur1b
4th(8port) ttyr1c - ttyr23 cur1c - cur23
...(etc.)
1st(4port) ttyr00 - ttyr03 cur00 - cur03
2nd(8port) ttyr04 - ttyr0b cur04 - cur0b
3rd(16port) ttyr0c - ttyr1b cur0c - cur1b
4th(8port) ttyr1c - ttyr23 cur1c - cur23
...(etc.)
标注
名称:标注设备在Linux 2.6是过时不可用的。
For Red Hat
The script. file "/etc/rc.d/rc.local" will be executed when Linux
boots up. Therefore the driver will append the instructions which
is used to load Real TTY driver in the script. file.
The script. file "/etc/rc.d/rc.local" will be executed when Linux
boots up. Therefore the driver will append the instructions which
is used to load Real TTY driver in the script. file.
这个任务由mxinst脚本以下语句完成:
#append "modprobe npreal2" in /etc/rc.d/rc.local.
cd $NPPATH/driver
./mxloadsvr install
二、问题
1) 使用服务器IBM System x3650(内存1G)安装32位RHEL5.8,将内存扩到16G,需要安装kernel-PAE-2.6.18-53.el5.i686.rpm,并修改/boot/grub/grub.conf,配置使用/vmlinuz-2.6.18-53.el5PAE,以支持4G以上内存。
但是引起MOXA驱动异常:
cd $NPPATH/driver
./mxloadsvr install
二、问题
1) 使用服务器IBM System x3650(内存1G)安装32位RHEL5.8,将内存扩到16G,需要安装kernel-PAE-2.6.18-53.el5.i686.rpm,并修改/boot/grub/grub.conf,配置使用/vmlinuz-2.6.18-53.el5PAE,以支持4G以上内存。
但是引起MOXA驱动异常:
MOXA驱动异常,造成FDP(fdp进程)MSDP(tsp/qnh进程)启动失败,因为该服务器有进程是Down状态,该服务器只能是Standby状态。ERROR: Module npreal2 does not exist in /proc/modules=========================================================Copyright (C) 2002-2007 Moxa Technologies Co., Ltd.All Rights Reserved.
MOXA NPort Server Real TTY Driver V1.14 Installation.System Imformation: Kernel 2.6.18-53.el5PAE; Machine i686.=========================================================
Tar files, please wait ... OK!Building driver...
If you want to use secure communication with target,you might choose [y] to enable the SSL function.Note: This function support RealCOM with secure mode only.Do you want to enable secure function? [y/N].make -C /lib/modules/2.6.18-53.el5PAE/build SUBDIRS=/tmp/moxa modulesmake: *** /lib/modules/2.6.18-53.el5PAE/build: No such file or directory. Stop.make: *** [module] Error 2Check Driver...FAILED !!!Install Not Completed !./install: line 505: cd: /usr/lib/npreal2/driver: No such file or directory./install: line 506: ./mxaddsvr: No such file or directory./install: line 507: ./mxloadsvr: No such file or directory
* 内存加到8G后,重新安装RHEL5.8,使用“ 一致”的PAE内核,安装MOXA驱动OK。这样与MOXA串口有关的进程FDP/tsp/qnh均运行正常( 否则进程为Down状态)。
2)关于NPORT的监控:
检查nport的snmp协议是否开启,方法如下:任意网域内的终端输入 :
snmpwalk -v 1 nportIp -c public 1.3.6.1.2.1.2.1
如果输出是nport拥有的端口数量(硬件)就是开启了snmp协议;SMC对NPORT的监控判定中,对于返回的端口数<=8才是有效的,超过认为是无效的,所以16个端口的NPort 5610-16监控是灰色的,但是不影响信号使用。
2018.3.29
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7970627/viewspace-764358/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7970627/viewspace-764358/