khoih-prog / EthernetWebServer

This is simple yet complete WebServer library for AVR, AVR Dx, Portenta_H7, Teensy, SAM DUE, SAMD21/SAMD51, nRF52, STM32, RP2040-based, etc. boards running Ethernet shields. The functions are similar and compatible to ESP8266/ESP32 WebServer libraries to make life much easier to port sketches from ESP8266/ESP32. Coexisting now with `ESP32 WebServer` and `ESP8266 ESP8266WebServer` libraries. Ethernet_Generic library is used as default for W5x00 with custom SPI
MIT License
178 stars 49 forks source link

RP2040 (IP Unset) with localIP #66

Closed KBLiveSolutions closed 1 year ago

KBLiveSolutions commented 1 year ago

Hi

I am running the UdpSendReceive with a RP2040 (Earle Philhower port) and a W5500 Ethernet Shield This is what I get when running the code

Start UDPSendReceive on RASPBERRY_PI_PICO with W5x00 using Ethernet_Generic Library on SPI0/SPI
EthernetWebServer v2.2.3
[EWS] =========== USE_ETHERNET_GENERIC ===========
[EWS] Default SPI pinout:
[EWS] MOSI: 19
[EWS] MISO: 16
[EWS] SCK: 18
[EWS] SS: 17
[EWS] =========================
[EWS] RPIPICO setCsPin: 17
[ETG] W5100 init, using W5100Class::ss_pin =  17 , whereas new ss_pin =  10 , SS_PIN_DEFAULT = 17
[ETG] Chip is W5500
[ETG] W5100::init: W5500, SSIZE = 8192
[EWS] =========================
[EWS] Currently Used SPI pinout:
[EWS] MOSI: 19
[EWS] MISO: 16
[EWS] SCK: 18
[EWS] SS: 17
[EWS] =========================
Using mac index = 17
Connected! IP address: (IP unset)

Starting connection to server...
Listening on port 1883`

Why do I have this (IP unset) for the localIP ? The Ethernet shield seems to be correctly connected.

khoih-prog commented 1 year ago

Sorry I have no issue here.

Start UDPSendReceive on RASPBERRY_PI_PICO with W5x00 using Ethernet_Generic Library on SPI0/SPI
EthernetWebServer_SSL v1.9.2
[EWS] =========== USE_ETHERNET_GENERIC ===========
[EWS] Default SPI pinout:
[EWS] MOSI: 19
[EWS] MISO: 16
[EWS] SCK: 18
[EWS] SS: 17
[EWS] =========================
[EWS] RPIPICO setCsPin: 17
[EWS] =========================
[EWS] Currently Used SPI pinout:
[EWS] MOSI: 19
[EWS] MISO: 16
[EWS] SCK: 18
[EWS] SS: 17
[EWS] =========================
Using mac index = 9
Connected! IP address: 192.168.2.108

Check your router / wiring, especially Ethernet cable

This happens if I remove the Ethernet cable, then reset

Start UDPSendReceive on RASPBERRY_PI_PICO with W5x00 using Ethernet_Generic Library on SPI0/SPI
EthernetWebServer_SSL v1.9.2
[EWS] =========== USE_ETHERNET_GENERIC ===========
[EWS] Default SPI pinout:
[EWS] MOSI: 19
[EWS] MISO: 16
[EWS] SCK: 18
[EWS] SS: 17
[EWS] =========================
[EWS] RPIPICO setCsPin: 17
[EWS] =========================
[EWS] Currently Used SPI pinout:
[EWS] MOSI: 19
[EWS] MISO: 16
[EWS] SCK: 18
[EWS] SS: 17
[EWS] =========================
Using mac index = 18
Connected! IP address: (IP unset)

Starting connection to server...
Listening on port 1883
KBLiveSolutions commented 1 year ago

Ok, I'll check the cables, thanks

KBLiveSolutions commented 1 year ago

FYI, it was my mistake, I needed to authorize Internet Sharing in macOS.