Hello,

Check that your PC is set to the same network as the router.

Be sure that the router is unplugged from the internet when you try to connect. Then reconnect the internet before you run the script.

Another way you can check the subnet is to set the PC to DHCP and check the ip address it receives, then connect to the gateway ip.