ESP_NOW wifi channel setting

davdav
Posts: 208
Joined: Thu Nov 17, 2016 2:33 pm

ESP_NOW wifi channel setting

Postby davdav » Sat Aug 04, 2018 2:01 pm

Hi everybody,

We would like to have 4 devices which can transfer some data each other. ESP-NOW seems to be a good candidate as a solution.
Since the device can also connects to a router, my question are:

- If I turn on WiFI in station/softAP mode, can I setup the channel for ESP-NOW in the softAP mode (for example channel 3), so letting the station mode to connect to router (in channel 5 for example)?

- is there a way to pair the devices sending each one a broadcast message to the others to let them know the MAC address


Thanks for everyone can give some hints or have experience with ESP-NOW.

Ankit Siddhapura
Posts: 21
Joined: Sat Jun 30, 2018 1:04 pm

Re: ESP_NOW wifi channel setting

Postby Ankit Siddhapura » Fri Aug 10, 2018 6:20 am

Hi,
- If I turn on WiFI in station/softAP mode, can I setup the channel for ESP-NOW in the softAP mode (for example channel 3), so letting the station mode to connect to router (in channel 5 for example)?
Till I know only single radio is present to tune channel, so in AP+STA mode both would have same channel.
is there a way to pair the devices sending each one a broadcast message to the others to let them know the MAC address
Yes, Using ESP-NOW protocol you can send broadcast and uni-cast messages to each other in connected or non-connected state.
For broadcast need to add broadcast address(0xff:0xff:0xff:0xff:0xff:0xff) in peer list and for Unicast need to add particular device MAC address in peer list. Use ESP-NOW send and receive API to do packet transfer.

Before this,You need to register ESP-NOW send and receive call backs to do such operations.

Thank you!

Who is online

Users browsing this forum: Baidu [Spider], Majestic-12 [Bot] and 80 guests