7
$ 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
4

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.

0

Read man setserial, or search on manpages.ubuntu.com. It says, in part:

For the most part, superuser privilege is required to set the configuration parameters of a serial port. A few serial port parameters can be set by normal users, however, and these will be noted as exceptions in this manual page.

Or, you could sudo setserial ....

1
  • 4
    It makes no difference, I get the same error with sudo. May 11 '16 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.