When 002_CC2530_ coordinator (router) _ terminal does not exist the problem continues to reconnect power

(A) Reference: the CC2530 low power consumption network terminals kept reconnection problems

(Ii) to solve the problem: when the coordinator or router off when the terminal is disconnected after the reconnection constantly, resulting in power consumption problems

(C) Workaround: After the terminal is disconnected, trying to reconnect five times, five times if it were not even sleep on, one minute before trying to reconnect, not even on dormant again until the even date

(D) ZDApp.c file 402 lines added in the program folder ZDO

 

(E) programs and add their own original protocol stack program comparison

static uint8 initFailCounter = 0; 
IF (initFailCounter ++> = . 5 )   // reconnection times 
  { 
     osal_start_timerEx (ZDAppTaskID, ZDO_NETWORK_INIT, 60000); // reconnection interval = 60s 60,000ms 
      initFailCounter = 0 ;
      return (Events ^ ZDO_NETWORK_INIT); 
  }

 

Guess you like

Origin www.cnblogs.com/luxiaoguogege/p/12100501.html