Skip to content

Flash zones

Firmware lives in firmware/gg-edge-client. It targets ESP32-S3
Espressif ESP32-S3 — Wi‑Fi microcontroller used here as the Greengrass client device (not a second core).
, uses discovery
Greengrass discovery API — HTTPS call with the client certificate that returns associated core connectivity (host, port, CA) for local MQTT.
, connects to Moquette
aws.greengrass.clientdevices.mqtt.Moquette — local MQTT broker on the core. Not Mosquitto; client devices connect here over mTLS.
with the client certificate, and does three things:

  • publishes BOOT press/release on gg-edge/sensor
  • publishes chip-temperature telemetry every 10 s on gg-edge/telemetry/<thing>
  • drives the onboard RGB from gg-edge/actuator/<thing>, using the color the sender chooses (green = button loop, blue = cloud, red = edge ML)

The temperature comes from the ESP32-S3’s internal sensor (temperature sensor driver), so no extra hardware is needed. It reads the die rather than the air, a few degrees above room temperature, in steps of about 0.4–1 °C. A thumb on the module warms it enough to trip the alarm and ML pages.

Steps on this page:

  1. 1Copy client certscp → main/certs/
  2. 2Configure + flashset-target · menuconfig · flash
  3. 3Watch serial logwifi · discover · mqtt
All on the workstation with ESP-IDF. Success = serial showswifi connected → discover response →mqtt connected to core, then button → RGB and telemetry every 10 s.
Terminal window
cp "$CLIENT_CERTS_DIR/device.pem.crt" firmware/gg-edge-client/main/certs/
cp "$CLIENT_CERTS_DIR/private.pem.key" firmware/gg-edge-client/main/certs/
cp "$CLIENT_CERTS_DIR/AmazonRootCA1.pem" firmware/gg-edge-client/main/certs/
(no output)

Do not commit these PEM files.

Extra zones: copy from $CLIENT_CERTS_DIR_2 / _3 into that board’s build tree (or a separate checkout), and set Client Thing name in menuconfig to the matching $CLIENT_THING_NAME_*.

With ESP-IDF
Espressif IoT Development Framework — toolchain used to build and flash the ESP32-S3 client firmware (v5.1+ recommended).
from Tooling (v5.1+) exported in your shell:

Terminal window
cd firmware/gg-edge-client
idf.py set-target esp32s3
idf.py menuconfig
Target set to esp32s3
… menuconfig (save and exit) …

Set under GG Edge Client:

  • Wi‑Fi SSID / password
  • Client Thing name (CLIENT_THING_NAME)
  • Region (AWS_REGION)
  • IoT data endpoint is used only for reference; discovery uses greengrass-ats.iot.<region>.amazonaws.com
  • Telemetry interval (GG_TELEMETRY_INTERVAL_S, default 10 s)
Terminal window
idf.py build flash monitor
Project build complete. To flash, run:
idf.py -p (PORT) flash
Connecting to /dev/ttyACM0...
wifi connected
discovered core 192.0.2.10:8883
mqtt connected to core

Boot through to the first telemetry message (esp32-1). Example host 192.0.2.10 is the docs stand-in for the NUC; discovery returns your real LAN IP.

I (257) gg-edge: RGB strip on GPIO 48 — boot blink
I (1007) gg-edge: RGB -> off
I (2217) gg-edge: chip temperature sensor ready: 28.9 C
I (3017) gg-edge: wifi connected
I (4197) gg-edge: discovered core 192.0.2.10:8883
I (4197) gg-edge: mqtt connected to core
I (4197) gg-edge: subscribed gg-edge/actuator/gg-edge-wt-dev-esp32-1
I (13207) gg-edge: telemetry {"thing":"gg-edge-wt-dev-esp32-1","tempC":28.90,"rssi":-29,"uptimeS":13,"rgb":"off"} msg_id=0
  1. discovered core <nuc-ip>:8883 from discovery
    Greengrass discovery API — HTTPS call with the client certificate that returns associated core connectivity (host, port, CA) for local MQTT.
  2. mqtt connected to core (mTLS
    Mutual TLS — both sides present certificates. The ESP32-S3 authenticates to Moquette with its IoT Thing certificate.
    to Moquette)
  3. A telemetry JSON line every 10 s
  4. On button press: published sensor event=press
  5. After the closed-loop component runs: actuator msg on gg-edge/actuator/<thing> and RGB -> green (on)

Next: Prove the LAN loop.