Comments (4)
Addendum: This actually also fails when not giving the interrupt pin in the constructor (i.e. polling mode).
from arduino-pico.
This is expected behavior. Ethernet PHY status is via isLinked()
, not connected()
which is only looking at IP addressing. It's done this way mostly for backward compatibility. If you try:
void loop() {
Serial.println("Ethernet connected: " + String(eth.connected()) + " isLinked:" + String(eth.isLinked()));
Serial.print("IP address: ");
Serial.println(eth.localIP());
delay(1000);
}
You'll see something like
15:30:16.874 -> Starting Ethernet port
15:30:16.874 -> Ethernet connected: 0 isLinked:1
15:30:16.874 -> IP address: (IP unset)
15:30:17.866 -> Ethernet connected: 1 isLinked:1
15:30:17.866 -> IP address: 192.168.1.229
15:30:18.859 -> Ethernet connected: 1 isLinked:1
15:30:18.859 -> IP address: 192.168.1.229
15:30:19.885 -> Ethernet connected: 1 isLinked:1
15:30:19.885 -> IP address: 192.168.1.229
15:30:20.877 -> Ethernet connected: 1 isLinked:1
15:30:20.877 -> IP address: 192.168.1.229
15:30:21.871 -> Ethernet connected: 1 isLinked:0
15:30:21.871 -> IP address: 192.168.1.229
15:30:22.863 -> Ethernet connected: 1 isLinked:0
15:30:22.863 -> IP address: 192.168.1.229
15:30:23.889 -> Ethernet connected: 1 isLinked:0
15:30:23.889 -> IP address: 192.168.1.229
15:30:24.882 -> Ethernet connected: 1 isLinked:0
15:30:24.882 -> IP address: 192.168.1.229
15:30:25.875 -> Ethernet connected: 1 isLinked:0
15:30:25.875 -> IP address: 192.168.1.229
15:30:26.867 -> Ethernet connected: 1 isLinked:0
15:30:26.867 -> IP address: 192.168.1.229
15:30:27.860 -> Ethernet connected: 1 isLinked:1
15:30:27.893 -> IP address: 192.168.1.229
15:30:28.886 -> Ethernet connected: 1 isLinked:1
15:30:28.886 -> IP address: 192.168.1.229
It may be worthwhile to &&
isLinked
into the connected()
logic, though...thoughts?
from arduino-pico.
Oh, and the W5100 does not report PHY state, or at least the driver here doesn't know how to get that bit of info.
from arduino-pico.
Hmm then it was a API misunderstanding of mine. The connected()
and isLinked
functions are properly documented, in my IDE's mousehover.
from arduino-pico.
Related Issues (20)
- Arduino IDE v2.3.1 for RP2040 has lost I2C capability HOT 2
- Pico W board config in PIO crash with LVGL HOT 2
- Picow compilation errors in lwIP HOT 3
- setBuffers useage question
- Compile error in SPISlave when DEBUG_RP2040_SPI is defined
- Bluetooth hci_power_control() interferes with Adafruit TinyUSB HOT 3
- Serial Monitor not functional under linux? HOT 7
- Cannot use stdio_usb_connected() HOT 1
- AWS IoT WiFi - Compilation error
- cstdint not working correctly on platformio HOT 2
- LittleFS fails to mount on W5500-EVB-Pico HOT 2
- Intermittent failure to connect to wifi HOT 4
- WiFiClient.write blocks intermittently HOT 3
- Feature Request: Add Waveshare RP2040 Matrix
- Bug in SDClass.end(..) ? HOT 1
- Can't figure out how to get assertion failure messages from Pico SDK functions HOT 1
- PCM1808 Does Not Work Correctly Using I2S Unless I Shift the Result by Nine Bits. I Expected Eight. HOT 8
- Debug via pico probe Output serial
- Arduino IDE 2.3.2 debuging with picoprobe / how to catch serial out from target pico HOT 1
- SerialUART.cpp: Hardware Flow Control configuration (RTS/CTS) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-pico.