public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Splitting USB-Packets
@ 2005-04-13 14:07 Fuchs, Torsten
  2005-04-13 21:41 ` Frank Pagliughi
  0 siblings, 1 reply; 3+ messages in thread
From: Fuchs, Torsten @ 2005-04-13 14:07 UTC (permalink / raw)
  To: ecos-discuss

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

^ permalink raw reply	[flat|nested] 3+ messages in thread
* AW: [ECOS] Splitting USB-Packets
@ 2005-04-14  8:24 Fuchs, Torsten
  2005-04-14 14:34 ` Frank Pagliughi
  0 siblings, 1 reply; 3+ messages in thread
From: Fuchs, Torsten @ 2005-04-14  8:24 UTC (permalink / raw)
  To: Frank Pagliughi, ecos-discuss

Hi,

I'm using a philips ISP1583 with a self-written driver in a digital camera to implement the PTP (Picture transfer protocol). So there are only bulk and some interrupt transfers. The hardware does not send the zero packet automatically. Modifying the device driver is not the problem but getting a flag through the overlying slave package, that I want to use. It seems I have to modify it and be no more compatible to the original package. I just wondered if no-one had the problem of splitting larger packets into pieces until now. 
The PTP-Standard says that the first short or zero packet ends the transfer, so I think there is no other way than modifying the driver.

The host side is a PC or MAC. I did not know that WinXP breaks up the packets in smaller units when they exceed a certain size. But relying on this "feature" is not a safe way for the device.

Torsten Fuchs


-----Ursprüngliche Nachricht-----
Von: Frank Pagliughi [mailto:fpagliughi@mindspring.com]
Gesendet: Mittwoch, 13. April 2005 23:41
An: Fuchs, Torsten; ecos-discuss@sources.redhat.com
Betreff: RE: [ECOS] Splitting USB-Packets


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


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-04-14 14:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-13 14:07 [ECOS] Splitting USB-Packets Fuchs, Torsten
2005-04-13 21:41 ` Frank Pagliughi
2005-04-14  8:24 AW: " Fuchs, Torsten
2005-04-14 14:34 ` Frank Pagliughi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).