Web lists-archives.com

Re: [Spca50x-devs] Need Help-Is_host_pipe_error()




On 10/22/07, George Neil C <georgeneils@xxxxxxxxx> wrote:
> Hello,
> I am trying to read a global register of my webcam using ATMEL AVR USB MCU[AT90USB1287]. The MCU has detected the camera and allocated pipes and is running in the host mode. I am using a sample audio_host_project provided by ATMEL which can stream data from USB Microphone. Now
>
> http://www.atmel.com/dyn/resources/prod_documents/at90usb128-demo-host-audio-1_0_0-doc.zip

I would recommend staying away from Atmel-provided code.  Their
license agreements (see
Atmel/at90usb128-demo-host-audio-1_0_0/at90usb128/demo/host_audio/LICENSE.TXT
in the ZIP file you referrenced) are usually very restrictive so you
would not, for example, be allowed to modify their code and
redistribute it.  Also, their licenses are usually very incompatible
with the GPL so you could not use GPLed code (such as the GSPCA
driver) and Atmel-provided code in the same binary.

Instead, I suggest you look at the MyUSB project
(http://www.fourwalledcubicle.com/MyUSB.php).  It is a GPLed USB
library for the AT90USB1287 chip.  I've written a keyboard driver that
I plan to release shortly, which uses MyUSB.

> In the firmware i have used a macro to read from a global register. But gives  me only a pipe_error
>
> #define spca5xxRegRead(address)        (usb_request.bmRequestType = 0xC1,\
>                                         usb_request.bRequest      = 0x00,\
>                                         usb_request.wValue        = 0,\
>                                         usb_request.wIndex        = (U16)address,\
>                                         usb_request.wLength       = 1,\
>                                         usb_request.uncomplete_read = FALSE,\
>                                         host_send_control(data_check))
>
> and the
>
> /**
>  * host_send_control.
>  *
>  * @brief This function is the generic Pipe 0 management function
>  * This function is used to send and receive control request over pipe 0
>  *
>  * @todo Fix all timeout errors and disconnection in active wait loop
>  *
>  * @param data_pointer
>  *
>  * @return status
>  *
>  * @note This function uses the usb_request global structure as parameter.
>  * Thus this structure should be filled before calling this function.
>  *
>  */
> U8 host_send_control(U8* data_pointer)
> {
[...]
> }
>
>
> Now the MCU is in the  Is_host_pipe_error() stage. What may be the possible solutions..??

Not having much experience with Atmel's host audio driver, I don't
know.  As I mentioned above, I would suggest you stay away from
Atmel's code due to the licensing restrictions.  Try re-implementing
your code on top of the MyUSB code
(http://www.fourwalledcubicle.com/MyUSB.php).  Dean Camera, the author
and maintainer of MyUSB, would be happy to help you out.  You can
contact him at dean [at] fourwalledcubicle [dot] com.

If you have any questions specifically related to interfacing with the
GSPCA driver, or if you are using parts of the GSPCA driver in your
firmware, then this list is the right place to post them.

Denver


> George Neil
> Design Engineer
>    E-Smart Satellite and Telecommunication
> GCDA Complex, Kerala
> India.
> Pin: 682031
> Telephone: +91 484 2352310
> Fax: +91 484 2364850

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Spca50x-devs mailing list
Spca50x-devs@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/spca50x-devs