Comments (6)
do you have some test sketch?
from arduinocore-mbed.
Even the basic OPTA LinkStatus example:
/*
Link Status
This sketch prints the ethernet link status. When the
ethernet cable is connected the link status should go to "ON".
NOTE: Only WizNet W5200 and W5500 are capable of reporting
the link status. W5100 will report "Unknown".
Hardware:
- Ethernet shield or equivalent board/shield with WizNet 5200/5500
Written by Cristian Maglie
This example is public domain.
*/
#include <SPI.h>
#include <PortentaEthernet.h>
#include <Ethernet.h>
void setup() {
Serial.begin(9600);
}
void loop() {
auto link = Ethernet.linkStatus();
Serial.print("Link status: ");
switch (link) {
case Unknown:
Serial.println("Unknown");
break;
case LinkON:
Serial.println("ON");
break;
case LinkOFF:
Serial.println("OFF");
break;
}
delay(1000);
}
from arduinocore-mbed.
it only works after Ethernet.begin, because that starts the network interface
from arduinocore-mbed.
So the example is not working "out of the box". I will try after the Ethernet.begin() function and I will post here the result. Thanks for the help
from arduinocore-mbed.
the example is copied from the Ethernet library for Wiznet chips but there too linkStatus
will work only after begin
from arduinocore-mbed.
@JAndrassy you were right: after the Ethernet.begin() function (successfully or not) the Ethernet.linkStatus() function works as intended. Thank you
from arduinocore-mbed.
Related Issues (20)
- bug in SDRAM defrag HOT 1
- How to define my own pins for PDM microphone (board, nano 33 BLE) HOT 1
- Dual Core Processing on Portenta H7 using one Sketch: issue with core 4.0.10 and 4.1.1. HOT 6
- Arduino Nicla Sense ME - SPI Slave support
- Giga Crashes if using ConnectionHandler and Scheduler.h HOT 5
- Missing WiFiClass::setHostname definition HOT 1
- error: 'WiFiAccessPoint' does not name a type,
- [ACELL02] Incomplete `library.properties` file for the GSM library
- Wrong bootloader information from factory Opta HOT 2
- Ethernet defines SSID_MAX_LENGTH HOT 1
- missing null pointer checks HOT 1
- potential null pointer access / _initializerCallback not initialized
- [BUG] DHCP Ethernet crashes after repeated switching of network interface [OPTA/Portenta H7] HOT 4
- Nicla Voice Record_and_Stream compile fails HOT 1
- Binary constants - enum implementation, leading to severe macro-coditioning compilation errors HOT 1
- UDP Multicast crashes ethernet interface when cable is disconnected and reconnected HOT 1
- Socket Write and Close Hangs Indefinitely When There Is No Connectivity HOT 1
- Accessing mbed errors history HOT 1
- `Ethernet.dnsServerIP()` does not return the IP address I set with `Ethernet.begin()` HOT 2
- Issue with sdram.h using PLL2
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 arduinocore-mbed.