Skip to content

Conversation

@dilyanpalauzov
Copy link

If tcgetattr(fd, &ttyset) fails and errno is EINVAL 22 Invalid Argument, or ENOTTY - https://en.wikipedia.org/wiki/Not_a_typewriter, then this is not a serial device and do not try to adjust its settings.

First obtain the flags, so that these can be restored later.

Why EINVAL and not only ENOTTY? - It should be ENOTTY but is EINVAL : https://lore.kernel.org/linux-input/[email protected]/.

dilyanpalauzov pushed a commit to dilyanpalauzov/nrjavaserial that referenced this pull request Nov 5, 2025
…r hidraw device

NeuronRobotics#263

If tcgetattr(fd, &ttyset) fails and errno is EINVAL 22 Invalid Argument, or ENOTTY - https://en.wikipedia.org/wiki/Not_a_typewriter, then this is not a serial device and do not try to adjust its settings.

First obtain the flags, so that these can be restored later.

Why EINVAL and not only ENOTTY? - It should be ENOTTY but is EINVAL : https://lore.kernel.org/linux-input/[email protected]/.
dilyanpalauzov pushed a commit to dilyanpalauzov/nrjavaserial that referenced this pull request Nov 7, 2025
…r hidraw device

NeuronRobotics#263

If tcgetattr(fd, &ttyset) fails and errno is EINVAL 22 Invalid Argument, or ENOTTY - https://en.wikipedia.org/wiki/Not_a_typewriter, then this is not a serial device and do not try to adjust its settings.

First obtain the flags, so that these can be restored later.

Why EINVAL and not only ENOTTY? - It should be ENOTTY but is EINVAL : https://lore.kernel.org/linux-input/[email protected]/.
…r hidraw device

If tcgetattr(fd, &ttyset) fails and errno is EINVAL 22 Invalid Argument, or ENOTTY - https://en.wikipedia.org/wiki/Not_a_typewriter, then this is not a serial device and do not try to adjust its settings.

First obtain the flags, so that these can be restored later.
@dilyanpalauzov dilyanpalauzov force-pushed the testread_ignore_tcgetattr_errors branch from 670fbcd to aff84a2 Compare November 12, 2025 17:34
dilyanpalauzov pushed a commit to dilyanpalauzov/nrjavaserial that referenced this pull request Nov 12, 2025
…r hidraw device

NeuronRobotics#263

If tcgetattr(fd, &ttyset) fails and errno is EINVAL 22 Invalid Argument, or ENOTTY - https://en.wikipedia.org/wiki/Not_a_typewriter, then this is not a serial device and do not try to adjust its settings.

First obtain the flags, so that these can be restored later.

Why EINVAL and not only ENOTTY? - It should be ENOTTY but is EINVAL : https://lore.kernel.org/linux-input/[email protected]/.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant