xBee series2 zigbee API and terminal

Hi, I have worked I lot with xbee series2 zb in AT mode without having throubles. Now I need to switch to api mode but I'm having problems.
I put one xbee as coordinatorAPI and the other as routerAPI or ruterAT and open two terminal on x-ctu, one connected to the coordinator and one to the ruter.

1)Why if I send messages from the coordinatorAPI to the routerAPI or AT nothing compare on the router terminal?
2)Why if I send messages from the routerAPI to the coordinatorAPI nothing compare on the coordinatorAPI terminal?
3)Why if I send messages from the routerAT to the coordinatorAPI I can see the message on the coordinatorAPI terminal?

I have tried using broadcasting address or destination specific address but nothing changes. Pan address are also ok.

Thanks in advance for your precious help.

Not sure what exactly you are doing, but maybe this will help - when you are using a serial terminal to "type" into an AT-configured xBee, that data will just get sent to the receiver. But if you are sending from an API-configured xBee, the data must be encapsulated into a datapacket. I am not sure you can do that by just typing - you'd need to send binary data. The easiest way to do that is to write a processing (or java, or arduino) sketch and use the xbee library to handle all the API work for you.

yes, I am sending api packet (with header, payload and cheksum). I am writing the HEX values in X-CTU terminal. My question is: Is it ok that I do not see received packet on the receiving radio terminal if they're sent on API mode?

The way I handled going to API mode is to set one device to coordinator AT and another to router API. I could then broadcast from the coordinator AT and the router API would output the data to XCTU. From there I constructed a packet by hand and sent it from the router API to the coordinator AT. I only did this once and then wrote code to support sending an API frame. It was too darn hard adding up all the bytes for the checksum.

You absolutely can mix modes on these devices. One can be in API mode and the other can be in AT and they will talk just fine. You can tell when you have successfully constructed a frame on the API device because it will hand back a transmit status packet (unless you have that turned off) If you properly construct the frame and broadcast it from an API device an AT device will receive it and send just the payload out the serial pins. I used broadcasts for initial testing for this reason, I could see the frames being sent. Take a look at my XBee page for some addressing problems I had that kept a network from being established properly and the solution I found. draythomp.blogspot.com

Another item that helped me get my network running as I wanted it to was to put the coordinator in a device that was not used much and I could easily monitor. My coordinator is in AT mode and serves to do a tiny amount of work and a whole lot of coordinating. My device that I process and collect data from is a router API hooked to a mega2560 with the serial running at 57K. Notice that you can also have each XBee running at a different baud rate, the radios and the serial lines are independent in this fashion.

Regarding the XBee library. I don't use it yet and may not. I couldn't figure out how to get it to work with alternate serial ports, as on the mega boards, and also couldn't get it to work with version 10C of NewSoftSerial. Connecting and disconnecting it from the usart serial port is to darn inconvenient when you're changing the code every couple of minutes trying some new idea. Also, the routines and such in the library were hard to understand how to use. For example, I use API mode 1, not 2; I don't use the start sentinel or other characters that need to be escaped communicating, so why add the confusion?

My single hardest problem to overcome is the darn checksum at the end. For some reason that just gives me fits.

cantore:
yes, I am sending api packet (with header, payload and cheksum). I am writing the HEX values in X-CTU terminal. My question is: Is it ok that I do not see received packet on the receiving radio terminal if they're sent on API mode?

No, it is not ok. Even in API mode you should see the received packet (it will be in the hex bytes). I am working with one coordinator and several endpoints, using the xbee library for arduino as interface.
Check out the digi manual (http://ftp1.digi.com/support/documentation/90000976_G.pdf), they have examples of api messages queries and responses in chapter 9.

thanks