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

Moderator: igrr

User avatar
By noisette
#24462 Hello
I see on reference http://arduino.esp8266.com/versions/1.6.5-947-g39819f0/doc/reference.html that it is not possible to use multicast on AP interface so I was trying to connect the STA interface to AP interface but it doesn't seem to work
this is my code :
Code: Select all#include <ESP8266WiFi.h>
#include <WiFiUdp.h>

const char* ssid = "tagada";
const char* password = "azertyuiop";

void setup(void)
  {
  Serial.begin(115200);
  delay(2000);
  WiFi.mode(WIFI_AP);
  WiFi.softAP(ssid, password);
  delay(2000);
  wifiConnect();
  }

void loop(void)
  {
  delay(500);
  }

void wifiConnect()
  {
  WiFi.begin(ssid, password);
  // Wait for connection
  while(WiFi.status() != WL_CONNECTED)
    {
    delay(500);
    Serial.println("waiting");
    }
  Serial.println(WiFi.localIP());
  }

the second connexion never happens
i can connect to my acces point with another device
Does somebody know why I can't do that ?
thanks !
User avatar
By noisette
#24470 My mistake but it doesn't resolve the issue :/

new version of my code :
Code: Select all#include <ESP8266WiFi.h>
#include <WiFiUdp.h>

const char* ssid = "tagada";
const char* password = "azertyuiop";

void setup(void)
  {
  Serial.begin(115200);
  delay(2000);
  WiFi.mode(WIFI_AP_STA);
  WiFi.softAP(ssid, password);
  delay(2000);
  wifiConnect();
  }

void loop(void)
  {
  delay(500);
  }

void wifiConnect()
  {
  WiFi.begin(ssid, password);
  // Wait for connection
  while(WiFi.status() != WL_CONNECTED)
    {
    delay(500);
    Serial.println("waiting");
    }
  Serial.println(WiFi.localIP());
  }
User avatar
By noisette
#24471 also I add a WiFi.printDiag(Serial) in my connexion wait loop
I have this return :
waiting
Mode: STA+AP
PHY mode: N
Channel: 4
AP id: 0
Status: 1
Auto connect: 1
SSID (6): tagada
Passphrase (10): azertyuiop
BSSID set: 0
18:FE:34:F9:73:65
waiting
Mode: STA+AP
PHY mode: N
Channel: 1
AP id: 0
Status: 1
Auto connect: 1
SSID (6): tagada
Passphrase (10): azertyuiop
BSSID set: 0
18:FE:34:F9:73:65
waiting
Mode: STA+AP
PHY mode: N
Channel: 11
AP id: 0
Status: 1
Auto connect: 1
SSID (6): tagada
Passphrase (10): azertyuiop
BSSID set: 0
18:FE:34:F9:73:65


My Channel changes in continue :/ it is strange !