Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > de.sci.electronics > #234742

Re: USB HID OUT endpoint report descriptor

From Stefan Wiest <swdig@gmx.de>
Newsgroups de.sci.electronics
Subject Re: USB HID OUT endpoint report descriptor
Date 2017-10-30 11:28 +0100
Message-ID <f5od67F32inU1@mid.individual.net> (permalink)
References <ot6prp$3le$1@news.albasani.net>

Show all headers | View raw


Am 30.10.2017 um 10:02 schrieb Johannes Bauer:

Hallo Johannes,

> Für OUT habe ich keine Report Deskriptoren und ich vermute jetzt, dass
> Windows die sehen will, bevor es einfach irgendwas an das Gerät schickt.
> Allerdings habe ich keine Ahnung, wie ich die deklarieren soll bzw wie
> das geht. In allen beispielen sehe ich immer nur die IN reports
> deklariert, aber die OUT reports nie. Beide Endpoints habe ich natürlich
> deklariert (IN INTERRUPT und OUT INTERRUPT), aber eben die reports nicht.
>
> Kann mir da jemand weiterhelfen, der sich mit dem Thema auskennt?

Für Windows ist die Definition des OUT reports notwendig und eigentlich 
auch ganz einfach. ein Beispiel für 3 LEDs und 5 Dummy-Bits damit das 
Byte voll wird:

0xa1, 0x02,        /*   Collection (Logical)  */
     0x85, 0x04,    /*     Report ID (LED Data Report) */
     0x05, 0x08,    /*   USAGE_PAGE (LED)              */
     0x19, 0x4b,    /*   USAGE_MINIMUM (Generic Indicator)     */
     0x29, 0x4d,    /*   USAGE_MAXIMUM (Generic Indicator)     */
     0x15, 0x00,    /*   LOGICAL_MINIMUM (0)           */
     0x25, 0x01,    /*   LOGICAL_MAXIMUM (1)           */
     0x95, 0x03,    /*   REPORT_COUNT (3)              */
     0x75, 0x01,    /*   REPORT_SIZE (1)               */
     0x91, 0x02,    /*   OUTPUT (Data,Var,Abs)         */
     0x95, 0x01,    /*   REPORT_COUNT (1)              */
     0x75, 0x05,    /*   REPORT_SIZE (5)               */
     0x91, 0x03,    /*   OUTPUT (Const)                */
   0xc0,            //   End Collection (Logical)


Grüße,
Stefan

Back to de.sci.electronics | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

USB HID OUT endpoint report descriptor Johannes Bauer <dfnsonfsduifb@gmx.de> - 2017-10-30 10:02 +0100
  Re: USB HID OUT endpoint report descriptor Stefan Wiest <swdig@gmx.de> - 2017-10-30 11:28 +0100
    Re: USB HID OUT endpoint report descriptor Johannes Bauer <dfnsonfsduifb@gmx.de> - 2017-10-30 12:48 +0100

csiph-web