This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problem in writing to the modem

1.Our application has a problem writing to the serial port connected to the
The same application works fine on Linux.

2.The following is the open call for the serial port connected to the modem:
fd = open( device_name, O_RDWR | O_NONBLOCK );

3.The serial port has the following settings:

    struct termios newtio;
    memset(&newtio,0,sizeof(struct termios));

    newtio.c_cflag = CS8 | B115200 | CREAD | CLOCAL | CRTSCTS;
    newtio.c_oflag = 0;
    newtio.c_iflag = IGNPAR | IXON | IXOFF ;
    newtio.c_lflag = 0;

    newtio.c_cc[VTIME] = 0;
    newtio.c_cc[VMIN] = 1;

    /* Set Terminal settings for the Line Device */
    newtio.c_oflag &= ~OPOST;
    newtio.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
    newtio.c_cflag &= ~(CSIZE|PARENB);
    newtio.c_cflag |= CS8;

    tcsetattr(fd, TCSANOW, &newtio);

4.The write call to the serial port is failing. The error returned is EACESS

Please let me know if there is any problem in the settings of the port.

Thanking you in advance
Bhanu Kurpad

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]