Robert JUHASZ ha scritto: > The communication parameters are 9600, 8, n, 1, Xon/Xoff. > >> Do you have some sort of handshaking? >> Then it /could/ happen that the device sends an Xoff, but the software does not see it at the correct time. There has been a similar issue when the new UARTs with fifo came out - some application recommended to disable the fifo, because instead of a single char to test for an Xoff, the software sometimes received a bunch of bytes.
The USB is not really bidirectional like a true serial port, and buffers data. So the situation looks similar. Not an easy question. You could try hardware flow control, if possible (perhaps you hate it like me). Or you can read all the pending incoming data before sending. You can also try to break outgoing data in small pieces, to let the driver peek at incoming Xoffs. Or you can disable flow control entirely, and implement it in your own code. If you have a serial scope (data tester?) try to see what happens. If you don't have one, a PC with two (real!) serial ports can do. If you describe or send parts of the code, may be that someone can see some caveat in it. Regards, Doriano ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
