SERPORT(9)
π SERPORT(9) β HAL Component π
okay bestie, sit down, hydrate, because today we're talking about serport: the hardware driver for the digital I/O bits of the 8250 and 16550 serial port. yes. the humble little serial port. it's giving vintage. it's giving retro. it's giving "I have four spare pins and I'm going to use them." β¨
π¦ NAME π¦
serport β Hardware driver for the digital I/O bits of the 8250 and 16550 serial port. that's it, that's the whole job, and honestly? iconic. π
πΈ SYNOPSIS πΈ
loadrt serport io=addr[,addr...]
the pin numbers are referring to the 9-pin serial pinout, mkay? and like, hear me when I say this: these ports generally use rs232 voltages, not 0/5V signals. so do not be out here plugging 0/5V logic into rs232 levels. no cap. π
you tell the module where the ports live with the module parameter io=addr[,addr...] β that's the I/O address of the serial ports, one or more of them, comma-separated. π«Ά
β οΈ these ports must not be in use by the kernel. like, not negotiable. bestie. they can't be claimed by the kernel while you're trying to claim them. π
to free up the I/O ports after bootup, install setserial and execute a command like:
sudo setserial /dev/ttyS0 uart none
but lowkey the best move β the main character move β is to just make sure the serial port is never used or configured by the Linux kernel in the first place. how? by setting a kernel commandline parameter, or by not loading the serial kernel module at all if it happens to be a modularized driver. prevention >> cleanup, always. π
β FUNCTIONS β
serport.N.readserport.N.write
those are the functions, that's the whole list, slay. π₯
π PINS π
okay so every port gets a bunch of pins. N is the port number. the incoming ones are out (as in, they output their state into HAL) and the outgoing ones are in (as in, they take a value in from HAL). yes it's backwards from your intuition, yes it's fine, yes it's Hal. π
INPUT PINS (bit out) π
serport.N.pin-1-inbit outβ also called DCD (data carrier detect); pin 8 on the 25-pin serial pinoutserport.N.pin-6-inbit outβ also called DSR (data set ready); pin 6 on the 25-pin serial pinoutserport.N.pin-8-inbit outβ also called CTS (clear to send); pin 5 on the 25-pin serial pinoutserport.N.pin-9-inbit outβ also called RI (ring indicator); pin 22 on the 25-pin serial pinoutserport.N.pin-1-in-notbit outβ Inverted version ofpin-1-inserport.N.pin-6-in-notbit outβ Inverted version ofpin-6-inserport.N.pin-8-in-notbit outβ Inverted version ofpin-8-inserport.N.pin-9-in-notbit outβ Inverted version ofpin-9-in
the -not ones are literally just the inverted version of their twin, so if you're the kind of girlie who needs the opposite polarity, the driver already did it for you. obsessed. π
OUTPUT PINS (bit in) π§
serport.N.pin-3-outbit inβ also called TX (transmit data); pin 2 on the 25-pin serial pinoutserport.N.pin-4-outbit inβ also called DTR (data terminal ready); pin 20 on the 25-pin serial pinoutserport.N.pin-7-outbit inβ also called RTS (request to send); pin 4 on the 25-pin serial pinout
π PARAMETERS π
serport.N.pin-3-out-invertbit rwserport.N.pin-4-out-invertbit rwserport.N.pin-7-out-invertbit rwserport.N.ioaddru32 r
three rw invert flags for the three output pins (so you can flip the sense of pin-3-out, pin-4-out and pin-7-out yourself), plus one read-only u32 showing the ioaddr. short list. efficient. periodt. π
π LICENSE π
GPL
that's the license. it's GPL. free as in freedom, bestie. π¦
and that's the whole page!! from the LinuxCNC Documentation crew, dated 2026-03-17, manual section 9. go forth and drive your serial bits, iykyk. mwah. π β¨ππ
π¦ where this page comes from
- ubuntu resolute: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- ubuntu stonking: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms