Invalid frames problem

I’m having an issue where all of the sudden my receiving Xbee will stop receiving frames after I take it out of range and back in again. I think I was able to recreate the problem by closing and re-opening my serial terminal in XCTU. I didn’t realize what was happening until I opened the frame filter tool and included “invalid frames” I saw then that I was indeed receiving frames (the Rx frame counter was still going up), but that all the frames were “invalid” and my data was scrambled. To break it down further:

• Going out of range or receiving through certain non-line-of-sight conditions result in some packet loss.
• Sometimes after packet loss, no more packets are received unless I change the data contents of the packetized AT transmission.
• In XCTU, the receiving Xbee shows invalid frames after closing and reopening the serial connection.
• The invalid frames appear similar to expected data, but are somehow out of sync
• Changing the transmitted data does not work in XCTU. The invalid frames show up looking like the changed frames, but scrambled as before.
• If I repeatedly disconnect and reconnect the serial connection in XCTU, I see good frames after a few tries.
• My good strings are supposed to look like this: 0$ 0.24156* • Whereas the invalid frame data is showing up like this: }33$0$ 0.24156* (Line return) £

And to elaborate on my settings and methods:

• Remote device is in AT mode, hardware serial. Packet sizes range from 3 to 13 and sometimes more
• I’m using API mode on the receiving side because I sometimes have to call a remote AT command to wake my remote arduino.
• I’m using cyclic sleep on the remote Xbee, and keeping it awake at all times by continually sending data except when I put the remote arduino to sleep.
• Between sleep cycles, the remote xbee sends a packet containing D0 high or low. D0 is not connected to anything. This serves as a sleep indicator.
• My send loop takes about 21ms to iterate.

Which XBee modules are you using?
Can you tell me part number and FW version of modules?

Sure, thanks for your help. I’m using a pair of Xbee Pro S1’s (802.15.4)(XBP24-AWI). The transmitting Xbee is in AT mode and the receiving end is in API so that I can use it to make remote AT commands. Firmware version is 10ef.

I can find a way to send you my settings profiles and a serial log of valid and invalid frames, if that would help.

So which side is getting the garbled data? Is it the API side or the transparent side?

The transmitting Xbee is in AT mode and the receiving end is in API mode.

Do you have any ideas on what might be wrong here?

What is the data that is coming out of the UART of the receiving radio? Does it begin with a 7E?

It’s been awhile, and I’m back to tackling this problem. The recieved data normally begins with 7E, but the invalid frames read like this:

Invalid frame (API 2)

00 7D 33 81 00 33 24 00 60 30 24 2D 31 2E 37 30 31 38 33 2A 0D 0A A3

RF data: 00 7D 33 81 00 33 24 00 60 30 24 2D 31 2E 37 30 31 38 33 2A 0D 0A A3

Looks like you left off the 7E for the frame.

The correct frame would be 7E 00 7D 33 81 00 33 24 00 60 30 24 2D 31 2E 37 30 31 38 33 2A 0D 0A A3 which then shows the data being 60 30 24 2D 31 2E 37 30 31 38 33 2A 0D 0A