wjwwood / serial

Cross-platform, Serial Port library written in C++
http://wjwwood.github.com/serial/
MIT License
2.11k stars 1.03k forks source link

Inappropriate ioctl for device on rapberry pi raspbian 8 jessie #205

Closed mikelaltadi closed 3 years ago

mikelaltadi commented 5 years ago

When I use available in serial port ttyAMA0 in rapberry pi raspbian 8 jessie

using wjwwood/serial for Linux I receive the following error: IO Exception (25): Inappropriate ioctl for device, file /src/unix.cpp, line 488.

Serial::SerialImpl::available () { if (!isopen) { return 0; } int count = 0; if (-1 == ioctl (fd_, TIOCINQ, &count)) { THROW (IOException, errno); } else { return static_cast (count); } }

ComeBackTo2016 commented 4 years ago

I have the same Question on rpi3bplus based on ubuntu server 18.04, linux 4.15. Did you solve this problem?

GXTX commented 4 years ago

Also running into this on a rPi.

wjwwood commented 3 years ago

I don't have an rpi to try this on, and normal linux doesn't seem to have this (for me), so I'll have to close this until someone can come up with a solution. If any new information comes up, or a solution is found, please comment here and I can reopen.

GXTX commented 3 years ago

If you can't test it doesn't it seem reasonable to have the issue open if users are running into this? I don't see the point in closing it.