Set lopy wifi ip when as access point
thibault last edited by
Hi, i search to change the ip adress of the lopy when he act as access point.
I use this code:
def Wifi_Init(): from network import WLAN wlan = WLAN(mode=WLAN.AP, ssid="Own SSID", auth=(WLAN.WPA2, 'Own password'), channel=11, antenna=WLAN.INT_ANT) wlan.ifconfig(config=('192.168.0.4', '255.255.255.0', '192.168.0.1', '126.96.36.199'))
It's seems not what i want to do. Because a client a such config lopy, have '192.168.4.2' and can ping '192.168.4.1'.
Was it possible to set the ip of the access point, and the wifi client too?
derorrim last edited by
according to this doc https://docs.pycom.io/pycom_esp32/library/network.WLAN.html you should pass id=1 when changing IP in AP mode.
Didn't test it though...
_tim0bile_ last edited by
@daniel i want to confirm this proplem - my home network has the same IP address range like my WiPy2, so this gets realy annoying. I tried same as @thibault (on the REPL) and had the same results. I would like to change the wipy network to 192.168.5.0 or something like that but don't know how.
@thibault it should be possible to change the AP IP address. We'll investigate it. Thanks.