This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Frequency Agility library doesn't fire events

Other Parts Discussed in Thread: Z-STACK

Hey!

i have been having Trouble with frequency agility on my ZC. I defined NWK_MANAGER in nwk_globals.h, but I never seem to reach the breakpoint in the ZDNwkMgr_event_Loop function. My ZC also never switches the channel.(tested it with the SmartRF packet sniffer) It works fine on my ZED(it sends Beacons on all channels). Do you have any idea what could be wrong? If you need more Information I will provide it as soon as possible.

For now I am trying to fire an event myself. I am currently using the something like this:

uint8 retval = 0;
  uint8* msg_ptr = osal_msg_allocate(sizeof(zdoIncomingMsg_t));
  zdoIncomingMsg_t* msg = (zdoIncomingMsg_t*) msg_ptr;
  msg->hdr.event = ZDO_CB_MSG;
  msg->srcAddr = ZDAppNwkAddr;
  msg->wasBroadcast = 0;
  msg->clusterID = Mgmt_NWK_Update_req;
  msg->SecurityUse = 1;
  msg->TransSeq = 0;
  msg->asduLen = 6;
  msg->macDestAddr = 0;
  uint8* pbuf = osal_mem_alloc((6 * sizeof(uint8)));
 
  *(pbuf) = 0x00;
  *(pbuf + 1) = 0x78;
  *(pbuf + 2) = 0x00;
  *(pbuf + 3) = 0x00;
  *(pbuf + 4) = 0x05;
  *(pbuf + 5) = 0x04;
 
  msg->asdu = pbuf;
  retval = osal_msg_send( ZDNwkMgr_TaskID, msg_ptr );
  // reset timer
  osal_start_timerEx(_taskId, _CI_CHECK_EVENT, CENTRAL_NODE_CI_CHECK_INTERVAL);

I could figure out a few variables but some values are a mystery for me like:

msg->srcAddr = ZDAppNwkAddr; // maybe jsut 0 ?

 msg->SecurityUse = 1;
 msg->TransSeq = 0;

msg->macDestAddr = 0;

  • Hi Florian,

    Please see section 11 of Z-Stack Developers Guide at C:\Texas Instruments\Z-Stack Home 1.2.1\Documents to understand how the frequency agility works. Hope this will help you understand when the stack should trigger channel change, etc.

    Regards