Hi Mike,
But the request from dequeue data is not more than 1024bytes where the queue has more 2000bytes. how increase the request size of the dequeuedata request size. how to control enqueuedata and dequeuedata paramenter requests.
The behaviour is like..
read(fd, buf, 2048); <== request from application
Driver calls ==>
dequeuedata(buf, size(1020), count(0), min(1), port);
dequeuedata(buf, size(980), count(0), min(1), port);
in this way im recving to dequeuedata calls...
instead I expect or require as
==> dequeuedata(buf, size(2048), count(0), min(1), port);
how to control this call...
please guide me...
Thanks for the reply...
-Sachin.
----- Original Message -----
Sent: Saturday, December 06, 2008 10:54 AM
Subject: Re: Increase read buffer size.
On Dec 5, 2008, at 8:49 PM, Sachin Kumar wrote:
I am developing a usb driver based on IOSerialStreamSync and IOSerilaDriverSync. Where normal serial application can access my driver and communicate with the
device.
Normally read and wite is working fine when sending and receiving data less than 1k. If more than 1k the behaviour is different.
If Iam sending 2000 bytes using write
As we expect the driver gets the call to enqueueData with request size of 2000bytes at once, but its not. It gets called two times with 1024 once and remaining with second call. So to avoid this chunking, I have created private
IOCTL to send data from application to the driver with wanted bytes to transfer on usb pipe. This solved my write issue.
You should not do this. Your driver needs to be prepared to receive writes of any size, and to buffer internally as required. You really don't want to be implementing "pretend" read/write system calls using ioctl.
In read when the data is recieved the dataReadComplete is called with 2000bytes. fine. But in dequeData the request data is again
chunking, as the result the read is called two times for 2000bytes. Iam unable to read more than 1024 from the driver at once . By maing some changes in dequequeData tried to send more data from the driver but failed, system crashes.
Is there any settings from user level to increase the read buffer size...
Please help me.. if you have not understood my question please let me update.
What you're seeing is correct behaviour for a serial device and I/O Kit.
= Mike
The information contained in this email and any attachments is confidential and may be subject to copyright or other intellectual property protection. If you are not the intended recipient, you are not authorized to
use or disclose this information, and we request that you notify us by reply mail or telephone and delete the original message from your mail system.
|