# Raspberry Pi Pico W Access Point - cannot change default IP

**URL:** <https://forum.core-electronics.com.au/t/raspberry-pi-pico-w-access-point-cannot-change-default-ip/15039>\
**Category:** Raspberry Pi\
**Created:** [5 September 2022 06:50 UTC](https://forum.core-electronics.com.au/t/raspberry-pi-pico-w-access-point-cannot-change-default-ip/15039 "2022-09-05T06:50:07Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Doug27394](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/doug27394/32/7961_2.png) [@Doug27394](https://forum.core-electronics.com.au/u/Doug27394)\
**Post date:** [6 September 2022 00:48 UTC](https://forum.core-electronics.com.au/t/raspberry-pi-pico-w-access-point-cannot-change-default-ip/15039/4 "2022-09-06T00:48:15Z")

</div>

Hi Jim,

It looks like the `ap.active(True)` sets the ip to the default/previous value. Try swapping the `ap.ifconfig(...)` and `ap.active(True)` lines like this:

```auto
import network
ap = network.WLAN(network.AP_IF)
ap.config(ssid='picow', password='picow')
print('01 ',ap.ifconfig())
ap.active(True)
print(ap)
print('02 ',ap.ifconfig())
ap.ifconfig(('192.168.12.1','255.255.255.0','192.168.12.1','0.0.0.0'))
print('03 ',ap.ifconfig())

while ap.active() == False:
  pass

print('Connection successful')
print('04 ',ap.ifconfig())

```

this gave me:

```auto
%Run -c $EDITOR_CONTENT
01 ('0.0.0.0', '0.0.0.0', '0.0.0.0', '0.0.0.0')
<CYW43 AP up 192.168.4.1>
02 ('192.168.4.1', '255.255.255.0', '192.168.4.1', '0.0.0.0')
03 ('192.168.12.1', '255.255.255.0', '192.168.12.1', '0.0.0.0')
Connection successful
04 ('192.168.12.1', '255.255.255.0', '192.168.12.1', '0.0.0.0')

```

---

_[View the full topic](https://forum.core-electronics.com.au/t/raspberry-pi-pico-w-access-point-cannot-change-default-ip/15039)._
