Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: sencer on February 17, 2016, 01:16:06 PM

Title: eth0 link is always on even if cable is unplugged
Post by: sencer on February 17, 2016, 01:16:06 PM
I would like to detect if network cable is plugged or not to A20-LIME2 eth0 port. I use standart Linux image. Debian 7 kernel 3.4.90

"ethtool eth0" command always displays yes for "link detected" 

also

/sys/class/net/eth0/carrier and and operstate values does not change after cable is unplugged.

What may be the reason?

Regards,
Title: Re: eth0 link is always on even if cable is unplugged
Post by: Gerrit on February 17, 2016, 04:15:58 PM
does the green led goes off when you unplug the cable ?
Title: Re: eth0 link is always on even if cable is unplugged
Post by: sencer on February 17, 2016, 05:35:54 PM
Yes, the green led goes off after unplugging the cable.
Title: Re: eth0 link is always on even if cable is unplugged
Post by: Gerrit on February 17, 2016, 06:31:32 PM
it should work, I would check the board for tin drops or bridges that don't belong
Title: Re: eth0 link is always on even if cable is unplugged
Post by: sencer on February 18, 2016, 12:38:36 PM
I checked, but I did not see any problem.
Title: Re: eth0 link is always on even if cable is unplugged
Post by: MBR on February 28, 2016, 07:59:58 PM
Did you tried the ethernet status/diagonostic tool ethtool? (available as a package in Debian-based distributions). What does the link status say?
Title: Re: eth0 link is always on even if cable is unplugged
Post by: splite on March 29, 2016, 06:32:11 PM
Hey,

I have pretty much the same issue. Only the kernel is detecting if the cable is plug in/out, but nothing is detected on a higher level. For example, Network-manager does not detect if a cable is plugged in, the only workaround is to reboot the system or down / up the interface which is not convenient.

Florian