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 should my vanilla LoPy 4 be configured?

    Scheduled Pinned Locked Moved LoPy
    lopy4 bringupfactory
    7 Posts 3 Posters 1.4k 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.
    • P Offline
      Pugnacious
      last edited by

      OK, I jumped the gun and got my LoPy 4 up & running under Atom only to transfer my old WiPy development library into it.
      Can someone point me to what are the default shipping files that come with the LoPy 4 so I can restore it to it's factory state? The LoPy directory in GitHub is from 2016 (: Thanks. What I'm looking for is a directory tree along with what files belong where. #LoPy4

      L 1 Reply Last reply Reply Quote 0
      • L Offline
        livius @Pugnacious
        last edited by

        @pugnacious
        there is no something like restore to the factory firmware.
        You can check which firmware you have by issuing command

        import os
        os.uname()
        

        you can only clean flash from custom files by

        import os
        os.mkfs('/flash')
        

        then your lopy will run as clean

        to work with current Pymakr you need to update firmware first:
        https://pycom.io/downloads/

        The LoPy directory in GitHub is from 2016

        sources of firmware are under
        https://github.com/pycom/pycom-micropython-sigfox
        and
        https://github.com/pycom/pycom-esp-idf

        libraries you can find here
        https://github.com/pycom/pycom-libraries

        and any docs here
        https://docs.pycom.io/

        think about people first, then computers

        P 1 Reply Last reply Reply Quote 0
        • P Offline
          Pugnacious @livius
          last edited by

          @livius Thanks! Will this also eliminate the rubbish files that I inadvertently transferred to the chip?

          L 1 Reply Last reply Reply Quote 0
          • L Offline
            livius @Pugnacious
            last edited by

            @pugnacious said in How should my vanilla LoPy 4 be configured?:

            inadvertently transferred to the chip?

            If you mean to the flash then yes os.mkfs('/flash') is like "format" commad on desktop

            think about people first, then computers

            P 1 Reply Last reply Reply Quote 0
            • P Offline
              Pugnacious @livius
              last edited by

              @livius Yes. Inadvertently as to mean "screwed up" by having an old project folder open in Atom a REPL window open talking to the chip and then hitting the Upload button which transferred all the files including updated main.py and boot.py onto my new LoPy. It might not make sense, but yes it happened.

              Thanks, the os.mkfs('/flash') did work and gave me a clean directory with nothing in /flash and it appears my old project files are nowhere to be seen.

              What directory structure should I be seeing and what files should be there? What I'm looking for is:
              Where can I find an original main.py and boot.py? Are these in a current github repository, if so where?
              What files need to exist under /flash/lib, /flash/sys, and /flash/cert? where are these and are they important?
              Anything else to restore to factory condition?
              Thanks for responding.

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

                @pugnacious The defeault main.py and boot.py are just empty with a comment like:
                # Put your own code here
                The same for the directories you mention. You can put code of "library style" into /flash/lib, but that's just a place mentioned in sys.path.
                /flash/sys and /flash/cert are "special" directories, more like logical devices than file system places, just used for special actions. So ignore them in the first place.

                P 1 Reply Last reply Reply Quote 0
                • P Offline
                  Pugnacious @robert-hh
                  last edited by

                  @robert-hh Thanks. I did the os.mkfs('/flash') and then ran Pymate on my phone to re-establish a WiFi connection and reinitialize the chip (repopulating with main.py and boot.py) that I now see in ftp.

                  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