chrome.hid.receiveFeatureReport is not getting data
Reported by
kris...@topsinfosolutions.com,
Jul 31
|
||
Issue descriptionUserAgent: Mozilla/5.0 (X11; CrOS x86_64 10895.5.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.14 Safari/537.36 Platform: 10895.5.0 (Official Build) dev-channel edgar Steps to reproduce the problem: 1. Connect with hid device using chrome.hid.connect function 2. on connect call chrome.hid.receiveFeatureReport to receive data. 3. repeat 2nd step in every 500ms. What is the expected behavior? chrome.hid.receiveFeatureReport function call should return present data that device is sending. whatever data device will send, function should return that data. Suggestion: there should be an event that fire whenever device sends data instead of calling function in 500ms. like chrome.hid.onReceiveData What went wrong? whenever i connect device with computer and calling chrome.hid.connect function first time, chrome.hid.receiveFeatureReport function is getting that moment data only, rest of time its returning same data. Like 1. i connect device to computer 2. than i called chrome.hid.connect function for this device 3. than i called chrome.hid.receiveFeatureReport function first time, suppose that time device was returning XYZ data, Function will return XYZ data only for all time, even device is returning any other data. I created an c#.net application, in .net application i am getting real data without any issue. I am using dymo weight scale device, and i am trying to read weight by chrome app. Please help me, i have wasted a lot of time on this only. Thanks! Did this work before? N/A Does this work in other browsers? N/A Chrome version: 69.0.3497.14 Channel: dev OS Version: 10895.5.0 Flash Version: 30.0.0.142
,
Aug 1
Yes,I am polling the device by calling chrome.hid.receiveFeatureReport() function. I tried chrome.hid.receive() function also, but no result. for receiving input report, which function should i use, I found only two functions only for receiving data , chrome.hid.receiveFeatureReport() and chrome.hid.receive(), both i have tried. Thanks for response!
,
Aug 1
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 1
My research online[1] indicates that DYMO scales send the item weight as an input report. These are read by calling chrome.hid.receive(). [1]: https://github.com/erjiang/usbscale
,
Aug 2
I already tried with chrome.hid.receive() function, its not returning anything. Before i was using that later i changed it to chrome.hid.receiveFeatureReport() at the place of chrome.hid.receive() function. Thanks!
,
Aug 6
How to use chrome.hid.receive() function? I am polling this function after 500ms interval. But i am not getting any data. Weight scale is sending data correctly, but i am unable to read data by chrome.hid.receive() function. I tried both function from last 1 week, but still i didnt get any solution. I am hopeless. Please help me. Thanks!
,
Aug 6
sample code
chrome.hid.connect(deviceId, function(connectInfo) {
if (!connectInfo) {
console.log("unable to connect :(");
}
connection = connectInfo.connectionId;
console.log("connected successfully");
readWeight();
});
var readWeight = function(){
chrome.hid.receive(connection, function(reportId, result) {
let data = new Uint8Array(result);
var str1 = "";
var str2 = ByteArrayToString(data);
if (!(str2 != ""))
return;
if (outPutInfo.Unit == "oz")
{
str1 = (+str2 / 10.0) + "";
}
else if (outPutInfo.Unit == "gram")
{
str1 = str2;
}
console.log("Reading of weight :" + str1 + " " + outPutInfo.Unit);
setTimeout(readWeight, 200);
});
}
,
Aug 7
Hi, I don't get any clue over internet still. I am unable to figure this issue out. I need your support, please give me any clue to figure it out. @ Is there any log for api, from there i can figure out issue of receive function? @ Is it a bug or development or issue of understanding? @ Can chrome.hid not communicate with dymo scale? Many questions are in my mind, but i am not sure even for single query. Please guys help me, you guys only can clear my issue. Please help me. I am looking forward for your response! Thanks for your attention !!
,
Aug 7
If there is an error reading from the device that is logged to chrome://device-log. If you can reproduce this issue on a Linux host you can use Wireshark to sniff traffic on the USB bus in order to see what data is being sent. Make sure you are checking chrome.runtime.lastError in your callbacks as that is how Chrome Apps APIs report errors.
,
Aug 8
Hi, I checked in wireshark on ubuntu, I tried to understand that report but i didnt get how to troubleshoot my problem by this. I am getting USBHID protocol report in wireshark while connecting device to ubuntu computer. I am checking chrome.runtime.lastError, I am getting undefined. I have attached device log file and wireshark report with this comment. Please suggest me how to overcome from this problem, may these attachment help you to understand actual problem. Thanks for your valuable time.
,
Aug 13
Hi guys, Still i am on same place, i tried to solve this issue, but still even i don't know what is exact issue. I am expecting support from your side. -> i don't see any error in chrome://device-log -> i checked in chrome://system also, didn't find anything to troubleshoot -> i checked device on window using a c# program, there device is working. -> i checked in wireshark also and output sniff attached with last comment. That all things i tried, but still i didn't get what is issue. can you please tell me- -> is there any way to see log of api calling functions? -> Is there anything like that device not supports your calls(I am using DYMO M10 10 Kg Digital Postal Scale )? -> should i stop using chrome OS for such tasks, as OS not support? Please help me. Thanks!! |
||
►
Sign in to add a comment |
||
Comment 1 by reillyg@chromium.org
, Jul 31Labels: Needs-Feedback