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

    config file on sd card

    Scheduled Pinned Locked Moved MicroPython
    configurationsdcardsource-code
    3 Posts 2 Posters 273 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.
    • T Offline
      tttadam
      last edited by

      Hello there,

      Whats the best practice to store config related "things"? Like wifi ssid/pass, mqtt info, rtc info, timezone...
      Would be important, because the device need to function in enviroment where ppl has a limited knowedge about embleded system or it in general, but maybe needs to edit some basic configs.
      BTW, how do you protect the source code? So it can't be downloaded from pycom board only by people with access.

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

        @tttadam If it does not have to be protected, you can put that in a Pyhton script which will be imported. You could as well us a JSON coded file, which you load and decode.
        For protection PyCom devices can encrypt the flash. However, you have to build the firmware yourself. At a slight less rigorous level you can put data into frozen bytecode, which again requires building the image yourself. Modules in frozen bytecode are not directly accessible to FTP or telnet. It is also possible to modify the code such that there is no REPL prompt. There are a lot of hits and thoughts about that in the forum.

        1 Reply Last reply Reply Quote 0
        • T Offline
          tttadam
          last edited by

          Json on the sd is come up to my mind also for config, I will give a try with that. :)
          I hoped, that there is an easier solution for source code protection, but it seems there isn't. Still thanks for your suggestion.

          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