Skip to content

esp8266, openwrt can't connect #9234

Closed
Closed
@johndoe71rus

Description

@johndoe71rus

trying to connect esp8266 to access point. simple sketch.

#include <ESP8266WiFi.h>
#define WIFI_SSID "My_SSID"
#define WIFI_PASS "My_pass"
void setup() {
  Serial.begin(115200);
  WiFi.setPhyMode(WIFI_PHY_MODE_11G);
  WiFi.begin(WIFI_SSID, WIFI_PASS);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("Connected");
  Serial.println(WiFi.localIP());
}
void loop() {
}

router log only one entry
...
daemon.info hostapd: wlan1: STA yy:yy:yy:yy:yy:yy IEEE 802.11: authenticated
daemon.info hostapd: wlan1: STA yy:yy:yy:yy:yy:yy IEEE 802.11: authenticated
daemon.info hostapd: wlan1: STA yy:yy:yy:yy:yy:yy IEEE 802.11: authenticated
...
esp does not receive ip address.

SDK:3.0.0-dev(c0f7b44)/Core:2.5.0=20500000/lwIP:STABLE-2_1_2_RELEASE/glue:1.1/BearSSL:6778687
scandone
.wifi evt: 2
....scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 0 (1f)
wifi evt: 1
STA disconnect: 203
..reconnect
......scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 0 (1f)
wifi evt: 1
STA disconnect: 203
..reconnect
...wifi evt: 7
wifi evt: 7
...scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 0 (1f)
wifi evt: 1
STA disconnect: 203
..reconnect        

i don't know if this is an esp or AP problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions