[ECOS] Splitting USB-Packets

Frank Pagliughi fpagliughi@mindspring.com
Wed Apr 13 21:41:00 GMT 2005


Which USBS device/driver are you using? Does the hardware automatically send
the zero packet? I assume not, so you could modify the driver for your
specific application - if that's what you really want to do. I've been
working with Philips chips, where you have to send the zero packet
explicitly. And you do *need* to do this by default, especially if you're
using the higher level File I/O functions.

BTW, are you talking about Bulk transfers?

And what are you using on the host side? I don't know that low-level USB
functions guarantee undivided packets back to user mode code (or even upper
level drivers). In a Windows XP device driver I just wrote I would see Bulk
IN packets broken up by the underlying bus driver when they were around the
4kB page size. That would require repeated read() calls by the application
to reconstruct the full packet, sort of like reading a TCP stream.

Frank Pagliughi

-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org]On Behalf Of Fuchs,
Torsten
Sent: Wednesday, April 13, 2005 10:07 AM
To: ecos-discuss@sources.redhat.com
Subject: [ECOS] Splitting USB-Packets


Hi,

I need to send or receive large amounts of data via USB using the usbs
slave. The data sizes can under certain circumstances be larger then the RAM
in the system so I have to split the data into blocks. From the hosts point
of view there shall be only one big USB-packet.

Receiving is not a problem but transmitting. When sending multiples of the
maximum packet size (64 Bytes) the device driver generates a zero length
packet to end the data transfer. So the host sees an interrupted packet. I
need an option to supress the generation of this zero length packet to
continue the transmission with another call of usbs_start_tx. Only the last
block should be finished with a zero length packet.

Every modification would not be compatible to the slave package so how can I
solve this problem? In my opinion there should be an additional flag to
enable/ disable the generation of the last packet by the driver.

Thanks
Torsten

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss




-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list