You can also do an acknowledge and retry. Error checking only tells you that the received data is bad. One scheme goes like this.... 1. Sender transmits data block (packet) with CRC or checksum 2. Receiver checks CRC or checksum. If OK, it sends a short "ACK" message back. If bad, it sends a "NACK" (not ACK) message. ACK and NACK are defined by you. 3. Sender retransmits the message if a NACK is received. 4. If NEITHER ACK nor ACK is received in a certain time, it sends the original again. 5. There is usually a MaximumRetry value after which the sender gives up. Jim On Feb 16, 2008, at 7:27 AM, David Kelly wrote: > > On Feb 15, 2008, at 10:06 AM, bhadson2001 wrote: > > > i am recieving data from serial port of PC to AVR. sometimes > > controller recieve data different. i am using 4 byte frame to > > recognize a particular command. sometimes it picks up different > > command. what will i do to solve the problem. > > 1) get a better radio link. > 2) build in error checking on your data packets > 3) investigate redundant and self-correcting codes > 4) all of the above > > Of course, "all of the above" is what wireless is all about. > Otherwise it would be too easy and everyone would think they could do > it. > > -- > David Kelly N4HHE, dkelly@HiWAAY.net > = > = > ====================================================================== > Whom computers would destroy, they must first drive mad. > > > [Non-text portions of this message have been removed]
Message
Re: [AVR-Chat] how to avoid data loss in wireless using avr
2008-02-16 by James Wagner
Attachments
- No local attachments were found for this message.