Preferences

I've given this some thought. The way to improve the TTY is to give it channels, like SSH or RDP. This way you can transit unrelated data over the same connection. And, if you think about it, most of the complexity of a serial interface is handling mode settings and state; streams abstract that away for you. Streams get rid of the need for control characters and in band signalling. Streams could be given priority and interrupt levels.

gonzus
A big fat YES from me. I have been looking into TUIs lately, and the state of terminal handling is ridiculously bogged down by years of cruft that, honestly, I don't give a shit about anymore. To put it succinctly: I want Alt-Home and Ctrl-Click to work on a TUI. Period.

If I had superpowers, I would layer the system as a very low-level library that recognizes keyboard / mouse / tablet / microphone input hardware events and encodes them somehow (so Alt is a separate key, pressing multiple keys is handled, clicking + moving the mouse is handled, etc); then a protocol that can give you this event stream, either from a local or remote source; then a layer that maps this into higher-level events (so Alt and Home pressed together is interpreted as Alt-Home). The idea would be to have the ability to detect, even over a serial connection, any of these input events, without resorting to escape codes.

I don't even know if this all makes sense; I just hate the loops you have to go through today to even try to make sense of key combinations.

/rant

ksherlock
If you add a header with the channel number and data length and a CRC, it starts looking like UDP.
tyingq
RS-485 is essentially RS-232 with channels. Never used it, but Linux supports it at some level.
nrclark
This might not be accurate. RS-485 is an electrical signaling standard for carrying arbitrary binary signals. It's usually used for carrying UART data, as a longer-range / higher-speed replacement for RS-232. It has no opinion about what is transmitted, and has no concept of channels or even any particular encoding format.
tyingq
It could be the basis for a tty with multiple channels, fairly easily.
catblast01
How does that make it an RS-232 with channels? You’re confused. RS-485 just like RS-232 is an electrical specification for serial signaling (with multiple access), nothing more nor less. There are USB to 485 converters that basically operate exactly the same as their serial port counterparts and will show up as a tty device in Linux/Unix flavor or a COM port in Windows.
tyingq
It's a bus, rather than point-to-point. Schemes to address devices on the bus separately exist. You could call them "channels" even. RS-232 can't do that, as it isn't an electrical bus. Respectfully, you're confused.

Since tty's are fairly well married to a serial port, adding an ioctl() (or similar) that would switch channels would seem likely. RS-485 would provide a way for that to work not just with ptys, but with real physical devices as well. With reasonable backward compatibility.

kyberias
RS-485 in itself really isn't. It has no concept of "channels" although it can be operated as multipoint.

You may be mixing this with Modbus which is typically run on RS-485.

This item has no comments currently.