<zyp>
rjo, how come it works with hidapi but not pywinusb.hid?
<rjo>
pywinusb.hid wants to auto-discover the things you can do with the device. looked like there is a much higher level hid api which that hardware does not implement (correctly). you don't just send reports, you look up pages and usage ids for the different reports etc.
<zyp>
yeah, that's the whole point of hid
<zyp>
that sounds actually way more suited than my current approach with hidapi of just assuming a given report format
<zyp>
shame it's windows only
<zyp>
more suited for my application, that is
<rjo>
well. if the device does not do it correctly, it's not suited ;)
<zyp>
can you call a device not following the hid standard a hid device? :)
<rjo>
half-hid.
<zyp>
windows won't bind the hid driver to hid devices without a valid report descriptor, so whatever you're doing, you're going to need that
<rjo>
there are report descriptors but i could not match them to the raw report format that is described in the (crappy) datasheet of the device.
<rjo>
i have to admit that i was pissed by the weird terminology of the hid standard as well. so i gave up relatively early.
<zyp>
heh
<rjo>
zyp: what about this first padding byte in the reports. under windows it seemed to want that on write but the reads did not return that padding byte.
<rjo>
meaning writes are 9 byte, reads are 8 byte.
<zyp>
with hidapi?
<zyp>
or plain windows hid?
<rjo>
hidapi on windows.
<rjo>
your dll in fact.
<zyp>
hidapi should be consistent over all platforms
<zyp>
hidapi takes the report id as first byte
<zyp>
and if you don't have multiple reports, you need to put a zero there
<rjo>
one would hope so
<rjo>
and on reads?
<rjo>
does it return a report id?
<zyp>
the report id is always the first byte of the report if you are using ids at all
<rjo>
i am not, i believe.
<rjo>
" For devices with multiple reports, make sure to read an extra byte for the report number." does that mean that "devices without multiple reports" do not need that byte and start with data right away?
<rjo>
on read
<zyp>
ok, I looked at my code, you're not getting a padding byte on reads if there's no report id
<zyp>
I believe it's to cope with certain OS APIs expecting report ids out of band
<zyp>
«we don't know if the first byte is a report id that we have to strip off or not, so let's just always strip it off and require a padding byte if there's none»
<zyp>
wheras on a read you know whether you have something to prepend or not
siruf has quit [Write error: Broken pipe]
_whitelogger has joined #m-labs
_florent_ has joined #m-labs
<ysionneau>
rjo: ah! great that you had it to work!
sj_mackenzie has quit [Remote host closed the connection]
fengling has quit [Quit: WeeChat 1.0]
sh4rm4 has joined #m-labs
_florent_ has quit [Ping timeout: 246 seconds]
_florent_ has joined #m-labs
xiangfu has joined #m-labs
xiangfu has quit [Quit: leaving]
MY123 has joined #m-labs
kill_-9_1 has joined #m-labs
MY123 has quit []
kill_-9_1 is now known as MY123
_florent_ has quit [Quit: Page closed]
mumptai has joined #m-labs
sh4rm4 has quit [Remote host closed the connection]