Forums Register Login

getting data from serial port device

+Pie Number of slices to send: Send
Hi,

I am sending a command to a device to retrieve data from that device.After writing a command to the device i will wait for some time(Response time ---> Thread.sleep(100)) to get the response form the device.But some times i will get the data from the device for that particular response time , but most of the times i won't get the data.

If i set the response time Thread.sleep(1000) i will get the data , but it 's not a good programming .

I need good solution to solve the problem.Please help.
I found a beautiful pie. And a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 842 times.
Similar Threads
Java Socket buffering problem and nonblocking
How to transfer file from PAD to PC through internet
Serial Port App Design Question
Serial port question
listener or sleep(time) for JSP?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 01:18:03.