Forum >HELP, how to reduce delay&lost sending data
HELP, how to reduce delay&lost sending data

Please help me for my thesis,
I have an pulse sensor, arduino R2 combine with xbee S2 (router mode api) on sender side and xbee S2 (coordinator mode api) and arduino R3 on receiver side (arduino connect to computer with USB A-B to read the received data and show on processing.exe). On sender side it can be send data up to 7-10 packet per second (example pasket S9881, B9880), but on receiver side can't receive all data in real time, there to much delay and lost data, (e.g. on receiver sent S9881, B9880, S9880, B9888 but on receiver side usually just one or two packet can be received)
it just point to point connection, what a big problem if the delay and lost data can't be reduced when I use mesh topology.
please someone help me
I have an pulse sensor, arduino R2 combine with xbee S2 (router mode api) on sender side and xbee S2 (coordinator mode api) and arduino R3 on receiver side (arduino connect to computer with USB A-B to read the received data and show on processing.exe). On sender side it can be send data up to 7-10 packet per second (example pasket S9881, B9880), but on receiver side can't receive all data in real time, there to much delay and lost data, (e.g. on receiver sent S9881, B9880, S9880, B9888 but on receiver side usually just one or two packet can be received)
it just point to point connection, what a big problem if the delay and lost data can't be reduced when I use mesh topology.
please someone help me
2012-07-20 19:13:02 ok, so if you notice that on XCTU you are not receiving the full string of sent data, it is a problem of Xbee. Sorry, I am not very familiar with Xbee protocol. You should look on Xbee forum for help.
But I think, maybe if you slow down the Bps settings on your arduino you might have more success. First get this working on XCTU, then try other modifications.
Your buffer should be an array you define in your code. So just make sure its big enough to capture all the data you might send in 1 go.
Hector
But I think, maybe if you slow down the Bps settings on your arduino you might have more success. First get this working on XCTU, then try other modifications.
Your buffer should be an array you define in your code. So just make sure its big enough to capture all the data you might send in 1 go.

2012-07-20 07:25:54 first : yes , I use arduino uno R3 on receiver side. but I think it's not onl from arduino, because I've try to send data by this format:
sender : xbee + arduino uno r3 that connected via USB to computer A
receiver : xbee with xbee explorer that connected via USB to same computer (computer A)
and I try to send data via terminal on XCTU (I try to send a, and I get fast reply, but if I send a long string e.g. qwertyuiop, there will be a delay to receive that and sometimes the feedback I just got qwyp)
second : and how to increase the buffer on arduino code (I use arduino with xbee on AT mode),
third : I want to use receiver with xbee only to computer via USB (without arduino board), but I dont know what I must modify on the code on my processing code, I dont really need the processing, cause I just use the processing to connect the data sent by xbee to my database (I use MySQL)
uyacakra
sender : xbee + arduino uno r3 that connected via USB to computer A
receiver : xbee with xbee explorer that connected via USB to same computer (computer A)
and I try to send data via terminal on XCTU (I try to send a, and I get fast reply, but if I send a long string e.g. qwertyuiop, there will be a delay to receive that and sometimes the feedback I just got qwyp)
second : and how to increase the buffer on arduino code (I use arduino with xbee on AT mode),
third : I want to use receiver with xbee only to computer via USB (without arduino board), but I dont know what I must modify on the code on my processing code, I dont really need the processing, cause I just use the processing to connect the data sent by xbee to my database (I use MySQL)

2012-07-18 19:10:25 Hi,
On the receiving side are you using a regular Arduino?
If so, you might be having a conflict between the USB cable and the Xbee. An Arduino only has 1 serial port which is used for USB communication, and can also be used for Xbee communication, but it only allows 1 at a time.
If you need to do this I would recommend using an Arduino MEGA as it has 4 serial ports you can use.
I recommend this shield as it breaks out 3 of the comm ports for use with an Xbee: [url=https://www.dfrobot.com/index.php?route=product/product&path=123_129&product_id=560]MEGA Expansion shield[/url]
Another reason you might be loosing data is due to the way in which you might be storing the received data. You might need to optimize that code. Make sure the buffer is large enough, and that you are not overflowing what ever data type variable you are using.
Hector
On the receiving side are you using a regular Arduino?
If so, you might be having a conflict between the USB cable and the Xbee. An Arduino only has 1 serial port which is used for USB communication, and can also be used for Xbee communication, but it only allows 1 at a time.
If you need to do this I would recommend using an Arduino MEGA as it has 4 serial ports you can use.
I recommend this shield as it breaks out 3 of the comm ports for use with an Xbee: [url=https://www.dfrobot.com/index.php?route=product/product&path=123_129&product_id=560]MEGA Expansion shield[/url]
Another reason you might be loosing data is due to the way in which you might be storing the received data. You might need to optimize that code. Make sure the buffer is large enough, and that you are not overflowing what ever data type variable you are using.
