Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Esp32 failed to send one to many using espnow protocol (IDFGH-9600) #10949

Closed
3 tasks done
lebossejames opened this issue Mar 8, 2023 · 29 comments
Closed
3 tasks done
Assignees
Labels
Awaiting Response awaiting a response from the author Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally

Comments

@lebossejames
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

Hello,

I use Arduino IDE with ESP32-C3 (library 2.0.7) and use ESP-NOW but ESP failed to send one to many times using espnow protocol.
13:09:30.201 -> Last Packet Send Status: Delivery Fail 13:09:31.795 -> isAfterBLE_FRONT 13:09:31.795 -> Ask to open all relay 2CH 13:09:32.825 -> Sent with success 13:09:32.825 -> 13:09:32.825 -> Last Packet Send Status: Delivery Fail 13:09:34.452 -> isAfterBLE_FRONT

I try to set this on my code but doesn't resolved:
WiFi.useStaticBuffers(true); WiFi.mode(WIFI_STA);

@espressif-bot espressif-bot added the Status: Opened Issue is new label Mar 8, 2023
@github-actions github-actions bot changed the title Esp32 failed to send one to many using espnow protocol Esp32 failed to send one to many using espnow protocol (IDFGH-9600) Mar 8, 2023
@lebossejames
Copy link
Author

lebossejames commented Sep 9, 2023

Hello,

News of this issue? @zhangyanjiaoesp

@espressif-bot espressif-bot added Status: In Progress Work is in progress and removed Status: Opened Issue is new labels Sep 19, 2023
@zhangyanjiaoesp
Copy link
Collaborator

@lebossejames

Do you use BLE when using ESP-NOW? Can you provide a demo for us to reproduce the issue? Can't tell from your log what happened .

@lebossejames
Copy link
Author

lebossejames commented Sep 20, 2023

@zhangyanjiaoesp

Hello,

This is my project.
On line 57: String mode_selected=modes[0];

if you set modes[0] Client ; modes[1] Server

On line 71 : broadcastServerESPNow : mac address of wifi Server
you can flash on your esp
ManageBluetoothCameraByESP.zip

@zhangyanjiaoesp
Copy link
Collaborator

We will try to test it on our side.

@zhangyanjiaoesp
Copy link
Collaborator

@lebossejames
When I was compiling the project you provided, there were many errors.
Can you describe what exactly your project does?

  1. What the BLE do?
  2. What the ESP-NOW do?
  3. Can you open the debug log when testing? And provide the complete logs for both devices.

@lebossejames
Copy link
Author

@zhangyanjiaoesp I have one code contains BLE and ESP-NOW functions, i use only ESP-NOW

Client ESP-NOW send message when the level of input is High and other message when it's low to Server ESP-NOW.

What do you mean of debug log? I use Arduino IDE.

@lebossejames
Copy link
Author

@zhangyanjiaoesp any news?

@zhangyanjiaoesp
Copy link
Collaborator

@lebossejames
In case of Arduino, to open the debug log, besides enabling the core level (set the Tools -> Core debug level -> debug), you also need to Serial.setDebugOutput(true);, where Serial can be any serial port or USB.

@lebossejames
Copy link
Author

lebossejames commented Oct 17, 2023

@zhangyanjiaoesp
Copy link
Collaborator

zhangyanjiaoesp commented Oct 17, 2023

@lebossejames
can't get more infomation from the log.
When I try to test your code locally, there is the compile error:
MicrosoftTeams-image (7)

@zhangyanjiaoesp
Copy link
Collaborator

ManageBluetoothCameraByESP/LCD_Manage.cpp:9:9: fatal error: LiquidCrystal_I2C.h: No such file or directory
  #include<LiquidCrystal_I2C.h>
          ^~~~~~~~~~~~~~~~~~~~~
 compilation terminated.

 exit status 1
 
Compilation error: LiquidCrystal_I2C.h: No such file or directory

@lebossejames
Copy link
Author

Are you install:
https://gitlab.com/painlessMesh/painlessMesh
and
Capture d’écran de 2023-10-17 12-19-48

@zhangyanjiaoesp
Copy link
Collaborator

Just installed LiquidCrystal I2C in Arduino IDE. How to install painlessMesh? Clone it and put it under the same folder as the ManageBluetoothCameraByESP.zip project?

