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

    How to get the automatic AP back on lopy ?

    Scheduled Pinned Locked Moved LoPy
    lopy4ap modewifiaccess point
    9 Posts 3 Posters 651 Views 3 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.
    • M Offline
      melkoutch
      last edited by

      Hi, I'm using a Lopy4. I managed to connect with a computer to the automatic AP named "lopy-wlan-xxx". Then I went on ftp://192.168.4.1 and everything worked fine.

      I tried to change the AP name with the following command :

      network.WLAN(mode=network.WLAN.AP, ssid="lopy_test", auth=(network.WLAN.WPA2,'lopy123456'))
      

      It worked (I could see the new network on the computer) but I couldn't get to ftp://192.168.4.1. I tried to change the mode (AP, STA, STA_AP) but I can't get on the ftp link anymore.

      Does anyone know how to get back to the way it was (default configuration with the automatic access point) or get the FTP to work with a custom network ?

      Thanks

      robert-hhR 1 Reply Last reply Reply Quote 0
      • E Offline
        Eric73
        last edited by

        Hi, have you try to set your IP with something like this

        network.WLAN.ifconfig(config=('192.168.0.4', '255.255.255.0', '192.168.0.1', '8.8.8.8'))
        

        Documentation found here:
        https://docs.pycom.io/firmwareapi/pycom/network/wlan.html#wlanifconfigid0-configdhcp-or-configtuple

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          melkoutch @Eric73
          last edited by

          @Eric73 Hi, yes I did try. I did this exact line and then tried to get to ftp://192.168.0.4 (tell me if I'm wrong) but it didn't work.

          E 1 Reply Last reply Reply Quote 0
          • E Offline
            Eric73 @melkoutch
            last edited by

            @melkoutch Have you try to restart ftp server after changing AP name ?

            import network
            server = network.Server()
            server.deinit() # disable the server
            # enable the server again with new settings
            server.init(login=('user', 'password'), timeout=600)
            

            (from pycom documentation)
            Warning : if you use telnet to acces to the board you will lose the connexion after server.deinit()
            Use serial cable to do this

            M 1 Reply Last reply Reply Quote 1
            • M Offline
              melkoutch @Eric73
              last edited by

              @Eric73 I hadn't tried that, and it worked ! Thanks !

              1 Reply Last reply Reply Quote 0
              • robert-hhR Offline
                robert-hh @melkoutch
                last edited by

                @melkoutch You could set up the device to connect to you home router, along the instructions at https://docs.pycom.io/tutorials/all/wlan.html
                That is usually much more convenient.

                M 1 Reply Last reply Reply Quote 0
                • M Offline
                  melkoutch @robert-hh
                  last edited by

                  @robert-hh Yes I saw that but when you say "more convenient" what do you mean ? Is it like faster ? I really just need one computer to get access to the ftp server so is it worth it to take a router raher than making the board an AP ?

                  robert-hhR 1 Reply Last reply Reply Quote 0
                  • robert-hhR Offline
                    robert-hh @melkoutch
                    last edited by

                    @melkoutch If you just have a 1-to-1 connection, then you can do anything. If you have several devices already in a network with a router, then it may be more convenient to have the Lopy4 also connected to the router.
                    And not, it is not faster.

                    M 1 Reply Last reply Reply Quote 1
                    • M Offline
                      melkoutch @robert-hh
                      last edited by

                      @robert-hh Ok, thanks !

                      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