3. Espressif
Company behind popular ESP8266 and ESP32 modules
• ESP32:
• 240 MHz dual core Tensilica LX6 MCU (600 DMIPS)
• Integrated 520 KB SRAM
• Integrated 802.11BGN HT40 Wi-Fi transceiver
• Integrated dual mode Bluetooth (classic and BLE)
• 16 MByte flash
Find out more at https://www.espressif.com
Espressif and AWS are co-sponsoring this workshop
4. Mongoose OS
Cesanta Mongoose OS (mongoose-os.com)
• Hardware agnostic: ESP32, ESP8266, TI CC3200, STM32 and others
• Secure: SSL/TLS, Microchip ATECC508A crypto-chip support, ESP32
encrypted flash support
• Develop in C or JavaScript, or both
• Networking: MQTT, WebSocket, COAP, HTTP/ HTTPS and other
• Mongoose Embedded Web Server and Networking Library
6. Prerequisites
• AWS CLI configured with valid credentials in the AWS account that
you intend to use
http://docs.aws.amazon.com/cli/latest/userguide/
installing.html
• ESP32 Dev board
• A (good!) USB cable to connect the ESP32 board to your computer
• mos – The Mongoose OS flashing tool. Download at
http://www.mongoose-os.com
• git clone of the Mongoose OS repository from GitHub:
Ø git clone https://github.com/cesanta/mongoose-os
7. Exercise #1 (publish button presses to AWS IoT)
Once you clone git repo, change directory to:
Ø cd mongoose-os/fw/examples/mjs_base
Then execute:
Ø mos build --arch esp32
Ø mos flash
Ø mos wifi SSID PASSWORD
Ø mos aws-iot-setup --aws-region REGION --aws-iot-policy
mos-default *
* mos-default is demo quite permissive policy. Please use more restrictive policies in production!
Change the value of highlighted values to reflect your setup
8. Exercise #1 (publish button presses to AWS IoT)
Start mos console:
Ø mos console
You should see:
Using port /dev/cu.SLAB_USBtoUART
Tock uptime: 8.25607 RAM: 166700
Tick uptime: 9.25616 RAM: 166700
Tock uptime: 10.2566 RAM: 166700
Published: yes topic: mOS/topic1 message: {"free_ram":
166632,"total_ram":0}
I (13755) wifi: pm start, type:0
9. Exercise #1 (publish button presses to AWS IoT)
• Log in to your AWS IoT account and go to AWS IoT service page
• Click on Test
11. Exercise #1 (publish button presses to AWS IoT)
• Pressing button on your ESP32 will publish free RAM to the MQTT topic
12. Follow up steps
Go to www.mongoose-os.com
Follow the examples:
• Internet button
• Smart heater
• ECC508A crypto-element
Cesanta is running Give Away &
https://mongoose-os.com/awsloft