How to install Mongoose OS on ESPer or ESP32

how to iot mongoose os
Featured image

Recently I’ve got my hands on the craved-for IoT ESP32, thanks to DFRobot, and have been tinkering with it ever since. I’m really amazed by it since it packs both Bluetooth and WiFi in a small yet powerful unit. Since I received the MCU rather than the module, so, to use it, I made myself a breakout board named ESPer(because, why not? :smile:). Feel free to check out its Instructable over here.

So, coming back on track, this post is dedicated on how to use it efficiently via Mongoose OS, which in my opinion, is a great firmware to start with for ESP32 beginners, such as me. It provides a good interface for creating, modifying and and uploading code. I think it’s biggest feature is that it allows code modification over the air(OTA) so that you don’t have to flash your device for every small modification.

Speaking of code, it also supports a variety of languages, including C++, JavaScript and guess what, Wiring(Arduino). I think that’s enough of decribing what Mongoose OS is.

If you’re more curious about Mongoose OS, check out it’s official site: Mongoose OS.


Prepping and Beginning! #

To flash your ESPer with Mongoose OS, you’re supposed to have the following things at bay:

This method will also work if your ESP32 is wired according to the ESPer schematic here. The ESP32 chip I used!

That’s all for the requirements. Once you’re sure you’ve got all the stuff, boost ahead!


Installing the mos Tool #

mos ui The Mongoose OS website provides an easy-to-use tool for flashing and managing Mongoose OS on devices. This tool also aids in uploading code and in numerous other tasks.

The installation instructions have been documented on the official website here. Since I’m using Lubuntu myself, I had to use the following commands:

$ sudo add-apt-repository ppa:mongoose-os/mos
$ sudo apt-get update
$ sudo apt-get install mos

Wiring up ESPer #

Wiring Diagram Once the tool is downloaded, wire up your ESPer with any USB to TTL Converter since the flashing is to be done via UART.

To keep things applicable to a larger reader-base, I’ll be proceeding with my good ‘ol Arduino UNO. It’s possible to use an Arduino as a USB to TTL Converter since it has an in-built CH340G Converter which the Arduino uses for programming the ATmega IC. Now wire up ESPer according to the wiring diagram posted above. Once done it should look something like this.

ESPer Wired Up

Be careful while making the power connections because ESP32 MCU is not 5V tolerable therefore you might end up burning your MCU if you’re not careful.

Once that’s done, connect your Arduino to your PC or any other device.


Flashing the Firmware #

Now that everything’s done, all that’s left to do is to flash the firmware onto the ESPer board. To do that:

This concludes the flashing process.


Configuring the WiFi Settings #

WiFi So we have flashed the Mongoose OS firmware in our ESPer board now, but we still haven’t configured the WiFi Settings which is the most important feature of IoT devices since they have to be connected to the internet. To configure WiFi:


The Sky’s the Limit #

Now that you’ve installed an OS on your ESPer board or ESP32, you can do almost anything with it, be it a mini Arduino or a WiFi server, you name it. So go ahead and start coding and making. The video below shows my ESPer flashed with the Blink Code.

The video was recorded before this post was published that is why there is no silkscreen on the ESPer board.

So that’s how you install Mongoose OS on your ESPer board. You may refer to the official documentation to get acquainted with the UI and use it effectively in your projects. This is the link: Mongoose OS Documentation

If you feel that I missed something, please use the Disqus Comments below to let me know. Same goes for the improvement suggestions.

A huge thanks to DFRobot for sending me awesome stuff.

Thanks for reading! :grinning:

Keep Making!



Comments

Nothing yet.

Leave a reply