Skip to content

SerialImp.c:RXTXCommDriver(testRead) - ignore tcgetattr() failures for hidraw device#263

Open
dilyanpalauzov wants to merge 1 commit intoNeuronRobotics:masterfrom
dilyanpalauzov:testread_ignore_tcgetattr_errors
Open

SerialImp.c:RXTXCommDriver(testRead) - ignore tcgetattr() failures for hidraw device#263
dilyanpalauzov wants to merge 1 commit intoNeuronRobotics:masterfrom
dilyanpalauzov:testread_ignore_tcgetattr_errors

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/24eaed9105633d03eded13e11c5a994bd93a81aa.camel@aegee.org/.

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/24eaed9105633d03eded13e11c5a994bd93a81aa.camel@aegee.org/.
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/24eaed9105633d03eded13e11c5a994bd93a81aa.camel@aegee.org/.
…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/24eaed9105633d03eded13e11c5a994bd93a81aa.camel@aegee.org/.
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