Transmit Problem with XBee API

Transmit Problem with XBee API.

XBee module: XBee24-B

I’ve tried to send an API-frame from an end-device to the coordinator.

This is my API-frame:

7E-00-09-01-01-00-00-48-65-6C-6C-6F-09

API-Identifier: 01 so its an 16-Bit-Adressierung

ID: 01

Address: 00 00 for the Coordinator

“Hello” as data and the checksum 09

I get no response and nothing has arrieved at the coordinator.

Can somebody help me to solve this problem?

What is the firmware version? This will positively ID what the API frame should be.

I believe you have a Series 2 module with ZB firmware so I’ll use the Digi Document 90000976_C.

The Frame should decode as:

7E start

00 09 length

01 frame type = ???

01 frame ID

00 00 ??address???

48 65 6C 6C 6F data = ‘Hello’

09 checksum

A frame type of 01 does not exist in the XBee firmware. See Table 9-06 on page 84 of the above document.

You want to use frame type 0x10 to send data embedded in the frame. See page 88.

Also it needs the 64bit address of the coordinator, 0x0000000000000000 or 0x000000000000FFFF for broadcast.

The frame should be:

7E-00-15-10-01-00-00-00-00-00-00-00-00-FF-FE-00-00-48-65-6C-6C-6F-FD

Try this and see if it works.

firmware versions

Coordinator: 1120

End device: 1320

i think the versions are not correct, cause i tried to send your frame and nothing happened.

can i download new versions from digi.com?

Use XCTU. It will download firmware for you.

updates are done. but there is no new version for xb24-b.

The best I can tell those versions are ZNet 2.5 firmware and seem to be the lastest.

These are covered in the Digi document #90000866:

XBee™ ZNet 2.5/XBee-PRO™ ZNet 2.5 OEM RF Modules

Product Manual v1.x.4x - ZigBee Protocol

For OEM RF Module Part Numbers: XB24-BxIT-00x

ZigBee OEM RF Modules by Digi International

Firmware Versions: 1.0xx - Coordinator, Transparent Operation

1.1xx - Coordinator, API Operation

1.2xx - Router, End Device, Transparent Operation

1.3xx - Router, End Device, API Operation

90000866_C.

The 0x10 frame is on page 63.

The API frames seem to have the same structure as the API frames in the 90000976 document.

Double check the checksum to be sure I calculated it correctly.

As you have found, if there is anything incorrect in an API frame it is ignored without any error message.

This may be helpful:

http://www.jsjf.demon.co.uk/xbee/xbee.html

It is for the Series 1 modules but has some good info.

Another:

http://www.faludi.com/itp_coursework/me … grade.html

There is a Digi User Support forum that has good info. Somewhere on it there is a downloadable Excel spreadsheet that calculates the checksum and frame size that is handy. Also a lot to be learned by just reading the many posts.

http://www.digi.com/support/forum/listf … sible=true

I have not had good luck with broadcast and default 64bit addresses. So try putting your coordinator’s 64bit address into the frame and re-calc the checksum.

I programmed the xbees now with the xb-24zb firmware for the coordinator and the end device.

In the attached picture you can see my configuration.

I tried this frame End-device → Coordinator:

7E-00-16-10-01-00-00-00-00-00-00-00-00-FF-FE-00-00-54-78-32-43-6F-6F-72-64-FC

I took this frame out oft the Digi Document 90000976_C.

Same problem, the end-device get no response and the coordinator no received frame.

Please help me!!

So try putting your coordinator’s 64bit address into the frame and re-calc the checksum.

I run ZB firmware and have gotten API working from the coordinator to an end device. I’ll look at this closer when I am home tonight. In the mean time try my suggestion above.

Just another thought: is the API mode = 1 or 2. It should be 1.

Second try with 64bit address of the coordinator:

7E-00-19-10-01

now the address: 00-13-A2-00-40-2D-7B-71

FE-FF-00-00

data: 48-65-6C-6C-6F

end the checksum: EF

whole frame: 7E-00-19-10-01-00-13-A2-00-40-2D-7B-71-FE-FF-00-00-48-65-6C-6C-6F-EF

Result: it doesn’t work.

Do I need also a router?? may thats the problem?

gandus90:
Do I need also a router?? may that’s the problem?

I don't believe so but you could put router firmware in the device to try.

Ok lets look at your frame with the 64bit address:

7E-00-19-10-01-00-13-A2-00-40-2D-7B-71-FE-FF-00-00-48-65-6C-6C-6F-EF

The checksum is correct but the frame length should be 0x0013 not 0x0019. These values are in HEX not decimal.

Frame type 0x10 is Transmit Request, ok

0x01 ok

The coordinator’s Address of 00 13 A2 00 40 2D 7B 71 is ok.

16bit address or unknown: 0xFEFF, this is wrong it should be 0xFFFE

broadcast radius: 0x00 = max #hops, ok

options: 0x00 = unused, ok

Data: 0x48, 0x65,0x6C,0x6C,0x6F = “Hello”, ok

Checksum 0xEF ok for the bytes in this frame and will not change with the above two corrections.

The frame should be:

7E-00-13-10-01-00-13-A2-00-40-2D-7B-71-FF-FE-00-00-48-65-6C-6C-6F-EF

Does this work?

no :cry: :cry:

I also tried it with a broadcast and a higher baud rate.

Ok, lets back up.

What device is connected the the remote XBee? A uProcessor? Which one?

A different PC serial port? What is the interface level translator?

In X-CTU there is a ‘Save’ Profile button. This saves all of the XBee parameters to a text file. save these and post here so I can look at all of the set-up.

What Baud rate are you using?

Try sending a data request from the coordinator to the remote, an “ATIS” command. to see if the remote responses.

As I’ve said, if there is one error in a frame the frame is ignored without any error.