Results 1 to 2 of 2

Thread: Serial port performance

  1. #1
    Join Date
    Aug 2009
    Location
    Belgium
    Posts
    310
    Thanks
    10
    Thanked 31 Times in 25 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Question Serial port performance

    Hi,

    I've been evaluating several Qt serial port libraries :
    - Inbiza labs qserialport
    - Kuzulis QSerialDevice 0.4
    - Kuzulis serialport 2.0
    (QExtSerialport will be next when I have the time)

    One of the tests involves putting a serial port in loopback (using a small wire), sending a character on the port, waiting until the character is received back, and then send another one, and see how many can be sent per second. This is (I think) a measure for how fast the library handles read and write calls, and receive notifications (using the signal-slot mechanism).

    Since I have no native serial port on my laptop, I'm using USB-to serial cables, from different manufacturers.

    It seems that - for each USB port - no more than about 60 send-and-receive cycles can be achieved per second.

    I wonder if it is related to the implementation of the libraries, or if it is a limitation in USB itself (which is unlikely, since the frame rate on USB is much higher than that : 1ms for a USB interrupt packet). I don't think it is a limitation of Qt (the signal-slot mechanism is much faster than that).

    Does anyone have experience with this ?

    I intend to control embedded devices through a serial port, and if I can only send 60 'commands' per second, that's rather slow.

    Best regards,
    Marc

  2. #2
    Join Date
    Aug 2009
    Location
    Belgium
    Posts
    310
    Thanks
    10
    Thanked 31 Times in 25 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Serial port performance

    Some progress here...

    On a 'native' serial port inside a desktop computer, the Kuzulis 0.4 library reaches 2500 send-and-receive cycles, and the Inbiza labs library 250.
    On the same computer using a USB port, only about 150 cycles are achieved.

    So USB is certainly a limiting factor, but also the use of the library.

    More insight would be much appreciated...

    Best regards,
    Marc

Similar Threads

  1. serial port communication
    By robotics in forum Qt Programming
    Replies: 19
    Last Post: 28th September 2011, 15:11
  2. serial port issues
    By jhowland in forum Qt Programming
    Replies: 7
    Last Post: 12th January 2009, 13:38
  3. serial port communiction
    By jagadish in forum Qt Programming
    Replies: 1
    Last Post: 7th July 2007, 11:52
  4. Serial Port
    By b1 in forum Qt Programming
    Replies: 2
    Last Post: 18th January 2007, 02:05
  5. Serial Port access in Qt
    By Doug Broadwell in forum Newbie
    Replies: 1
    Last Post: 30th November 2006, 09:45

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.