Skip to content

Flashing Firmware

  • ESP-IDF v5.x installed
  • ESP32-CAM-MB carrier board (recommended) or USB-to-serial adapter
  • LoRa module disconnected from GPIO 1/3 during flashing
Terminal window
# Use the hardware sdkconfig defaults
cp sdkconfig.defaults sdkconfig.defaults
idf.py set-target esp32
idf.py build

The hardware config enables WiFi, BLE, PSRAM, and the OTA partition table.

If using the carrier board with CH340G USB-to-serial:

Terminal window
idf.py -p /dev/ttyUSB0 flash monitor

The MB board handles the boot mode (GPIO0 pulled low) and reset automatically.

If using a bare ESP32-CAM without the MB board:

  1. Connect the adapter:

    • Adapter TX → ESP32-CAM RX (GPIO3)
    • Adapter RX → ESP32-CAM TX (GPIO1)
    • Adapter GND → ESP32-CAM GND
    • 5V → ESP32-CAM 5V
  2. Enter flash mode:

    • Connect GPIO0 to GND
    • Press the RST button (or cycle power)
    • GPIO0 can be released after boot
  3. Flash:

    Terminal window
    idf.py -p /dev/ttyUSB0 flash
  4. Run (normal mode):

    • Disconnect GPIO0 from GND
    • Press RST again

After flashing, connect the RYLR module to the ESP32-CAM:

ESP32-CAM PinRYLR PinFunction
GPIO1 (TX)RXDESP32 transmits to module
GPIO3 (RX)TXDModule transmits to ESP32
3.3VVDDPower (RYLR runs at 3.3V)
GNDGNDGround

After power-on (normal mode, K1 not held):

  1. Initialize NVS
  2. Load LoRa config from NVS (or use defaults)
  3. Check if WiFi is provisioned
  4. If not provisioned → start BLE provisioning (use ESP SoftAP Provisioning app)
  5. Connect to WiFi
  6. Start remote syslog logging
  7. Initialize RYLR LoRa module via AT commands
  8. Start camera-to-LoRa pipeline task

If the LoRa module is not yet connected, you can still use the serial console:

Terminal window
idf.py -p /dev/ttyUSB0 monitor

Press Ctrl+] to exit the monitor.