€•ÍkŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ/translations/zh_CN/hid/hidraw”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/zh_TW/hid/hidraw”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/it_IT/hid/hidraw”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/ja_JP/hid/hidraw”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/ko_KR/hid/hidraw”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/pt_BR/hid/hidraw”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/sp_SP/hid/hidraw”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ@HIDRAW - Raw Access to USB and Bluetooth Human Interface Devices”h]”hŒ@HIDRAW - Raw Access to USB and Bluetooth Human Interface Devices”…””}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³Œ8/var/lib/git/docbuild/linux/Documentation/hid/hidraw.rst”h´KubhŒ paragraph”“”)”}”(hŒôThe hidraw driver provides a raw interface to USB and Bluetooth Human Interface Devices (HIDs). It differs from hiddev in that reports sent and received are not parsed by the HID parser, but are sent to and received from the device unmodified.”h]”hŒôThe hidraw driver provides a raw interface to USB and Bluetooth Human Interface Devices (HIDs). It differs from hiddev in that reports sent and received are not parsed by the HID parser, but are sent to and received from the device unmodified.”…””}”(hhÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhÌ)”}”(hŒîHidraw should be used if the userspace application knows exactly how to communicate with the hardware device, and is able to construct the HID reports manually. This is often the case when making userspace drivers for custom HID devices.”h]”hŒîHidraw should be used if the userspace application knows exactly how to communicate with the hardware device, and is able to construct the HID reports manually. This is often the case when making userspace drivers for custom HID devices.”…””}”(hhÛh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hh·h²hubhÌ)”}”(hXÙHidraw is also useful for communicating with non-conformant HID devices which send and receive data in a way that is inconsistent with their report descriptors. Because hiddev parses reports which are sent and received through it, checking them against the device's report descriptor, such communication with these non-conformant devices is impossible using hiddev. Hidraw is the only alternative, short of writing a custom kernel driver, for these non-conformant devices.”h]”hXÛHidraw is also useful for communicating with non-conformant HID devices which send and receive data in a way that is inconsistent with their report descriptors. Because hiddev parses reports which are sent and received through it, checking them against the device’s report descriptor, such communication with these non-conformant devices is impossible using hiddev. Hidraw is the only alternative, short of writing a custom kernel driver, for these non-conformant devices.”…””}”(hhéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhÌ)”}”(hX?A benefit of hidraw is that its use by userspace applications is independent of the underlying hardware type. Currently, hidraw is implemented for USB and Bluetooth. In the future, as new hardware bus types are developed which use the HID specification, hidraw will be expanded to add support for these new bus types.”h]”hX?A benefit of hidraw is that its use by userspace applications is independent of the underlying hardware type. Currently, hidraw is implemented for USB and Bluetooth. In the future, as new hardware bus types are developed which use the HID specification, hidraw will be expanded to add support for these new bus types.”…””}”(hh÷h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhÌ)”}”(hX†Hidraw uses a dynamic major number, meaning that udev should be relied on to create hidraw device nodes. Udev will typically create the device nodes directly under /dev (eg: /dev/hidraw0). As this location is distribution- and udev rule-dependent, applications should use libudev to locate hidraw devices attached to the system. There is a tutorial on libudev with a working example at::”h]”hX…Hidraw uses a dynamic major number, meaning that udev should be relied on to create hidraw device nodes. Udev will typically create the device nodes directly under /dev (eg: /dev/hidraw0). As this location is distribution- and udev rule-dependent, applications should use libudev to locate hidraw devices attached to the system. There is a tutorial on libudev with a working example at:”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhŒ literal_block”“”)”}”(hŒRhttp://www.signal11.us/oss/udev/ https://web.archive.org/web/2019*/www.signal11.us”h]”hŒRhttp://www.signal11.us/oss/udev/ https://web.archive.org/web/2019*/www.signal11.us”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jh³hÊh´K$hh·h²hubh¶)”}”(hhh]”h»)”}”(hŒThe HIDRAW API”h]”hŒThe HIDRAW API”…””}”(hj(h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj%h²hh³hÊh´K(ubah}”(h]”Œthe-hidraw-api”ah ]”h"]”Œthe hidraw api”ah$]”h&]”uh1hµhh·h²hh³hÊh´K(ubh¶)”}”(hhh]”(h»)”}”(hŒread()”h]”hŒread()”…””}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj>h²hh³hÊh´K+ubhÌ)”}”(hXyread() will read a queued report received from the HID device. On USB devices, the reports read using read() are the reports sent from the device on the INTERRUPT IN endpoint. By default, read() will block until there is a report available to be read. read() can be made non-blocking, by passing the O_NONBLOCK flag to open(), or by setting the O_NONBLOCK flag using fcntl().”h]”hXyread() will read a queued report received from the HID device. On USB devices, the reports read using read() are the reports sent from the device on the INTERRUPT IN endpoint. By default, read() will block until there is a report available to be read. read() can be made non-blocking, by passing the O_NONBLOCK flag to open(), or by setting the O_NONBLOCK flag using fcntl().”…””}”(hjOh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K,hj>h²hubhÌ)”}”(hŒüOn a device which uses numbered reports, the first byte of the returned data will be the report number; the report data follows, beginning in the second byte. For devices which do not use numbered reports, the report data will begin at the first byte.”h]”hŒüOn a device which uses numbered reports, the first byte of the returned data will be the report number; the report data follows, beginning in the second byte. For devices which do not use numbered reports, the report data will begin at the first byte.”…””}”(hj]h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K3hj>h²hubeh}”(h]”Œread”ah ]”h"]”Œread()”ah$]”h&]”uh1hµhh·h²hh³hÊh´K+ubh¶)”}”(hhh]”(h»)”}”(hŒwrite()”h]”hŒwrite()”…””}”(hjvh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjsh²hh³hÊh´K9ubhÌ)”}”(hŒÿThe write() function will write a report to the device. For USB devices, if the device has an INTERRUPT OUT endpoint, the report will be sent on that endpoint. If it does not, the report will be sent over the control endpoint, using a SET_REPORT transfer.”h]”hŒÿThe write() function will write a report to the device. For USB devices, if the device has an INTERRUPT OUT endpoint, the report will be sent on that endpoint. If it does not, the report will be sent over the control endpoint, using a SET_REPORT transfer.”…””}”(hj„h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K:hjsh²hubhÌ)”}”(hŒÛThe first byte of the buffer passed to write() should be set to the report number. If the device does not use numbered reports, the first byte should be set to 0. The report data itself should begin at the second byte.”h]”hŒÛThe first byte of the buffer passed to write() should be set to the report number. If the device does not use numbered reports, the first byte should be set to 0. The report data itself should begin at the second byte.”…””}”(hj’h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K?hjsh²hubeh}”(h]”Œwrite”ah ]”h"]”Œwrite()”ah$]”h&]”uh1hµhh·h²hh³hÊh´K9ubh¶)”}”(hhh]”(h»)”}”(hŒioctl()”h]”hŒioctl()”…””}”(hj«h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj¨h²hh³hÊh´KDubhÌ)”}”(hŒ%Hidraw supports the following ioctls:”h]”hŒ%Hidraw supports the following ioctls:”…””}”(hj¹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KEhj¨h²hubhŒdefinition_list”“”)”}”(hhh]”hŒdefinition_list_item”“”)”}”(hŒ-HIDIOCGRDESCSIZE: Get Report Descriptor Size ”h]”(hŒterm”“”)”}”(hŒHIDIOCGRDESCSIZE:”h]”hŒHIDIOCGRDESCSIZE:”…””}”(hjÔh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÒh³hÊh´KHhjÎubhŒ definition”“”)”}”(hhh]”hÌ)”}”(hŒGet Report Descriptor Size”h]”hŒGet Report Descriptor Size”…””}”(hjçh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KHhjäubah}”(h]”h ]”h"]”h$]”h&]”uh1jâhjÎubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÌh³hÊh´KHhjÉubah}”(h]”h ]”h"]”h$]”h&]”uh1jÇhj¨h²hh³hÊh´NubhÌ)”}”(hŒ?This ioctl will get the size of the device's report descriptor.”h]”hŒAThis ioctl will get the size of the device’s report descriptor.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KJhj¨h²hubjÈ)”}”(hhh]”jÍ)”}”(hŒ$HIDIOCGRDESC: Get Report Descriptor ”h]”(jÓ)”}”(hŒ HIDIOCGRDESC:”h]”hŒ HIDIOCGRDESC:”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÒh³hÊh´KMhjubjã)”}”(hhh]”hÌ)”}”(hŒGet Report Descriptor”h]”hŒGet Report Descriptor”…””}”(hj-h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KMhj*ubah}”(h]”h ]”h"]”h$]”h&]”uh1jâhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÌh³hÊh´KMhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jÇhj¨h²hh³hÊh´NubhÌ)”}”(hŒÎThis ioctl returns the device's report descriptor using a hidraw_report_descriptor struct. Make sure to set the size field of the hidraw_report_descriptor struct to the size returned from HIDIOCGRDESCSIZE.”h]”hŒÐThis ioctl returns the device’s report descriptor using a hidraw_report_descriptor struct. Make sure to set the size field of the hidraw_report_descriptor struct to the size returned from HIDIOCGRDESCSIZE.”…””}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KOhj¨h²hubjÈ)”}”(hhh]”jÍ)”}”(hŒHIDIOCGRAWINFO: Get Raw Info ”h]”(jÓ)”}”(hŒHIDIOCGRAWINFO:”h]”hŒHIDIOCGRAWINFO:”…””}”(hjbh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÒh³hÊh´KThj^ubjã)”}”(hhh]”hÌ)”}”(hŒ Get Raw Info”h]”hŒ Get Raw Info”…””}”(hjsh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KThjpubah}”(h]”h ]”h"]”h$]”h&]”uh1jâhj^ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÌh³hÊh´KThj[ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÇhj¨h²hh³hÊh´NubhÌ)”}”(hŒThis ioctl will return a hidraw_devinfo struct containing the bus type, the vendor ID (VID), and product ID (PID) of the device. The bus type can be one of::”h]”hŒœThis ioctl will return a hidraw_devinfo struct containing the bus type, the vendor ID (VID), and product ID (PID) of the device. The bus type can be one of:”…””}”(hj“h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KVhj¨h²hubj)”}”(hŒ1- BUS_USB - BUS_HIL - BUS_BLUETOOTH - BUS_VIRTUAL”h]”hŒ1- BUS_USB - BUS_HIL - BUS_BLUETOOTH - BUS_VIRTUAL”…””}”hj¡sbah}”(h]”h ]”h"]”h$]”h&]”j#j$uh1jh³hÊh´KZhj¨h²hubhÌ)”}”(hŒ(which are defined in uapi/linux/input.h.”h]”hŒ(which are defined in uapi/linux/input.h.”…””}”(hj¯h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K_hj¨h²hubjÈ)”}”(hhh]”jÍ)”}”(hŒ"HIDIOCGRAWNAME(len): Get Raw Name ”h]”(jÓ)”}”(hŒHIDIOCGRAWNAME(len):”h]”hŒHIDIOCGRAWNAME(len):”…””}”(hjÄh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÒh³hÊh´KbhjÀubjã)”}”(hhh]”hÌ)”}”(hŒ Get Raw Name”h]”hŒ Get Raw Name”…””}”(hjÕh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KbhjÒubah}”(h]”h ]”h"]”h$]”h&]”uh1jâhjÀubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÌh³hÊh´Kbhj½ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÇhj¨h²hh³hÊh´NubhÌ)”}”(hŒ„This ioctl returns a string containing the vendor and product strings of the device. The returned string is Unicode, UTF-8 encoded.”h]”hŒ„This ioctl returns a string containing the vendor and product strings of the device. The returned string is Unicode, UTF-8 encoded.”…””}”(hjõh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kdhj¨h²hubjÈ)”}”(hhh]”jÍ)”}”(hŒ*HIDIOCGRAWPHYS(len): Get Physical Address ”h]”(jÓ)”}”(hŒHIDIOCGRAWPHYS(len):”h]”hŒHIDIOCGRAWPHYS(len):”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÒh³hÊh´Khhjubjã)”}”(hhh]”hÌ)”}”(hŒGet Physical Address”h]”hŒGet Physical Address”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jâhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÌh³hÊh´Khhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jÇhj¨h²hh³hÊh´NubhÌ)”}”(hXThis ioctl returns a string representing the physical address of the device. For USB devices, the string contains the physical path to the device (the USB controller, hubs, ports, etc). For Bluetooth devices, the string contains the hardware (MAC) address of the device.”h]”hXThis ioctl returns a string representing the physical address of the device. For USB devices, the string contains the physical path to the device (the USB controller, hubs, ports, etc). For Bluetooth devices, the string contains the hardware (MAC) address of the device.”…””}”(hj;h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kjhj¨h²hubjÈ)”}”(hhh]”jÍ)”}”(hŒ+HIDIOCSFEATURE(len): Send a Feature Report ”h]”(jÓ)”}”(hŒHIDIOCSFEATURE(len):”h]”hŒHIDIOCSFEATURE(len):”…””}”(hjPh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÒh³hÊh´KphjLubjã)”}”(hhh]”hÌ)”}”(hŒSend a Feature Report”h]”hŒSend a Feature Report”…””}”(hjah²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kphj^ubah}”(h]”h ]”h"]”h$]”h&]”uh1jâhjLubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÌh³hÊh´KphjIubah}”(h]”h ]”h"]”h$]”h&]”uh1jÇhj¨h²hh³hÊh´NubhÌ)”}”(hX°This ioctl will send a feature report to the device. Per the HID specification, feature reports are always sent using the control endpoint. Set the first byte of the supplied buffer to the report number. For devices which do not use numbered reports, set the first byte to 0. The report data begins in the second byte. Make sure to set len accordingly, to one more than the length of the report (to account for the report number).”h]”hX°This ioctl will send a feature report to the device. Per the HID specification, feature reports are always sent using the control endpoint. Set the first byte of the supplied buffer to the report number. For devices which do not use numbered reports, set the first byte to 0. The report data begins in the second byte. Make sure to set len accordingly, to one more than the length of the report (to account for the report number).”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Krhj¨h²hubjÈ)”}”(hhh]”jÍ)”}”(hŒ*HIDIOCGFEATURE(len): Get a Feature Report ”h]”(jÓ)”}”(hŒHIDIOCGFEATURE(len):”h]”hŒHIDIOCGFEATURE(len):”…””}”(hj–h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÒh³hÊh´Kzhj’ubjã)”}”(hhh]”hÌ)”}”(hŒGet a Feature Report”h]”hŒGet a Feature Report”…””}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kzhj¤ubah}”(h]”h ]”h"]”h$]”h&]”uh1jâhj’ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÌh³hÊh´Kzhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jÇhj¨h²hh³hÊh´NubhÌ)”}”(hXõThis ioctl will request a feature report from the device using the control endpoint. The first byte of the supplied buffer should be set to the report number of the requested report. For devices which do not use numbered reports, set the first byte to 0. The returned report buffer will contain the report number in the first byte, followed by the report data read from the device. For devices which do not use numbered reports, the report data will begin at the first byte of the returned buffer.”h]”hXõThis ioctl will request a feature report from the device using the control endpoint. The first byte of the supplied buffer should be set to the report number of the requested report. For devices which do not use numbered reports, set the first byte to 0. The returned report buffer will contain the report number in the first byte, followed by the report data read from the device. For devices which do not use numbered reports, the report data will begin at the first byte of the returned buffer.”…””}”(hjÇh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K|hj¨h²hubjÈ)”}”(hhh]”jÍ)”}”(hŒ(HIDIOCSINPUT(len): Send an Input Report ”h]”(jÓ)”}”(hŒHIDIOCSINPUT(len):”h]”hŒHIDIOCSINPUT(len):”…””}”(hjÜh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÒh³hÊh´K…hjØubjã)”}”(hhh]”hÌ)”}”(hŒSend an Input Report”h]”hŒSend an Input Report”…””}”(hjíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K…hjêubah}”(h]”h ]”h"]”h$]”h&]”uh1jâhjØubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÌh³hÊh´K…hjÕubah}”(h]”h ]”h"]”h$]”h&]”uh1jÇhj¨h²hh³hÊh´NubhÌ)”}”(hXXThis ioctl will send an input report to the device, using the control endpoint. In most cases, setting an input HID report on a device is meaningless and has no effect, but some devices may choose to use this to set or reset an initial state of a report. The format of the buffer issued with this report is identical to that of HIDIOCSFEATURE.”h]”hXXThis ioctl will send an input report to the device, using the control endpoint. In most cases, setting an input HID report on a device is meaningless and has no effect, but some devices may choose to use this to set or reset an initial state of a report. The format of the buffer issued with this report is identical to that of HIDIOCSFEATURE.”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K‡hj¨h²hubjÈ)”}”(hhh]”jÍ)”}”(hŒ'HIDIOCGINPUT(len): Get an Input Report ”h]”(jÓ)”}”(hŒHIDIOCGINPUT(len):”h]”hŒHIDIOCGINPUT(len):”…””}”(hj"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÒh³hÊh´KŽhjubjã)”}”(hhh]”hÌ)”}”(hŒGet an Input Report”h]”hŒGet an Input Report”…””}”(hj3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KŽhj0ubah}”(h]”h ]”h"]”h$]”h&]”uh1jâhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÌh³hÊh´KŽhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jÇhj¨h²hh³hÊh´NubhÌ)”}”(hXThis ioctl will request an input report from the device using the control endpoint. This is slower on most devices where a dedicated In endpoint exists for regular input reports, but allows the host to request the value of a specific report number. Typically, this is used to request the initial states of an input report of a device, before an application listens for normal reports via the regular device read() interface. The format of the buffer issued with this report is identical to that of HIDIOCGFEATURE.”h]”hXThis ioctl will request an input report from the device using the control endpoint. This is slower on most devices where a dedicated In endpoint exists for regular input reports, but allows the host to request the value of a specific report number. Typically, this is used to request the initial states of an input report of a device, before an application listens for normal reports via the regular device read() interface. The format of the buffer issued with this report is identical to that of HIDIOCGFEATURE.”…””}”(hjSh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khj¨h²hubjÈ)”}”(hhh]”jÍ)”}”(hŒ*HIDIOCSOUTPUT(len): Send an Output Report ”h]”(jÓ)”}”(hŒHIDIOCSOUTPUT(len):”h]”hŒHIDIOCSOUTPUT(len):”…””}”(hjhh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÒh³hÊh´K™hjdubjã)”}”(hhh]”hÌ)”}”(hŒSend an Output Report”h]”hŒSend an Output Report”…””}”(hjyh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K™hjvubah}”(h]”h ]”h"]”h$]”h&]”uh1jâhjdubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÌh³hÊh´K™hjaubah}”(h]”h ]”h"]”h$]”h&]”uh1jÇhj¨h²hh³hÊh´NubhÌ)”}”(hXËThis ioctl will send an output report to the device, using the control endpoint. This is slower on most devices where a dedicated Out endpoint exists for regular output reports, but is added for completeness. Typically, this is used to set the initial states of an output report of a device, before an application sends updates via the regular device write() interface. The format of the buffer issued with this report is identical to that of HIDIOCSFEATURE.”h]”hXËThis ioctl will send an output report to the device, using the control endpoint. This is slower on most devices where a dedicated Out endpoint exists for regular output reports, but is added for completeness. Typically, this is used to set the initial states of an output report of a device, before an application sends updates via the regular device write() interface. The format of the buffer issued with this report is identical to that of HIDIOCSFEATURE.”…””}”(hj™h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K›hj¨h²hubjÈ)”}”(hhh]”jÍ)”}”(hŒ)HIDIOCGOUTPUT(len): Get an Output Report ”h]”(jÓ)”}”(hŒHIDIOCGOUTPUT(len):”h]”hŒHIDIOCGOUTPUT(len):”…””}”(hj®h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÒh³hÊh´K£hjªubjã)”}”(hhh]”hÌ)”}”(hŒGet an Output Report”h]”hŒGet an Output Report”…””}”(hj¿h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K£hj¼ubah}”(h]”h ]”h"]”h$]”h&]”uh1jâhjªubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÌh³hÊh´K£hj§ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÇhj¨h²hh³hÊh´NubhÌ)”}”(hXThis ioctl will request an output report from the device using the control endpoint. Typically, this is used to retrieve the initial state of an output report of a device, before an application updates it as necessary either via a HIDIOCSOUTPUT request, or the regular device write() interface. The format of the buffer issued with this report is identical to that of HIDIOCGFEATURE.”h]”hXThis ioctl will request an output report from the device using the control endpoint. Typically, this is used to retrieve the initial state of an output report of a device, before an application updates it as necessary either via a HIDIOCSOUTPUT request, or the regular device write() interface. The format of the buffer issued with this report is identical to that of HIDIOCGFEATURE.”…””}”(hjßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¥hj¨h²hubeh}”(h]”Œioctl”ah ]”h"]”Œioctl()”ah$]”h&]”uh1hµhh·h²hh³hÊh´KDubh¶)”}”(hhh]”(h»)”}”(hŒExample”h]”hŒExample”…””}”(hjøh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjõh²hh³hÊh´K¬ubhÌ)”}”(hŒåIn samples/, find hid-example.c, which shows examples of read(), write(), and all the ioctls for hidraw. The code may be used by anyone for any purpose, and can serve as a starting point for developing applications using hidraw.”h]”hŒåIn samples/, find hid-example.c, which shows examples of read(), write(), and all the ioctls for hidraw. The code may be used by anyone for any purpose, and can serve as a starting point for developing applications using hidraw.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K­hjõh²hubhÌ)”}”(hŒ Document by:”h]”hŒ Document by:”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K²hjõh²hubhŒ block_quote”“”)”}”(hŒ/Alan Ott , Signal 11 Software”h]”hÌ)”}”(hj&h]”(hŒ Alan Ott <”…””}”(hj(h²hh³Nh´NubhŒ reference”“”)”}”(hŒalan@signal11.us”h]”hŒalan@signal11.us”…””}”(hj1h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:alan@signal11.us”uh1j/hj(ubhŒ>, Signal 11 Software”…””}”(hj(h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K´hj$ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´K´hjõh²hubeh}”(h]”Œexample”ah ]”h"]”Œexample”ah$]”h&]”uh1hµhh·h²hh³hÊh´K¬ubeh}”(h]”Œ>hidraw-raw-access-to-usb-and-bluetooth-human-interface-devices”ah ]”h"]”Œ@hidraw - raw access to usb and bluetooth human interface devices”ah$]”h&]”uh1hµhhh²hh³hÊh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÊuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hºNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j„Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÊŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(j^j[j;j8jpjmj¥j¢jòjïjVjSuŒ nametypes”}”(j^‰j;‰jp‰j¥‰jò‰jV‰uh}”(j[h·j8j%jmj>j¢jsjïj¨jSjõuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.