Home  >  Support  >  Support Forum  >  How to reset Radio Buffer Xbee Programmable
Notice! We've recently migrated to using a new forum, we hope you enjoy it. If you are an existing member and this is your first time visiting our new forum, please reset your password to be able to sign in.

How to reset Radio Buffer Xbee Programmable

0 votes
Hi,
i would to reset my XBee when it receive "11" value from controller. i have wrote this code:
Code:
#ifdef ENABLE_XBEE_HANDLE_RX int xbee_transparent_rx(const wpan_envelope_t FAR *envelope, void FAR *context) { uint8_t *rx = envelope->payload; if (*rx == 11) { sys_reset(APP_CAUSE_NOTHING); } return 0; } #endif

I receive correctly the message and my app reboots itself, but after reboot it handles again the same message from coordinator,
it is as if the radio buffer wasn't been resetted, so, my application reboots just three times.
An orrible workaround is to use at least 3 printf (it will slow down application and it will reboot itself just one time).

I try to use a Remote AT Command FR but it seam not works.

Any ideas?
Thanks
asked Apr 16 in XBee Programmable Development by ziobo New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
Hi,

Just a thought, and I have no idea if it will help but I would suggest.

Change the code in the RX frame handler so it sets a global variable to TRUE to request a reset. Exit from the handler with the standard return. Then in the main loop that is calling the Xbee_tick, check the global variable and issue the reset there.

I suspect that you may need to allow the handler to exit cleanly so that the received message is cleared from the buffer, befor you try to do the reset.

Hope it helps
Roy
answered Apr 17 by rdeabill Community Contributor (140 points)
Your M2M Expert™for Businessfor Developers
Newsletter SignupYouTubeGoogle+FacebookCopyright © 1996-2013 Digi International Inc. All rights reserved. Legal
...