Flow control with Serial

Hi All,

I have a point to point serial (null modem) link between two devices; with Minicom, they can exchange data fine. (e.g. type anything on either terminal and it instantly appears on the other side).

Yet with a Xojo app on one side, it can receive data from the other Minicom, but what it sends with Serial.Write only partially gets to the other side. After a few Writes, the app stops responding, and I suspect a buffer being overflown, probably due to control lines?

Minicom settings on both sides are:
Bps/Par/Bits : 9600 8N1
Hardware Flow Control : No
Software Flow Control : No

How can I set this flow control to off? I tried setting CTS = False, DTR = False, XON = False, no avail.


Actually any serial.write with a Xojo app causes the app to pause for a few seconds, even if i call quit right after the write. What is it that Minicom can do and Xojo can’t?


Please add hardware information first and/or move this question to the correct target subforum.

Both devices are Linux PC x86; serial devices are XR21V1414 based USB ports.

The serial ports on both PCs are connected by a null modem cable. With Minicom on both, communications works in both directions with 9600/8N1 and flow control off. This establishes that hardware and drivers are fine.

With Minicom on one side and a Xojo console app on another: Xojo app opens port OK. Any characters typed on the other side Minicom immediately show up in a DataAvailable event. There are no LineStateChanged events.

When Xojo app does a serial.write, only part of the string shows up on the other side Minicom (e.g. send ABCDEF but receive only ABCD). Sometimes a serial.write causes a delay where the console app stops responding, even a timer event stops firing.

I tried setting CTS, DTR and XON to true and false in various combinations, tried .xmitwait and .flush, no effect.

Anybody experienced this?

thank you!

I haven’t tried this on Linux, but you may try these regardless (and you should still move this question to the Linux sub forum):

Call the Flush method after using the Write method (Oh, I see you already tried that).

Keep a Timer running at Period=50 and Mode = 2 to make sure the Xojo runtime keeps polling the port (some Xojo versions don’t do this on their own correctly). Call the Serial’s Poll method from the Timer’s Action event.

But it sounds like you have more severe problems, probably specific to Linux. Another way to solve this might be to interface the tty device directly, using declares. I can’t help you with that easily, though. Hopefully someone else can.

What’s odd, is when I write something to port in Xojo app, some of the characters that were not seen at the remote Minicom suddenly appear, as if new data pushes old data to be sent…

The weirdest is that Minicom works both ends, so I can’t figure what’s different between Minicom and Xojo serial control.

My Xojo is 2015r4.1…