Hi,
For the hardware connection, please refer tohttp://www.seeedstudio.com/forum/viewtopic.php?f=18&t=1112&hilit=XBEE
For the code, I think after
“Serial.begin(38400);”
then
“Serial.print(”\r\n+STWMOD=0\r\n");
Serial.print("\r\n+INQ=1\r\n");"
is ok.
May this helpful to you, and let me know if you have any question.
Regards,
-Icing