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

    LoPy4: Please reveal the secrets of the onboard default WiFi...

    Scheduled Pinned Locked Moved LoPy
    8 Posts 4 Posters 114 Views 4 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.
    • S Offline
      schmise7777
      last edited by

      Hi fellow LoPyNauts,
      after 6 weeks of trial and many many errors I finally have to ask the Forum for experiences and/or tipps with the default onboard WiFi of the LoPy4 (The one that should be there as soon as the LoPy is powered on, with the SSID "lopy4-wlan" or "lopy-wlan-xxxx").

      I own two LoPy4s and both simply do not emit a default WiFi as stated in the docs and manuals. Whereas I absolutely managed to make them WiFi-Stations by typing some code into the boot.py, the default WiFi does not exist.

      I tried several different configurations: LoPys put into Expansion Board 3.1 and after that into Pysense, power via USB, power via onboard socket, etc.
      No default WiFi.

      Another strange point is, that the manuals say, that it will generate an access point by default. However, when I construct a WLAN object and get its mode, it always says Station. Even if you switch it to access point manually, it is back in Station mode after reboot.

      My first LoPy was updated via the update tool, the other one was not updated. Both behave exactly the same.

      I would be very glad if someone could tell me if their default WiFi simply worked after powering on, or if there is any other thing to do before you can use the default WiFi?
      Do I have to register somewhere, update something or perhaps switch some of the jumpers on the Expansion Board? I simply run out of ideas how to switch on the default WiFi...

      Best regards
      Sebastian

      J 1 Reply Last reply Reply Quote 0
      • J Offline
        jcaron @schmise7777
        last edited by jcaron

        @schmise7777 did you try pycom.wifi_on_boot?

        If not enabled on boot, I believe you can also start it “manually” by instantiating Server IIRC.

        1 Reply Last reply Reply Quote 0
        • S Offline
          schmise7777
          last edited by

          Thank you, @jcaron !

          This is definitely a step to start from. On one of the LoPys, pycom.wifi_on_boot() returns False (and it cannot be set to True by pycom.wifi_on_boot(True)...), on the other LoPy it returns True - although both do not emit WiFi. Mysterious.

          The "False"-machine has OS release 1.20.0.r3
          and the "True"-machine has OS release 1.20.2.rc6

          However, today i'll do a search for wifi_on_boot and the different OSes on the forum!

          I also will try to instantiate Server later.

          Best
          Sebastian

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

            @schmise7777 Do the log message at boot tell, that pybytes it starting. If yes, then the AP is not activated. If you do not need pybytes, you have to block it. You can deactivate pybytes by putting a file on your device with the name pybytes_config.json and the content:
            {"pybytes_autostart": false}

            S 1 Reply Last reply Reply Quote 1
            • S Offline
              schmise7777 @robert-hh
              last edited by

              @robert-hh Thank you,

              this was a good hint! I updated both LoPys with legacy (non-Pybytes) versions of MicroPython firmware and (to be absolutely safe) added the file you proposed, and one of the LoPys now successfully has default WiFi from power on.

              Unfortunately, the other LoPy (the older one, but with the same MicroPython version), still has not! :-D (otherwise identical conditions, i.e. same Expansion Board, same empty boot.py and empty main.py etc.)

              I keep on searching for the right switch!
              Thanks
              Sebastian

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

                @schmise7777 This Wifi-on-boot setting is also relevant. And you have to set the AP manually active at least once.

                1 Reply Last reply Reply Quote 0
                • S Offline
                  schmise7777
                  last edited by

                  @robert-hh , @jcaron thanks again for the hints and tipps! After sweeping the flash clean, reinstalling the newest OS and caring for the wifi-on-boot and pybytes settings, the second LoPy is online too!

                  1 Reply Last reply Reply Quote 0
                  • B Offline
                    bruno.l
                    last edited by

                    I fixed it with:

                    import pycom
                    from network import WLAN
                    pycom.wifi_mode_on_boot(WLAN.AP)
                    

                    Firmware version was:

                    >>> os.uname()
                    (sysname='LoPy4', nodename='LoPy4', release='1.20.2.r3', version='v1.11-a6eabf9fe on 2020-02-26', machine='LoPy4 with ESP32',
                    lorawan='1.0.2', sigfox='1.0.1', pybytes='1.3.1')
                    

                    But it is really disappointed from Pycom, how they can deliver products with wrong default settings, there is actually a lack of quality control

                    1 Reply Last reply Reply Quote 1

                    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