>You probably hit the second case: no control request was
>pending, since the previous write() completed the response.
>("No process was expecting that response!")
>
>Try leaving debug messages on in gadgetfs for a while.  Normally,
>only "interesting" paths like faults (and some initialization
>or shutdown actions) cause messages.  Or there's "VERBOSE"...
>
>- Dave

Thanks for the suggestion.  I did try incorporating the data into the
existing loop, and it was able to write to the buffer.  However, the
host didn't recognize that as 'mouse movement'.  I referred to other
sources regarding this problem, it seems that the data I am trying to
send is not in response to a control request, so incorporating the data
into that main loop will not work (the host polls by sending an IN
packet alone - no control request.)

I decided to write the mouse movements by creating a separate thread,
and an additional interrupt-IN endpoint in gadgetfs that the host can
poll, which will create a separate fd to write the mouse movement bytes
to.  However, it seems that I am still having problems with "write" -
this time in ep_config.  

When ep_config is called from the simple_source_thread function, it
correctly opens a new fd for this endpoint.  Memcpy -ing the endpoint
descriptor data returns a pointer to memory, as it should.  However,
when the function enters the 
        status = write(fd, buf, (4+USB_DT_ENDPOINT_SIZE);
portion of the code, I receive the EBUSY error. From consulting the
gadgetfs kernel code, it seems that ep_open is having a problem such
that the endpoint data->state is not entering STATE_EP_DISABLE loop as
it should be to write the data.  It appears to me that the data
structure and inode values are filled in without my knowledge, and are
not attributes that I can set.  Is there a way to set this in the user
level code initially so that the endpoint will configure properly?

Thanks,
Colleen



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to