Home/Support/Support Forum/Xbee s2 API communication problem

Xbee s2 API communication problem

0 votes
I have 2 modules xbee XB24-Z7SIT-004,one connected to an Arduino UNO connected to a pc(win 7) whit a blank sketch and the other connected to a Raspberry PI type A. I tried to send strings by serial uart terminal in AT mode,setting Coordinator AT and Router At,destination addresses,pan id etc. and all works fine,but when I set their firmware to coordinator API and router API and try to send a hex string for test to one module in local,I receive no response. I tried for both modules whit this string "7E 00 04 08 01 4E 4A 0D" that is the command "node join" that should send back to me the node join date but none of them respond
asked Aug 21, 2014 in RF Solutions and XBee by Gianmarco New to the Community (2 points)

Please log in or register to answer this question.

1 Answer

+1 vote
 
Best answer
The NJ parameter does not respond with a date. Try using the ID parameter or the ND parameter instead.
answered Aug 21, 2014 by mvut Veteran of the Digi Community (15,412 points)
selected Aug 28, 2014 by Gianmarco
I tried these frames : ID parameter = 7E 00 04 08 52 49 44 18
and ND parameter = 7E 00 04 08 52 4E 44 13 but I get no response, are they correct?
Your API frames are incorrect.  The ND should be 7E 00 04 08 01 4E 44 64 and the ID would be 7E 00 04 08 01 49 44 69
Neither yours work,anyway to make frames I use this http://ftp1.digi.com/support/utilities/digi_apiframes2.htm
This is sounding more and more like your modules are not in API mode or you are not using the Hex option for sending the API Frames as the frames I provided are valid and work on other XBee ZB modules.
When I read their firmware from xctu it says "ZIGBEE ROUTER API" an in the terminal program I set hex when i send the frames,maybe both module are defective or something but it's improbable
What is the Modem Type and version listed for both?
The modem type are zigbee coordinator api and zigbee router api and the version are low power series 2
Can you be more specific? I mean when you go to the modem configuration tab of XCTU and you do a Read, what is the Modem type listed (XB24-B?) and version listed (21A7)?
The modem type is XB24-ZB for both,the version is 21A7 for the coordinator and 23A7 for the router
What is the ID, OD and CH values for both modules?  Try using API mode 1 on both module with an AO of 0.
I set ID 1995 for both,CH is 0 for the router and 1A for the coordinator,but I don't know how to get OD value and API and AO are already set to 1 and 0
Your CH of 0 indicates that the module with the 0 value is not associated to the coordinator. Try setting the SC value to 0x1FFE on both and then issue a Global network reset starting on the Coordinator and then on the router.
How do I issue a Global network reset?
Try issuing 7E 00 05 08 01 4E 52 01 55 to both modules.
I tried,but as I said before the main problem is that both modules seems that can't read the frames that I send to them and I get no response
Are you able to enter AT command mode by issuing +++ ? That is, do you get an OK back when you send the +++?
Yes,but in order to do so I have to change to AT mode rewriting the firmware whit XCTU
The question was not for you to change the firmware and test but to test with the code that was on the radio to verify you are running API code.  Make sure that you are using Non Escaped API mode and not Escaped. It does make a differences on what the API frame needs to look like.  You should also be using the Assemble packet and Hex option to send the API frame.
NOW I get some response : the problem was that I didn't know of the "Assemble packet option", now i get with the ID command "7E 00 0D 88 01 49 44 00 00 00 00 00 00 00 19 95 3B",thanks for all your support!
...