I have setup a netduino with a xbee shield(end device). The other xbee is connected to a computer to receive the output(co-ordinator).
Now i have a loop in tthe code in the netduino where i send data from to the computer. It is the same data everytime(this is to test that i can commnicate using the xbee).
When i start the netduino, the computer never receives the netduino xbee packets until after a few seonds(5-20secods).
So if the netduino sends 20 packets the receiver usually only receives that last 10 or so packets!
The xbees are setup in Zigbee Explicit format (AO=1). It appears that the xbee doesn’t send the first few packets for some reason.
I tried waitng for 10seconds and the first packet is still not sent.
I am using a zigbee packet sniffer so the packets are definitely not being sent.
Weird…if i send a packet from computer to the netduino, the packets from the netduino start being sent to the computer? Do i have to tell the xbee to flush the buffer or something?
Ok, V2170 Firmware is a ZigBee Coordinator in API commands.
Your other XBee is then running as an End Device, Firmware Versions: 2970 or 2870, API or AT mode.
Which version is the End Device running.
Are you properly formatting the API Frames being sent (if the End Device is API)? If there is anything wrong with an API Frame the XBee will silently ignore the Frame.
The xbees are setup in Zigbee Explicit format (AO=1).
I use AO=0, have you tried this?
Is the AP command set to 1 (not using escaped characters)?
Have you monitored the End Device Association?
I know that it can take some time before a device is associated and is ready to send data. This time can vary depending on several factors.
Ah…another thought! An End Device normally Sleeps and the firmware versions I use an End Device Always does sleep. This can greatly increase the time to Associate. See the SM command.
Load Router Firmware into the XBee connected to the netduino. A Router still has the option to sleep if it is needed.
Using End Device 2970 firmware. How do i wake up device if a sleep. Will try to make end device not sleep to see if this fixes the problem. Packets are in corect format b/c i have verified this.
Also going to investigate the time to Associate…is this only relevent for a Router?
Read Chapter 6 of the XBee doc on Managing End Devices. There is info on different methods of handling Sleep.
If the XBee is in Sleep the CTS line is de-asserted (high) so the processor can poll that line (connect to a processor input) to know when the XBee’s UART will accept data.
Check the CTS, and Sleep lines with a scope.
There really isn’t any reason not to use Router firmware. This is what I use for the XBee on my Robot.