Would like to check whether anyone can share what will be the coding for serial communication between the Zigbee modem?
I have the zigbee development kit, and it is connected to the zigbee modem, with the Port D of the microcontroller connect to pin 2, 3 of the modem, which for TX_out and RX_in repsectively.
I have a camera which control using asy serial communication connected to the remote zigbee modem pin2 and pin3.
I am using the Dynamic C for programming, and would like to know what code should I use to select the modem and transmitt the camera command from the microcontroller thr the zigbee modem to the camera.
Is just transmitting the command on port D on the microcontoller will do? I believe i need to do some setting on the destination and MY address, but how should I go about it?
Had been trying to look for example on the manual, but seem like most of the coding is on setting of the modem.
Hope someone can give me some highlight here.
Thanks a lot.
Both module can be programmed by the x-ctu software. Assuming you are having XBee ZB modules, One should be programmed as coordinator and other should be programmed as router. The xbee module at remote side should work as router.
Now, if you select by default setting on the x-ctu software than only Channel and PanID need to be set, which can be set by SC (using bit mask) and ID parameter respectively.
Than you need to start the coordinqtor first and than router. This will be broadcast transmission.
For unicast transmission, you can set DH and DL of router as SH and SL of coordinator and vice versa.
But zigbee support maximum over the air data rate upto 250 kbps, so, camera data transfer through zigbee is not the right way, unless you are using less frames /per second through the camera.
Want to ask does it matter if I use series 1 or series 2 Xbee module? As I am having the series 1 xbee module.
And when you said setting the channel, Pan ID, DH, DL and SH SL, you mean set using X-CTU, right?
Do I need to activate anything on the porgramming code under Dynamic C for the application kit?
I understand the low data rate of Zigbee module, and I am planned to use the module to transfer the data of a jpg file. Hope it will work and I will go and try on your recommendation. Thanks.
One more question I wanted to ask, if I required dual communication, mean microcontroller to xBee modem, then X Bee modem to camera, and a reply from the camera replied back though the xBee modem, how should the setting of the xbee module be?
Thanks
These settings also applied to the XBee series 1, but does not need to join the network, and does to require Coordinator to start the network. Therefore you can make peer to peer network.
And Both the Series 1 and Series2 modules supports Bidirectional communication, once the configuration as I have mentioned is done.