Reputation: 172
I am new to Android and just started working with Android 4.0.3. which enables USB Host connection. I'm trying to send some signal via USB to a camera, let's say it is supposed to be some characters that the camera has to receive and e.g. start recording. I wanted to do it via controlTransfer(), but I am unable to understand what each part of the logic of this method means. I've checked many fora, but everywhere I see it people keep refering to it as if it was obvious. What is the request ID, value and index? Or maybe there is some other approach to the problem that I don't know. I know for sure that you can send a signal via USB from Linux terminal to that camera and as android has a linux kernel so maybe the way to go would be to start a terminal and do it the Linux way? Thanks for any tips :)
Upvotes: 3
Views: 3443
Reputation: 3029
controlTransfer()
intended to send commands via control endpoint (endpoint 0). Request ID, index and value and part of USB protocol. Please refer to http://www.beyondlogic.org/usbnutshell/usb6.shtml#SetupPacket for more information.
Do you has protocol description for your camera? I suppose, you need to use other endpoint (as described in camera protocol) to send characters to a camera.
Upvotes: 1