-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Having issues trying to simulate a ttyACM0 device #99
Comments
I'm afraid the I suppose your recorded ttyACM0.ioctl doesn't actually contain anything, or much of value? script recording on a TTY (without ioctls) should work though. Does your ttyACM0.script look reasonable? Can you run the |
@joaofl Do the two comments above help? Is this still relevant with current versions? |
Thanks @benzea for the tip, and @martinpitt for checking this out. |
Thanks @joaofl . I close this for now, I'm happy to reopen if/when you ever get back to this, just yell here please. |
I've been trying to use the umockdev (v14.1) lib to mock a ttyACM0 device on an ARM based platform with Yocto. I first included the recipe, compiled, deployed and installed it on the remote host, and so far it seems to work just fine.
The target device is connected to a second device through USB, and a C program interfaces /manages a scanner of RFIDs connected to /dev/ttyACM0.
In order to get the traces a first run:
and after recording the main operations I want to reproduce, I try to run it with:
However, as the
scanner-reader
progrtam loads, I'm getting errors. Mainly in two parts of the code:throws the error:
ioctl(FIONREAD) for /dev/ttyACM0 failed with errno 25: Inappropriate ioctl for device
And when I try to read the file descriptor fd with
read(fd, buffer, maxLength)
I get the error:
Read error on /dev/ttyACM0 (9): Bad file descriptor
Do you have any Idea why, and or suggestion on how to overcome this?
Thanks in advance!
By the way, congrats for the nice tool!
The text was updated successfully, but these errors were encountered: