Hi, I hope you're doing well!
Frequency Agility is an optional feature in ZigBee stacks. It can be implemented to allow the Network Manager to change the channel if it detects that the current one is too crowded or has a lot of interference.
A process similar to frequency agility is used when the network is about to be created, as the coordinator scans the available channels, and determines the least crowed one.
A request to change the channel can be sent by using the ZPS_eAplZdpMgmtNwkUpdateRequest function included in the zps_apl_zdp.h header file. This function is described in chapter 8 of the ZigBee Pro Stack User Guide, and can be used, along with a channel scan, to determine and change the channel if necessary.
For an example on how to use this function, could you please take a look at JN-AN-1216, in the app_Znc_cmds.c source file?
Please let me know if you need any more information.
Best regards,
Sebastian