I assume you have already used M587 to program your WiFi SSID and password into the WiFi module. Make sure your router is transmitting on 2.4GHz. The WiFi module doesn't do 5GHz. Send M587 without parameters to list the networks that the WiFi module knows about. Check that it lists the SSID of your 2.4GHz network exactly right, in particular in the correct case. Note, your router may use different SSIDs for 2.4GHz and 5GHz. If that all seems correct, the problem could be poor WiFi signal strength at the Duet. Try moving the Duet into the same room as the router.