Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 02-03-2014, 11:35 AM   #1
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,604

Rep: Reputation: 51
libusb: usb_control_msg. This is all you find in the net abuot usb_control_msg. First, the number of parameters is two more than in the device request. Example:
int usb_control_msg(usb_dev_handle *dev, int requesttype, int request, 
int value, int index, char *bytes, int size, int timeout);
If you put timeout=0 then usb_control_msg will wait forever. Does it say so in the libusb documentation. Surely, but where?

Last edited by unSpawn; 02-04-2014 at 03:35 PM. Reason: //remove fake vBB tags before move.
Old 02-04-2014, 06:52 AM   #2
Registered: Dec 2013
Location: Turin, Italy
Distribution: slackware
Posts: 327

Rep: Reputation: 73
function returns int number of bytes read or written, there are only two pointer, so *dev should be the device and *bytes the buffer; because you linked the prototype, i think sources haven't more infos
Old 02-04-2014, 08:13 AM   #3
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,604

Original Poster
Rep: Reputation: 51
Very little. The parameters


really correspond to


in table 9-2 of the USB 1.1 specification but there is wLength also in the table. Besides, for the rest of the parameters, there is no documentation that I know of, certainly not in the site. So for the designer it's a matter of guessing?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
usb_control_msg send extra '0x00' bytes niekvanagt Programming 0 01-22-2013 04:44 PM
LibUSB on PIC18F4550 jeanCarloMachado Linux - Newbie 2 10-27-2011 01:56 AM
[SOLVED] usb_control_msg data inside module Jyke Linux - Kernel 1 09-20-2011 09:23 AM
want to use libusb in C, but confused ... cjh21017 Linux - Software 3 06-16-2011 05:32 PM
[SOLVED] ubuntu 9.10 - #include <libusb/libusb.h> stonehinge03 Linux - Newbie 5 04-20-2010 09:02 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:42 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration