Hi,
i would to reset my XBee when it receive “11” value from controller. i have wrote this 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