Boot.py conf lost



  • Hi,

    I've a strange behavior with the boot.py file. At the boot time, boot.py is executed and connect correctly to my wifi network and returns the IP address, but when I get the REPL prompt, the configuration is lost, isconnected returns false. If I run manually the script, then the connection is fine.

    Thanks for your help

    Laurent

    Scanning for known wifi nets
    ......
    Connected to XXXXXXX with IP address:192.168.1.53
    Smart Provisioning started in the background
    See https://docs.pycom.io/smart for details
    Pycom MicroPython 1.20.2.r4 [v1.11-ffb0e1c] on 2021-01-12; LoPy4 with ESP32
    Pybytes Version: 1.6.1
    Type "help()" for more information.
    >>> wl.isconnected()
    False
    >>> Running C:\.........\boot.py
    
    >>> 
    >>> 
    
    Connected to XXXXXXXX with IP address: .isconnected()192.168.1.53
    >
    Pycom MicroPython 1.20.2.r4 [v1.11-ffb0e1c] on 2021-01-12; LoPy4 with ESP32
    Pybytes Version: 1.6.1
    Type "help()" for more information.
    >>> 
    >>> wl.isconnected()
    True
    >>>
    


  • @Laurent-Toutain Smart provisioning is the pybytes stuff, which indeed mangles with the communication interfaces. If you do not use pybytes, switch it off.

    import pycom
    pycom.pybytes_on_boot(False).

    If that does not work, create a file on your device called pybytes_config.json and the content:
    {"pybytes_autostart": false}



  • Hi Robert,

    I takes few seconds, in both cases it works, I got the IP address, but when boot.py is started automatically, I lose the information. Note the variable are available from REPL, I can manipulate wl, but the connection is lost. When i start manually it works. Looks like something after the boot.py reset the connection. I don't know what is Smart Provisionning started in the background means.

    Thanks

    Laurent



  • @Laurent-Toutain how long does your boot script for the connection to get established. That may take a few seconds.


Log in to reply
 

Pycom on Twitter