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. USB Communication in qt
Forum Updated to NodeBB v4.3 + New Features

USB Communication in qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 316 Views
  • 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.
  • Q Offline
    Q Offline
    Qtcpp_User
    wrote on last edited by
    #1

    I find libusb API libusb_bulk_transfer() to transfer data.bulk_transfer.png
    But I need to know when USB data comes.Do Qt have "USB Receive Signal" like Serial Port's?
    serial.png
    readyRead.png
    Where I should use libusb API libusb_bulk_transfer()?

    Thanks for your reply.

    JonBJ 1 Reply Last reply
    0
    • Q Qtcpp_User

      I find libusb API libusb_bulk_transfer() to transfer data.bulk_transfer.png
      But I need to know when USB data comes.Do Qt have "USB Receive Signal" like Serial Port's?
      serial.png
      readyRead.png
      Where I should use libusb API libusb_bulk_transfer()?

      Thanks for your reply.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @Qtcpp_User said in USB Communication in qt:

      But I need to know when USB data comes.Do Qt have "USB Receive Signal" like Serial Port's?

      No. As you have found, QIODevices emit readyRead() signal when one or more bytes are received and available to be read. Qt does not have (or at least expose) any special handling for USBs, and probably (can't be sure) does not use this libusb library.

      Where I should use libusb API libusb_bulk_transfer()?

      You should not use such a call yourself, assuming you are allowing Qt to handle the serial/USB port. If you want to write your own code for handling USB I/O that is a different matter.

      1 Reply Last reply
      2

      • Login

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