Click here to Skip to main content
15,921,382 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please tell anyone, suppose total size of is 2560 bytes.i want send each time 256 bytes and get acknowledgement "Send successfully".After getting messege it will send next 256 bytes till 2560 bytes send successfully.
Posted

1 solution

Then you need to look at doing a bit more than you sending the data - you want to look at handling the DataReceived event (in conjunction with a timer) and sending the next block only when you have a valid reply. It's not difficult: just set up an output stream (for example) and send a block. Set the timer to show when the response failed, and when you get a serial port response, decide if it is an ok (so send another block), bad data (so repeat the block) or cancel (report an error and fail the send)
I can't write it for you - I don't know what is connected to the other end of the serial wire and what it responds with. It's pretty basic stuff, though.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900