@zhangyanjiaoesp
Copy link
Collaborator

Installed painlessMesh:

image

now the compile error is:

In file included from /home/Arduino/libraries/Painless_Mesh/src/painlessMesh.h:10,
                 from /home//ManageBluetoothCameraByESP/ManageBluetoothCameraByESP.ino:26:
/home/Arduino/libraries/Painless_Mesh/src/painlessmesh/configuration.hpp:31:10: fatal error: AsyncTCP.h: No such file or directory
 #include <AsyncTCP.h>
          ^~~~~~~~~~~~
compilation terminated.

exit status 1

Compilation error: exit status 1

@zhangyanjiaoesp
Copy link
Collaborator

zhangyanjiaoesp commented Oct 17, 2023

Installed AsyncTCP:

image

now the log is:

ARNING: library LiquidCrystal I2C claims to run on avr architecture(s) and may be incompatible with your current board which runs on esp32 architecture(s).
Sketch uses 1511540 bytes (115%) of program storage space. Maximum is 1310720 bytes.
Global variables use 64476 bytes (19%) of dynamic memory, leaving 263204 bytes for local variables. Maximum is 327680 bytes.
Sketch too big; see https://support.arduino.cc/hc/en-us/articles/360013825179 for tips on reducing it.
text section exceeds available space in board

Compilation error: text section exceeds available space in board

@lebossejames
Copy link
Author

lebossejames commented Oct 17, 2023

i copy theses files on Painless folder library :
AsyncTCP.zip

I don't install AsyncTCP library !! I use ESP32-C3 partitions schemes 1.9APP/190kb SPIFFS

@zhangyanjiaoesp
Copy link
Collaborator

i copy theses files on Painless folder library : AsyncTCP.zip

I don't install AsyncTCP library !! I use ESP32-C3 partitions schemes 1.9APP/190kb SPIFFS

OK, I will try again.

@zhangyanjiaoesp
Copy link
Collaborator

zhangyanjiaoesp commented Oct 18, 2023

@zhangyanjiaoesp

Hello,

This is my project. On line 57: String mode_selected=modes[0];

if you set modes[0] Client ; modes[1] Server

On line 71 : broadcastServerESPNow : mac address of wifi Server you can flash on your esp ManageBluetoothCameraByESP.zip

Now the project can run on my side. I have some questions :

  1. If the device want to send ESP-NOW, set String mode_selected=modes[0], and if the device want to receive ESP-NOW set String mode_selected=modes[1], right?
  2. there is comment on line 70:

// REPLACE WITH YOUR RECEIVER MAC Address Wifi
uint8_t broadcastServerESPNow[] = {0x7C,0xDF,0xA1,0xC2,0x50,0xEC};

So the broadcastServerESPNow is the mac address which will receive the ESP-NOW data?

  1. How does your code implement one device sends packets to multiple devices? Here is the send code:

esp_err_t result = esp_now_send(broadcastServerESPNow, (uint8_t *) &myDataESPNow, sizeof(myDataESPNow));

It only can send to one device.

@lebossejames
Copy link
Author

lebossejames commented Oct 18, 2023

@zhangyanjiaoesp

  1. right
  2. right
  3. i implement code to send only to One device, because i have only 1 server

@zhangyanjiaoesp
Copy link
Collaborator

There is crash on the receive device, I think that is why the ESP-NOW can't be received.
Do you see a similar phenomenon on your device? @lebossejames

ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5810,len:0x438
load:0x403cc710,len:0x91c
load:0x403ce710,len:0x25b0
entry 0x403cc710
setup---begin
This chip has 1 cores
                     I2C: SDA 4 SCL 5
setup---middle1
68:B6:B3:A4:61:30
setup---end
setup---disableCore0WDT
Bytes received: 16
String: A1

