Dear Nidhal,
What you are trying to do could be achieved with the application templates included in BeeKit. Depending in the hardware being used (MC1323x or KW2x) you should select the proper BeeStack (ZigBee) codebase, where you will find several examples including a ZigBee Home Automation On/Off Light and On/Off switch. The new project’s wizard will guide you through basic configuration and settings (node type, MAC address, channel, etc) before exporting it to IAR.
You will be able to load such solutions to your development boards and start sending ZigBee On/Off commands right away using board’s push buttons. The light is emulated by the on-board LEDs. For further details about how to use the demo, please refer to the Freescale ZigBee™ Application User’s Guide for ZigBee 2012 and 2007 included in BeeKit’s documentation folder.
If you would like to use an external tool to send the over-the-air (OTA) commands, you could implement a parser converting such custom commands to ZigBee function calls as you may see in the application’s source code.
Another approach would be to use the ZigBee Test Client (ZTC) in your On/Off switch board. The ZTC layer would let you send commands serially to your board, that will be converted to ZigBee OTA commands. You could test such commands using TestTool 12 command console. For further details please refer to BeeStack™ BlackBox ZigBee™ Test Client (ZTC) Reference Manual included in documentation folder too.
Regards,
AngelC