ESPNow send function

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
MMliam
Posts: 121
Joined: Mon May 07, 2018 1:08 pm

ESPNow send function

Post by MMliam » Sun Aug 28, 2022 11:50 pm

ESPNow code runs in ESP8266, throws an error in ESP32.

Code:

Code: Select all

eNow = espnow.ESPNow()
enRcvr = b'\x01\x02\x03\x04\x05\x06'
devState = bytes('On', 'ascii')
ackRcvd = eNow.send(enRcvr,devState,True)
This code snippet runs without error in an ESP8266

In an ESP32 it throws this error:
Traceback (most recent call last):
File "main.py", line 29, in <module>
OSError: (-12393, 'ESP_ERR_ESPNOW_NOT_FOUND')
MicroPython v1.19.1-espnow-6-g44f65965b on 2022-07-09; ESP32 module with ESP32
Line 29 is the eNow.send function.
Both the ESP8266 & ESP32 are using their respective v1.19.1-espnow builds.

Anyone know what causing the error for the ESP32?

Mike

Online
davef
Posts: 811
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: ESPNow send function

Post by davef » Mon Aug 29, 2022 1:39 am

Which ESP32 variant?

jameswise
Posts: 5
Joined: Tue Aug 16, 2022 1:32 am

Re: ESPNow send function

Post by jameswise » Wed Jul 26, 2023 3:47 am

MMliam wrote:
Sun Aug 28, 2022 11:50 pm
ESPNow code runs in ESP8266, throws an error in ESP32.

Code:

Code: Select all

eNow = espnow.ESPNow()
enRcvr = b'\x01\x02\x03\x04\x05\x06'
devState = bytes('On', 'ascii')
ackRcvd = eNow.send(enRcvr,devState,True)
This code snippet runs without error in an ESP8266

In an ESP32 it throws this error:
Traceback (most recent call last):
File "main.py", line 29, in <module>
OSError: (-12393, 'ESP_ERR_ESPNOW_NOT_FOUND') wordle bot
MicroPython v1.19.1-espnow-6-g44f65965b on 2022-07-09; ESP32 module with ESP32
Line 29 is the eNow.send function.
Both the ESP8266 & ESP32 are using their respective v1.19.1-espnow builds.

Anyone know what causing the error for the ESP32?

Mike
This error can occur due to several reasons:
  1. ESPNow module not installed: Ensure that the ESPNow module is properly installed on the ESP32. Double-check the installation steps and make sure all dependencies are met.
  2. Incompatible firmware version: Verify that the ESPNow module and the firmware version on the ESP32 are compatible. It’s possible that the firmware version you are using on the ESP32 does not support the ESPNow module.
  3. Incorrect configuration: Check if the ESPNow module is correctly configured on the ESP32. Make sure that all necessary settings, such as channel, encryption, and data rate, are properly set.
  4. Hardware limitations: Some ESP32 boards may have hardware limitations that prevent the ESPNow module from functioning correctly. Make sure your board supports the ESPNow functionality.
By investigating these possibilities, you should be able to identify the cause of the error and find a suitable solution.

Post Reply