Emanuele Maiarelli | 13 Sep 2007 12:16
Picon

Re: Unable (to (sends?)/recive from bulks endpoint.

i've tried all solutions, but things dosen't change.
This is the the pice C of code on usb device handling EP1 (Cypres FX2LP):

...
   if(!(EP1OUTCS & bmBIT1))
    {
        char cmdbuff[10];
        int cmdsize=0;
        int i;
        int bitcount= EP1OUTBC;
        BOOL stc=FALSE;
        BOOL done=FALSE;
        int c=0;
        while ((c<bitcount) && cmdsize<10 && (!(done)))
        {
            if ((stc) && (EP1OUTBUF[c]!=0x03))
cmdbuff[cmdsize++]=EP1OUTBUF[c];
            if (EP1OUTBUF[c]==0x02) stc=TRUE;
            if (EP1OUTBUF[c]==0x03) done=TRUE;
            c++;
        }
        if (cmdsize>0)
        {
            if ((cmdbuff[0]=='S') && (cmdbuff[1]=='N'))
            {
                EP1INBUF[0]=0x02;
                for (i=0;i<9;i++)
                {
                    EP1INBUF[1+i]=_SNO[i];
                }
(Continue reading)

Dan Streetman | 13 Sep 2007 15:45
Picon

Re: Unable (to (sends?)/recive from bulks endpoint.

If you still think the device isn't getting your data, I recommend
first tracing the data with Linux's built-in USB data monitor.  If
that shows the data being transferred, I think your next step is
probably getting a USB bus trace machine to really verify that it's
being sent.  Although, I will say that I think it's very unlikely that
Linux is dropping the data silently.  If your data did not get to the
device, javax.usb should give you a error code.

I think it's much more likely that you may be either getting the
device's protocol wrong or simply leaving out command(s).  Maybe you
should get a Windows (software) trace of *everything* going to/from
your device (not just your one specific command) and compare that to a
Linux monitor (software) trace of what you are sending to/getting from
your device.  That is a lot cheaper than getting a hardware bus
tracer.

If you do want to get a hardware bus tracer, I have used most of the
CATC (now owned by LeCroy) bus tracers.  They are all fine tracers,
with relatively good analysis software.  However they are *expensive*.
http://www.lecroy.com/tm/products/ProtocolAnalyzers/usb.asp?menuid=67

I've also used the USB 2.0 model of Ellisys bus tracer.  It's a fine
tracer that will get the job done, but the analysis software is not at
all as good as the LeCroy software.  But, it's a lot less expensive
than the LeCroy tracers.
http://ellisys.com/products/usbex200/index.php

If you're looking for a bus tracer that isn't multi-thousands of
dollars, I have seen one or two around that are "only" in the hundreds
of dollars, but at the time I think it was only USB 1.1 bus speeds,
(Continue reading)


Gmane