RX buffer and XBee data limits

Hi,

I am trying to interface my Arduino with a computer using Xbee series 1 modules, sending and receiving data on both sides.

Currently I'm using the Arduino Messenger library to send strings of data. I am having troubles getting decent data rates and reliability, and I'm wondering how to improve things. I'm currently using the Xbee's at default settings.

One problem is that it seems really easy to cross the limit of data the xbee is handling. With a normal USB cable things are fine, but once the xbee modules are used I really need to watch out. If I send too much data the connection easily freezes for a few seconds or completely jams forever so it seems.

Could this be related to the RX buffer on the Arduino, or is this likely to do with my xbee configuration?

The second problem I'm experiencing is that if I set the xbee at anything higher than baud rate 38400 it seems to corrupt the data, even though the Duemilanove and xbee should be able to handle this easily. Is this an indication that something is wrong?

I just read a little about the xbee in API mode, but I don't quite understand if this is related to what I want to do. So I guess my questions are:

  • Would it help to increase the RX buffer size, and how would I do that?
  • Do I need to run the xbees in API mode in order to optimize the data throughput?
  • Why is the connections jammed if i send to much data? Isn't there any check to prevent overload freezing on the xbee / arduino and just drop additional data or instead?

I hope I'm not asking too many questions :slight_smile: This stuff is all new to me.