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

  • 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

  • I fixed it with:

    import pycom
    from network import WLAN

    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

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

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

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

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

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


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

Log in to reply

Pycom on Twitter