[Aranym-dev] Update for sdlgui

Thorsten Otto halgara at yahoo.de
Sun Feb 22 15:15:45 CET 2015


> Out of curiosity after "lsusb -v", what are
> the "bInterfaceClass" field's strings for both interfaces?
The interface class is HID in both cases. the subclass is different:
$ lsusb -v -s 2:4

Bus 002 Device 004: ID 046d:c31c Logitech, Inc. Keyboard K120 for Business
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x046d Logitech, Inc.
  idProduct          0xc31c Keyboard K120 for Business
  bcdDevice           64.00
  iManufacturer           1 Logitech
  iProduct                2 USB Keyboard
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           59
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          3 U64.00_B0001
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               90mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              2 USB Keyboard
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      65
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              10
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              2 USB Keyboard
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     159
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval             255
Device Status:     0x0000
  (Bus Powered)
> With Virtual Box I have the group vboxusers
Thats the problem with those scripts, they will conflict with other packages. But it seems to be the easiest solution for now.
 

     David Gálvez <dgalvez75 at gmail.com> schrieb am 11:55 Sonntag, 22.Februar 2015:
   

 2015-02-22 8:12 GMT+01:00 Thorsten Otto <halgara at yahoo.de>:
>> I'm going to correct myself here because my memory tricked me, libusb
>> returns a list of USB devices not interfaces.
>
> Depends upon what you call. lsusb only loops over the devices, while your
> current code also loops over the interfaces. I still don't know why my
> keyboard is reported with 2 interfaces, but thats only a bit irritating

I've seen other USB devices which one would expect to only have one
interface to have two of them, sometimes the second one is a "Vendor
Specific Class" interface. Out of curiosity after "lsusb -v", what are
the "bInterfaceClass" field's strings for both interfaces?

> because i don't know much about usb, there seems to be nothing wrong with
> your code. I guess someone who is going to use the USB feature knows better.
>

I've already done the changes to make the dialog to show devices
instead of interfaces, I'll commit it after I do some more tests.


> In the meantime i took a look at AppArmor, but that does not solve our
> problem. There is only the possibility to fine-tune the permissions, so you
> can only restrict the access rights even further, but you can't grant an
> application to do something that it couldn't do without it. So that doesn't
> help in this case.
>

Thanks to look at this. I've taken a quick look at what other virtual
machine does. With Virtual Box I have the group vboxusers, my user was
added to this group, there is also a file with udev rules
"/etc/udev/rules.d/60-vboxdrv.rule", some script
"/usr/share/virtualbox/VBoxCreateUSBNode.sh" is run when devices are
plugged/unplugged, I didn't look much deeper.
_______________________________________________
cz-bobek-lists-aranym mailing list
aranym at lists.bobek.cz
https://lists.bobek.cz/mailman/listinfo/cz-bobek-lists-aranym


   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.bobek.cz/pipermail/cz-bobek-lists-aranym/attachments/20150222/14b32d7d/attachment-0001.html>


More information about the cz-bobek-lists-aranym mailing list