Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-48094

[Linux] Custom baud rate method deprecated on some UART chipset ?

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.6.0
    • 5.5.0
    • Serial Port
    • None
    • Raspberry Pi 2 with Debian Wheezy

    Description

      Hi, I finally managed to test some DMX data transmission using QtSerialPort and threads (thanks to kuzulis)

      My simple app works fine on a FTDI DMX-USB adapter and now I am testing the same app on a Raspberry Pi with a UART DMX hat:
      http://www.bitwizard.nl/shop/index.php?route=product/product&product_id=153

      The DMX protocol requires a custom rate of 250Kbps so I call setBaudRate(250000) before opening a QSerialPort.
      On the FTDI adapter (ttyUSB0) this works, while on the UART hat (ttyAMA0) it doesn't output anything and the kernel says:
      [ 90.322470] uart-pl011 dev:f1: WriterThread sets custom speed on ttyAMA0. This is deprecated.
      Kernel is: Linux raspberry-pi 3.18.11-v7+ #777 SMP PREEMPT Sat Apr 11 17:30:37 BST 2015 armv7l GNU/Linux
      Libc version is: 2.13-38+rpi2+deb7u8

      Searched for the message with google and I found a couple of interesting discussions:
      http://help.lockergnome.com/linux/Serial-custom-speed-deprecated--ftopict368717.html
      http://stackoverflow.com/questions/12646324/how-to-set-a-custom-baud-rate-on-linux

      Apparently, setting a clock divisor is not always the right way and I can confirm another software using pure C calls works fine with the UART hat that I have. This is how they do it:
      https://github.com/OpenLightingProject/ola/blob/master/common/io/ExtendedSerial.cpp#L47

      I tried to make a patch with that code into qserialport_unix.cpp but with no luck.

      Any clue ?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kuzulis Denis Shienkov
            mcallegari79 Massimo Callegari
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes