We tried to make two Xbees communicate with each other. One Xbee module(configured as transmitter) is connected to one PC (PC1), and the other Xbee module(configured as receiver) is connected to another PC (PC2). Using HyperTerminal of PC1, we tried sending multiple characters (e.g. my name is myriel kaye torres 1234567890) through Tx Xbee. We monitored the serial data received by the Rx Xbee thru HyperTerminal of PC2. If we send the characters, it will be received correctly by the Rx Xbee as shown in the HyperTerminal of PC2, but when we are not transmitting, we are still receiving garbage characters like in the image below. How can we delete the garbage characters so that the only received data will be the one that we sent? Any suggestions? Thank you very much!
I had a similar problem recently with an XBee device receiving an unexpected sequence of six characters while not receiving anything while in transparent mode. It's not too easy to track this down because the diagnostic "pitch mode" isn't mentioned in the datasheet but after discussions with Digi support once I was aware of the name I tracked down this knowledge base article:
I was using a Sparkfun XBee Explorer Regulated and as mentioned the RSSI line was connected to a LED to ground pulling the line low that caused it to enter that mode. I removed the current limit resistor R4 connected in series with pin 6 and it solved the problem. But of course if you're using a different product the reference designators will be different so check the schematics for the particular board you're using.
It might be a lot easier than what I've said immediately below if Xbee supports "seamless" data transmission and reception but, if it doesn't then below is probably the bottom-line.
It's probably a case of you not transmitting a recognizable frame of data. You need to format your data (packetize it) into a frame with a header and quite likely an error check field. Then you may well have to send a preamble (before the frame) that allows the receiver to recognize that a frame is about to begin and correctly align itself. You can send a fixed length frame or you can embed the frame length into a header (usually straight after the preamble). Now, your receiver will know when the data begins and when it ends. Get writing some code. If the frame is in error (error check bits) then you'll need to develop a retry mechanism system.
Alternatively, and I'm no expert on Xbee, look for a mode of operation that does this for you. Plenty of RF transceivers offer "seamless" modes of communication and the packetizing stuff is all down for you - read the data sheet to find out what xbee offers in this area.
You do not say how do you send data to the XBee device. If you send data directly to the XBee device's serial line using hyperterminal it's not likely to work because your device is configured in API mode (which I can tell because every packet in API mode starts with
In order for your data to be sent through, you need to use a library that handles xbee API mode communication in your favorite language. I have written such a library a while back in C++ (which may not be the best, that one is newer and certainly better), or in python or …
Another solution would be to reconfigure your XBee using X-CTU to use the AT command firmware so you can send data through easily using a simple terminal. Though the AT commandset are less complete than the API mode commandset.
Though if you do communicate in API mode with your XBee, and still see that kind of garbage, then that's because you may have noise in your signal and all the packets coming gets shifted by a few bytes making it impossible to read from. Check the schematics, the wiring etc… That happened to me with a chip having a broken ground pin that made a false contact if the device is being moved/touched when transmitting. Random bytes were read in the middle of a datagram, making the CRC failing, and all the following datagrams impossible to read…