P2 Static IP Once Set Does Not Change

Hi,

Related to my earlier issue,

I have been able to successfully set the static IP mentioned in the above thread. Now the condition has arisen that the Router has changed and so has the router IP address. Eg. The earlier router IP address was 192.168.1.1 and the new router has IP address as 192.168.103.1

The P2 tries to use DHCP and is still forfully acquiring the same IP address as the previous settings. I want to be able have P2 forget the old Network conf and be able to connect to the new network.
The logs show the following error:

.0000062683 [app] INFO: Initializing WiFi.

0000062689 [app] INFO: Using Dynamic IP.

0000062693 [app] INFO: Gateway: 192.168.103.1

0000062697 [app] INFO: Source: 10

0000062703 [net.rltkncp] ERROR: linkOutput up=0 link_up=0

Please suggest way forward. I have tried the below conf settings and the P2 is just fast blinking green but not able to connect to the Wifi. The new router has the same SSID and Password as the old router.

auto conf = NetworkInterfaceConfig()
                .source(NetworkInterfaceConfigSource::DHCP, AF_INET)
                // .address(V_GatewayStaticIp, V_SubnetMask)
                .gateway(IPAddress(0,0,0,0))
                .dns(IPAddress(8,8,8,8))
                .dns(IPAddress(1,1,1,1))
                .profile(V_RouterSsidStr);
WiFi.setConfig(conf);

More info: I have also tried to re-setup the P2 using USB. No luck.

Your gateway setting above cannot be 0.0.0.0 - that's only for an isolated network (ie. local access on Ethernet, Cloud on WiFi)
Please set to your Router IP and it should work.
You should also change DHCP to static.

setConfig(NetworkInterfaceConfig()
  .source(NetworkInterfaceConfigSource::STATIC);
  .address({192,168,1,20}, {255,255,255,0})
  .gateway(SockAddr({192,168,1,1}))
  .dns(SockAddr({192,168,1,1})));