Hi Iam using 3 arduino Fio in combination with XBEE S2. One of them is set as a coordinator and the other two as end-devices.
the two end-devices are measuring sensor data and save these in an array of 20. after this the enddevice should transmit the content of this array to the coordinator.
I set up 19200 as Baudrate and i use the modules in AT-Mode and the problem is, that the coordinator received the data but not completely that means some data are lost. I tried to decrease the Baudrate to 9600 –> same problem.
After this is connected by wire the arduino without XBEE (RX/TX-Pin) to test and the transmission was great.
My question what can be the problem? How i can solve this?
Do you have the XBee in an End device roll?
Yeah the enddevice is connected witrh the arduino fio. This arduino has the socket for this
Milito, what I mean is what firmware version is installed on the XBee module? Is the SM command set to a value greater than 0?
Hi yeah i have the newest firmware and the SM value is equal to 4 that means cyclic sleep. What i did is i tried to use no sleep but for an enddevice this is not possible. After this i uploaded the firmware as router and set the SM = 0(no sleep) and now it looks like that works.
So i guess its because of the cyclic sleep is it true? that when i want to send the data the module needs some time to wake up and because of this not all data are sent to coordinator?
You are close. Yes, it is because you were using a sleep mode. But if you use hardware flow control, you can then use sleep modes as you will know when the radio is awake and when it is asleep keeping you from loosing the data.
ok that means i should turn on cts floe control in xctu and flash the device as end-device? Or I should change something in the code?
Another question iam using the broadcasting mode and when the two enddevices send at the same time data to coordinator some data are lost too? What can be the reason? Or is there a method to solve this problem?
That means that if you want the radio to be sleeping, you need to first enabled CTS and RTS flow control in the radios firmware. Next enabled in your code CTS and RTS flow control. Then you need to connect the lines between the processor and the XBee.
Otherwise if you do not want the radio to sleep, just use it as a router.