PDA

View Full Version : QSerialPort sporadic 0D and 0E chars - Ubuntu



RolandHughes
2nd February 2016, 18:31
Weird problem. I've done serial port communication since the days of the original XT computer. Not seen this issue.

Ubuntu 14.04 32-bit all updates applied.
Qt 5.4.2

Application on Ubunut computer (actual computer, not VM and the HP motherboard has an actual serial port built in) communicating with external device via serial port. 57600 8-N-1 noFlowControl. External device sending packets every few seconds. Packets bounded by STX and ETX per historical standards. Device cannot be changed to include additional control characters. This means the device does not transmit adding LF or CR after the packet.

Periodically, but rather consistently the Ubuntu computer will send either 0D (LF) or 0E (SO - Shift Out). It looks like the serial port driver assumes it is a terminal with some kind of line length and forces these characters out to achieve some kind of "line wrap".

Has anybody seen this with 14.04?
Does anyone know how to configure the serial port so it doesn't "think" a terminal is connected? (i.e. so it is just a raw data port not trying to do me any "favors")

Thanks,

anda_skoa
2nd February 2016, 19:09
That sounds like a system setup issue, e.g. a terminal device being attached to the port.
Maybe you should ask in a Ubuntu or Linux forum?

Or do you have a non-Qt program that works on the same system?

Cheers,
_

RolandHughes
3rd February 2016, 13:40
I don't seem to see them with putty using the same port just streaming the output. Was hoping someone else had seen them here. Not a high priority, but I did want to track down their cause. It could also be due to running under debug within creator. Yes, I also asked on the Ubuntu forum. So far greeted with sound of silence.

anda_skoa
3rd February 2016, 14:23
I was just asking because if the device is present at boot then the OS might have associated a mgetty process with it, i.e. so that it can be used for serial console login.

Cheers,
_

RolandHughes
8th February 2016, 13:29
I was just asking because if the device is present at boot then the OS might have associated a mgetty process with it, i.e. so that it can be used for serial console login.

Cheers,
_

Exactly what it turned out to be.