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

    SecureBoot and Encryption Issues - Unable to set efuses

    Scheduled Pinned Locked Moved Firmware
    6 Posts 3 Posters 102 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.
    • S Offline
      Simon Egerton
      last edited by

      I can successfully build new firmware images and upload them onto a connected Pycom using either the expansion board V3 or a Pysense (unencrypted). And I'm able to build encrypted firmware. However, I'm unable to set the efuses to upload pre-generated keys and enable the secureboot and flash encryption.

      When I run the following command,

      python $IDF_PATH/components/esptool_py/esptool/espefuse.py --port /dev/ttyUSB0 burn_key flash_encryption flash_encryption_key.bin

      I get stuck with the following,

      Connecting......................................_____

      A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

      I'm using a FyPi with Pycom MicroPython 1.20.2.r4

      I note the FiPy resets with each attempted connection (I've also tried a LoPy and LoPy4)

      I don't know what I'm missing here, hopefully something really obvious :-)

      Any help very much appreciated.

      1 Reply Last reply Reply Quote 0
      • N Offline
        neil jepsen
        last edited by

        I solved this using 115200 speed.

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          Simon Egerton @neil jepsen
          last edited by Simon Egerton

          @neil-jepsen Thanks. I've just tried this, along with other baud rates and no luck. I've also tried combinations of the --before option

          I've tried doing a simple fuse dump with

          python $IDF_PATH/components/esptool_py/esptool/espefuse.py --port /dev/ttyACM0 -- baud <tried all options> dump

          And face the same connection issues.

          I should have mentioned, I'm running this on an Ubuntu VM, but I guess this isn't a factor as everything else is working.

          1 Reply Last reply Reply Quote 0
          • S Offline
            Simon Egerton
            last edited by

            I've also tried this on a different system under Windows 10 WSL, Debian, with no luck either...

            1 Reply Last reply Reply Quote 0
            • P Offline
              peterp
              last edited by peterp

              esp32 must be in download mode for this, so

              • either ./tools/fw_updater/pypic.py -p /dev/ttyACM0 --enter
              • or connect P2 to GND and press reset

              after (removing the jumper and) pressing reset you come out of download mode again

              S 1 Reply Last reply Reply Quote 2
              • S Offline
                Simon Egerton @peterp
                last edited by

                @peterp many thanks, this has solved the problem with both options working. Would it be possible to update the docs (https://docs.pycom.io/advance/encryption/) with this update?

                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