Home/Support/Support Forum/Python with API and AT mode
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Python with API and AT mode

0 votes
Hi I'm new to this and would like some help please.

I have ConnectportX2 and 2 ZNET 2.5 modules both loaded with ZNET 2.5 Router/End Device AT firmware (1 on RS232 interface board and 1 on USB intrface board each connected to 2 different computers). I ran the "hello world" program from the zigbee socket example and it worked fine. Then i changed the firmware on both modems to ZNET 2.5 Router/End Device API and tried the same thing and cannot get it to work. The program runs fine cos i dont get any errors, but i cant see "hello world" on the specified endpoint .. API is enabled on both modems. Can someone please share some light on what i'm doing wrong or how i can test my modems in API mode.

Thanks in advance
asked Jul 30, 2009 in Python by meme New to the Community (42 points)

Please log in or register to answer this question.

5 Answers

0 votes
What application are you trying to see "hello world" in?

Since you've configured the XBee's for API mode, you'll need some API interface (typically a program) that understands the API packet coming across the wireless network, and strip the data from and display it.

If you have no such program, set the modules back AT, i.e. "passthrough" mode.
answered Aug 6, 2009 by Admin Veteran of the Digi Community (732 points)
0 votes
I'm using XCTU.
When i ran the "hello world" program that uses sockets (not the basic one), the modem was loaded with AT firmware like i said, and i was able to see "hello world" in the terminal tab. I changed the firmware to API in the modem confirguration settings and enabled API in pc settings, then did the same thing in running the program, and i got nothing on the terminal tab.

Are there any programs i can use to understand the api packet coming, strip that data and display it? Or any examples of such programs? I want to use API because i want to be able to know the desitnation + other info that data is coming from.
answered Aug 6, 2009 by meme New to the Community (42 points)
0 votes
Check out

Processing: http://blog.faludi.com/code/xbee-api-library-for-processing/

Java: http://code.google.com/p/xbee-api/

Python: http://code.google.com/p/python-xbee/source/browse/#svn/trunk/xbee2.5

Disclaimer: I've not tried any of these out, but there seem to be successful projects based upon all of them.
answered Aug 6, 2009 by DigiGuy42 Community Contributor (102 points)
0 votes
I have project to send API packet (ZigBee Transmit Request, API Identifier Value: 0x10) to the coordinator without using (X_CTU), all the xbees are set up in API mode. I have installed the end device which is connected to the microcontroller ATMEL 89c52 as a (ZIGBEE END DEVICE API) & the coordinator which is connected to the PC-hyper terminal (ZIGBEE COORDINATOR API), and I can send (packet data) from end device to coordinator but cannot see it come out of the UART. My question is :(I know when talking to API modules via XCTU, the "Enable API" box must be checked on the PC Settings tab) but in my case ,I’m talking to API modules via microcontroller (how can I enable the API (like X_CUT ), I cannot use( +++ & ATAP1) in this mode. I’m sure data is being successfully sent (led indicator is glow when send data).I want to use API because I want to be able to know the destination & other info that data is coming from.your help is greatly appreciated.
answered Sep 7, 2009 by thothefali New to the Community (3 points)
0 votes
If you're using an "API" type firmware, API mode is already enabled. Not you'll just need to create an application which can encode/decode the API packets so you can strip the useful data from them.
answered Sep 8, 2009 by Admin Veteran of the Digi Community (732 points)
...