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

amaranth

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

    16
  • Joined

  • Last visited

amaranth's Achievements

Участник

Участник (2/5)

0

Reputation

  1. Если интересно, то я делаю следующее: 1. На сервере под управлением Fedora 30 (на HyperV) ставлю Docker 2. Создаю на основе образа Fedora 30 образ с помощью Dockerfile и в нем собираю драйвера moxa 3. Далее в этот образ интегрирую свою приложение на .NET Core, которое опрашивает устройство через ttyr00 и выводит данные через веб-интерфейс (с испоьзованием WebSocket). 4. Назначаю автозапускаемым мое приложение. Образ готов к употреблению. Получилось очень интересно.
  2. Не появилось пока более новой версии?
  3. После добавления устройства: Adding Server... ttyr00, cur00 Added RealCom server: ip : 10.96.1.89 mknod -m 666 ttyr00 c 33 0 mknod -m 666 cur00 c 38 0 Complete. Как посмотреть вывод с порта? На нем данные постоянно поступают от устройства. Команда stty -F /dev/ttyr00 9600 ничего не выводит, просто закрывается без ничего.
  4. Хотя почему в np_ver.h #define NPREAL_VERSION "Ver1.19.9" а сам файл обозначен как 1.9.11 ?
  5. C 1.9.11 (хотя почему в np_ver.h #define NPREAL_VERSION "Ver1.19.9" ?) вроде получилось: ./mxinst m64 =============================================================================== Copyright (C) 2002-2019 Moxa Inc. All Rights Reserved. MOXA NPort Server Real TTY Driver Ver1.19.9 Installation. System Information: Kernel 5.2.7-200.fc30.x86_64; Machine x86_64. =============================================================================== 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/5.2.7-200.fc30.x86_64/build M=/tmp/moxa modules make[1]: вход в каталог «/usr/src/kernels/5.2.7-200.fc30.x86_64» Building modules, stage 2. MODPOST 1 modules make[1]: выход из каталога «/usr/src/kernels/5.2.7-200.fc30.x86_64» cp -p npreal2.ko /lib/modules/5.2.7-200.fc30.x86_64/kernel/drivers/char/ depmod -a Check Driver... Copying configurations files ... OK! 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. ===============================================================================
  6. Предварительно его изменив с учетом макроса access_ok, как я сделал ранее ?
  7. К сожалению не могу пока посмотреть. До нее дойти надо. Без этого SN мне не видать драйвера 1.19.11 ? Спасибо.
  8. Без включения защищенного обмена тоже самое: ./mxinst m64 =============================================================================== Copyright (C) 2002-2017 Moxa Inc. All Rights Reserved. MOXA NPort Server Real TTY Driver Ver1.19 Installation. System Information: Kernel 5.2.7-200.fc30.x86_64; Machine x86_64. =============================================================================== 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 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/5.2.7-200.fc30.x86_64/build SUBDIRS=/tmp/moxa modules make[1]: вход в каталог «/usr/src/kernels/5.2.7-200.fc30.x86_64» Makefile:213: ================= WARNING ================ Makefile:214: 'SUBDIRS' will be removed after Linux 5.3 Makefile:215: Please use 'M=' or 'KBUILD_EXTMOD' instead Makefile:216: ========================================== Building modules, stage 2. MODPOST 1 modules make[1]: выход из каталога «/usr/src/kernels/5.2.7-200.fc30.x86_64» cp -p npreal2.ko /lib/modules/5.2.7-200.fc30.x86_64/kernel/drivers/char/ depmod -a Check Driver... Copying driver files ... OK! Load driver... OK! Loading TTY Driver... rm -f /dev/ttyr01 mknod -m 666 ttyr01 c 33 2 rm -f /dev/cur01 mknod -m 666 cur01 c 38 2 file open error =============================================================================== 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. ===============================================================================
  9. Можно ее пожалуйста? Я ее под ядро Kernel 5.2.7 соберу. Спасибо.
  10. Можно ее пожалуйста? Я ее под ядро Kernel 5.2.7 соберу. Спасибо.
  11. Извините, а где можно скачать последнюю версию драйвера ? Сейчас последняя 1.19.7 или 1.19.9 ?
  12. Вроде бы собралось: ./mxinst m64 =============================================================================== Copyright (C) 2002-2017 Moxa Inc. All Rights Reserved. MOXA NPort Server Real TTY Driver Ver1.19 Installation. System Information: Kernel 5.2.7-200.fc30.x86_64; Machine x86_64. =============================================================================== 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 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]. y make -C /lib/modules/5.2.7-200.fc30.x86_64/build SUBDIRS=/tmp/moxa modules make[1]: вход в каталог «/usr/src/kernels/5.2.7-200.fc30.x86_64» Makefile:213: ================= WARNING ================ Makefile:214: 'SUBDIRS' will be removed after Linux 5.3 Makefile:215: Please use 'M=' or 'KBUILD_EXTMOD' instead Makefile:216: ========================================== Building modules, stage 2. MODPOST 1 modules make[1]: выход из каталога «/usr/src/kernels/5.2.7-200.fc30.x86_64» cp -p npreal2.ko /lib/modules/5.2.7-200.fc30.x86_64/kernel/drivers/char/ depmod -a cc -c -m64 -DSSL_ON -DOPENSSL_NO_KRB5 npreal2d.c -I/tmp/moxa/include cc -m64 npreal2d.o -o npreal2d -lssl strip npreal2d Check Driver... Copying driver files ... OK! Load driver... OK! Loading TTY Driver... rm -f /dev/ttyr00 mknod -m 666 ttyr00 c 33 1 rm -f /dev/cur00 mknod -m 666 cur00 c 38 1 file open error =============================================================================== 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. =============================================================================== Но что означает после команды mknod -m 666 cur00 c 38 1 ошибка file open error ?
  13. В npreal2.c используется макрос с 3-мя аргументами в виде: rtn = access_ok( VERIFY_READ, (void *)arg, size )?0:-EFAULT; А в /usr/src/kernels/5.2.7-200.fc30.x86_64/arch/x86/include/asm/uaccess.h она объявлена так: #define access_ok(addr, size) \ ({ \ WARN_ON_IN_IRQ(); \ likely(!__range_not_ok(addr, size, user_addr_max())); \ }) Похоже что налицо несоответствие ядра 5.2. Какие будут предложения ? Попробую внести изменения как вот здесь.
×
×
  • Create New...