To rule out an issue with your router configuration and test the Duet wifi module directly, can you try running it in access point mode where the Duet creates it's own SSID that you connect to directly.

https://docs.duet3d.com/en/User_manual/Reference/Gcodes#usage-17