hello everyone,
the thing is, i run into a problem when i tried on linux to communicate a printer through a serial port.
i found there is noway to setting up hardware flow control in termios struct. so i tried the software control, that is, use x-on/x-off. pls see flowing code segment:
Quote:
options.c_iflag |= (IXON | IXOFF | IXANY);
options.c_cc[VSTART] = VSTART_MACRO;
//disable hardware control
options.c_cflag &= ~CRTSCTS;
|
but, when i try to listen to the serial port, there is nothing coming out and in, whatever i write. i use select interface to monitor the serial port file descrpt.i can see my input on terminal window, but the printer did not answer it.
could you help to check, is there anything wrong in my code? is it not a possible way to work on serial port like this?
cheers,
confuz