Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Set lopy wifi ip when as access point

    Scheduled Pinned Locked Moved LoPy
    5 Posts 5 Posters 3.0k Views 6 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      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', '8.8.8.8'))
      

      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?

      D 1 Reply Last reply Reply Quote 2
      • D Offline
        daniel @thibault
        last edited by

        @thibault it should be possible to change the AP IP address. We'll investigate it. Thanks.

        F 1 Reply Last reply Reply Quote 1
        • _ Offline
          _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.

          1 Reply Last reply Reply Quote 0
          • D Offline
            derorrim
            last edited by

            Hi there,
            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...

            Kind regards

            1 Reply Last reply Reply Quote 0
            • F Offline
              future_jimmy @daniel
              last edited by

              @daniel Has this been implemented? I'm on a LoPy4 and am under the impression that in wlan.ap mode the device can only be addressed via 192.168.4.1.

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • 1 / 1
              • First post
                Last post

              Pycom on Twitter

              Pycom