output control


I have 2 cards xbee series 2.
I have made the connection betwwen these 2 cards and I`m able to receive the values from an analog sensor. the coordinator is in API mode and the End Device in AT mode. With the IR=2000 the End Device xbee sends the values reads from sensor and transmit to the Coordinator periodly.

How can a made a connection to control the output pins? (example: to make HIGH the output DO0. DO0 by default is Low).

A have read, it is possible to send a frame who can modify the state of an output. My question is … the coordinator and the end device need to be both in API mode? If yes, how look a frame for doing this?


Both Xbees need to be in API mode. One coordinator the other a router/end point. Firmware will need to be set on both. See documentation on how to structure API frames (commands). You should be able to set and query the registers on a remote node using the 'Remote AT command Request". This command is a little different on query vs set.
You will have to get the 64 bit and 16 bit address of the remote node. see ND command. below is an API frame to set the DO2 pin high. However it is not working for me. If you get it working please let me know.

7E 00 10 17 12 00 13 A2 00 40 5C E7 3D 3F 1B 02 44 32 05 8F

0x7E - delimeter
0x00 0x10 = length
0x17 = API type
0x12 = Frame ID
0x00 0x13 0xA2 0x00 0x40 0x5C 0xE7 0x3D = 64 bit address
0x3F 0x1B = 16 bit address
0x02 = change now
0x44 0x32 = D2 command
0x05 = set to option 5 - DO-High
0x8F =checksum

I have gotten my API command to work. I was not getting the correct checsum… so a command frame like the one from my above post will work if you generate the correct checksum.