I want to connect 3 ESP boards in station mode to the ESP board in AP mode. And connect from linux to the ESP AP board too.
Testing this configuration I've found that stations can't talk each other, only to AP.
If I run simple Arduino sketch on AP board, all stations can talk each other.
FreeRTOS minimal code:
Code: Select all
#define UDP_SERVER_AP_NAME "TEST-AP"
#define UDP_SERVER_AP_PASWORD "TEST-AP-PASS0001"
void user_init(void) {
wifi_set_opmode(SOFTAP_MODE);
struct softap_config* config = (struct softap_config*) zalloc(sizeof(struct softap_config));
sprintf((char*) config->ssid, UDP_SERVER_AP_NAME);
sprintf((char*) config->password, UDP_SERVER_AP_PASWORD);
config->authmode = AUTH_WPA_WPA2_PSK;
config->ssid_len = 0;
config->max_connection = 4;
wifi_softap_set_config(config);
}
Arduino sketch:
Code: Select all
void setup() {
pinMode(LED_PIN, OUTPUT); // set pin as output
Serial.begin(115200);
Serial.println();
Serial.print("Setting soft-AP configuration ... ");
Serial.println(WiFi.softAPConfig(local_IP, gateway, subnet) ? "Ready" : "Failed!");
Serial.print("Setting soft-AP ... ");
Serial.println(WiFi.softAP("TEST-AP", "TEST-AP-PASS0001") ? "Ready" : "Failed!");
Serial.print("Soft-AP IP address = ");
Serial.println(WiFi.softAPIP());
}
void loop() {
digitalWrite(LED_PIN, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(LED_PIN, LOW); // set the LED off
delay(1000); // wait for a second
}