setserial

Read and modify serial port information. More information: https://manned.org/setserial.

setserial -a /dev/cuaN

setserial -b device

sudo setserial device parameter

setserial -g device1 device2 ...