Skip to content

ESPNOW result response for channel difference #7486

@kapyaar

Description

@kapyaar

Board

ESP32 Dev Module

Device Description

Basic ESP32 Dev Module. No additional hardware.

Hardware Configuration

None.

Version

v2.0.5

IDE Name

Arduino IDE

Operating System

Windows 11

Flash frequency

40M

PSRAM enabled

no

Upload speed

115200

Description

I am using basic ESPNow examples. When I intentionally test it with different channels,

I do see the following error on my Serial port.
E (21407) ESPNOW: Peer channel is not equal to the home channel, send fail!

This is good information. However, the only response code that comes out is from the following code.

else if (result == ESP_ERR_ESPNOW_ARG) {
Serial.println("Invalid Argument");
}

Which is fine if this would always mean "channel not same". I would like to make use of this information. So, Can you confirm if

  1. ESP_ERR_ESPNOW_ARG always means wrong channel
  2. Or What is the best way to get the error code for "ESPNOW: Peer channel is not equal to the home channel" inside the code.

I went through https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/error-codes.html, but no specific error code that I can find to this effect.

thanks,

Sketch

ESPNow example code.

Debug Message

E (21407) ESPNOW: Peer channel is not equal to the home channel, send fail!

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: BT&WifiBT & Wifi related issuesType: ExampleIssue is related to specific example.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions