Skip to content

Blynk-Technologies/Edgent-ESP-IDF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blynk.Edgent for ESP-IDF

Blynk.Edgent is a packaged solution that allows ESP-IDF developers to easily connect their devices to the Blynk IoT platform and take advantage of all its advanced features without the need for extensive coding.

image

Features

  • Blynk.Inject: connect your devices easily using Blynk IoT App (iOS and Android)
    • BLE-assisted device provisioning for the best end-user experience
    • WiFiAP-based provisioning for devices without BLE support - (soon)
  • Network Manager: Advanced network connection management and troubleshooting
    • WiFi: Maintains connection to the most reliable WiFi network (up to 16 configured networks)
    • Ethernet: Supports Static IP or DHCP network configuration
  • Secure Blynk.Cloud MQTT connection that provides simple API for:
    • Data transfer with DataStreams, reporting Events, and accessing Metadata
  • Blynk.Air - automatic, managed Over The Air firmware updates using Web Dashboard
    • Direct firmware upgrade using iOS/Android App before device activation - (soon)

Supported targets:

✅ ESP32, ESP32-S3, ESP32-C2, ESP32-C3, ESP32-C5, ESP32-C6
⏳ ESP32-S2 - coming soon
❌ ESP32-P4, ESP32-H4

Important

Blynk.Edgent component is provided for specific ESP-IDF versions.
See the Release Notes for compatibility details.

Getting Started

  • Sign up/Log in to your Blynk Account
  • Install Blynk IoT App for iOS or Android
  • Create a new Product Template. This will provide you with Template ID and Template Name.

1. Build firmware

idf.py create-project-from-example "blynk/edgent:basic"
cd basic

# Configure the target chip
idf.py set-target esp32

# Configure Blynk.Edgent component
idf.py menuconfig

In menuconfig, navigate to:

(Top) → Component config → Blynk.Edgent
  • Set Template ID
  • Set Template Name
  • Save configuration and exit
  • Build and flash firmware

2. Connect your device to Blynk.Cloud

  1. Open Blynk IoT App on your smartphone
  2. Click Add device -> Find devices nearby
  3. Select your device and follow the wizard instructions

The device should appear online once the above steps complete successfully.

Expected device log

See the device log via idf.py monitor:

I (771) edgent.c: Blynk.Edgent initialized (device: Blynk Demo-N1A9)
I (771) edgent.c: State: IDLE => CONNECTING_NET
I (771) example: State change event received
I (851) nm_wifi.c: Connecting to SSID:wifi BSSID 2c:c8:1b:xx:xx:xx CH:11
I (851) example: Awaiting Cloud connection...
I (1931) edgent.c: State: CONNECTING_NET => CONNECTING_CLOUD
I (1931) example: State change event received
I (2981) edgent.c: State: CONNECTING_CLOUD => RUNNING
I (2981) example: State change event received
I (2981) example: Initial connection established
I (2991) example: [main] Cloud connected event received! Continuing...

The example application also handles the on-board button:

  • Double click – start provisioning without resetting the previous configuration, allowing reconfiguration.
  • Long press – perform a full configuration reset and start provisioning.

Adding to existing project

idf.py add-dependency "blynk/edgent"

If your project uses MINIMAL_BUILD, consider disabling it, or add build dependencies explicitly:

esp_event esp_netif esp_wifi esp_https_ota
esp_partition efuse nvs_flash mqtt json bt esp_eth

OTA configuration

Minimum flash size requirement for OTA updates is 4MB.

You should select a dual-bank partition table, for example:

(Top) → Partition Table → Partition Table → Two large size OTA partitions

Ethernet configuration

To enable Ethernet:

  1. Go to: Top → Component config → Blynk.Edgent
    and enable the "Use Ethernet" option.

  2. Then go to: Top → Example Ethernet Configuration
    and configure the adapter according to type, options, and pins.

Example: sdkconfig.T-Internet-POE file contains a sample configuration for the LilyGO T-Internet-POE board.

Further reading