<?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/4867" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2010-09-28T21:16:43+02:00</updated>

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

		<entry>
		<author><name><![CDATA[MaMu]]></name></author>
		<updated>2010-09-28T21:16:43+02:00</updated>

		<published>2010-09-28T21:16:43+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4867&amp;p=16017#p16017</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4867&amp;p=16017#p16017"/>
		<title type="html"><![CDATA[Re: Experience with LibUsbDotNet C# USB Library]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4867&amp;p=16017#p16017"><![CDATA[
IT WORKS!<br /><br /><blockquote><div><cite>_frank26080115 wrote:</cite><blockquote class="uncited"><div>here's a bit from my own code<br /><div class="codebox"><p>Code: </p><pre><code>public bool SetContrast(byte contrast)<br />        {<br />            if (IsConnected == false)<br />                return false;<br /><br />            UsbSetupPacket packet = new UsbSetupPacket((byte)UsbRequestType.TypeVendor, (byte)RequestCommand.SetContrast, (short)contrast, 0, 0);<br />            int temp1;<br />            object temp2 = null;<br />            return MyUsbDevice.ControlTransfer(ref packet, temp2, 0, out temp1);<br />        }</code></pre></div></div></blockquote></div></blockquote><br /><br />I removed the cast from the UsbDevice object and integrate your code snippet into my program. After a bit of experimenting with some values it worked.<br /><br />Thanks a lot!<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=4373">MaMu</a> — Tue Sep 28, 2010 9:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2010-09-26T22:18:19+02:00</updated>

		<published>2010-09-26T22:18:19+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4867&amp;p=16004#p16004</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4867&amp;p=16004#p16004"/>
		<title type="html"><![CDATA[Re: Experience with LibUsbDotNet C# USB Library]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4867&amp;p=16004#p16004"><![CDATA[
<blockquote class="uncited"><div>I'll install the lightweight debugger.</div></blockquote><br /><br />I meant: use the Visual Studio debugger<br /><br />here's a bit from my own code<br /><div class="codebox"><p>Code: </p><pre><code>public bool SetContrast(byte contrast)<br />        {<br />            if (IsConnected == false)<br />                return false;<br /><br />            UsbSetupPacket packet = new UsbSetupPacket((byte)UsbRequestType.TypeVendor, (byte)RequestCommand.SetContrast, (short)contrast, 0, 0);<br />            int temp1;<br />            object temp2 = null;<br />            return MyUsbDevice.ControlTransfer(ref packet, temp2, 0, out temp1);<br />        }</code></pre></div><p>Statistics: Posted by Guest — Sun Sep 26, 2010 10:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MaMu]]></name></author>
		<updated>2010-09-26T21:22:02+02:00</updated>

		<published>2010-09-26T21:22:02+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4867&amp;p=16003#p16003</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4867&amp;p=16003#p16003"/>
		<title type="html"><![CDATA[Re: Experience with LibUsbDotNet C# USB Library]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4867&amp;p=16003#p16003"><![CDATA[
<blockquote><div><cite>_frank26080115 wrote:</cite>have you tried break-pointing right before &quot;ControlTransfer&quot; and examining the packet before it's sent?</div></blockquote><br /><br />Of course! The debugger is always good idea!<br /><br />Because I built my own hardware I'm using an old laptop for testing. I'll install the lightweight debugger.<br /><br /><blockquote><div><cite>_frank26080115 wrote:</cite>I have great success using LibUsbDotNet, I have made an LCD display which uses control transfers for text, brightness, and contrast setting, when I did it, I always made sure that the values for bmRequestType and bRequest were valid, it sounds like you are just putting in values from textboxes, are the values valid?</div></blockquote><br /><br />After I couldn't get it to work I added the textboxes so I can easily experiment with different values.<br /><br /><blockquote><div><cite>_frank26080115 wrote:</cite>why are you always explicitly casting the UsbDevice object to interfaces? why not just call methods on usbDevice?</div></blockquote><br /><br />I got the code from the provided examples, I'll try without the cast.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=4373">MaMu</a> — Sun Sep 26, 2010 9:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2010-09-26T05:07:33+02:00</updated>

		<published>2010-09-26T05:07:33+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4867&amp;p=15999#p15999</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4867&amp;p=15999#p15999"/>
		<title type="html"><![CDATA[Re: Experience with LibUsbDotNet C# USB Library]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4867&amp;p=15999#p15999"><![CDATA[
have you tried break-pointing right before &quot;ControlTransfer&quot; and examining the packet before it's sent?<br /><br />I have great success using LibUsbDotNet, I have made an LCD display which uses control transfers for text, brightness, and contrast setting, when I did it, I always made sure that the values for bmRequestType and bRequest were valid, it sounds like you are just putting in values from textboxes, are the values valid?<br /><br />why are you always explicitly casting the UsbDevice object to interfaces? why not just call methods on usbDevice?<p>Statistics: Posted by Guest — Sun Sep 26, 2010 5:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MaMu]]></name></author>
		<updated>2010-09-25T20:56:50+02:00</updated>

		<published>2010-09-25T20:56:50+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4867&amp;p=15991#p15991</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4867&amp;p=15991#p15991"/>
		<title type="html"><![CDATA[Experience with LibUsbDotNet C# USB Library]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4867&amp;p=15991#p15991"><![CDATA[
Hi,<br /><br />Does anyone have experience with the LibUsbDotNet C# USB Library?<br /><br />As hardware I’m using the power switch reference project on an Atmega328p. As V-USB version I’m using: vusb-20100715. When using the provided Windows command line tool my hardware works.<br /><br />Now I’m trying to get the LibUsbDotNet C# USB Library to work, without success.<br /><br />See: <a href="http://sourceforge.net/apps/phpbb/libusbdotnet/viewtopic.php?f=3&amp;t=43" class="postlink">Support forum LibUsbDotNet C# USB Library</a><br /><br />Does anyone have V-USB working in combination with the LibUsbDotNet C# USB Library?<br /><br />MaMu<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=4373">MaMu</a> — Sat Sep 25, 2010 8:56 pm</p><hr />
]]></content>
	</entry>
	</feed>
