delMar43 / javahidapi

Automatically exported from code.google.com/p/javahidapi
Other
0 stars 0 forks source link

Device.Write() throwing Invalid Parameter Error #58

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I am trying to write a simple sequence of bytes to the device: 
0x01,0x00,0x01,0x01

I am using device.write() and I tried several approaches:

{0x01, 0x00, 0x01, 0x01} = invalid parameter
{0x00, 0x01, 0x00, 0x01, 0x01} = invalid user buffer
{0x02, 0x04, 0x01, 0x00, 0x01, 0x01} = invalid parameter

Do you have any idea why this is not working?

Thanks.

Original issue reported on code.google.com by quilombo...@gmail.com on 20 Nov 2013 at 4:03

GoogleCodeExporter commented 9 years ago
Try casting your values to bytes.

{(byte)0x01, (byte)0x00, (byte)0x01, (byte)0x01}

I hope this helps!

Original comment by dmorr...@gmail.com on 23 Nov 2013 at 5:13