Search code examples
raspberry-piraspbian

How to use MOXA N5110 device under Raspbian Jessie?


I tried installing the moxa real tty driver for linux, downloadable from moxa.com (http://www.moxa.com/product/NPort_5110.htm) on my raspbery pi 3... but failed at it.

Looks like compilation needs kernel sources, and i ran rpi-sources to install them (found instructions in last post here https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=121644) ...

then mxinst command did not stop, but ran, but still get bunch of errors...

Has anyone successfully installed nport driver from moxa on raspberry pi 3? how?

jack@raspberrypi:~/tmp/moxa $ sudo ./mxinst

=============================================================================== Copyright (C) 2002-2012 Moxa Inc. All Rights Reserved.

MOXA NPort Server Real TTY Driver V1.18 Installation.

System Imformation: Kernel 4.4.11-v7+; Machine armv7l.

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/4.4.11-v7+/build SUBDIRS=/home/jack/tmp/moxa modules make[1]: Entering directory '/root/linux-233755da0e7903fccb41f0b8c14e1da5244b69ec' CC [M] /home/jack/tmp/moxa/npreal2.o /home/jack/tmp/moxa/npreal2.c: In function ‘npreal_init_tty’: /home/jack/tmp/moxa/npreal2.c:661:11: error: dereferencing pointer to incomplete type de->data = (void ) net_node; ^ /home/jack/tmp/moxa/npreal2.c:663:11: error: dereferencing pointer to incomplete type de->proc_fops = &npreal_net_fops; ^ In file included from /home/jack/tmp/moxa/npreal2.c:92:0: /home/jack/tmp/moxa/npreal2.c: In function ‘npreal_init’: /home/jack/tmp/moxa/npreal2.h:28:35: error: ‘struct tty_driver’ has no member named ‘termios_locked’ #define DRV_VAR_P(x) npvar_sdriver->x ^ /home/jack/tmp/moxa/npreal2.c:779:5: note: in expansion of macro ‘DRV_VAR_P’ DRV_VAR_P(termios_locked) = npvar_termios_locked; ^ /home/jack/tmp/moxa/npreal2.c: In function ‘npreal_open’: /home/jack/tmp/moxa/npreal2.c:1064:13: error: invalid type argument of unary ‘’ (have ‘struct ktermios’) *tty->termios = info->normal_termios; ^


Solution

  • UPDATE: Friendly people on irc channel #raspberrypi helped me out with a link to MOXA's latest nport driver (http://www.moxa.ru/forum/index.php?app=core&module=attach&section=attach&attach_id=1677) which compiled without errors (but you have to have kernel sources installed - see link in my question)...

    UPDATE: Immediately after my arose, i also emailed moxa's support, and a day later they sent me latest (beta) nport driver, which is even newer - and also works on raspberry pi 3 / raspbian jessie... So - if anyone has the same problem - email moxa - their support is really nice!