Go Down

Topic: Data over XBee works for a few seconds then stops... (Read 7 times) previous topic - next topic


Wait, these are hardware pins you're talking about.

Are you saying take data from/to them? Ground them?


These are the pins on the XBee. The CTS will be high whenever his buffer is full and cannot take more.
I think with the rate you are transmitting, it will be better to know whether XBee is ready to take in more data.


Right, you're saying to measure it to see what's up.

So it should never go high? Or rather, if I see it go high, there's a problem?

What would be the solution to that problem, if it's the 'transmitter' xbee that's overflowing?


The CTS pin will go up and down depending on whether it is ready to take in more data.
Take a look at page 13 of the datasheet.
If the XBee is not ready (CTS high), all the data that you send from the Arduino on the serial to the XBee will be ignored/dropped. You are running at quite high serial baud rate right?

In your data packet, do you have a packet number? Like a free running number that increases over time (and overflow)? This can be used to indicate whether all packet are received at your receiver end (PC side).


I'm only running at 57600 (it was originally 115200 but it would dropout after a couple seconds).

The thing is, with the call/response the transmitter is only sending data when it receives a packet back (and vice versa for the computer), so nothing should overflow that way (I would think).

I'm guessing the 'response' part of the message is getting dropped periodically, so going back to just streaming data might be more reliable, but that's how I was getting dropouts at the start anyways.

I'm not packing a packet number in, so unless the xbee is, there isn't one. I've tried to keep the messages as small/tight as possible, so I'm sending all my sensor values as bytes. I'm sending a 20-byte message per 'go', though I'm sure the xbee sticks some stuff on top of that for what it does.

Go Up