Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

how to avoid data loss in wireless using avr

how to avoid data loss in wireless using avr

2008-02-15 by bhadson2001

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.
                             
         kindly help me.

Re: [AVR-Chat] how to avoid data loss in wireless using avr

2008-02-16 by David Kelly

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.

Re: [AVR-Chat] how to avoid data loss in wireless using avr

2008-02-16 by James Wagner

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]

Re: [AVR-Chat] how to avoid data loss in wireless using avr

2008-02-16 by Tom Becker

> ... 1) get a better radio link.

Do I misunderstand that Bluetooth will not deliver received data that 
has not been validated?  A few years ago we did some simple range 
testing with several Bluetooth radios.  At a distance that was greater 
than the expected range, a packet was handed to each transmitter and the 
radio was walked toward the receiver until the packet appeared at the 
receiver output.  Each time, as I recall, the correct data was 
eventually produced.

Is not Bluetooth "error free" if it is communicating at all?



Tom

Re: [AVR-Chat] how to avoid data loss in wireless using avr

2008-02-16 by dlc

What are you using?  I've used Bluetooth and XBee and neither have ever 
given me bad data (no data at all when out of range though.)

DLC

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.
>                              
>          kindly help me.
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 

-- 
-------------------------------------------------
Dennis Clark          TTT Enterprises
www.techtoystoday.com
-------------------------------------------------

Re: [AVR-Chat] how to avoid data loss in wireless using avr

2008-02-16 by David Kelly

On Feb 16, 2008, at 4:02 PM, dlc wrote:

> What are you using?  I've used Bluetooth and XBee and neither have  
> ever
> given me bad data (no data at all when out of range though.)


The OP sounded like a school assignment (typical plea for help with  
no details as to how anything is being done) so I gave a broad all- 
encompassing generic answer.

Bluetooth, Zigbee, and 802.15.4 are much higher level communication  
protocols than the OP's "4 byte command packet." We have no idea  
whether he has a bidirectional interface. We know he doesn't have  
error detection other than the device behaves wrong when the wrong  
data is received. So we are pretty confident in guessing he doesn't  
have error correction.

Suggested reading: http://en.wikipedia.org/wiki/ 
Forward_error_correction and http://en.wikipedia.org/wiki/ 
Error_correction

--
David Kelly N4HHE, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.

Re: [AVR-Chat] how to avoid data loss in wireless using avr

2008-02-16 by David Kelly

On Feb 16, 2008, at 10:39 AM, Tom Becker wrote:

> Do I misunderstand that Bluetooth will not deliver received data that
> has not been validated?  A few years ago we did some simple range
> testing with several Bluetooth radios.  At a distance that was greater
> than the expected range, a packet was handed to each transmitter  
> and the
> radio was walked toward the receiver until the packet appeared at the
> receiver output.  Each time, as I recall, the correct data was
> eventually produced.
>
> Is not Bluetooth "error free" if it is communicating at all?


A problem with Bluetooth is that it has tried to be everything to  
everyone, and got so bloated no one without a huge budget can afford  
its overhead.

Based on my readings several years ago Bluetooth has accurate  
delivery methods for what you describe above but also has guaranteed- 
rate delivery which sacrifices data integrity. Drop a few bits in  
your Bluetooth headset and the last thing you want is for them to be  
delivered accurate but late. You'd rather just drop them and move on.

--
David Kelly N4HHE, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.