Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By sairfan06
#90868 Hello, i have two questions:

Q1) I'm setting up ESP Now, i want to know can i put a specific channel number to Receiver node rather than it gets dynamically? for static channel number if i have to update some config on Wifi router i would go for it.

Q2) On sender node i want to understand what does below function is doing, what i understand in ESP Now protocol Sender node connects and sends data to Receiver node then why its looking for WiFi SSID

Code: Select allint32_t getWiFiChannel(const char *ssid) {
  if (int32_t n = WiFi.scanNetworks()) {
    for (uint8_t i=0; i<n; i++) {
      if (!strcmp(ssid, WiFi.SSID(i).c_str())) {
        return WiFi.channel(i);
      }
    }
  }
  return 0;
}