> A similar idea here would be to have a "default" command to > for default settings. When a device is opened, it is > initialized with these settings. The reason I like this is > because then I don't need to teach every serial IO program > what setting to use (often the other end is a dumb device > requiring its own fixed and peculiar settings).
i think it is even easier to set the state up properly with cpurc or consolefs' configuration file, and have the various programs not even care that they're talking to a serial port. rdb, for example, was one program that got this wrong. it was setting the baud, which backfired in some cases. not doing anything is a better solution. you can always echo bxyz>/dev/eiaXXctl, assuming it really is a serial line. :-) - erik