Background
At the moment, I have TelosB motes that using to collect sensor data, and then transmit it over its USB serial port at 115200 baud.
In the past, I used Python to develop the program that will interface with the mote, but Python's GIL has its share of threading problems which can only be solved by not using Python (I needed its concurrency after the initial testing phase), so I shifted to C++/Qt. I spent a lot of time with Qt, as I didn't have prior knowledge, learnt most its best practices and got everything working perfectly. Everything except this problem.
The Problem
When I try to read the port, if there is a lot of data coming through, some sets of data will mysteriously error out, leading to a higher than desirable loss rate in my project.
This happens when I use qextserialport but it does not happen with pySerial.
This is how I initialize the port with qextserialport:
port.setName("COM3");
port.setQueryMode(QextSerialPort::EventDriven);
port.setBaudRate(BAUD115200);
port.setParity(PAR_NONE);
port.setDataBits(DATA_8);
port.setStopBits(STOP_1);
port.setFlowControl(FLOW_OFF);
and pySerial:
port = Serial('COM3', 115200)
Question
So I suspect that there is something different in the way the two libraries are initialising the port, but I have no experience in serial programming and could be wrong.
Does anybody have any idea what might be causing this error?