lekernel changed the topic of #m-labs to: Mixxeo, Migen, MiSoC & other M-Labs projects :: fka #milkymist :: Logs http://irclog.whitequark.org/m-labs
rjo_ has joined #m-labs
<rjo_> sb0: forget what i said about the hub for these thorlabs motor controllers being a usb hub. it is not ;)
<rjo_> but its not much different. the full protocol is in http://www.thorlabs.us/software/apt/APT_Communications_Protocol_Rev_14.pdf
nicksydney has joined #m-labs
nicksydney_ has quit [Ping timeout: 272 seconds]
nicksydney has quit [Read error: No route to host]
nicksydney has joined #m-labs
siruf has quit [Ping timeout: 255 seconds]
siruf has joined #m-labs
siruf has quit [Ping timeout: 255 seconds]
siruf has joined #m-labs
sb0 has quit [Quit: Leaving]
siruf has quit [Ping timeout: 264 seconds]
siruf has joined #m-labs
siruf has quit [Ping timeout: 245 seconds]
siruf has joined #m-labs
cfelton has quit [Ping timeout: 244 seconds]
siruf has joined #m-labs
siruf has quit [Changing host]
fengling has joined #m-labs
cfelton_ has joined #m-labs
rjo_ has quit [Quit: Page closed]
rjo_ has joined #m-labs
rjo_ has quit [Ping timeout: 246 seconds]
<rjo> weird. my posts from the freenode webchat never made it here...
<rjo> zyp, ysionneau: the hardware is sufficiently non-hid that pywinusb.hid does not work.
sj_mackenzie has joined #m-labs
<rjo> ysionneau: i went back to hdapi and rewrote everything. this works: http://paste.debian.net/131250/
<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> but you need it on writes
<zyp> http://cgit.jvnv.net/arcin/tree/autotest.py#n93 <- see how I'm adding the padding byte on line 94, but not on line 110
<rjo> yep. weird api...
<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]
sh4rm4 has joined #m-labs
<GitHub151> [artiq] jboulder opened pull request #4: Update installing.rst (master...patch-1) http://git.io/jWMw4A
mumptai has quit [Quit: Verlassend]
sh4rm4 has quit [Remote host closed the connection]
sh4rm4 has joined #m-labs
aeris has quit [Read error: Connection reset by peer]
aeris has joined #m-labs
sh4rm4 has quit [Remote host closed the connection]
sh4rm4 has joined #m-labs