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

    Boot.py conf lost

    Scheduled Pinned Locked Moved LoPy
    4 Posts 2 Posters 27 Views 2 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.
    • L Offline
      Laurent Toutain
      last edited by

      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
      >>>
      
      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @Laurent Toutain
        last edited by

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

        1 Reply Last reply Reply Quote 0
        • L Offline
          Laurent Toutain
          last edited by

          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

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

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

            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