The easiest method would be to use I/O Line Passing. This lets you toggle a pin on one XBee and have it follow on another. There are a lot of examples on how to do this on Digi's Examples Page here: examples.digi.com
The disadvantage is that you get no feedback as to whether it worked...
If you need feedback and want to remotely control the remote pins using a command string, then you're looking at running API on at least one radio and using a "Remote AT Command".
The frame type is 0x17, and you can see how it's assembled using the API Frame Maker
, or the "Next Gen" version
Here's an example for you:
I want to set the output of DIO0 of a remote XBee from LOW to HIGH. It's address (SH and SL) is 0013A200 12345678.
Using the frame maker, I set the following:
Frame Type: 0x17
16DestAddr: FFFE (unless you're using ZigBee, it will always be FFFE)
CmdOptions: 2 (there's a typo in the frame maker, setting this to 2 will apply changes immediately)
AT Cmd: D0
AT CmdData: 5 (HIGH)
The frame that gets generated is: 7E 00 10 17 01 00 13 A2 00 12 34 56 78 FF FE 02 44 30 05 A6
When this is sent as HEX into the XBee connected to my PC, it will set D0 to HIGH on the remote XBee.
I will also get a response frame back:
7E 00 0F 97 00 00 13 A2 00 12 34 56 78 FF FE 44 30 00
The 00 near the end indicates that it went through successfully; this frame is your ACK.
Finally, if all you care about is reading the remote I/O lines (whether they are high or low, or analog inputs), you can sample this data: http://www.digi.com/support/kbase/kbaseresultdetl?id=3522
The Series 1 is a little weird when it comes to sampling, but this should give you a starting point.
Hope this helps!