<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for Florian Leitner-Fischer</title>
	<atom:link href="http://www.florian-leitner.de/index.php/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.florian-leitner.de</link>
	<description></description>
	<lastBuildDate>Fri, 18 May 2012 15:21:35 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>Comment on HID USB Driver / Library for .Net / C# by Keval</title>
		<link>http://www.florian-leitner.de/index.php/2007/08/03/hid-usb-driver-library/#comment-3346</link>
		<dc:creator>Keval</dc:creator>
		<pubDate>Fri, 18 May 2012 15:21:35 +0000</pubDate>
		<guid isPermaLink="false">http://florian-leitner.de/wordpress/index.php/2007/08/03/hid-usb-driver-library/#comment-3346</guid>
		<description>Hi,

You have made a great lib, it solves many pblms for those who work for usb

I have add ur project as steps given, and made my form1 and included ur lib

I have succesfully  detected my pedometer, but can not read data

All wroks well but hangs on  Assert.IsTrue(usbI.write(startCMD)); in sendStartCMD

Please guide where i am wrong


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using System.Threading;

using USBHIDDRIVER;
using USBHIDDRIVER.TESTS;
using NUnit.Framework;


namespace USBHIDDRIVER
{
    public partial class Form1 : Form
    {   //pedometer
        USBHIDDRIVER.USBInterface usbI = new USBInterface(&quot;vid_0590&quot;, &quot;pid_0028&quot;);
 
        public Form1()
        {
            InitializeComponent();
        }


        [Test]
        public void deviceList()
        {
            USBHIDDRIVER.USBInterface usbI = new USBInterface(&quot;0&quot;);
            String[] list = usbI.getDeviceList();
            Assert.IsNotNull(list);
        }

        [Test]
        public void sendStartCMD()
        {
            byte[] startCMD = new byte[8];
            //Start
            startCMD[0] = 255;
            //Mode
            startCMD[1] = 0;
            //USync
            startCMD[2] = 28;
            //ULine
            startCMD[3] = 20;
            //tSync
            startCMD[4] = 20;
            //tRepeat - High
            startCMD[5] = 0;
            //tRepeat - Low
            startCMD[6] = 0x01;
            //BusMode
            startCMD[7] = 0xF4;
            //send the command

          

            Assert.IsTrue(usbI.Connect());
            Assert.IsTrue(usbI.write(startCMD));

            //textBox1.Text = textBox1.Text + &quot; AND &quot; + &quot;from sendStartCMD&quot;;
        }



        [Test]
        public void startRead()
        {

            sendStartCMD();
            usbI.enableUsbBufferEvent(new System.EventHandler(myEventCacher));
            Thread.Sleep(5);
            usbI.startRead();
            Thread.Sleep(5);
            for (int i = 0; i &lt; 10; i++)
            {
                Assert.IsNotNull(USBHIDDRIVER.USBInterface.usbBuffer);
                Thread.Sleep(2);
            }
            usbI.stopRead();
            sendStopCMD();

           // textBox1.Text = textBox1.Text + &quot; AND &quot; + &quot;from startRead&quot;;
        }



        [Test]
        public void sendStopCMD()
        {
            byte[] stopCMD = new byte[75];
            //Stop
            stopCMD[0] = 128;

            stopCMD[64] = 8;

            Assert.IsTrue(usbI.write(stopCMD));
        }

