Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
Have you handled the parity bit/stop bit/data bits per byte/Baud rate issues correctly?
When you say that it writes a random number of bytes per write(), are you measuring this by what you see on the serial device itself, or the return value from the write() call, or both?
Are you doing synchronous input/output, or asynchronous input/output? Which one?
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:
Originally Posted by wjevans_7d1@yahoo.co
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.
Have you handled the parity bit/stop bit/data bits per byte/Baud rate issues correctly?
When you say that it writes a random number of bytes per write(), are you measuring this by what you see on the serial device itself, or the return value from the write() call, or both?
Are you doing synchronous input/output, or asynchronous input/output? Which one?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.