Re: How to implement a tty serial driver for RFC2217 networked serial port access devices?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)

Attachment: pgp82HHMRAgkG.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux