title: C++ send data with libusb (working with RS 232)
body: <p>I'm sending 199 151 2 3 3 7 63 173 174 block to serial port and got success.
  But when i do it with libusb nothing happens. No error or nothing happens. </p>
  
  <p>here how i send data to serial (RS 232):</p>
  
  <pre><code>unsigned char data[9];
  //filling data
  RS232_cputs(comportNumber, &amp;data[0], 9); //success
  </code></pre>
  
  <p>here how i send data to usb</p>
  
  <pre><code>//endPointAdressIn = 2;
  //timeout = 0;
  
  for( int i = 0; i &lt; 9; i++ )
  {
       libusb_bulk_transfer(deviceHandle, endPointAdressIn , data, 3, &amp;actual, timeout);
  }
  </code></pre>
  
  <p>Is there a protocol difference between usb and serial RS? If i send same data serial and usb, cant i get success?</p>
  
  <p>I've found something like that:</p>
  
  <p>when they send data to serial, sending char by char. when i sending it serial i also do like that. But they send same data to usb they'are adding two chars for each:
  for 199 151 2 3 3 7 63 173 174 data, they are sending
  2 1 199 
  2 1 151 
  2 1 2 
  2 1 3 
  2 1 3 
  2 1 7 
  2 1 6
  2 1 3 
  2 1 173 
  2 1 174</p>
  
  <p>They'are i also tried it like that:</p>
  
  <pre><code>transferredData[0]=0x02;
  transferredData[1]=0x01;
  
  for( int i = 0; i &lt; 9; i++ )
  {
      transferredData[2] = data[i];
  
      return_value = libusb_bulk_transfer(deviceHandle, endPointAdressIn , transferredData, 3, &amp;actual, 0);        
  }
  </code></pre>
  
  <p>i have added 2, 1 for each my data member and i send it like that. And also nothing happened. No error or nothing in my hardware.</p>
  
  <p>So what am i doing wrong?</p>