        [Test]
        public void userDefinedeventHandling()
        {
            sendStartCMD();

            usbI.enableUsbBufferEvent(new System.EventHandler(myEventCacher));
            usbI.startRead();

            //wait a little bit
            for (int i = 0; i  0)
            {
                byte[] currentRecord = null;
                int counter = 0;
                while ((byte[])USBHIDDRIVER.USBInterface.usbBuffer[counter] == null)
                {
                    //Remove this report from list
                    lock (USBHIDDRIVER.USBInterface.usbBuffer.SyncRoot)
                    {
                        USBHIDDRIVER.USBInterface.usbBuffer.RemoveAt(0);
                    }
                }
                //since the remove statement at the end of the loop take the first element
                currentRecord = (byte[])USBHIDDRIVER.USBInterface.usbBuffer[0];
                lock (USBHIDDRIVER.USBInterface.usbBuffer.SyncRoot)
                {
                    USBHIDDRIVER.USBInterface.usbBuffer.RemoveAt(0);
                }

               // textBox1.Text = currentRecord;
                //DO SOMETHING WITH THE RECORD HERE
            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {
           // USBHIDDRIVER.USBInterface usb = new USBInterface(&quot;vid_0590&quot;,&quot;pid_0028&quot;);

          //  usb.enableUsbBufferEvent(new System.EventHandler(myEventCacher));

           
//usb.Connect();

            String[] list = usbI.getDeviceList();
            textBox1.Text = list[0];

            foreach (string s in list)
            {
                textBox1.Text = textBox1.Text + &quot; &quot; + s;
            }

           
           
            sendStartCMD();

            usbI.enableUsbBufferEvent(new System.EventHandler(myEventCacher));
            usbI.startRead();

            //wait a little bit
            for (int i = 0; i &lt; 10; i++)
            {
                Thread.Sleep(4);
            }

            sendStopCMD();


        }



        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }
    }
}</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>You have made a great lib, it solves many pblms for those who work for usb</p>
<p>I have add ur project as steps given, and made my form1 and included ur lib</p>
<p>I have succesfully  detected my pedometer, but can not read data</p>
<p>All wroks well but hangs on  Assert.IsTrue(usbI.write(startCMD)); in sendStartCMD</p>
<p>Please guide where i am wrong</p>
<p>using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Drawing;<br />
using System.Text;<br />
using System.Windows.Forms;</p>
<p>using System.Threading;</p>
<p>using USBHIDDRIVER;<br />
using USBHIDDRIVER.TESTS;<br />
using NUnit.Framework;</p>
<p>namespace USBHIDDRIVER<br />
{<br />
    public partial class Form1 : Form<br />
    {   //pedometer<br />
        USBHIDDRIVER.USBInterface usbI = new USBInterface(&#8220;vid_0590&#8243;, &#8220;pid_0028&#8243;);</p>
<p>        public Form1()<br />
        {<br />
            InitializeComponent();<br />
        }</p>
<p>        [Test]<br />
        public void deviceList()<br />
        {<br />
            USBHIDDRIVER.USBInterface usbI = new USBInterface(&#8220;0&#8243;);<br />
            String[] list = usbI.getDeviceList();<br />
            Assert.IsNotNull(list);<br />
        }</p>
<p>        [Test]<br />
        public void sendStartCMD()<br />
        {<br />
            byte[] startCMD = new byte[8];<br />
            //Start<br />
            startCMD[0] = 255;<br />
            //Mode<br />
            startCMD[1] = 0;<br />
            //USync<br />
            startCMD[2] = 28;<br />
            //ULine<br />
            startCMD[3] = 20;<br />
            //tSync<br />
            startCMD[4] = 20;<br />
            //tRepeat &#8211; High<br />
            startCMD[5] = 0;<br />
            //tRepeat &#8211; Low<br />
            startCMD[6] = 0&#215;01;<br />
            //BusMode<br />
            startCMD[7] = 0xF4;<br />
            //send the command</p>
<p>            Assert.IsTrue(usbI.Connect());<br />
            Assert.IsTrue(usbI.write(startCMD));</p>
<p>            //textBox1.Text = textBox1.Text + &#8221; AND &#8221; + &#8220;from sendStartCMD&#8221;;<br />
        }</p>
<p>        [Test]<br />
        public void startRead()<br />
        {</p>
<p>            sendStartCMD();<br />
            usbI.enableUsbBufferEvent(new System.EventHandler(myEventCacher));<br />
            Thread.Sleep(5);<br />
            usbI.startRead();<br />
            Thread.Sleep(5);<br />
            for (int i = 0; i &lt; 10; i++)<br />
            {<br />
                Assert.IsNotNull(USBHIDDRIVER.USBInterface.usbBuffer);<br />
                Thread.Sleep(2);<br />
            }<br />
            usbI.stopRead();<br />
            sendStopCMD();</p>
<p>           // textBox1.Text = textBox1.Text + &quot; AND &quot; + &quot;from startRead&quot;;<br />
        }</p>
<p>        [Test]<br />
        public void sendStopCMD()<br />
        {<br />
            byte[] stopCMD = new byte[75];<br />
            //Stop<br />
            stopCMD[0] = 128;</p>
<p>            stopCMD[64] = 8;</p>
<p>            Assert.IsTrue(usbI.write(stopCMD));<br />
        }</p>
<p>        [Test]<br />
        public void userDefinedeventHandling()<br />
        {<br />
            sendStartCMD();</p>
<p>            usbI.enableUsbBufferEvent(new System.EventHandler(myEventCacher));<br />
            usbI.startRead();</p>
<p>            //wait a little bit<br />
            for (int i = 0; i  0)<br />
            {<br />
                byte[] currentRecord = null;<br />
                int counter = 0;<br />
                while ((byte[])USBHIDDRIVER.USBInterface.usbBuffer[counter] == null)<br />
                {<br />
                    //Remove this report from list<br />
                    lock (USBHIDDRIVER.USBInterface.usbBuffer.SyncRoot)<br />
                    {<br />
                        USBHIDDRIVER.USBInterface.usbBuffer.RemoveAt(0);<br />
                    }<br />
                }<br />
                //since the remove statement at the end of the loop take the first element<br />
                currentRecord = (byte[])USBHIDDRIVER.USBInterface.usbBuffer[0];<br />
                lock (USBHIDDRIVER.USBInterface.usbBuffer.SyncRoot)<br />
                {<br />
                    USBHIDDRIVER.USBInterface.usbBuffer.RemoveAt(0);<br />
                }</p>
<p>               // textBox1.Text = currentRecord;<br />
                //DO SOMETHING WITH THE RECORD HERE<br />
            }<br />
        }</p>
<p>        private void Form1_Load(object sender, EventArgs e)<br />
        {<br />
           // USBHIDDRIVER.USBInterface usb = new USBInterface(&#8220;vid_0590&#8243;,&#8221;pid_0028&#8243;);</p>
<p>          //  usb.enableUsbBufferEvent(new System.EventHandler(myEventCacher));</p>
<p>//usb.Connect();</p>
<p>            String[] list = usbI.getDeviceList();<br />
            textBox1.Text = list[0];</p>
<p>            foreach (string s in list)<br />
            {<br />
                textBox1.Text = textBox1.Text + &#8221; &#8221; + s;<br />
            }</p>
<p>            sendStartCMD();</p>
<p>            usbI.enableUsbBufferEvent(new System.EventHandler(myEventCacher));<br />
            usbI.startRead();</p>
<p>            //wait a little bit<br />
            for (int i = 0; i &lt; 10; i++)<br />
            {<br />
                Thread.Sleep(4);<br />
            }</p>
<p>            sendStopCMD();</p>
<p>        }</p>
<p>        private void textBox1_TextChanged(object sender, EventArgs e)<br />
        {</p>
<p>        }<br />
    }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on HID USB Driver / Library for .Net / C# by Travis</title>
		<link>http://www.florian-leitner.de/index.php/2007/08/03/hid-usb-driver-library/#comment-3321</link>
		<dc:creator>Travis</dc:creator>
		<pubDate>Mon, 14 May 2012 19:00:46 +0000</pubDate>
		<guid isPermaLink="false">http://florian-leitner.de/wordpress/index.php/2007/08/03/hid-usb-driver-library/#comment-3321</guid>
		<description>Are you able to also release this under the LGPL?  As it is a library, the GPL is a little too restrictive for the vast majority of Point of Service providers.</description>
		<content:encoded><![CDATA[<p>Are you able to also release this under the LGPL?  As it is a library, the GPL is a little too restrictive for the vast majority of Point of Service providers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Günstiger Hama WLAN Stick für Samsung Fernseher und Blu-Ray Player by Ioannis</title>
		<link>http://www.florian-leitner.de/index.php/2010/10/13/gnstiger-hama-wlan-stick-fr-samsung-fernseher-und-blu-ray-player/#comment-3293</link>
		<dc:creator>Ioannis</dc:creator>
		<pubDate>Mon, 07 May 2012 19:52:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.florian-leitner.de/index.php/2010/10/13/gnstiger-hama-wlan-stick-fr-samsung-fernseher-und-blu-ray-player/#comment-3293</guid>
		<description>Glaub langsam wäre es eher interessant zu melden, bei welchen Modellen es nicht geht. Ich hab das jetzt an 3 verschiedenen Samsunggeräten getestet und war nie ein Thema. 

Ich glaub sobald der Samsung TV oder das Gerät einen USB Anschluss hat, kann man davon ausgehen, dass der Hama Stick auch funktioniert. :)</description>
		<content:encoded><![CDATA[<p>Glaub langsam wäre es eher interessant zu melden, bei welchen Modellen es nicht geht. Ich hab das jetzt an 3 verschiedenen Samsunggeräten getestet und war nie ein Thema. </p>
<p>Ich glaub sobald der Samsung TV oder das Gerät einen USB Anschluss hat, kann man davon ausgehen, dass der Hama Stick auch funktioniert. <img src='http://www.florian-leitner.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on HID USB Driver / Library for .Net / C# by pabz</title>
		<link>http://www.florian-leitner.de/index.php/2007/08/03/hid-usb-driver-library/#comment-3292</link>
		<dc:creator>pabz</dc:creator>
		<pubDate>Mon, 07 May 2012 11:41:38 +0000</pubDate>
		<guid isPermaLink="false">http://florian-leitner.de/wordpress/index.php/2007/08/03/hid-usb-driver-library/#comment-3292</guid>
		<description>hello 
while accessing the get device list into a string array ,,,,,,it is showing that the list is empty Or array is beyond the boundary limit even if i want to display array of zero ??????
can anyone ans m please !!!!!</description>
		<content:encoded><![CDATA[<p>hello<br />
while accessing the get device list into a string array ,,,,,,it is showing that the list is empty Or array is beyond the boundary limit even if i want to display array of zero ??????<br />
can anyone ans m please !!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on HID USB Driver / Library for .Net / C# by Munna Kumar</title>
		<link>http://www.florian-leitner.de/index.php/2007/08/03/hid-usb-driver-library/#comment-3291</link>
		<dc:creator>Munna Kumar</dc:creator>
		<pubDate>Mon, 07 May 2012 08:10:50 +0000</pubDate>
		<guid isPermaLink="false">http://florian-leitner.de/wordpress/index.php/2007/08/03/hid-usb-driver-library/#comment-3291</guid>
		<description>Hi How Can I write a window service to read barcode in background without using a textbox which is require to read barcode.</description>
		<content:encoded><![CDATA[<p>Hi How Can I write a window service to read barcode in background without using a textbox which is require to read barcode.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Günstiger Hama WLAN Stick für Samsung Fernseher und Blu-Ray Player by Rachid</title>
		<link>http://www.florian-leitner.de/index.php/2010/10/13/gnstiger-hama-wlan-stick-fr-samsung-fernseher-und-blu-ray-player/#comment-3290</link>
		<dc:creator>Rachid</dc:creator>
		<pubDate>Sat, 05 May 2012 20:56:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.florian-leitner.de/index.php/2010/10/13/gnstiger-hama-wlan-stick-fr-samsung-fernseher-und-blu-ray-player/#comment-3290</guid>
		<description>Hallo Florian Leitner,

im obigen Artikel wurde darum gebeten weitere, positiv getestete Samsung TV Modelle zu benennen.

Funktioniert tadellos mit &quot;Samsung UE40D6200TS&quot; :)

Hatte mir Adapter für 25€ bei MediaMarkt in Düsseldorf gekauft.
(Die hatten noch viele)</description>
		<content:encoded><![CDATA[<p>Hallo Florian Leitner,</p>
<p>im obigen Artikel wurde darum gebeten weitere, positiv getestete Samsung TV Modelle zu benennen.</p>
<p>Funktioniert tadellos mit &#8220;Samsung UE40D6200TS&#8221; <img src='http://www.florian-leitner.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Hatte mir Adapter für 25€ bei MediaMarkt in Düsseldorf gekauft.<br />
(Die hatten noch viele)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on HID USB Driver / Library for .Net / C# by PIC18F4550, Giao tiep USB, Nap AT89S52</title>
		<link>http://www.florian-leitner.de/index.php/2007/08/03/hid-usb-driver-library/#comment-3289</link>
		<dc:creator>PIC18F4550, Giao tiep USB, Nap AT89S52</dc:creator>
		<pubDate>Sat, 05 May 2012 20:20:09 +0000</pubDate>
		<guid isPermaLink="false">http://florian-leitner.de/wordpress/index.php/2007/08/03/hid-usb-driver-library/#comment-3289</guid>
		<description>[...] 36           Thư viện và hướng dẫn về USB HID trên trang này: HID USB Driver / Library for .Net / C# [...]</description>
		<content:encoded><![CDATA[<p>[...] 36           Thư viện và hướng dẫn về USB HID trên trang này: HID USB Driver / Library for .Net / C# [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on HID USB Driver / Library for .Net / C# by Rexogxut</title>
		<link>http://www.florian-leitner.de/index.php/2007/08/03/hid-usb-driver-library/#comment-3288</link>
		<dc:creator>Rexogxut</dc:creator>
		<pubDate>Fri, 04 May 2012 23:54:16 +0000</pubDate>
		<guid isPermaLink="false">http://florian-leitner.de/wordpress/index.php/2007/08/03/hid-usb-driver-library/#comment-3288</guid>
		<description>I&#039;m happy very good site http://kijuhojudom.de.tl nonnude girl models  She could get it from me anytime she wants it i would love to throw a fuck into her ass</description>
		<content:encoded><![CDATA[<p>I&#8217;m happy very good site <a href="http://kijuhojudom.de.tl" rel="nofollow">http://kijuhojudom.de.tl</a> nonnude girl models  She could get it from me anytime she wants it i would love to throw a fuck into her ass</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on HID USB Driver / Library for .Net / C# by Pdgboeku</title>
		<link>http://www.florian-leitner.de/index.php/2007/08/03/hid-usb-driver-library/#comment-3287</link>
		<dc:creator>Pdgboeku</dc:creator>
		<pubDate>Thu, 03 May 2012 22:25:32 +0000</pubDate>
		<guid isPermaLink="false">http://florian-leitner.de/wordpress/index.php/2007/08/03/hid-usb-driver-library/#comment-3287</guid>
		<description>Could you ask her to call me? http://apokyebob.de.tl beautiful model pics  Watched this s few times. I want to be the last one to fuck her then lick her pussy clean!</description>
		<content:encoded><![CDATA[<p>Could you ask her to call me? <a href="http://apokyebob.de.tl" rel="nofollow">http://apokyebob.de.tl</a> beautiful model pics  Watched this s few times. I want to be the last one to fuck her then lick her pussy clean!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on HID USB Driver / Library for .Net / C# by Pnuiqimv</title>
		<link>http://www.florian-leitner.de/index.php/2007/08/03/hid-usb-driver-library/#comment-3286</link>
		<dc:creator>Pnuiqimv</dc:creator>
		<pubDate>Thu, 03 May 2012 03:00:40 +0000</pubDate>
		<guid isPermaLink="false">http://florian-leitner.de/wordpress/index.php/2007/08/03/hid-usb-driver-library/#comment-3286</guid>
		<description>What university do you go to? http://iqyufucacak.de.tl black exotic models  Another thing why the fuck is his dick limp man i would be fuckin rock solid just looking at her bro........</description>
		<content:encoded><![CDATA[<p>What university do you go to? <a href="http://iqyufucacak.de.tl" rel="nofollow">http://iqyufucacak.de.tl</a> black exotic models  Another thing why the fuck is his dick limp man i would be fuckin rock solid just looking at her bro&#8230;&#8230;..</p>
]]></content:encoded>
	</item>
</channel>
</rss>

