AWS EduKit restore factory firmware
-
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.
-
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 -
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.
-
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.
-
@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?
-
@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.
-
ok thanks. i used the "us-west-2". Let me check again.
-
@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.
-
@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.
-
@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.
-
@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?
-
@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.
-
@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.
-
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.
-
@greenleaf Thank you! I'll give it a go and check it out.
Thanks! -
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.
-
@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? -
Hi @infinitool ,
-
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
-
You can use PlatformIO. As a matter of fact, the Getting Started guide explicitly uses PlatformIO: https://edukit.workshop.aws/en/getting-started.html.
-