in general when I need to check if the ethernet cable is connected to a raspberry, I verify the value of /sys/class/net/eht0/carrier
Code: Select all
carrier = 0 --> network cable detached
carrier = 1 --> network cable attached
My kernel version is 4.14.79-v7+ #1159
it seems that the problem is specific to RPI 3B+ as I read on this site:
https://raspberrypi.stackexchange.com/q ... ont-change
The proposed solution of connecting the Ethernet cable after turning on the raspberry is interesting but does not seem applicable in real cases.
Is there any other way to know if the network cable is connected ?