🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    AWS EduKit restore factory firmware

    Core2 for AWS
    7
    20
    27.6k
    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.
    • B
      bentterp
      last edited by

      Hi!
      I've been going through the edukit.workshop.aws and would like to restore my unit to the original state, how do I do that?

      When I use the "Erase Flash" option in Platform.io the unit is completely blanked and doesn't boot - it just emits a ticking sound twice per second.

      1 Reply Last reply Reply Quote 0
      • felmueF
        felmue
        last edited by

        Hello @bentterp

        have you tried to compile and flash the project from here?

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 0
        • K
          ksprayberry
          last edited by

          I’ve done the same thing and was wondering too. It is “listening” though. I moved on to the next part, the blindly hellos world and was able to write my credentials to it, and it went from making a ticking to a very quiet squall of sorts. This whole ESP-IDF 4.2 that it wants you to load has been a real pain. I’ve had other versions of Python on my computer and laptop and I think that confuses it somehow. The installation for the tools would never complete, so I don’t think things were compiled right. Long story short, if you are worried that your device is “bricked” I don’t think it is.

          1 Reply Last reply Reply Quote 1
          • felmueF
            felmue
            last edited by

            Hi guys

            I agree, the device most likely isn't bricked. Maybe this Arduino factory test code could help to verify basic functionality?

            And yes, having the correct Python version for the ESP-IDF environment can be a real pain - I went through that exercise myself until I found this helpful tool: Miniconda. It gives you a virtual environment with the desired Python version w/o disturbing the rest of your setup.

            Thanks
            Felix

            GPIO translation table M5Stack / M5Core2
            Information about various M5Stack products.
            Code examples

            1 Reply Last reply Reply Quote 0
            • N
              nikhilpen
              last edited by

              I had the same issue as well. The screen won't turn on along with the ticking sound. I looks like the erasing flash leaves the device in a zombie state on the next boot-up. I guess this is expected as there is no app to run on boot-up.

              I am able to build and flash with the same project and other subsequent EduKit projects without any issues.

              1 Reply Last reply Reply Quote 0
              • greenleafG
                greenleaf
                last edited by

                The ESP-IDF build kit is a beast. It's over a gigabyte in size (!) and contains thousands and thousands of files. Building the AWS Edu IoT firmware is not something I'd recommend for beginners. Some pointers from my experience with it:

                • Make sure you install the correct version of ESP-IDF installed on your machine
                • Use miniconda to ensure you have the exact right version of python and required modules
                • Use conda activate edukit to get back into your custom edukit environment
                • Make sure you have installed all the required modules with pip3 install -r requirements.txt
                • Always load the ESP-IDF environment settings with export.sh (export.ps1 on windows), after you enter the conda environment. These environment scripts are inside of your esp-idf folder.
                • Be in the Blinky-Hello-World directory when you run idf.py build
                • Use idf.py flash monitor COMX where X is your port

                Once you have a working firmware image you can reflash without rebuilding.

                K 1 Reply Last reply Reply Quote 0
                • K
                  ksprayberry @greenleaf
                  last edited by

                  @greenleaf The esp-idf is indeed a bear to build. I managed to get it built and work my way through the tutorial. They actually changed the tutorial on me halfway through taking out the bit about the Jupyter notebook and replacing it with a certificate helper. I managed to work my way through it all, compiled the program and have run it, but I cannot get the lights to blink. It has the appearance of being connected, but no blinky blink. Any thoughts as to where I may have went wrong?
                  0_1609533705812_IMG_8130.jpg 0_1609533717204_IMG_8129.jpg

                  greenleafG 1 Reply Last reply Reply Quote 0
                  • greenleafG
                    greenleaf @ksprayberry
                    last edited by

                    @ksprayberry Make sure you are in the correct AWS region. The test button on the MQTT page won't throw any errors or output if you're not in the correct region.

                    K 1 Reply Last reply Reply Quote 0
                    • K
                      ksprayberry
                      last edited by

                      ok thanks. i used the "us-west-2". Let me check again.

                      1 Reply Last reply Reply Quote 0
                      • K
                        ksprayberry @greenleaf
                        last edited by

                        @greenleaf Woohooo! That was it! I changed it to the North Virginia and it worked. Of course now after its working, I kind of fee like Ralphy on the Christmas Story after getting his Little Orphan Annie Secret decoder ring...."Be sure to drink your Ovaltine" a crumby commercial? SOB!" No, thank you, I was so close and it was something small.

                        greenleafG 1 Reply Last reply Reply Quote 1
                        • greenleafG
                          greenleaf @ksprayberry
                          last edited by

                          @ksprayberry Don't feel bad, I slipped on the exact same banana peel. Writing technical workshop documentation is hard. I've been sending suggestions to the developer on github with some ideas about how to make this easier for new users.

                          What would be really amazing is the UIFlow experience, but with the AWS features enabled. Maybe someone could whip up a micropython module that would handle the AWS registration and key exchange interactively.

                          K 2 Replies Last reply Reply Quote 0
                          • K
                            ksprayberry @greenleaf
                            last edited by

                            @greenleaf I would love for this to all be baked into the UIflow environment somehow or the provisioning baked into the M5Burner even somehow. I really enjoy working in it.

                            1 Reply Last reply Reply Quote 0
                            • K
                              ksprayberry @greenleaf
                              last edited by

                              @greenleaf I spoke too soon. I'm stumped on the next example. Everything looks right, I can see the output from the M5 at the command line, I even think the messages are coming in to AWS, I can see the activity, but I don't seem to be able to change the state of the M5.Any tips?

                              greenleafG 1 Reply Last reply Reply Quote 0
                              • greenleafG
                                greenleaf @ksprayberry
                                last edited by

                                @ksprayberry I must confess, I stopped the tutorial after getting Blinky Hello World working. I ended up flashing the device with UIFlow instead as it's much more user friendly.

                                K 1 Reply Last reply Reply Quote 0
                                • K
                                  ksprayberry @greenleaf
                                  last edited by

                                  @greenleaf It is that indeed. I can't help but think there are a few bugs and holes in the tutorials that will shake themselves out in the weeks to come.

                                  1 Reply Last reply Reply Quote 0
                                  • greenleafG
                                    greenleaf
                                    last edited by greenleaf

                                    In the meantime if you want to play around with AWS and MQTT I wrote up this how to guide for setting it up in UIFlow:

                                    https://community.m5stack.com/topic/2688/mqtt-config-for-aws-iot-core-solved

                                    You can both publish and subscribe to topics if you follow those steps. You do need to flash your device with the UIFlow image though.

                                    K 1 Reply Last reply Reply Quote 0
                                    • K
                                      ksprayberry @greenleaf
                                      last edited by

                                      @greenleaf Thank you! I'll give it a go and check it out.
                                      Thanks!

                                      1 Reply Last reply Reply Quote 0
                                      • R
                                        rashedtalukder
                                        last edited by

                                        I wasn't aware of this forum, so my apologies if you didn't receive a solution right away.

                                        To flash the factory firmware:

                                        cd /<<PATH_TO_REPO>>/Core2-for-AWS-IoT-EduKit-Factory-Firmware
                                        idf.py build flash
                                        

                                        The tick/pop you hear is the sound of the device rebooting over and over since there's no firmware (after erasing the flash). It's not bricked.

                                        All the links on the instructions as of a week ago all point directly to the us-west-2 region so you don't get taken to your default region by accident. Hoping that helps all users.

                                        Since there appears to be a lot of interest in UIFlow, we will prioritize getting that going in partnership with M5Stack. I really appreciate the feedback.

                                        Head of the AWS IoT EduKit program and AWS employee. Not an M5Stack employee.

                                        I 1 Reply Last reply Reply Quote 1
                                        • I
                                          infinitool @rashedtalukder
                                          last edited by

                                          @rashedtalukder This helps, 1) but what is the process to bootstrap the device after Getting Started worked, when it doesn't even turn on, or change the dead device behavior where it doesn't tick or do anything anymore to take this firmware?
                                          2) Can the AWS unit not use PlatformIO and perform as a regular Core2 device?

                                          1 Reply Last reply Reply Quote 0
                                          • R
                                            rashedtalukder
                                            last edited by

                                            Hi @infinitool ,

                                            1. So when you unplug/plug the device in, the serial port doesn't even show up? If the port does not show up on your computer, then there are other issues. You can see these instructions or the link to Espressif's documentation for identifying the port for each OS: https://edukit.workshop.aws/en/blinky-hello-world/device-provisioning.html#identifying-the-serial-port-on-host-machine

                                            2. You can use PlatformIO. As a matter of fact, the Getting Started guide explicitly uses PlatformIO: https://edukit.workshop.aws/en/getting-started.html.

                                            Head of the AWS IoT EduKit program and AWS employee. Not an M5Stack employee.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post