Re: Simple iso code isn't sending any data at all (not even a request)?

Chris E <[email protected]> Fri, 12 Jun 2015 13:42:49 +1000
Newsgroups gmane.comp.lib.libusb.devel.windows
Message-ID <CALmGtgRD_2Hm9BHk15tkg_rFrrdTwqNYC+LyW30zYRm7SEvDmA@mail.gmail.com>
Thank you very much for your help.
For reference, I have found out what was causing the error code 57 when
resetting the pipe.  It was just a case of dodgy enumeration.  I'd
accidentally set bNumEndpoints to 0 but supplied an endpoint descriptor.  I
believe this is why it saw an endpoint with type, direction, endpoint
number etc. but couldn't access (still unsure about 470, which persists).
Quite embarrassed about that.

I am going to attempt a bulk implementation, like you suggested, and just
not use the device on a busy bus.
Hopefully there's more luck there!

Thank you once again,
~Chris

On 10 June 2015 at 15:34, Xiaofan Chen <[email protected]> wrote:

> On Wed, Jun 10, 2015 at 8:02 AM, Chris E <[email protected]> wrote:
> > That would only work for oscilloscopes with an external display or
> > triggering, wouldn't it?
> > To view and log waveforms in real time you'd need to stream data.
> > Bulk could be used with some sort of handshaking attached, but samples
> would
> > be lost if the host doesn't request packets regularly.
> > The microcontroller I'm using has only 2kB of RAM (only about 1kB of
> which I
> > can reserve for the USB buffers) and I plan on sending 500kB/s per
> second to
> > the host, so if a new 500 byte packet isn't sent each frame then
> everything
> > will get corrupted.
> >
> > Unless Bulk transfer can more or less "guarantee" a packet every ms on a
> > not-so-busy bus?
>
> Actually there will be multiple packets if you use Bulk transfer
> on a not-so-busy bus. For full speed USB Bulk transfer, the
> limit is 19packets x 64Bytes/packet per ms (1 frame)=1216Bytes/ms.
> Usually you will not be able to achieve 19 but I have seen 16
> (1024Bytes/ms).
>
> Ref: http://www.microchip.com/forums/m417509.aspx
>
> Maybe you wan to read the USBTMC standard to see if that is
> what you need. No isoc transfer is used.
> http://www.usb.org/developers/docs/devclass_docs/USBTMC_1_006a.zip
>
> Or some introduction.
> http://www.ni.com/tutorial/4478/en/ (either USBTMC or USB raw, but no
> isoc transfer support for USB raw).
> http://sigrok.org/wiki/USBTMC
>
> In a word, you do not need to use isoc transfer for your
> USB oscilloscopes. But whether you can support 500kB/s
> to the host depends your implementation, it is certainly
> within the theoretical limit with USB Full Speed using bulk
> transfer.
>
>
> --
> Xiaofan
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Libusb-win32-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>

------------------------------------------------------------------------------

_______________________________________________
Libusb-win32-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel