Ahsan-AhsanS wrote:
I have no idea about which protocol to use.Can you kindly send me just a simple code so that i might be able to work on it.
Regarding the protocol it doesn't really matter since you control both sides you can do what you want. It all depends on what your requirements are, e.g. if you're just sending a file then all you could potentially do is open the port, send a query string, e.g. "OK?", if the PDA returns "OK" back then simply send the entire file with a checksum at the end. If the checksum matches all well and good, if not then resend. That would be the simplest solution (although I suggest sending it in blocks of say 0x100 bytes and checksum each of these blocks so you don't have to resend the whole file. If the serial port is being used for other stuff as well then you'd have to make it a bit more complicatated, (e.g. replace the "OK?" with "SendFile?", if it can be sent then it responds with an Ack ("OK") and you perform the previous steps). As for the simple code, I'm sorry I don't have time, I have my first (final) A-Level module tomorrow.
You know you're a Land Rover owner when the best route from point A to point B is through the mud. Ed