Re: detect/probe the physical connected state of a network cable
On Sun, 04 Mar 2012 01:13:12 +0800, lina wrote:
> On Sun, Mar 4, 2012 at 12:38 AM, Camaleón <noelamac@gmail.com> wrote:
>> On Sat, 03 Mar 2012 23:29:45 +0800, lina wrote:
>>
>>> Once I disabled the wireless and plugged in the cable.
>>
>> How exactly did you disable the wireless? Was the ethernet cable
>> already plugged at that time? Was eth0 up?
>
> There is some bars (which indicates the strength of the wireless), right
> click there is disconnect option, so ...
Under which desktop environment, GNOME, KDE, XFCE...? Or put in other
words, what aplication are you using to manage your wifi?
> sometimes it didn't plug in, while sometimes it plugged in, not worked
> (I felt the patience and retry plug in can get rewards at that
> situation) , so I enabled the wireless again.
I don't understand this paragraph in full, sorry :-(
> I am not sure how to tell eth0 up or down.
"/sbin/ifconfig eth0" and also "dmesg | grep -i eth0"
>> What controls you networking stuff, "ifup" or "network-manager"?
> $ dpkg --get-selections | grep network
> gir1.2-networkmanager-1.0 install
> glib-networking install
> glib-networking-common install
> glib-networking-services install
> libqt4-network install
> network-manager install
> network-manager-gnome install
Having network-manager installed does not mean it has to be used. Okay,
let's take this as you're using NM :-)
>> Anyway, check your "/etc/network/interfaces" for "allow-hotplug eth0"
>
> # more /etc/network/interfaces
>
> # The loopback network interface
> auto lo
> iface lo inet loopback
>
> # The primary network interface
> allow-hotplug eth0
> iface eth0 inet dhcp
Mmm, your eth0 is not being managed by NM unless you have told NM to do
it otherwise...
>> stanza. Also, review the messages with "tail -f /var/log/syslog" and
>
> wow, after disconnect the wireless, unplug the cable and replug the
> cable, interesting scenario in syslog,
Of course :-)
> disconnected the wireless first and then plug in worked.
>
> but if it's already plugged in. disconnected the wireless, it's not so
> sensitive.
Can you see any event related to the network card?
> How do the laptop examine whether there is cable connected or not?
Again, "dmesg | grep -i eth0" will tell you even more interesting
stuff ;-)
Greetings,
--
Camaleón
Reply to: