Problem with comserv

J. Seth Henry jshamlet at comcast.net
Fri Oct 3 16:44:41 PDT 2003


Hello,
I'm trying to use the comserv daemon in the ports tree to share a SIIG
Cyber 4S multiport serial board. The ports work locally, and it appears
that comserv is, in fact, working. However, I can't write to the ports
once I open them on the remote end.

I don't think it is a permissions problem. I changed the ownership of
/dev/cuaa? to root:wheel, and assigned permissions 664. Other programs
running as root can access the ports properly.

gearbox# ls -l | grep cuaa
crw-rw-r--   1 root  wheel      28, 128 Oct  3 19:43 cuaa0
crw-rw-r--   1 root  wheel      28, 129 Oct  3 16:40 cuaa1
crw-rw-r--   1 root  wheel      28, 130 Oct  3 16:13 cuaa2
crw-rw-r--   1 root  wheel      28, 131 Oct  3 16:13 cuaa3
crw-rw-r--   1 root  wheel      28, 132 Oct  3 16:13 cuaa4

Lastly, when connecting to the comserv control port, typing status
produces this:

comservd> status
COMSERV revision timestamp 2002/06/20 01:52:48 GMT
logdir = /var/log
devdir = /usr/local/comserv
                Srl  TCP           Local Endpoint      Remote Endpoint
Id      Host    Port Port  Device  Conn Fd  Rd Wr Data Conn Fd  Rd Wr
Data
------- ------- ---- ----- ------- ---- --- -- -- ---- ---- --- -- --
----
comserv            0     0 comserv  yes   5  X       0   no
rcom2   gearbox    2  2200 statnet  yes   4  X       0  yes   9  X      
0
rcom3   gearbox    3  2300 rcuaa2   yes   6  X       0  yes  10  X      
0
rcom4   gearbox    4  2400 rcuaa3   yes   7  X       0  yes  11  X      
0
rcom5   gearbox    5  2500 rcuaa4   yes   8  X       0  yes  12  X      
0

(sorry for the wrap)

I configured the server as such:

# default directory for device log files
logdir /var/log

# default directory from which to make symlinks to /dev pty's
devdir /usr/local/comserv

# a control port that we can use to issue commands to the daemon
ctl comserv comserv

# don't block the remote side of a connection if there is no one
# listening locally
set default options=noblock

# Serve up our own local serial ports com1 and com2 at ports 2100 and
# 2200 respectively
#
#       DevId      Device  Com#  TCP/IP Port  LogFile Spec
#       -----  ----------  ----  -----------  ------------
#serve  com1   /dev/cuaa0     1         2100  nolog
serve  com2   /dev/cuaa1     2         2200  log
serve  com3   /dev/cuaa2     3         2300  log
serve  com4   /dev/cuaa3     4         2400  log
serve  com5   /dev/cuaa4     5         2500  log

#    DevId  Device   TermSrv   Termsrv        TermSrv          LogFile
#           Symlink  Hostname   Port #  TCP/IP Port #             Spec
#    -----  -------  --------  -------  -------------  ---------------
add   mir0  statnet   gearbox        1           2200  nolog
add   mir1   lcuaa2   gearbox        2           2300  nolog
add   mir2   lcuaa3   gearbox        3           2400  nolog
add   mir3   lcuaa4   gearbox        4           2500  nolog

Note that the local serial ports are also mirrored by comservd on the
local host. These don't work properly either.

I configured the client as such:

# default directory for device log files
logdir /var/log

# default directory from which to make symlinks to /dev pty's
devdir /usr/local/comserv

# a control port that we can use to issue commands to the daemon
ctl comserv comserv

# don't block the remote side of a connection if there is no one
# listening locally
set default options=noblock

# Serve up our own local serial ports com1 and com2 at ports 2100 and
# 2200 respectively
#
#       DevId      Device  Com#  TCP/IP Port  LogFile Spec
#       -----  ----------  ----  -----------  ------------
#serve  com1   /dev/cuaa0     1         2100  nolog
#serve  com2   /dev/cuaa1     2         2200  nolog


#    DevId  Device   TermSrv   Termsrv        TermSrv          LogFile
#           Symlink  Hostname   Port #  TCP/IP Port #             Spec
#    -----  -------  --------  -------  -------------  ---------------
add  rcom2  statnet   gearbox        2           2200  nolog
add  rcom3   rcuaa2   gearbox        3           2300  nolog
add  rcom4   rcuaa3   gearbox        4           2400  nolog
add  rcom5   rcuaa4   gearbox        5           2500  nolog


It would appear that comserv is the one preventing the write access, but
poking through the man pages revealed nothing about this. The log files
which should be created on the server are empty.

Any help is greatly appreciated,
Seth Henry



More information about the freebsd-questions mailing list