Set lopy wifi ip when as access point

  • 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=('', '', '', ''))

    It's seems not what i want to do. Because a client a such config lopy, have '' and can ping ''.

    Was it possible to set the ip of the access point, and the wifi client too?

  • Hi there,
    according to this doc you should pass id=1 when changing IP in AP mode.
    Didn't test it though...

    Kind regards

  • @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 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.


Pycom on Twitter