[Interest] USB support

Roland Hughes roland at logikalsolutions.com
Tue Apr 17 16:39:26 CEST 2018

On 04/17/2018 09:15 AM, Thiago Macieira wrote:
> On Monday, 16 April 2018 17:16:43 PDT Roland Hughes wrote:
>> All,
>> I know the answer may well be RTFD, but, has raw USB communications been
>> more integrated or are the libusb examples from 2008 "current"?
> Nothing changed since 2008. You need to run as root anyway, so it's not a
> functionality you should expect to see in Qt any time soon.

I don't see any mention of needing to be root here:

And the current "official" site http://libusb.info
It is user-mode: No special privilege or elevation is required for the 
application to communicate with a device.

Of course, root, for an embedded system, isn't much of an issue. One 
would think that being a member of plugdev would give you USB access 
much like being a member of dialout gives you access to serial port.

It does appear there should be some kind of support already there if one 
built the webengine

roland at roland-I5-HP-Compaq-8300-Elite-SFF-PC:/$ sudo find -iname libusb

Not sure if that is still around in 5.xx or 6.x but 5.7.1 appears to 
have included libusb 1.0.17

/* This file is parsed by m4 and windres and RC.EXE so please keep it simple. */
#include "version_nano.h"
#define LIBUSB_MAJOR 1

#define LIBUSB_MINOR 0

#define LIBUSB_MICRO 17

#define LIBUSB_NANO 0

/* LIBUSB_RC is the release candidate suffix. Should normally be empty. */
#ifndef LIBUSB_RC
#define LIBUSB_RC ""


      Can I run libusb applications on Linux without root privilege?

The standard solution is to use udev rules. Here are some links to udev 
related websites.

  * udev homepage
  * Debian's udev overview <http://wiki.debian.org/udev>
  * Writing udev rules <http://www.reactivated.net/udevrules.php>
  * Proper place to ask questions about udev rules


Should prove to be an interesting experiment. I imagine a few dozen 
people have written their own QObject based wrapper class for that 
library but getting code contributed is monumentally impossible so they 
are all one-offs.

Roland Hughes, President
Logikal Solutions


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180417/82a68c45/attachment.html>

More information about the Interest mailing list