Linux – setserial: Cannot get serial info: Inappropriate ioctl for device

linuxserial port

$ setserial /dev/ttyUSB0 -G
Cannot get serial info: Inappropriate ioctl for device

What does this error mean? stty works fine:

$ stty -F /dev/ttyUSB0
speed 9600 baud; line = 0;
eof = ^A; min = 1; time = 0;
-brkint -icrnl -imaxbel
-opost -onlcr
-isig -icanon -iexten -echo -echoe -echok -echoctl -echoke

Best Answer

This means that the driver does not support the IOCTL that setserial is using:

setserial gets the information via an ioctl() call. In case the driver 
for your device does not support TIOCGSERIAL, the "invalid argument" is 
returned.

(Debian bug report)

I think stty should be able to perform any configuration you need for a USB-Serial device.

Related Question