if you actually are sending Xbee commands in the format you speficied in your last comment-

Quote

XBee.println(ATKYWORD);

Then that's wrong. I can't speak from personal experience as I have never used an XBee, but I've used a couple of other arduino shields that recieve AT commands (3G shield, cell shield) and I know that those commands have to be enclosed in quotes within the serial.println commandi.e.

nid69ita your code works well. Just have some fails if you use number instead characters for password, something like this: "password11". I will try to solve it. Thank you.

I wrote XBee.println(ATKYWORD);, I already know it fails because it has not enclosure for ATKYWORD.

I have no problems to write password in define in hexadecimal but my program will be use by people who doesn't know what hexadecimal is, so I cannot do that. They can be able to write a word as their password and after that, program will convert it.

I have all my commands in defines so ATKY represents "atky" actually. WORD will be the password... I just meaned the way commands are sent to XBee.

I didn't post code just because I didn't have any code for that. I was trying to convert the sentence to start to do a function for that but I haven't the program yet.