How to implement a tty serial driver for RFC2217 networked serial port access devices?
Valdis.Kletnieks at vt.edu
Valdis.Kletnieks at vt.edu
Sat Aug 2 16:27:45 EDT 2014
On Sat, 02 Aug 2014 12:38:50 +0100, TJ said:
> The kernel module would act as a RFC2217 client, presenting the local system
> with serial TTY devices whose endpoints are on a remote network access device,
> e.g. the Moxa NPort 6650 [2][*].
Wouldn't a 2217-capable telnet at the other end of a /dev/pts be easier?
> For an access device with 16 ports I'd imagine presenting something like /dev/ttyNET${DEV}p${PORT}, e.g:
You might want to look at how bash deals with /dev/{tcp,udp} pseudo-names in
redirections...
Bash handles several filenames specially when they are used in redirec-
tions, as described in the following table:
/dev/fd/fd
If fd is a valid integer, file descriptor fd is dupli-
cated.
/dev/stdin
File descriptor 0 is duplicated.
/dev/stdout
File descriptor 1 is duplicated.
/dev/stderr
File descriptor 2 is duplicated.
/dev/tcp/host/port
If host is a valid hostname or Internet address, and port
is an integer port number or service name, bash attempts
to open the corresponding TCP socket.
/dev/udp/host/port
If host is a valid hostname or Internet address, and port
is an integer port number or service name, bash attempts
to open the corresponding UDP socket.
(at which point you cay use 'stty < /dev/tcp/10.0.0.15/818' or whatever....)
(This may require a hacked-up stty command and/or a smarter bash. But that's
still easier than doing it in kernelspace)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140802/a3aa2730/attachment.bin
More information about the Kernelnewbies
mailing list