[BRLTTY] Communicating with a cdc-acm device

Mario Lang mlang at delysid.org
Wed Jul 20 07:52:23 EDT 2016


saeid javani <javani.saeid at gmail.com> writes:

> I have a usb-cdc device and want to write a driver for it. Using libusb-1.0
> in a simple program I can communicate with this device. But in brltty, it
> can not claim interface. Actually early control communications are fine and
> brltty receives device model and number of cells from device but after
> that, claim interface error occurs.
>
> Here is in my usbChannelDefinition initialization in connectResource()
> function :
> (interface 0 is master interface and has an input endpoint, but interface 1
> is for data communication)
>
> BEGIN_USB_CHANNEL_DEFINITIONS
>      {
>        .vendor=0x03eb, .product=0x2018,
>        .configuration=0, .interface=1, .alternative=0,
>        .inputEndpoint=0x83, .outputEndpoint=0x04,
                          ^^

>        .serial = &serialParameters
>      },
> END_USB_CHANNEL_DEFINITIONS
>
> Is this definition correct for a usb-cdc device?

If I am not totally mistaken, this value should be 3, instead of 0x83.
The 0x80 is the mask to indicate endpoint direction, but BRLTTY already
takes care of this internally.

You can check what other drivers do by grepping for "inputEndpoint".

-- 
CYa,
  ⡍⠁⠗⠊⠕


More information about the BRLTTY mailing list