usb - chrome.hid.send not sending packets -
i developing chrome app needs connected custom hid device.i able receive data the device. have write permission on hid , usb bus.yet there no data received device.
able send data via hidapi in separate program. can suggest method check whether or not chrome.hid.send working or not?
os : arch linux
chrome version : 46.0.2490.22 beta (64-bit)
well following code snippet seems work me : (taken hid sample app chrome-app-samples)
function sendhid(){ var bytes = new uint8array(63); bytes[0] = 0x01;//to send 0x01 hid device chrome.hid.send(connectionid,0,bytes.buffer,function(){ if (chrome.runtime.lasterror) { console.log(chrome.runtime.lasterror.message); return; } else { console.log("sent!"); } }); }
Comments
Post a Comment