Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Strange behavior qtserialport on linux with custom baud rate
Forum Updated to NodeBB v4.3 + New Features

Strange behavior qtserialport on linux with custom baud rate

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 939 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Brian_l
    wrote on last edited by Brian_l
    #1

    Have an app that communicates through serial interface at 8192 baud rate. When setting baud rate in the app I get this error:
    Baud rate of serial port /dev/ttyUSB0 is set to 8193 instead of 8192: divisor 2929.687500 unsupported

    even though 8193 is well within the range that would be acceptable for communicating with device.
    If I set the baud rate to 8193 in the app, I still get the error:
    Baud rate of serial port /dev/ttyUSB0 is set to 8193 instead of 8193: divisor 2929.329834 unsupported

    It works flawlessly under windows.

    The base baud is 24000000 and the divisor should be 2929, but it's setting the divisor as a float. Not sure what's going on here, or why it's failing this check. Any input would be appreciated

    Version of QT is 5.5
    serial device is ftdi

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kuzulis
      Qt Champions 2020
      wrote on last edited by kuzulis
      #2

      The base baud is 24000000 and the divisor should be 2929

      No,

      24000000 / 8192 = 2929.6875
      24000000 / 8193 = 2929.3299157817649212742585133651

      Warning about there is no integer divider for the desired speed, and the near divider will be set (2929). So, speed will be 24000000 / 2929 = 8193.9228405599180607715944008194 baud.

      1 Reply Last reply
      0
      • B Offline
        B Offline
        Brian_l
        wrote on last edited by Brian_l
        #3

        thanks, that was really helpful

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved