NetBSD Problem Report #59288
From www@netbsd.org Sun Apr 13 13:03:49 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 1B9161A9239
for <gnats-bugs@gnats.NetBSD.org>; Sun, 13 Apr 2025 13:03:49 +0000 (UTC)
Message-Id: <20250413130347.D22F41A923D@mollari.NetBSD.org>
Date: Sun, 13 Apr 2025 13:03:47 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: uhid(4): story of report byte id is unclear
X-Send-Pr-Version: www-1.0
>Number: 59288
>Category: kern
>Synopsis: uhid(4): story of report byte id is unclear
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Sun Apr 13 13:05:00 +0000 2025
>Originator: Taylor R Campbell
>Release: current, 10, 9, ...
>Organization:
The NetUHID Documentation
>Environment:
>Description:
In some circumstances, the packets read and written on /dev/uhidN, either with read(2)/write(2) or with ioctl(USB_GET_REPORT)/ioctl(USB_SET_REPORT0, possibly limited to raw mode or not-raw mode, have a report id byte prefixed, but in other circumstances, they do not.
This was very confusing to me when I last dealt with /dev/uhidN. But evidently the tricky issue is not written down anywhere obvious like the uhid(4) man page or comments in sys/dev/usb/uhid.c. So now I have to figure it out afresh from the code and/or spec and/or doing science on a physical device.
Also the link http://www.usb.org/developers/devclass_docs/HID1_11.pdf in uhid.c to the USB HID spec is broken.
>How-To-Repeat:
attempt to write or port code involving /dev/uhidN
>Fix:
Yes, please!
Also make sure to include an archive.org link for the spec so it doesn't break again.
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.