Ask to close relay-2CH n�°1
[2023-10-19 10:30:15] Bytes received: 64
[2023-10-19 10:30:15] String: Guru Meditation Error: Core  0 panic'ed (Load access fault). Exception was unhandled.
[2023-10-19 10:30:15] 
[2023-10-19 10:30:15] Core  0 register dump:
[2023-10-19 10:30:15] MEPC    : 0x42034378  RA      : 0x42028c80  SP      : 0x3fcad940  GP      : 0x3fc92400  
[2023-10-19 10:30:15] TP      : 0x3fc78a08  T0      : 0x420f37fc  T1      : 0x4201fe00  T2      : 0xc9000001  
[2023-10-19 10:30:15] S0/FP   : 0x00000000  S1      : 0x00000000  A0      : 0x60000000  A1      : 0x004904de  
[2023-10-19 10:30:15] A2      : 0x00000066  A3      : 0x3fcad95c  A4      : 0x004904de  A5      : 0x00000000  
[2023-10-19 10:30:15] A6      : 0x00000000  A7      : 0x00000009  S2      : 0x6e001000  S3      : 0x3fc9c558  
[2023-10-19 10:30:15] S4      : 0x6e001000  S5      : 0x00000000  S6      : 0x00000000  S7      : 0x004904de  
[2023-10-19 10:30:15] S8      : 0x00000000  S9      : 0x00000000  S10     : 0x00000001  S11     : 0x3fcb40a4  
[2023-10-19 10:30:15] T3      : 0xdfffffff  T4      : 0xbfffffff  T5      : 0x80000000  T6      : 0x00000009  
[2023-10-19 10:30:15] MSTATUS : 0x00001881  MTVEC   : 0x40380001  MCAUSE  : 0x00000005  MTVAL   : 0x004904de  
[2023-10-19 10:30:15] MHARTID : 0x00000000  
[2023-10-19 10:30:15] 
[2023-10-19 10:30:15] Stack memory:
[2023-10-19 10:30:15] 3fcad940: 0x00000001 0x3fcad9a6 0x6e001000 0x004904de 0x00000000 0x00000000 0x00000008 0x00000066
[2023-10-19 10:30:15] 3fcad960: 0x6e001000 0x00000000 0x3fc9c558 0x42029c70 0x00000000 0x00000000 0x00000000 0xffffffff
[2023-10-19 10:30:15] 3fcad980: 0x3fcb4134 0x00000000 0x3fc998cc 0xffffffdd 0x3fcb414c 0x3fcb40a4 0x00000045 0x00000040
[2023-10-19 10:30:15] 3fcad9a0: 0x00000001 0x004904de 0x3fc91f20 0x42023a8e 0x00000001 0x3c131890 0x3fc91f20 0x6e001000
[2023-10-19 10:30:15] 3fcad9c0: 0x3fc9c000 0x3fc9747c 0x6e001000 0x4201fe0e 0x3fc9c000 0x3fc97000 0x3fc97000 0x4202079a
[2023-10-19 10:30:15] 3fcad9e0: 0x00000002 0x3fc97000 0x3fc97000 0x4200255e 0x3fcb37b4 0x00000000 0x4203ed4c 0x4003ee24
[2023-10-19 10:30:15] 3fcada00: 0x00000001 0x3fce0000 0x00000000 0xd2fc49ee 0x00000002 0x00000001 0xffffffc0 0x3fc998ac
[2023-10-19 10:30:15] 3fcada20: 0x3fcb4150 0x3fcb414c 0x3fc9a000 0x420dd68c 0x3fcb4134 0x00000000 0x8b5260fe 0xffff20c0
[2023-10-19 10:30:15] 3fcada40: 0x00000080 0x3fcb40a4 0x3fcb414c 0x3fcb37b4 0x3fcb4279 0x3fcb39ec 0x3fcb4134 0x420f397a
[2023-10-19 10:30:15] 3fcada60: 0x3fca17f0 0x00000003 0x4957454e 0x00000000 0x3fcdf934 0x3fce0000 0x3ff1b000 0xa4b3b668
[2023-10-19 10:30:15] 3fcada80: 0x3fc93061 0x00000003 0x3fc9ac9c 0x3fc9d000 0x00060000 0x00000000 0xc0380000 0x00000000
[2023-10-19 10:30:15] 3fcadaa0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
[2023-10-19 10:30:15] 3fcadac0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
[2023-10-19 10:30:15] 3fcadae0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
[2023-10-19 10:30:15] 3fcadb00: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
[2023-10-19 10:30:15] 3fcadb20: 0x3fcadb78 0x00000000 0x3fc998cc 0x00000018 0x00000149 0x00000000 0x3fcb37b4 0x3fc99bb8
[2023-10-19 10:30:15] 3fcadb40: 0x000000d0 0x3fcb39ec 0x00000000 0x421235be 0x00000001 0x3fce0000 0x3fce0000 0x3fcabb34
[2023-10-19 10:30:15] 3fcadb60: 0x00000011 0xffffffdd 0x00000000 0x3fcb413e 0x3fce0000 0x3fce0000 0x3fce0000 0x00000000
[2023-10-19 10:30:15] 3fcadb80: 0x3fcdf934 0x3fce0000 0x3ff1b000 0x3fce0000 0x3fce0000 0x3fce0000 0x000000f5 0x3fce0000
[2023-10-19 10:30:15] 3fcadba0: 0x3fcb4104 0x3fce0000 0x3fcb40a4 0x400415ba 0x3fce0000 0x3fce0000 0x3fce0000 0x3ff1b5a8
[2023-10-19 10:30:15] 3fcadbc0: 0x00000000 0x3fcdf918 0x3fce0000 0x40040902 0x00000000 0x00000000 0x00000011 0x00000000
[2023-10-19 10:30:15] 3fcadbe0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
[2023-10-19 10:30:15] 3fcadc00: 0x00000000 0x00000000 0x00000000 0x4038d314 0x00000000 0x00000000 0x00000000 0x00000000
[2023-10-19 10:30:15] 3fcadc20: 0x00000000 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xbaad5678
[2023-10-19 10:30:15] 3fcadc40: 0x00000160 0xabba1234 0x00000154 0x3fcad8f0 0x00004702 0x3fc98f74 0x3fc98f74 0x3fcadc4c
[2023-10-19 10:30:15] 3fcadc60: 0x3fc98f6c 0x00000002 0x3fca86bc 0x3fca86bc 0x3fcadc4c 0x00000000 0x00000017 0x3fcac23c
[2023-10-19 10:30:15] 3fcadc80: 0x69666977 0x5a7acb00 0xf752ab23 0x000f4c9c 0x00000000 0x3fcadc30 0x00000017 0x00000002
[2023-10-19 10:30:15] 3fcadca0: 0x00000000 0x00000000 0x00000000 0x3fca1eb4 0x3fca1f1c 0x3fca1f84 0x00000000 0x00000000
[2023-10-19 10:30:15] 3fcadcc0: 0x00000001 0x00000000 0x00000000 0x00000000 0x4210e7a4 0x00000000 0x00000000 0x00000000
[2023-10-19 10:30:15] 3fcadce0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
[2023-10-19 10:30:15] 3fcadd00: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
[2023-10-19 10:30:15] 3fcadd20: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000

@lebossejames
Copy link
Author

lebossejames commented Oct 19, 2023

I have theses traces @zhangyanjiaoesp :

07:29:50.166 -> !⸮⸮ ⸮⸮⸮�ʣ�N⸮⸮⸮ESP-ROM:esp32c3-api1-20210207 07:29:50.190 -> Build:Feb 7 2021 07:29:50.190 -> rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT) 07:29:50.190 -> SPIWP:0xee 07:29:50.190 -> mode:DIO, clock div:1 07:29:50.190 -> load:0x3fcd5810,len:0x438 07:29:50.190 -> load:0x403cc710,len:0x918 07:29:50.190 -> load:0x403ce710,len:0x25f4 07:29:50.190 -> entry 0x403cc710 07:29:50.456 -> setup---begin 07:29:50.456 -> This chip has 1 cores 07:29:50.456 -> I2C: SDA 4 SCL 5 07:29:50.954 -> setup---middle1 07:29:50.954 -> [ 793][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 0 - WIFI_READY 07:29:51.020 -> [ 827][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 2 - STA_START 07:29:51.020 -> 7C:DF:A1:C2:50:EC 07:29:53.013 -> setup---end 07:29:53.013 -> setup---disableCore0WDT 07:29:53.411 -> [ 3238][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:29:53.411 -> [ 3238][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:29:53.445 -> [ 3241][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi Reconnect Running 07:29:55.835 -> [ 5659][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:29:55.835 -> [ 5660][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:29:55.835 -> [ 5663][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:29:58.262 -> [ 8082][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:29:58.262 -> [ 8083][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:29:58.262 -> [ 8086][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:00.686 -> [ 10511][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:00.686 -> [ 10511][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:00.686 -> [ 10515][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:03.122 -> [ 12934][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:03.122 -> [ 12934][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:03.122 -> [ 12937][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:05.534 -> [ 15358][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:05.534 -> [ 15359][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:05.534 -> [ 15362][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:07.959 -> [ 17783][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:07.959 -> [ 17783][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:07.959 -> [ 17786][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:10.384 -> [ 20205][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:10.384 -> [ 20205][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:10.384 -> [ 20208][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:12.808 -> [ 22629][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:12.808 -> [ 22629][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:12.808 -> [ 22633][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:15.233 -> [ 25052][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:15.233 -> [ 25052][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:15.233 -> [ 25056][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:17.657 -> [ 27476][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:17.657 -> [ 27476][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:17.657 -> [ 27480][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:20.081 -> [ 29900][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:20.081 -> [ 29900][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:20.081 -> [ 29904][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:22.506 -> [ 32325][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:22.506 -> [ 32326][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:22.506 -> [ 32329][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:24.930 -> [ 34747][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:24.930 -> [ 34748][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:24.930 -> [ 34751][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:27.354 -> [ 37170][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:27.354 -> [ 37170][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:27.354 -> [ 37174][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:29.779 -> [ 39593][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:29.779 -> [ 39593][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:29.779 -> [ 39596][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:32.204 -> [ 42016][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:32.204 -> [ 42016][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:32.204 -> [ 42019][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:34.628 -> [ 44441][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:34.628 -> [ 44442][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:34.628 -> [ 44445][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:37.053 -> [ 46864][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:37.053 -> [ 46864][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:37.053 -> [ 46867][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:37.086 -> Bytes received: 16 07:30:37.086 -> String: A1 07:30:37.086 -> 07:30:39.078 -> Ask to close relay-2CH n°1 07:30:42.366 -> [ 52202][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:42.399 -> [ 52202][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:42.399 -> [ 52205][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:44.790 -> [ 54623][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:44.790 -> [ 54624][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:44.823 -> [ 54627][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:47.213 -> [ 57046][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:47.213 -> [ 57046][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:47.246 -> [ 57050][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:49.637 -> [ 59469][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:49.637 -> [ 59469][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:49.670 -> [ 59472][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:52.061 -> [ 61893][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:52.061 -> [ 61893][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:52.094 -> [ 61896][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:54.484 -> [ 64314][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:54.484 -> [ 64315][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:54.518 -> [ 64318][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:56.909 -> [ 66737][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:56.909 -> [ 66737][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:56.942 -> [ 66740][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:59.367 -> [ 69198][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:59.367 -> [ 69198][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:59.400 -> [ 69202][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:01.791 -> [ 71622][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:01.791 -> [ 71622][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:01.824 -> [ 71625][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:04.214 -> [ 74044][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:04.214 -> [ 74044][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:04.247 -> [ 74048][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:06.638 -> [ 76467][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:06.638 -> [ 76467][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:06.671 -> [ 76470][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:09.061 -> [ 78889][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:09.061 -> [ 78889][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:09.094 -> [ 78892][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:11.485 -> [ 81311][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:11.485 -> [ 81312][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:11.518 -> [ 81315][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:13.909 -> [ 83735][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:13.909 -> [ 83735][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:13.909 -> [ 83739][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:16.333 -> [ 86158][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:16.333 -> [ 86158][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:16.333 -> [ 86161][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:18.757 -> [ 88580][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:18.757 -> [ 88580][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:18.757 -> [ 88583][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:21.181 -> [ 91002][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:21.181 -> [ 91002][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:21.181 -> [ 91006][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:23.605 -> [ 93424][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:23.605 -> [ 93425][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:23.605 -> [ 93428][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:26.028 -> [ 95848][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:26.028 -> [ 95848][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:26.028 -> [ 95851][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:28.453 -> [ 98272][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:28.453 -> [ 98272][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:28.453 -> [ 98276][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:30.876 -> [100696][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:30.876 -> [100696][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:30.876 -> [100699][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:33.299 -> [103118][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:33.299 -> [103118][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:33.299 -> [103121][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:35.724 -> [105542][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:35.724 -> [105542][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:35.724 -> [105545][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running

no crash.

@zhangyanjiaoesp
Copy link
Collaborator

zhangyanjiaoesp commented Oct 19, 2023

@lebossejames
After comment line 391, the crash disappear.

Serial.println(myDataESPNow.msgNow);

And I have captured the packets between the two ESP32C3 device, there are too many RTS and probe request packets.

Screenshot from 2023-10-19 14-05-01

After comment line 1039~1042, the ESP-NOW send callback can return success.

  //if(mode_selected.equals(modes[1])){
  //  WiFi.begin(WIFI_SSID_JM, JM_PASSWORD);
  //  delay(1000);
  //}

image

So suggest you begin to send ESP-NOW packets after the STA connected. And the AP's channel should be same to the ESP-NOW sender.

@zhangyanjiaoesp
Copy link
Collaborator

I have theses traces @zhangyanjiaoesp :

07:29:50.166 -> !⸮⸮ ⸮⸮⸮�ʣ�N⸮⸮⸮ESP-ROM:esp32c3-api1-20210207 07:29:50.190 -> Build:Feb 7 2021 07:29:50.190 -> rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT) 07:29:50.190 -> SPIWP:0xee 07:29:50.190 -> mode:DIO, clock div:1 07:29:50.190 -> load:0x3fcd5810,len:0x438 07:29:50.190 -> load:0x403cc710,len:0x918 07:29:50.190 -> load:0x403ce710,len:0x25f4 07:29:50.190 -> entry 0x403cc710 07:29:50.456 -> setup---begin 07:29:50.456 -> This chip has 1 cores 07:29:50.456 -> I2C: SDA 4 SCL 5 07:29:50.954 -> setup---middle1 07:29:50.954 -> [ 793][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 0 - WIFI_READY 07:29:51.020 -> [ 827][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 2 - STA_START 07:29:51.020 -> 7C:DF:A1:C2:50:EC 07:29:53.013 -> setup---end 07:29:53.013 -> setup---disableCore0WDT 07:29:53.411 -> [ 3238][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:29:53.411 -> [ 3238][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:29:53.445 -> [ 3241][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi Reconnect Running 07:29:55.835 -> [ 5659][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:29:55.835 -> [ 5660][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:29:55.835 -> [ 5663][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:29:58.262 -> [ 8082][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:29:58.262 -> [ 8083][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:29:58.262 -> [ 8086][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:00.686 -> [ 10511][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:00.686 -> [ 10511][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:00.686 -> [ 10515][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:03.122 -> [ 12934][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:03.122 -> [ 12934][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:03.122 -> [ 12937][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:05.534 -> [ 15358][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:05.534 -> [ 15359][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:05.534 -> [ 15362][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:07.959 -> [ 17783][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:07.959 -> [ 17783][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:07.959 -> [ 17786][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:10.384 -> [ 20205][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:10.384 -> [ 20205][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:10.384 -> [ 20208][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:12.808 -> [ 22629][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:12.808 -> [ 22629][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:12.808 -> [ 22633][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:15.233 -> [ 25052][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:15.233 -> [ 25052][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:15.233 -> [ 25056][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:17.657 -> [ 27476][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:17.657 -> [ 27476][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:17.657 -> [ 27480][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:20.081 -> [ 29900][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:20.081 -> [ 29900][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:20.081 -> [ 29904][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:22.506 -> [ 32325][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:22.506 -> [ 32326][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:22.506 -> [ 32329][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:24.930 -> [ 34747][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:24.930 -> [ 34748][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:24.930 -> [ 34751][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:27.354 -> [ 37170][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:27.354 -> [ 37170][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:27.354 -> [ 37174][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:29.779 -> [ 39593][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:29.779 -> [ 39593][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:29.779 -> [ 39596][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:32.204 -> [ 42016][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:32.204 -> [ 42016][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:32.204 -> [ 42019][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:34.628 -> [ 44441][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:34.628 -> [ 44442][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:34.628 -> [ 44445][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:37.053 -> [ 46864][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:37.053 -> [ 46864][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:37.053 -> [ 46867][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:37.086 -> Bytes received: 16 07:30:37.086 -> String: A1 07:30:37.086 -> 07:30:39.078 -> Ask to close relay-2CH n°1 07:30:42.366 -> [ 52202][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:42.399 -> [ 52202][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:42.399 -> [ 52205][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:44.790 -> [ 54623][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:44.790 -> [ 54624][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:44.823 -> [ 54627][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:47.213 -> [ 57046][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:47.213 -> [ 57046][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:47.246 -> [ 57050][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:49.637 -> [ 59469][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:49.637 -> [ 59469][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:49.670 -> [ 59472][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:52.061 -> [ 61893][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:52.061 -> [ 61893][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:52.094 -> [ 61896][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:54.484 -> [ 64314][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:54.484 -> [ 64315][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:54.518 -> [ 64318][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:56.909 -> [ 66737][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:56.909 -> [ 66737][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:56.942 -> [ 66740][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:30:59.367 -> [ 69198][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:30:59.367 -> [ 69198][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:30:59.400 -> [ 69202][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:01.791 -> [ 71622][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:01.791 -> [ 71622][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:01.824 -> [ 71625][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:04.214 -> [ 74044][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:04.214 -> [ 74044][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:04.247 -> [ 74048][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:06.638 -> [ 76467][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:06.638 -> [ 76467][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:06.671 -> [ 76470][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:09.061 -> [ 78889][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:09.061 -> [ 78889][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:09.094 -> [ 78892][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:11.485 -> [ 81311][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:11.485 -> [ 81312][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:11.518 -> [ 81315][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:13.909 -> [ 83735][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:13.909 -> [ 83735][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:13.909 -> [ 83739][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:16.333 -> [ 86158][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:16.333 -> [ 86158][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:16.333 -> [ 86161][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:18.757 -> [ 88580][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:18.757 -> [ 88580][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:18.757 -> [ 88583][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:21.181 -> [ 91002][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:21.181 -> [ 91002][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:21.181 -> [ 91006][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:23.605 -> [ 93424][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:23.605 -> [ 93425][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:23.605 -> [ 93428][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:26.028 -> [ 95848][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:26.028 -> [ 95848][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:26.028 -> [ 95851][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:28.453 -> [ 98272][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:28.453 -> [ 98272][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:28.453 -> [ 98276][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:30.876 -> [100696][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:30.876 -> [100696][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:30.876 -> [100699][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:33.299 -> [103118][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:33.299 -> [103118][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:33.299 -> [103121][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running 07:31:35.724 -> [105542][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED 07:31:35.724 -> [105542][W][WiFiGeneric.cpp:1061] _eventCallback(): Reason: 201 - NO_AP_FOUND 07:31:35.724 -> [105545][D][WiFiGeneric.cpp:1085] _eventCallback(): WiFi AutoReconnect Running

no crash.

This log show the device can't find the AP.

@lebossejames
Copy link
Author

@zhangyanjiaoesp So there is a problem or not?

How works if i want to use Client-Server with this code (create a personal network with this informations network)
if(mode_selected.equals(modes[1])){ // WiFi.begin(WIFI_SSID_JM, JM_PASSWORD); // delay(1000); //}
?

@zhangyanjiaoesp
Copy link
Collaborator

Have suggested in #10949 (comment) .

So suggest you begin to send ESP-NOW packets after the STA connected. And the AP's channel should be same to the ESP-NOW sender.

That means you can call

if(mode_selected.equals(modes[1])){
    WiFi.begin(WIFI_SSID_JM, JM_PASSWORD);
    delay(1000);
}

And init ESP-NOW and send ESP-NOW data after you get the WIFI_EVENT_STA_CONNECTED event.

However, if the STA and AP have a lot of data interaction, it will still affect the sending and receiving of ESP-NOW packets.

@lebossejames
Copy link
Author

lebossejames commented Oct 20, 2023

@zhangyanjiaoesp how can i use ESP-NOW and connect Wifi AP (Server ESP32) without mac adress server?

@zhangyanjiaoesp
Copy link
Collaborator

@zhangyanjiaoesp how can i use ESP-NOW and connect Wifi AP (Server ESP32) without mac adress server?

@lebossejames I'm sorry I don't see what you mean. Could you describe it in more detail?

@Sherry616
Copy link
Collaborator

Hi @lebossejames, do you still have this problem? Could you share the latest update? Thanks.

@espressif-bot espressif-bot added Awaiting Response awaiting a response from the author Status: Reviewing Issue is being reviewed and removed Status: In Progress Work is in progress labels Mar 4, 2024
@Sherry616
Copy link
Collaborator

Thanks for reporting, will close due to short of feedback, feel free to reopen with more updates.

@Sherry616 Sherry616 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 23, 2024
@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable and removed Status: Reviewing Issue is being reviewed labels Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Response awaiting a response from the author Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

5 participants