<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forums.obdev.at/app.php/feed/topic/8999" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2014-05-20T11:52:35+02:00</updated>

	<author><name><![CDATA[Objective Development Forums]]></name></author>
	<id>https://forums.obdev.at/app.php/feed/topic/8999</id>

		<entry>
		<author><name><![CDATA[eslavko]]></name></author>
		<updated>2014-05-20T11:52:35+02:00</updated>

		<published>2014-05-20T11:52:35+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=8999&amp;p=26961#p26961</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=8999&amp;p=26961#p26961"/>
		<title type="html"><![CDATA[Re: Crossplatform libusb]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=8999&amp;p=26961#p26961"><![CDATA[
Hello...<br />I do 'brute force' test to see what parameters pass.<br />And I found that in Win the bRequest can be only one of:<br />USBRQ_GET_CONFIGURATION 8<br />USBRQ_GET_INTERFACE     10<br />USBRQ_SET_INTERFACE     11<br /><br />so there is no wanted HID request I want.<br />USBRQ_HID_GET_REPORT    0x01<br />USBRQ_HID_SET_REPORT    0x09<br /><br />And bmRequestType works just with walues under 159. So USBRQ_TYPE_CLASS can't be used for write (and read too)..<br />I try with USBRQ_TYPE_STANDARD and modified vusb code like this<br /><div class="codebox"><p>Code: </p><pre><code>uchar   usbFunctionSetup(uchar data&#91;8&#93;)<br />{<br />    usbRequest_t *rq = (void *)data;<br />    if((rq-&gt;bmRequestType &amp; USBRQ_TYPE_MASK) == USBRQ_TYPE_STANDARD){    <br />        if(rq-&gt;bRequest == USBRQ_GET_INTERFACE){  <br />            return USB_NO_MSG;  /* use usbFunctionWrite() to receive data from host */<br />        }else if(rq-&gt;bRequest == USBRQ_SET_INTERFACE){<br />            return USB_NO_MSG;  /* use usbFunctionWrite() to receive data from host */<br />        }<br />    }<br />    return 0;<br />}<br /></code></pre></div><br /><br />but no sucess. I don't get error now, but either thing doesn't work<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=4732">eslavko</a> — Tue May 20, 2014 11:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[eslavko]]></name></author>
		<updated>2014-05-20T09:43:51+02:00</updated>

		<published>2014-05-20T09:43:51+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=8999&amp;p=26960#p26960</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=8999&amp;p=26960#p26960"/>
		<title type="html"><![CDATA[Crossplatform libusb]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=8999&amp;p=26960#p26960"><![CDATA[
Hello...<br /><br />I want to write linux/win application in python. But I can't get win version working on linux works nice.<br />The minimum example to shov error is below. In both systems selecting right device works, but control write fain on windows with bad parametter error.<br /><br />anny idea?<br /><br /><div class="codebox"><p>Code: </p><pre><code>import usb1, libusb1<br /><br />bmRequestType=libusb1.LIBUSB_TYPE_CLASS | libusb1.LIBUSB_ENDPOINT_IN<br />bRequest=libusb1.LIBUSB_REQUEST_SET_CONFIGURATION<br />buf=chr(0)+chr(0)+chr(0)<br /><br />context = usb1.USBContext()<br />deviceList=context.getDeviceList(skip_on_error=True)<br />for device in deviceList:<br />    if '16c0:05df' in str(device):<br />        deviceName=device.getProduct()<br />        if deviceName=='ISM_RTX':<br />            usbHandle=device.open()<br />            print usbHandle.controlWrite(bmRequestType, bRequest, 0, 0, buf,0)<br /></code></pre></div><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=4732">eslavko</a> — Tue May 20, 2014 9:43 am</p><hr />
]]></content>
	</entry>
	</feed>
