Replies: 3 comments 5 replies
-
The WiFi needs to be active for the ESPNow interface to send and receive. Calling disconnect when you are connected only makes sure that you are really disconnected. |
Beta Was this translation helpful? Give feedback.
-
That is odd. I have never found it necessary to call Please note that if you only soft reset the ESP32, the wifi device is not reset and your device will remain configured as it was before the soft reset. This can lead to some surprising behaviour, including remining connected to an AP, or running on an unexpected channel. I suggest to try power cycling the device (or calling |
Beta Was this translation helpful? Give feedback.
-
SOLVED: Looks like it was the channel issue when I added, w0.config(channel=6), the transmission works great. Thanks for all the help. import network peer = b'\xa0\xb7eXv8' |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a ESP32-Wroom-32 Devkitv1 set of boards, I can establish and send/receive ESPNow messages but ONLY when I add the WLAN.connect(“ssid”) function to the flow. After the WLAN.connect(“ssid”) I still call the WLAN.disconnect() function but with out the connect statement I can not send/receive.
import network
import espnow
import time
sta = network.WLAN(network.STA_IF)
sta.active(True)
sta.connect(“MySSID”) <——— Only works if I add this connect function
sta.disconnect()
e = espnow.ESPNow()
e.active(True)
peer = b'\xe8\x68\xe7\x4e\xbb\x19'
e.add_peer(peer)
print("Starting...")
e.send(peer1, "Test Message", True)
Beta Was this translation helpful? Give feedback.
All reactions