On Mon, Feb 27, 2012 at 16:33, Dan Williams <dcbw@redhat.com> wrote: > Ah, yeah, that would make sense. Does this happen for *all* ports on > the modem, or only a few ports? Patched the C snippet to open/close all three. Looks like ttyUSB0 is fine, 1 and 2 hang.
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
int main(void)
{
int fd = -1;
fd = open("/dev/ttyUSB0", O_RDWR | O_EXCL | O_NOCTTY | O_NONBLOCK);
close(fd);
fd = open("/dev/ttyUSB1", O_RDWR | O_EXCL | O_NOCTTY | O_NONBLOCK);
close(fd);
fd = open("/dev/ttyUSB2", O_RDWR | O_EXCL | O_NOCTTY | O_NONBLOCK);
close(fd);
return 0;
}
Attachment:
ttytest.strace
Description: Binary data