Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
All messages have this list of parameters (take note of the buffer var) :
device handle, 0x21, 0x9, 0x200, 0, <buffer>, 8, 1000
The buffer var is the command portion. All buffers have 8 bytes.
A stop message (sent at least after any command to signal a stop) has bytes of all 0's (character '\0' or a integer value of 0)
A movement/fire message is the same except for the first byte which is either a 1, 2, 4, 8, or 16. After all movement/fire commands you will want to wait for some timeout before sending the stop command. For movements I wait for 50000000 nanoseconds and for a fire I wait 5 seconds.
I'm still looking at cleaning this up into a kernel module at sometime so that I don't have to worry about permissions and knowing what position it starts in. As with everything, time is the enemy that prevents things from getting done.
If anyone can figure out how to get the device to give back information would help me in that.
I'm still trying to read from the device as well. I cannot find anything in the libusb documentation nor the usb spec which is helpful. There is a hint in the libusb examples section telling us to look in some camera drivers that they link to. However, school has started so I am rather busy and dont have time to put enough effort into digging through their code to get anything useful out of it. Also, I doubt that a camera which needs a sustained transfer would work in the same way as this little guy, which presumably just uses control messages. However, there may be is something useful in the camera config and discovery mechansims.
maniaq: if you want to know the error string associated with the number code, just do a strerror(errnum) (unix error codes are positive, but for some reason the libusb guy flips the sign, so you need to flip it back)
If I set up an SVN or CVS server, would either of you use it? Communicating like this is kinda inefficient, we need to share code.
okay...my professor is giving me dirty looks for not paying attention, gotta go.
For the device we are using, the index value is always 0. If memory serves, I believe the index had something to do with a predefined command for a given usb device class. Since the device we were using didn't fall into any of the usb device classes, it wasn't any use for us.
As I am not really an expert on it, and it was about a year since there was any movement on this on my part, I can't really say for sure. I seem to remember that index was the only bit of information that my sniffer didn't tell me.
You might try reading the usb specification at www.usb.org. I wouldn't bother with libusb's documentation. It is a single step on the far side of useless.
For the device we are using, the index value is always 0. If memory serves, I believe the index had something to do with a predefined command for a given usb device class. Since the device we were using didn't fall into any of the usb device classes, it wasn't any use for us.
As I am not really an expert on it, and it was about a year since there was any movement on this on my part, I can't really say for sure. I seem to remember that index was the only bit of information that my sniffer didn't tell me.
You might try reading the usb specification at www.usb.org. I wouldn't bother with libusb's documentation. It is a single step on the far side of useless.
That's true. The index for my case is 0 too. I use sniffusb to generate the code. Hic
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.