But router is now not recognising,and how to reset ZigBee default values?
You are going to need to use the recovery function in XCTU to load the Router/End device AT firmware on the module if you want to have UART access. The Code you loaded is designed and meant for the DIO adapter product only.