write() error
hi everybody,
while writing data to the serial port it writes random no of bytes every time we write using the write () what will be the problem in this |
I refrained from answering up to now, because I wanted this question to remain on the "Zero Replies" list until perhaps some expert saw it.
But the question is over 24 hours old, so I'll give it a shot. I have three questions.
|
thanks for ur reply.
actually i solved the problem by omitting the non blocking mode parameter while opening the serial port(O_NDELAY). but now i got problem in read() ie.,it does not reads the whole data which is written to the serial port once again thanks... Quote:
|
You may not get all the data on the first read(). You may have to do more read()s to get the rest of the data.
|
actually it is reading the whole characters but the characters at the position which are the multiples of 64 is not readed correctly.ie., at the position 64,128,192,256 etc...
actually i am connecting a fullspeed USB device. |
I'm afraid I can't help you here. I'm hoping someone else will enter the conversation.
But to move the conversation along a little, what happens to the 64th character? Is it completely missing, so that you get 63 characters out of every 64? Or is it changed to something else? Or what? |
the read operation is not behaving as expected .ie if we write 64 characters means it reads zero chracters but if we write characters between 65-127 means it reads whole characters which are written. again the same problem in 128(i,e multiples of 64).
please help me as soos as possible because i need the solution urgently |
I'm not really sure I can help at all. Since no one else has jumped into this conversation, if you need the solution urgently, you may wish to turn to other resources for help.
I'm particularly confused because my understanding of the symptoms as you relate them in post #5 is completely different from those you relate in post #7. |
All times are GMT -5. The time now is 01:30 AM. |