Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for exposing UARTs to TCP #39

Open
xobs opened this issue Jun 22, 2021 · 1 comment
Open

Add support for exposing UARTs to TCP #39

xobs opened this issue Jun 22, 2021 · 1 comment

Comments

@xobs
Copy link
Member

xobs commented Jun 22, 2021

Add support for connecting Wishbone UARTs to a TCP socket. This gives several benefits:

  1. Support for multiple UARTs. Each UART could get its own TCP server, which will allow for multiplexing across a single Wishbone bridge
  2. Enable network-aware programs such as gdb to attach to a gdbserver that's normally exposed over serial
  3. Allow for a user to use their own terminal emulator to connect to the serial program

Drawbacks to this are:

  1. The user may not have a telnet program installed
  2. The user may not have permission to create network servers
  3. Opening a network server carries risks such as opening a public server on a public IP

An alternative is to use openpty(3) for each serial port. This also gives several benefits:

  1. Support for multiple UARTs, exactly the same way that a TCP server supports.
  2. Any program that speaks serial natively will "just work" by accessing the PTY file
  3. Since no network connection is created, the server is self-contained.

Drawbacks to openpty(3) are:

  1. openpty(3) is not part of a standard, and is a BSD-ism. Therefore it does not exist on platforms such as Windows.

Overall I'm more inclined to go with the TCP approach simply because of the cross-platform compatibility issue.

@mithro
Copy link
Contributor

mithro commented Jun 22, 2021

Can we just support both?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants