Skip to content
This repository was archived by the owner on Dec 23, 2020. It is now read-only.
This repository was archived by the owner on Dec 23, 2020. It is now read-only.

Can't connect (self-assigns IP after 5') #17

@NdK73

Description

@NdK73

Hello.

Following directions in other issues, I removed core 2.7.1 and installed your 0.0.3 .
The code I'm compiling is:

#include <ESP8266WiFi.h>

#include <W5500lwIP.h>

// Using GPIO2 as CS
Wiznet5500lwIP eth(2);

void setup ()
{
  Serial.begin(115200);

  Serial.println("");
//  WiFi.mode(WIFI_OFF);

  SPI.begin();
//  SPI.setBitOrder(MSBFIRST);
//  SPI.setDataMode(SPI_MODE0);
  // Slow down because long (~20cm) wires and breadboard
  SPI.setFrequency(10000000); // Works up to 80M

  eth.setDefault(); // use ethernet for default route
  bool r=eth.begin(); // default mtu & mac address
  if(!r) {
    Serial.println("Error initializing eth");
    while(true) delay(1000);
  }
}

void loop ()
{
  delay(5000);
  if(eth.connected()) {
    Serial.print("My IP address: ");
    Serial.println(eth.localIP());
  } else {
    Serial.println("Still unconnected");
  }

}

It prints "Still unconnected" for about 5 minutes, then self-assigns 169.254.205.199 .
The W5500 board is connected correctly (I think: if I try swapping MISO/MOSI, or unconnecting SCLK or CS I get "Error initializing eth").
I left SPI settings commented after trying 'em and noticing they didn't change anything.
I don't see DHCP requests on my LAN.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions