Strange ESP-Now Issue - SOLVED

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
davef
Posts: 811
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: Strange ESP-Now Issue

Post by davef » Thu Jul 28, 2022 10:16 pm

In a test system I was able to send multiple messages.

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

Re: Strange ESP-Now Issue

Post by davef » Thu Jul 28, 2022 10:19 pm

The system cannot find the path specified. (os error 3) ??

MMliam
Posts: 121
Joined: Mon May 07, 2018 1:08 pm

Re: Strange ESP-Now Issue

Post by MMliam » Thu Jul 28, 2022 10:26 pm

The error almost sounds like after the first send, ESP-Now lost it's object. I assumed the object would be static, if it's not after a send that's got to be an ESP-Now glitch.

MMliam
Posts: 121
Joined: Mon May 07, 2018 1:08 pm

Re: Strange ESP-Now Issue

Post by MMliam » Thu Jul 28, 2022 10:35 pm

I printed out the ESP-Now object before and after the send; it appears unchanged. Still don't know what error 3 means.

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

Re: Strange ESP-Now Issue

Post by davef » Thu Jul 28, 2022 10:38 pm

I will try to fire-up the test system again. Give me an hour or so.

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

Re: Strange ESP-Now Issue

Post by davef » Thu Jul 28, 2022 10:44 pm

Need to correct a statement ... the working system is a ESPNow-only remote, but a ESPNow/WiFi local. I will try an ESPNow-only link.

MMliam
Posts: 121
Joined: Mon May 07, 2018 1:08 pm

Re: Strange ESP-Now Issue

Post by MMliam » Thu Jul 28, 2022 10:48 pm

Dave,
I fixed the error, I had deactivated the ESP-Now object, because my code was intended as a one per boot. To test your issue I simply looped on my code every 10 secs.

Once I commented out the deactivation, the loop ran without issue; every 10 secs it sent a message - I let it run for 7 consecutive sends.
Last edited by MMliam on Thu Jul 28, 2022 10:55 pm, edited 1 time in total.

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

Re: Strange ESP-Now Issue

Post by davef » Thu Jul 28, 2022 10:54 pm

Did you have a e0.active(False) at the "end" of your script?

MMliam
Posts: 121
Joined: Mon May 07, 2018 1:08 pm

Re: Strange ESP-Now Issue

Post by MMliam » Thu Jul 28, 2022 10:58 pm

No, it was just after the send; there was a little extra bookkeeping after that. Frankly, because the code was intended as a send-per-boot, I really didn't need to deactivate.

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

Re: Strange ESP-Now Issue

Post by davef » Thu Jul 28, 2022 11:05 pm

In most of my scripts I de-activate e0 before bailing-out. I have had grief in other areas with things being left in "unknown state".

If the issue is resolved, add [Solved] to the title.

Post Reply