Jump to content
Форум по продукции MOXA

uroboros

Пользователи
  • Posts

    7
  • Joined

  • Last visited

uroboros's Achievements

Новичок

Новичок (1/5)

0

Reputation

  1. Простите за не быстрый ответ. Устанавливал Suse 11.3 . Получены первые положительные результаты на ядре 2.6.34-12desktop (Через МОХА DE-311 опрашивается модуль i-7017 ICPDAS) питоновским скриптом. Драйвер МОХА последний высланный Вами npreal2_1.17.1_Build_11050413.tgz. БОЛЬШОЕ ЧЕЛОВЕЧЕСКОЕ СПАСИБО ЗА ПОМОЩЬ!
  2. удаленный последовательный порт открылся на OpenSuse 11.2 с ядром linux-w9g2:/tmp/moxa # uname -a Linux linux-w9g2 2.6.31.5-0.1-desktop #1 SMP PREEMPT 2009-10-26 15:49:03 +0100 i686 i686 i386 GNU/Linux драйвер: npreal2_1.17_Build_11011413.tgz полностью работа порта пока не проверена
  3. Не думаю что дело в связи, не думаю что можно назвать "соединением" когда из Windows на порты 950 и 966 долгое время вижу просто черный экран и отлуп не дает и не пишет ничего просто мигающий курсор в дос окне. Список разрешенных IP посмотрел , пробовал вписать туда свою подсеть , пробовал очистить его , пробовал внести IP своего хоста все это с применением, перезагрузкой МОХА и повторным подсоединением и проверкой установленных параметров - не помогло. И потом на ПК у меня установлено две ОС Suse 11.3 и Windows 7 IP адрес одинаковый (раздается DHCP по MAC-у) из Windows работает из Suse нет .
  4. в логах вот что cat ./npreal2d.logb/npreal2/driver # 05-04-2011 11:58:40 MOXA Real TTY daemon program starting (Ver1.17 Build 11011413)... 05-04-2011 11:58:40 MOXA Real TTY daemon program starting (Ver1.17 Build 11011413)... 05-04-2011 11:59:47 Socket connect fail (172.27.80.200,TCP port 950) ! 05-04-2011 11:59:47 Socket connect fail (172.27.80.200,TCP port 950) ! огненная стена погашена linux-8diq:/usr/lib/npreal2/driver # iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
  5. Попробовал на OpenSuse 11.3 Linux 2.6.34-12-desktop - Поведение аналогичное , запустить не удалось . В дополнении попробовал открыть порт через setserial linux-8diq:/usr/lib/npreal2/driver # setserial -g /dev/ttyr00 /dev/ttyr00: Input/output error tcpdump сетевых пакетов показывает что MOXA принимает пакеты из сети и отвечает на них на 950,966 портах. Мониторинг пакетов на порту телнетом 0 отправлено 0 принято. Надеюсь помощь не опоздает , горит диплом .
  6. Доброго времени суток!. Имеем Opensuse 11.4 1. #uname -a #Linux linux-kt7j.site 2.6.37.1-1.2-desktop #1 SMP PREEMPT 2011-02-21 10:34:10 +0100 i686 i686 i386 GNU/Linux 2. MOXA DE-311 нужно : подключить на сусе виртуальный COM порт компиляция: linux-kt7j:/tmp/moxa # ./mxinst =============================================================================== Copyright © 2002-2011 Moxa Inc. All Rights Reserved. MOXA NPort Server Real TTY Driver V1.17 Installation. System Imformation: Kernel 2.6.37.1-1.2-desktop; Machine i686. =============================================================================== There is an Real TTY Driver installed in your system. Continue to install will overwrite the old driver. Do you want to continue installing? [y/N]. y 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]. N make -C /lib/modules/2.6.37.1-1.2-desktop/build SUBDIRS=/tmp/moxa modules make[1]: Entering directory `/usr/src/linux-2.6.37.1-1.2-obj/i386/desktop' make -C ../../../linux-2.6.37.1-1.2 O=/usr/src/linux-2.6.37.1-1.2-obj/i386/desktop/. modules Building modules, stage 2. MODPOST 1 modules make[1]: Leaving directory `/usr/src/linux-2.6.37.1-1.2-obj/i386/desktop' cp -p npreal2.ko /lib/modules/2.6.37.1-1.2-desktop/kernel/drivers/char/ depmod -a Check Driver... Copying driver files ... OK! Load driver... OK! Loading TTY Driver... Complete. =============================================================================== Installation process is completed. The all driver files are installed on /usr/lib/npreal2/driver. Now you can cd /usr/lib/npreal2/driver and run ./mxaddsvr to add tty port. =============================================================================== создание порта: linux-kt7j:/usr/lib/npreal2/driver # ./mxaddsvr 172.27.80.200 1 Adding Server... ttyr00, cur00 Added RealCom server: ip : 172.27.80.200 rm -f /dev/ttyr00 mknod -m 666 ttyr00 c 33 0 rm -f /dev/cur00 mknod -m 666 cur00 c 38 0 Complete. Процессы: linux-kt7j:/tmp/moxa # ps -A | grep npreal 1128 ? 00:00:00 npreal2d_redund 1130 ? 00:00:00 npreal2d Телнет работает нормально : linux-kt7j:/tmp/moxa # telnet 172.27.80.200 Trying 172.27.80.200... Connected to 172.27.80.200. Escape character is '^]'. Console terminal type (1: ansi/vt100, 2: vt52) : 1 Проблема : при попытке подключиться к порту из скрипта на Python-е linux-kt7j:/windows/F/po_diplom/Diplom # cat ./testcom_2.py import serial ser = serial.Serial('/dev/ttyr00', 115200, timeout=1) ser.write("hello") x = ser.read() # read one byte s = ser.read(10) # read up to ten bytes (timeout) line = ser.readline() # read a '\n' terminated line print "--- ",line ser.close() получаем следующее python ./testcom_2.py po_diplom/Diplom # Traceback (most recent call last): File "./testcom_2.py", line 2, in <module> ser = serial.Serial('/dev/ttyr00', 115200, timeout=1) File "/usr/local/lib/python2.7/site-packages/serial/serialutil.py", line 260, in __init__ self.open() File "/usr/local/lib/python2.7/site-packages/serial/serialposix.py", line 276, in open raise SerialException("could not open port %s: %s" % (self._port, msg)) serial.serialutil.SerialException: could not open port /dev/ttyr00: [Errno 5] Input/output error: '/dev/ttyr00' при этом тоже самое устройство отвечает на запросы из под Windows XP подобному python скрипту import serial ser = serial.Serial('COM5', 115200, timeout=1) ser.write("hello") x = ser.read() # read one byte s = ser.read(10) # read up to ten bytes (timeout) line = ser.readline() # read a '\n' terminated line print "--- ",line ser.close() и в том и в другом случае мониторинг сетевых пакетов показывает что MOXA принимает пакеты из сети и отвечает на них на 950,966 портах. Что я делаю не так? С Уважением Александр.
×
×
  • Create New...