cyclades-ser-cli(8)

πŸ“¦
version 0.95 Β· 2 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– cyclades-ser-cli β€” the serial port interface for Cyclades Terminal Servers, manual section 8 ✨

okay bestie, sit down, hydrate, because this one is so cool once it clicks. it's cyclades-ser-cli(8) and it's basically the little matchmaker that makes a Unix device file and a physical port on a big ol' terminal server fall in love. no cap. 🫢


🌸 NAME 🌸

cyclades-ser-cli β€” Serial Port Interface for Cyclades Terminal Servers

like, that's literally the whole vibe: serial port interface, Cyclades terminal servers, that's it, that's the girl πŸ’…


✨ SYNOPSIS ✨

cyclades-ser-cli [options] devname rasname physport

three little positional besties at the end and you're good to go πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

So. What this program does: it takes a Unix device file called devname and connects it to a physical port called physport, on a Cyclades Terminal Server called rasname. it's giving matchmaker energy πŸ’–

cyclades-ser-cli is the I/O interface between the device file and the physical port, and the way it does that is by running as a 'user-mode device driver'. like, driver duties but make it userspace. obsessed. ✨

And here's a lil plot twist you need to know: if physport is assigned to 0, then rasname gets used as the IP address for IP-based serial port addressing. so rasname is doing double duty and honestly? main character behavior. πŸ‘‘


🌈 OPTIONS 🌈

cyclades-ser-cli may be started with the following options, and bestie, there are eleven of them, so let's go one by one, no skipping, we do not skip in this house πŸ™ˆ

  • -u ptyiosize β€” sets the internal device I/O size to ptyiosize. the max is 4096 bytes and the default is 1024 bytes. so like, that's the ceiling, don't try to be cute and go over it πŸŽ€
  • -n netiosize β€” sets the internal socket I/O size to netiosize. max is 512 bytes, default is 128 bytes. yes it's smaller than the device one, that's just how she is πŸ’…
  • -i retrydelay β€” the delay in seconds between connection requests. default is 60. so if it can't get through, it waits a polite minute and tries again, lowkey patient queen ⭐
  • -r retries β€” how many connection request retries happen before it exits. default is infinity, which is iconic of it honestly. she will keep trying forever unless you tell her not to 😭
  • -s β€” use the Socket Server protocol for talking to the server. what does that mean? it means just piping all the data down a TCP connection with no control information. which means it's impossible to change the port speed etc. so like, data go brrr but you can't fiddle with anything else. the default is to use the RFC2217 protocol instead πŸ”₯
  • -m modem handling β€” the default is 0, which means to check DCD state. 1 means to ignore DCD. pick your fighter πŸ¦‹
  • -c close mode β€” last close handling. the default is 0, which means to hangup the modem; 1 means not to hangup. choose wisely, bestie 🌸
  • -p start port β€” the TCP base port of servers at the terminal server side. the defaults are 31000 for Socket server and 30000 for Remote Telnet Server. ⚠️ note: if physport is assigned to zero, this option has no effect at all, because the Telnet Server standard port (23) is used instead. so don't be confused when nothing changes, it's not you, it's the config πŸ’€
  • -d debug level β€” default is debug level 0 (little debugging). level 1 debugs internal state changes, level 2 debugs events, and level 3 debugs IO calls. so it's a lil ladder of how nosy you want her to be πŸ‘€
  • -f β€” run in the foreground. this is suitable for running from init. very demure, very foreground ✨
  • -x β€” Console mode. normally all messages are sent to syslogd (using the local2 facility). with this option, all messages will be sent to stdout and cyclades-ser-cli runs in the foreground. this implies -f. so it's -f but louder and more extroverted πŸ’–

πŸŽ€ USE πŸŽ€

okay this part is the good part, this is where it all comes together.

Every instance of cyclades-ser-cli will have a virtual serial device, and that virtual serial device is a sym-link to a pseudo-tty. a terminal program can then talk to the virtual serial device, and its data transfers get redirected across the network. so the app thinks it's talking to a normal serial thing and meanwhile everything is ✈️ traveling ✈️ πŸ”₯

Each virtual serial device will be accompanied by a Unix domain socket with the same name, with the addition of .control on the end. so like, if cyclades-ser-cli provides the virtual device named /dev/modem, then it will have a control socket named /dev/modem.control. same name, lil .control suffix, they're a set, they're matching, it's a vibe 🌈

There's also a shared object named libcyclades-ser-cli.so, and what it does is intercept calls to the tcsetattr() and tcsendbreak() functions. this shared object then sends the relevant data to the cyclades-ser-cli server via the control socket. and to recognise a virtual modem device, it has to read /etc/cyclades-devices. yes that's a file path, write it down bestie 🫢

The libcyclades-ser-cli.so shared object can be loaded per-application through the LD_PRELOAD environment variable, or for the entire system through the system shared object configuration (see the OS documentation for that one, she's not gonna explain it here).

⚠️ big warning energy: note that the LD_PRELOAD environment variable has to have the fully qualified path of the object. otherwise an application which changes its current directory may fail. like, full path or it's over, no shortcuts πŸ’€

πŸ’€ BUGS πŸ’€

not everything is perfect and we respect the honesty.

  • In Solaris, libcyclades-ser-cli.so does not work with the stty program. stty uses a different interface to this and requires some extra coding. so like, it's not a her-problem, it's a stty-is-built-differently problem 😭
  • In Solaris, libcyclades-ser-cli.so conflicts with some system programs such as ps, for unknown reasons. the fix is very simple though: just don't load it for those programs. it has no such problems with any serial comms programs, so your actual serial work is fine, breathe πŸ’–

⭐ EXAMPLES ⭐

Start an interface between the /dev/prt1 device and serial port number 10 of a Terminal Server named pr01, without hangup at last close:

cyclades-ser-cli -c 1 /dev/prt1 pr01 10

see how the -c 1 is doing the "not to hangup" thing? yes queen, that's the close mode option showing off πŸ’…

And in general use? do not start cyclades-ser-cli from the command line. start it through the cyclades-serial-client script or from init. that's the way, fr fr 🌸


🧚 SEE ALSO 🧚

go read those too, they're the supporting cast and they ate πŸ‘‘


and that's the whole page, bestie!! this was cyclades-ser-cli(8) from the Cyclades terminal server docs, and yes she's section 8 because she's a system administration command and she knows it. mwah, love u, go connect some ports responsibly πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

πŸ“¦ where this page comes from