Arduino r4 wifi access point

I'm using this code to create an access point on arduino rev 4 wifi, but I would like to increase the number of wifi networks for educational purposes and in particular I would like to create 2 wifi networks with different names and 2 wifi networks with the same names, could anyone tell me how to do it? thanks

(using the instruction WiFi.beginAP(ssid, pass); several times it doesn't create wifi anymore but I always only get one)

#include "WiFiS3.h"

///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = "Test12345";        // your network SSID (name)
char pass[] = "Test12345";        // your network password (use for WPA, or use as key for WEP)
int keyIndex = 0;                 // your network key index number (needed only for WEP)

int status = WL_IDLE_STATUS;


void setup() {
  //Initialize serial and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }
  Serial.println("Access Point Web Server");

  // check for the WiFi module:
  if (WiFi.status() == WL_NO_MODULE) {
    Serial.println("Communication with WiFi module failed!");
    // don't continue
    while (true);
  }

  String fv = WiFi.firmwareVersion();
  if (fv < WIFI_FIRMWARE_LATEST_VERSION) {
    Serial.println("Please upgrade the firmware");
  }

  // by default the local IP address will be 192.168.4.1

  // print the network name (SSID);
  Serial.print("Creating access point named: ");
  Serial.println(ssid);

  // Create open network. Change this line if you want to create an WEP network:
  status = WiFi.beginAP(ssid, pass);
  if (status != WL_AP_LISTENING) {
    Serial.println("Creating access point failed");
    // don't continue
    while (true);
  }

  // you're connected now, so print out the status
  printWiFiStatus();
}


void loop() {}

void printWiFiStatus() {
  // print the SSID of the network you're attached to:
  Serial.print("SSID: ");
  Serial.println(WiFi.SSID());

  // print your WiFi shield's IP address:
  IPAddress ip = WiFi.localIP();
  Serial.print("IP Address: ");
  Serial.println(ip);

  // print where to go in a browser:
  Serial.print("To see this page in action, open a browser to http://");
  Serial.println(ip);

}

Is there some reason to believe that creating more than one WiFi network is possible with this board?

If so, how would that work if they have the same names?

theoretically the flipper zero when it mounts its wifi card (which is practically an esp32) can generate many networks with any name even the same I'm trying to recreate this behavior with the arduino esp32

You can give that one single WiFi that an ESP32 can create any name and any password (mimium 8 characters long) but an ESP32 is UNable to create multiple WiFi's at the same time.

The maximum a ESP32 can do is operate in a combined STA_AP-mode
where the soft-AP can have a different name than the STA-network the ESP32 connects to as a station(= connecting to another WiFi-router)

If an ESP32 is cabale of more than described above prove me wrong by posting the source-code that demonstrates this.

The only thing I can imagine is terminating one SSID

  • then changing the SSID and password
    and
    then create one single WiFi with a different SSID / password

doing all this while the code is running. But there will be always only one single WiFi active.

best regards Stefan

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.