Mongoose-OS – Get Start

Mongoose-OS IDE’s

  • Web Browser based
  • Visual basic extensions

mos tool

What is mos tool ?

  • We need IDE for our project development.
  • mos tool like a web browser based IDE.
  • we can use the mos tool to firmware upload & update, Build the firmware from c source, debug purpose and so on.

Mos tool features and use

This mos.exe  software works for many purpose like.

  • Installation of the flashing firmware into mcu.
  • Building the firmware from the C source files for mcu.
  • Managing the files on our mcu device.
  • Call and access the Remote Procedure Call (RPC protocol )  and many more features.

How mos tool works

  • mos tool  will be act as a local server.
  • We can access the mos tool server from any web browser like mozilz, chrome, internet explore, microsoft edge in the address of .
  • The server contains the web source of flashing & update firmware options, mcu interface option using uart.

Download & Install mos tool in windows

Note : Installed and tested on windows 10, 64-bit.

  • Download the windows installer using this link here (Download page)
  • After pop up will get the mos.exe  file. save anywhere on your pc.
  • Click Run as administrator  in mos.exe  file. (Note : Sometime its may be show like “Malicious file This application may cause damage to your device. Sensitive personal data may also be at risk.” click more info  link , then click run anyway  link. Also allow network permission and firewall access.
  • Once done above the default browser will open with the local host address like
  • Now you need to follow the steps of how to update mongoose os firmware into ESP8266  or flash the mongoose firmware into esp8266  see below.
  • Basically this server run using UART Serial communication, so our mcu should connect to our pc via usb port


How to update the mos tool

  • Automatic : update mos toll automatically update by the web browser throw automatically, every time its will the later release of the mos tool and update itself
  • Manual : update the mos tool via the web browser IDE Terminal command mos update or update .See the result below


  • Manual : You can specifically update the mos tool by this command mos update 1.18 . See the reults below (At the time i got some error, we will try later and update soon)


  • Manual : you can update the latest mos tool by this command update latest . See the below result




Flash the Firmware

Notes : You should install the mos tool if you not install, Also tested JavaScript with ESP8266 & ESP32 in Windows 10, 64-bit machine using mos tool.


  • How to update mongoose os firmware into ESP8266?
  • How flash the mongoose firmware into esp8266?


  • mos tool
  • ESP8266

Wiring Connection

Note : Your using development board then don’t need to follow this below wiring methods because development board pr-build setup have already.

Platform Wiring Notes
bare bones ESP8266 flash via UART: GPIO15 LOW , GPIO0 LOW, GPIO2 HIGH
flash to boot: GPIO15 LOW, GPIO0 HIGH, GPIO2 HIGH
boot from SD: GPIO15 HIGH
bare bones ESP32 flash via UART: GPIO0 LOW
boot from flash: GPIO0 HIGH
CC3200 launchpad connect J8 to SOP2 (see guide)

What is mean by bore bones?

  • Mostly development board has all features exposed with programmer. so easily can flash using in development
  • But if your working direct mcu chip or module (without programmer) you need to know what are the basic wiring required for boot, flash and normal running mode. Mostly this type of development is called bare bone.

Follow Steps

  • Connect your Device(ESP8266, ESP32, CC3220) board with PC using USB,
  • Run the mos tool and web browser will open the home page, and pop up will show the update or upload firmware page.
  •  Choose device address in a drop-down, or type into the text field, then click Select. Possible formats of device addresses:
    • COMx – serial port on Windows (Donno COM PORT check in deceive manger)
    • /dev/ttyUSBx – serial port on Linux
    • /dev/cu.xxxxxx – serial port on MacOS
    • ws://IP_ADDRESS/rpc – device on a local network
    •  mqtt://MQTT_SERVER:PORT/DEVICE_ID – device connected to an MQTT server
    • Note : if you PC can’t detect COM port then Check the COM port Enable. If not install the correct driver of your board.
  • Erlier mos  toll version upload the pr-build firmware called default firmware, but newer version may have many options like device platform : (ESP8266, ESP8266, CC2330)  based on memory and App : (JavaScript/C) based on programming language.
  • Then Choose platform (Ex : ESP8266), select app (Ex: js or c), click Flash 
  • Make sure (GPIO-0 Low) boot button  was pressed.
  • Initially it load the LED blink example.

Hello world Example

When flash the firmware into ESP8266, default load the LED blink example in init.js  file. (LED is in-build on development board GPIO-10.). Also automatically configured the ESP8266 WiFi as AP mode in the name of SSID Mongoose_?????? here ????? is the chip id. and the password is Mongoose.





Note : Write code into mcu or rewrite code into mcu, you should restart the machine manual or by software.

Command line (Terminal)

  • Following any commands can list out all commands in terminal : help  or helpfull  or commands  or command
ui Start GUI
init Initialise firmware directory structure in the current directory
build Build a firmware from the sources located in the current directory
flash Flash firmware to the device
flash-read Read a region of flash
console Simple serial port console
ls List files at the local device’s filesystem
get Read file from the local device’s filesystem and print t
o stdout
put Put file from the host machine to the local device’s filesystem
rm Delete a file from the device’s filesystem
config-get Get config value from the locally attached device
config-set Set config value at the locally attached device
call Perform a device API call. “mos call RPC.List” shows available methods
aws-iot-setup Provision the device for AWS IoT cloud
azure-iot-setup Provision the device for Azure IoT Hub
gcp-iot-setup Provision the device for Google IoT Core
update Self-update mos tool; optionally update channel can be given (eg. “latest”, “release”, or some exact version)
wifi Setup WiFi – shortcut to config-set wifi…
  • Global Flags:
    • --verbose  Verbose output. Optional, default value: “false”
    • --logtostderr  log to standard error instead of files. Optional, default value: “false”
    • --helpfull  Show full help, including advanced flags. Optional, default value: “false”


if your platform is JavaScript in Mongoose-OS, please read the basics below.


Declaring the variable

  • JavaScript : using var  keyword declare variables. Ex : var Arun  here Arun is a variable.
  • Mongoose-OS JavaScript : using let  keyword to declare variable. Ex: let Arun  here Arun is a variable



GPIO Module

  • GPIO.set_mode(pin, mode)  – Can set GPIO pin mode as like input or output.
    • Pin  – 0 (GPIO-0), 1(GPIO-1),  like wise 11(GPIO-11).
    • Mode  -for input – GPIO.MODE_INPUT , for output – GPIO.MODE_OUTPUT .
  • GPIO.set_pull(pin, type) – Can set input or output pin as PULL-Up , PULL-Down or None.
    • Pin  – 0 (GPIO-0), 1(GPIO-1),  like wise 11(GPIO-11).
    • Type -for none- GPIO.PULL_NONE , for pull up- GPIO.PULL_UP , for pull down – GPIO.PULL_DOWN .
  • GPIO.toggle(pin) – Can toggle output pin level as high or low using this function
    • Pin  – 0 (GPIO-0), 1(GPIO-1),  like wise 11(GPIO-11).
    • Return value : 0  or 1.
  • GPIO.write(pin, level)
    • Pin  – 0 (GPIO-0), 1(GPIO-1),  like wise 11(GPIO-11).
    • level – 0 (Low) or 1 (High).
    • Pin  – 0 (GPIO-0), 1(GPIO-1),  like wise 11(GPIO-11).
  • GPIO.enable_int(pin)
    • Return 1 for Success, 0 Otherwise
  • GPIO.disable_int(pin)
    • Return value is 1  Success, 0 – Otherwise
  • GPIO.set_int_handler(pin, mode, handler)
  • GPIO.set_button_handler(pin, pull, intmode, period, handler)
    • pull – for none- GPIO.PULL_NONE , for pull up- GPIO.PULL_UP , for pull down – GPIO.PULL_DOWN .
    • period – De-bounce interval in millisecond
    • handler – Calling function


Timer Module

Timer Functions

  • Timer.set(milliseconds, flags, handler, userdata)
    • Milliseconds – timeout
    • Flag  – 0 Zero, for repeat condition Timer.REPEAT

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

if you have any queries call us +918300026060 or WhatsApp Dismiss


Your Cart

%d bloggers like this: