I am currently working with Xbee series 2 Zigbee modules for my application. For the initial test and setup of the application, I tried to do a point to point between two of these modules. I configured one Xbee as Router AT, set the PAN ID, set destination ID as 0x0 (to communicate to the coordinator). I then connected this router to a mbed microcontroller over UART and wrote a simple program to transmit characters. I then took the other Xbee, connected to X-CTU and setup as Coordinator AT with same PAN ID. Following this I switch X-CTU to console window (to monitor messages from router) and then switch on my microcontroller+Xbee router. This arrangement works perfectly with me receving messages in console.
Following this, I look to switch off my router, and update function set of coordinator to Coordinator API. I make no changes to router config and let it remain in AT mode. After updating to API, I follow the same process, i.e., switch to console window on X-CTU and power on the router. However, in this case, I seem to be getting no data transmissions from the router at all.
Having observed this, I decided to revert back my coordinator to the AT mode. However, surprisingly now, even with the coordinator switched back to AT mode, I see no messages from the router at all. I was very confused because of this, and decided to do re update the firmware on the router to change to router AT(no real reason, just trying to get back to some working mode). Things started working now, which makes no sense at all. I am certain about the functioning of the UART interface on microcontroller, and so I assume this is something to do with the Xbee config.
What is the issue that I am missing here? Is it even possible to have router in AT mode and coordinator in API mode?(I assume it should be)
I am really stuck here people. Really appreciate any inputs.
P.S. One more piece of info, I ensure whenever I update the function set, I uncheck the “Force the module to maintain its current configuration” checkbox. Not sure if this info is useful.
The very important item you missed is that each time you change the coordinators firmware, you start a new network on a new channel and 64 bit PAN ID. To resolve the issue, set the coordinator to the desired function set. Then issue a Local Network Reset (ATNR0) on your router. This will cause the router to drop its current network settings and search for the coordinator on the new network.
Thanks for your input. Makes sense. One clarification though : Does this mean that there can two different Zigbee networks with the same PAN ID, but maybe on different channels? Coz I assume that is what happens in the situation I am in
Yes. You can have different networks all using the same ID value all on different channels. Or even on the same channel just with different OI and OP values.
Thanks a lot for your response on this. I have been able to get the system setup with the coordinator and router both in API mode working. I am also able to send out data from the router to the coordinator.
I have another query though. I am running into issues trying to send back data from coordinator to router. The method I use is as follows - I basically what I was trying to do in my earlier test as mentioned above. The microcontroller on the router is continuously polling for data on the UART port. On the coordinator side, with X-CTU running on my PC, I work in the console mode and create the following packet for transmit :
7E 00 19 10 01 00 13 A2 00 40 E7 3F 26 68 C7 00 00 4A 65 6C 6C 6F 20 57 6F 72 6C 64 60
I transmit this packet at the console window, but my microcontroller at receiver end doesnt receive anything. As a sanity check, I configured a 3rd Xbee in router mode and connected to a different microcontroller. This router was also able to join the network and send data to coordinator, but when I tried using the same packet as above (with the hope that the newly added router is able to send data to the other router), it didnt work either.
I think I am missing some basic setting or something here. Request appreciate your inputs on this.
First, try setting the 16 bit address to 0xFFFE in the API frame.
Next, what is your API status packet indicating is going on?
Instead of connecting to a processor, just connect the 2nd xbee to an interface board and your PC using XCTU. You should still get a response. That is you can have two radios connected to the same PC but on different ports. By doing this, what is sent on one port should show up on the 2nd. That is if they are on the same network and the packet is value and for it.