1hid(7D)                             Devices                            hid(7D)
2
3
4

NAME

6       hid - Human interface device (HID) class driver
7

SYNOPSIS

9       keyboard@unit-address
10       mouse@unit-address
11       input@unit-address:consumer_control
12       #include <sys/hid.h>
13       int ioctl(int fildes, int command, ... /*arg*/);
14
15

DESCRIPTION

17       The  hid  driver  is a USBA (Solaris USB Architecture) compliant client
18       driver that supports the Human Interface Device Class (HID) 1.0  speci‐
19       fication.  The  Human  Interface Device (HID) class encompasses devices
20       controlled by humans to operate computer systems. Typical  examples  of
21       HID  devices  include  keyboards,  mice, trackballs, and joysticks. HID
22       also covers front-panel controls such as knobs, switches, and  buttons.
23       A  USB device with multiple interfaces may have one interface for audio
24       and a HID interface to define the buttons that control the audio.
25
26
27       The hid driver is general and primarily handles the  USB  functionality
28       of  the  device  and generic HID functionality. For example, HID inter‐
29       faces are required to have an interrupt pipe for  the  device  to  send
30       data  packets,  and the hid driver opens the pipe to the interrupt end‐
31       point and starts polling. The hid driver is also responsible for manag‐
32       ing the device through the default control pipe. In addition to being a
33       USB client driver, the hid driver is also a STREAMS driver so that mod‐
34       ules may be pushed on top of it.
35
36
37       The HID specification is flexible, and HID devices dynamically describe
38       their packets and other parameters through a HID report descriptor. The
39       HID  parser  is a misc module that parses the HID report descriptor and
40       creates a database of information about  the  device.  The  hid  driver
41       queries  the HID parser to find out the type and characteristics of the
42       HID device. The HID specification predefines  packet  formats  for  the
43       boot protocol keyboard and mouse.
44

IOCTLS

46       HIDIOCKMGDIRECT    This  ioctl  should  only be addressed to a USB key‐
47                          board or mouse device. The hid driver maintains  two
48                          streams  for  each  USB  keyboard/mouse instance: an
49                          internal one for the use of the kernel and an exter‐
50                          nal one for the use of user applications. This ioctl
51                          returns the information of  which  stream  gets  the
52                          input for the moment.
53
54                          arg  must  point  to  a  variable  of int type. Upon
55                          return, 0 means the internal stream gets the  input,
56                          1 means the external stream gets the input.
57
58
59       HIDIOCKMSDIRECT    This  ioctl  should  only be addressed to a USB key‐
60                          board or mouse device. The hid driver maintains  two
61                          streams  for  each  USB  keyboard/mouse instance: an
62                          internal one for the use of the kernel and an exter‐
63                          nal one for the use of user applications. This ioctl
64                          sets which stream  should  get  the  input  for  the
65                          moment.
66
67                          arg  must point to a variable of int type. The argu‐
68                          ment 0 means the internal stream gets the  input,  1
69                          means the external stream gets the input.
70
71

FILES

73       /kernel/drv/hid
74
75           32-bit x86 ELF kernel hid module
76
77
78       /kernel/drv/amd64/hid
79
80           64-bit x86 ELF kernel hid module
81
82
83       /kernel/drv/sparcv9/hid
84
85           64-bit SPARC ELF kernel hid module
86
87
88       /kernel/misc/hidparser
89
90           32-bit x86 ELF kernel hidparser module
91
92
93       /kernel/misc/amd64/hidparser
94
95           64-bit x86 ELF kernel hidparser module
96
97
98       /kernel/misc/sparcv9/hidparser
99
100           64-bit SPARC ELF kernel hidparser module
101
102

ATTRIBUTES

104       See attributes(5) for descriptions of the following attributes:
105
106
107
108
109       ┌─────────────────────────────┬──────────────────────────────┐
110       │      ATTRIBUTE TYPE         │       ATTRIBUTE VALUE        │
111       ├─────────────────────────────┼──────────────────────────────┤
112       │Architecture                 │SPARC, x86, PCI-based systems │
113       ├─────────────────────────────┼──────────────────────────────┤
114       │Availability                 │SUNWusb                       │
115       └─────────────────────────────┴──────────────────────────────┘
116

SEE ALSO

118       cfgadm_usb(1M), attributes(5), usba(7D), virtualkm(7D)
119
120
121       Writing Device Drivers
122
123
124       STREAMS Programming Guide
125
126
127       Universal Serial Bus Specification 1.0 and 1.1
128
129
130       Device Class Definition for Human Interface Devices (HID) 1.1
131
132
133       System Administration Guide: Basic Administration
134
135
136       http://www.sun.com
137

DIAGNOSTICS

139       hid_attach: Unsupported HID device.
140
141           The device requires a protocol not supported by the hid driver.
142
143
144       Parsing of hid descriptor failed.
145
146           The  HID  report  descriptor cannot be parsed correctly. The device
147           cannot be supported by the hid driver.
148
149
150       Invalid report descriptor.
151
152           The HID report descriptor is invalid. The  device  cannot  be  sup‐
153           ported by the hid driver.
154
155
156
157       The following messages may be logged into the system log. They are for‐
158       matted in the following manner:
159
160         <device path><hid<instance number>): message...
161
162
163
164       hid_attach: Unsupported HID device.
165
166           The device cannot be supported by this version of the HID driver.
167
168
169       Parsing of HID descriptor failed.
170
171           The device cannot be supported by this version of the HID driver.
172
173
174       Invalid report descriptor.
175
176           The device cannot be supported by this version of the HID driver.
177
178

NOTES

180       The hid driver currently supports only keyboard, mouse  and  audio  HID
181       control devices.
182
183
184       Normally a mouse is not power managed and consquently, screen darkening
185       can be undone with a mouse movement. If power management of  the  mouse
186       is required, add the following line to hid.conf then reboot the system:
187
188         hid-mouse-pm-enable;
189
190
191
192       Modern  mice that are power managed require a 'click' to wake up. Occa‐
193       sionally, this may cause unexpected results.
194
195
196
197SunOS 5.11                        21 Aug 2009                          hid(7D)
Impressum