esp-now-skill

Generates and debugs ESP-NOW component firmware for ESP32 chips using verified recipes and API references.

28|3|Updated Jun 24, 2026
One-click install
npx skills add https://github.com/JasonYANG170/esp-dev-skill --skill esp-now-skill-jasonyang170
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: esp-now-skill
Source: https://github.com/JasonYANG170/esp-dev-skill/tree/main/repos/esp-now
Command: npx skills add https://github.com/JasonYANG170/esp-dev-skill --skill esp-now-skill-jasonyang170

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developing with Espressif's ESP-NOW connectionless Wi-Fi component requires precise initialization ordering, correct Kconfig options, and knowledge of dozens of APIs across control, security, OTA, and provisioning modules. This Skill prevents common firmware failures by grounding every generated line of code in the real espressif/esp-now repository source, eliminating hallucinated APIs and misordered initialization. ## Core Features & Use Cases - Scenario Recipes: 12 step-by-step recipes covering broadcast/unicast messaging, device control binding, security handshake (ECDH + AES-CCM), batch OTA upgrades, Wi-Fi provisioning, wireless debugging, time sync, and coin-cell low-power switches. - API & Config Reference: Complete signatures from espnow.h, espnow_ctrl.h, espnow_ota.h, espnow_sec, and espnow_prov headers, plus a full Kconfig option table with defaults and IDF version compatibility. - Pitfall Prevention: 39 documented traps with WRONG/CORRECT code pairs, such as calling espnow_init before esp_wifi_start or forgetting espnow_set_dec_key for encrypted reception. - Use Case: A developer building a battery-powered switch that controls a smart bulb asks for the binding and control flow; the Skill produces the initiator/responder code with light-sleep charging, bind window handling, and persistent state storage based on the coin_cell_demo example. ## Quick Start Ask the AI to create an ESP-NOW project that sends control data from a button to a lamp using the espressif/esp-now component on an ESP32-C3.

Frequently Asked Questions about esp-now-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I send and receive ESP-NOW data on ESP32?

Initialize in this order: espnow_storage_init, then Wi-Fi in STA mode with esp_wifi_start, then espnow_init. Register a receive callback with espnow_set_config_for_data_type and send with espnow_send using a frame head with broadcast and retransmit_count set.

How do I implement ESP-NOW device control binding between a switch and a light?

The responder calls espnow_ctrl_responder_bind with a timeout and RSSI threshold to open a binding window, then registers a data callback via espnow_ctrl_responder_data. The initiator triggers espnow_ctrl_initiator_bind and sends values with espnow_ctrl_initiator_send.

Which chips and ESP-IDF versions does the esp-now component support?

The component targets ESP32, ESP32-C2/C3/C6, and ESP32-S2/S3, and requires ESP-IDF v4.4 or later per its idf_component.yml. It does not apply to ESP8266 or to raw esp_now low-level API questions, which belong to ESP-IDF documentation.

Why is my ESP-NOW encrypted data still sent in plaintext?

Setting sec_enable=1 in espnow_config_t only enables the capability. You must also call espnow_set_key and espnow_set_dec_key, complete the security handshake, and set frame_head.security to true before sending.

Why does my coin-cell ESP-NOW switch reset when sending packets?

The capacitor is not charged before transmission. Enable CONFIG_ESPNOW_LIGHT_SLEEP, call a light-sleep delay before each send, pair esp_wifi_force_wakeup_acquire/release correctly, and set esp_now_set_wake_window(0) to save power.

How does ESP-NOW batch OTA upgrade work?

The initiator downloads firmware over HTTP and writes it to its own next update partition with esp_ota_write, computes the SHA-256, then distributes it via espnow_ota_initiator_send with an esp_partition_read callback. Responders run espnow_ota_responder_start to receive and flash the image with resume support.