xbee api transmission test

Hi my aim is to transmit some data from remote place to some another location. For this i am using xbee s2 module.

Modem type is XB24-ZB.
XCTU version is 5.2.8.6

I configured both in command mode and able to communicate.

Now i want to use it in API mode.

I one as coordinator API mode with dl an dh =0.
and another as router as a router AT with dl and dh of coordinator.

PAN is same for both i used 4567.

I am using xbee library.

i am transmitting data from router to coordinator.

In this case:

  1. Some time i did not get data at coordinator. means data is not available.

and after resetting or removing and fitting again xbee without any change in configuration as well as code

  1. Some i get error UNEXPECTED_START_BYTE.

In this case when saw on XCTU i can their are two frames
data is like (direact from xbee out)

7E 00 25 90 00 13 A2 00 40 B7 A1 6f 21 2C 41

[quote]
7E 00 14 10 01 00 7D 33 A2 00 40 B7 A1 73 FF FE 00 00 01 02 03 04 43 31 B3

F7

[/quote]

you can see i am getting response frame with data but data is complete transmit request sent from router .i.e.

7E 00 14 10 01 00 7D 33 A2 00 40 B7 A1 73 FF FE 00 00 01 02 03 04 43 31 B3

  1. Some times i get no error but data is corrupted in frame only actual data which i have sent not frame.

I am not able to understand, Why?

Please help…

You have Transmit request frames and an explicit receive frame (0x90). I don’t see a response to the TX request frames.

I am not getting response also but receiver is able to receive data, the response packet which i have given here is captured from receiver side.

Thanks

what can be problem?

Invalid frame. Try using Digi’s frame generator located at http://www.digi.com/support/kbase/kbaseresultdetl?id=3215 to help you find the issue.

yes i calculated frame from the tool, i am getting same frame
Just now calculated again.
7E 00 14 10 01 00 13 A2 00 40 B7 A1 73 FF FE 00 00 01 02 03 04 43 31 B3 which i am sending.

How to add picture here? I will show you the image.

Just to make sure it is only the data being received that is corrupted correct and not the frame?

" Just to make sure it is only the data being received that is corrupted correct and not the frame?"

I did get it?
corrupted correct???

Once more what I am doing.

I am sending data using transmit frame( 0x10) from router configured as router AT:
i.e.
7E 00 14 10 01 00 7D 33 A2 00 40 B7 A1 73 FF FE 00 00 01 02 03 04 43 31 B3
In this I should get response but I am not getting it.

Still I am receiving data using received response(0x90) at receiver. This receiver is configured as coordinator API ( API 2)

I am getting data at receiver also but it is

7E 00 25 90 00 13 A2 00 40 B7 A1 6f 21 2C 41
7E 00 14 10 01 00 7D 33 A2 00 40 B7 A1 73 FF FE 00 00 01 02 03 04 43 31 B3
F7

here you can see their are two frames one is receive response(0x90) and its payload is complete transmit request (0x10).

due this when i receive it using xbee lib function i get error UNEXPECTED_START_BYTE

What i think, this is due to second time 0x7E is coming in payload.

Am i correct ? Please help me to come out from this…

no what you are seeing is correct. The reason for that is your router who is sending the frame is in transparent mode. That means data in = data out. So as far as the Coordinator is concerned that is in API mode, the API frame you provided the Router in its UART is Data and would be in the data portion of the RX packet.