Serial Communication between XBee using Arduino

However you have not told us exactly what happens when you try that pair of programs

I mentioned my question in Reply #28 but, I'll state again for your easiness. I'm using a Sainsmart XBee-Arduino Shield which is used to make communication between XBee and Arduino. So there are two jumpers on that shield stating USB/XBEE. So when you have to upload an Arduino Code place the jumpers in USB Mode and when you want to make communication wirelessly, switch them to XBEE Mode.

So, when the jumpers are in USB Mode, the transmitted code is working fine and I'm able to take input from the user. But, when I'm switching the jumpers to XBEE Mode, neither it accepting any serial input nor it is displaying anything at the receiver end (which I understand since it didn't take any input at transmitter end so how it will show anything at the receiver end). So, do I have to apply some similar code I applied at the transmitter end on the receiver side as well or I'm missing any function or library because of which communication will be possible (I have no idea if I would be missing as I'm having zero experience with XBee)?

Assuming your array data[]is sent correctly then what is received in the payload are the bytes that make up the array. This is a wild guess, but it may work.

Yeah, kind of you are correct. As on the transmitter end if I'm sending from the router (say) 6, and the coordinates are (123,230). So the data which is sent is visible as 5412344230, which means, 54 is the ASCII value of symbol '6', 123 and 230 are the coordinates of the random location and 44 is the ASCII value of ','. So we can understand the coordinates with the help of seeing the ASCII value as 44. So we are sending a data array but at the receiver, we are taking it bitwise and because of lack of knowledge, I'm not able to figure out how to receive the data as sent.

... I'll need a little time to figure this out - will reply again asap

Sure, you can have your time and meanwhile, I also search for some option by searching through some pages and groups available online. I'll update immediately if I get anything.