Skip to content

In binary mode fails because sometimes the ioctl does not complete fast enough? #25

@esteimle

Description

@esteimle

Feel free to close this if you don't think it is an issue. I was using your library to communicate with a USB serial port on Ubuntu 20.04. The device only communicates in binary mode. I was seeing some issues that happen sometimes when canonical mode was not disabled. Basically it seemed to hang or timeout when certain characters came through. I read through your setup code and it looked good though. But then I dropped a single print in SerialPort.cpp right before this line: this->SetTermios2(tty); all of a sudden all my problems went away :)

So I added a sleep but that seems a little hackish. I was wondering if you had any ideas or had seen something like this? I notice you had commented out a flush on the file descriptor and I wondered if something similar might have to happen with that ioctl call inside SetTermios2. Anyway just wondering if you had any thoughts on it, not complaining or anything. I'm just curious what's going wrong for me.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions