Rafal Krypa
2005-06-01 15:58:53 UTC
Hi.
I'm new to programming tty's under Linux.
I am writing software communicating with fiscal printer over serial port and I
want to use XON/XOFF protocol described in the printer's manual as follows:
- while waiting for command printer sends XON byte every 3 seconds
- after receiving complete command printer sends XOFF byte to signal that it
will now be busy
- after processing command printer checks if it received XON byte. If yes, it
sends XON as a sign of readiness for another command, otherwise the printer
waits for XON from host and then sends XON by itself
Printer can be put in mode described above by sending particular command to it.
The question is: how do I deal with this from the side of my program? Can I
somehow tell Linux (by ioctl() for example) that the device is sending and
expecting particular XON/XOFF bytes?
I'm new to programming tty's under Linux.
I am writing software communicating with fiscal printer over serial port and I
want to use XON/XOFF protocol described in the printer's manual as follows:
- while waiting for command printer sends XON byte every 3 seconds
- after receiving complete command printer sends XOFF byte to signal that it
will now be busy
- after processing command printer checks if it received XON byte. If yes, it
sends XON as a sign of readiness for another command, otherwise the printer
waits for XON from host and then sends XON by itself
Printer can be put in mode described above by sending particular command to it.
The question is: how do I deal with this from the side of my program? Can I
somehow tell Linux (by ioctl() for example) that the device is sending and
expecting particular XON/XOFF bytes?
--
/"\ RafaĆ Krypa
\ / ===========
X ASCII Ribbon Campaign
/ \ against HTML mail
/"\ RafaĆ Krypa
\ / ===========
X ASCII Ribbon Campaign
/ \ against HTML mail