New issue
Advanced search Search tips

Issue 593962 link

Starred by 2 users

Issue metadata

Status: Archived
Owner: ----
Closed: Jun 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

chrome.hid.receiveFeatureReport missing one byte of data

Reported by matt...@matthewkendall.com, Mar 10 2016

Issue description

Chrome Version       : 48.0.2564.116 m
URLs (if applicable) : Not applicable
Other browsers tested: Not applicable

The documentation for chrome.hid.receiveFeatureReport says that the argument passed to the callback function is "the report data, including a report ID prefix if one is sent by the device".

My expectation therefore is that if the report itself is n bytes long, the array passed to the callback function will either be n bytes long, just consisting of the data, or be n+1 bytes long where the first byte is the report ID and the remainder is the data.

What I am seeing is that I receive an array that is n bytes long: the first byte is zero (the report ID); the remaining n-1 bytes are data; and the last byte of data is missing.

Steps to reproduce:

Prerequisites:
* An app such as the chrome.hid API Sample, extended to add a sample call to receiveFeatureReport
* A USB HID device that supports setting and getting a single feature report, described in its HID report descriptor without a report ID (i.e. the report ID is zero, and no report ID is sent over the bus).

Steps:
(1) Call chrome.hid.receiveFeatureReport()
(2) In the callback function, inspect the passed array

Expected result:
Array is n bytes long, where n is the length of the HID report, and contains all n bytes of the report.
Or, array is n+1 bytes long, and contains report ID plus n bytes of the report.

Actual result:
Array is n bytes long, and contains report ID plus n-1 bytes of the report.

Tested with Windows 7 Pro.


 
Labels: Documentation
Added attachments:
(1) Bus analyzer screenshot showing device sending 8-byte Feature Report
(2) Javascript debugger screenshot showing that chrome.hid.receiveFeatureReport has only delivered me 7 of those bytes, together with a useless zero ID prefix. The final byte of the report has been lost.

593962-001.png
216 KB View Download
593962-002.png
22.0 KB View Download
Labels: Te-NeedsFurtherTriage
Components: Platform>Extensions>API
Components: -Platform>Extensions>API Platform>Apps>API>HID
Project Member

Comment 6 by sheriffbot@chromium.org, Jun 8 2018

Status: Archived (was: Unconfirmed)
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment