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;