Results 1 to 5 of 5

Thread: QSerialPort sporadic 0D and 0E chars - Ubuntu

  1. #1
    Join Date
    Nov 2008
    Posts
    178
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QSerialPort sporadic 0D and 0E chars - Ubuntu

    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,

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,420
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QSerialPort sporadic 0D and 0E chars - Ubuntu

    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,
    _

  3. #3
    Join Date
    Nov 2008
    Posts
    178
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QSerialPort sporadic 0D and 0E chars - Ubuntu

    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.

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,420
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QSerialPort sporadic 0D and 0E chars - Ubuntu

    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,
    _

  5. The following user says thank you to anda_skoa for this useful post:

    RolandHughes (8th February 2016)

  6. #5
    Join Date
    Nov 2008
    Posts
    178
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QSerialPort sporadic 0D and 0E chars - Ubuntu

    Quote Originally Posted by anda_skoa View Post
    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.

Similar Threads

  1. Replies: 4
    Last Post: 17th October 2014, 21:24
  2. QTextEdit 80 chars wide
    By mpi in forum Qt Programming
    Replies: 4
    Last Post: 29th January 2011, 13:18
  3. Static casting of signed chars
    By ShamusVW in forum Qt Programming
    Replies: 0
    Last Post: 4th November 2009, 05:46
  4. qgetenv and special chars
    By miraks in forum Qt Programming
    Replies: 6
    Last Post: 21st March 2009, 13:48
  5. Need help. can't append chars in QString
    By AcerExtensa in forum Qt Programming
    Replies: 6
    Last Post: 12th June 2008, 10:57

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.