Detection of ethernet cable disconnection

Are there any SW means to detect ethernet cable disconnection from input of
ethernet board?

Jiri Kristek
RETIA, a.s.

“Jiri Kristek” <jkristek@retia.cz> wrote in message
news:a2p0u7$i2r$1@inn.qnx.com

Are there any SW means to detect ethernet cable disconnection from input
of
ethernet board?

Yes, if you run nicinfo, you’ll notice that it reports the speed of the

connection.
If it 0, it means it’s disconnected, or the hub/computer at the other end is
turned off.

You can do an IOCTL to /dev/io-net/enX just like nicinfo is doiong to
get the info. Llook at the header files I don’t have access to QRTP at
this time.

\

  • Mario


Basically for every NIC worth it’s salt ,there will be a bit somewhere in
it’s hardware registers which tells you the link status.It will be 1 if the
link is up and 0 if the link is down.This is required for the NIC inorder to
do autonegotiation.Most of the NICs send an event to the device driver to
inform that the link state has changed .If you want the information to come
to your software you need to capture this event.If you are OK with
Asynchronous information just poll this bit.

Hope it helps
Sreekanth

“Mario Charest” <goto@nothingness.com> wrote in message
news:a2p322$jd3$1@inn.qnx.com

“Jiri Kristek” <> jkristek@retia.cz> > wrote in message
news:a2p0u7$i2r$> 1@inn.qnx.com> …
Are there any SW means to detect ethernet cable disconnection from input
of
ethernet board?

Yes, if you run nicinfo, you’ll notice that it reports the speed of the
connection.
If it 0, it means it’s disconnected, or the hub/computer at the other end
is
turned off.

You can do an IOCTL to /dev/io-net/enX just like nicinfo is doiong to
get the info. Llook at the header files I don’t have access to QRTP at
this time.

\

  • Mario


\

“Sreekanth” <sreekanth@cambira.com> wrote in message
news:a2t3ph$i1f$1@inn.qnx.com

Basically for every NIC worth it’s salt ,there will be a bit somewhere in
it’s hardware registers which tells you the link status.It will be 1 if
the
link is up and 0 if the link is down.This is required for the NIC inorder
to
do autonegotiation.Most of the NICs send an event to the device driver to
inform that the link state has changed .If you want the information to
come
to your software you need to capture this event.If you are OK with
Asynchronous information just poll this bit.

Polling the hardware at the same time a driver handling it, is IMHO
risky business. The driver could be playing with registers, rendering
the “status register” unreliable. Only bypass the driver if you can’t
do it otherwise.

Hope it helps
Sreekanth

“Mario Charest” <> goto@nothingness.com> > wrote in message
news:a2p322$jd3$> 1@inn.qnx.com> …

“Jiri Kristek” <> jkristek@retia.cz> > wrote in message
news:a2p0u7$i2r$> 1@inn.qnx.com> …
Are there any SW means to detect ethernet cable disconnection from
input
of
ethernet board?

Yes, if you run nicinfo, you’ll notice that it reports the speed of the
connection.
If it 0, it means it’s disconnected, or the hub/computer at the other
end
is
turned off.

You can do an IOCTL to /dev/io-net/enX just like nicinfo is doiong to
get the info. Llook at the header files I don’t have access to QRTP at
this time.

\

  • Mario




\

Thanks, its usable for me.


Mario Charest <goto@nothingness.com> pí¹e v diskusním
pøíspìvku:a2p322$jd3$1@inn.qnx.com

“Jiri Kristek” <> jkristek@retia.cz> > wrote in message
news:a2p0u7$i2r$> 1@inn.qnx.com> …
Are there any SW means to detect ethernet cable disconnection from input
of
ethernet board?

Yes, if you run nicinfo, you’ll notice that it reports the speed of the
connection.
If it 0, it means it’s disconnected, or the hub/computer at the other end
is
turned off.

You can do an IOCTL to /dev/io-net/enX just like nicinfo is doiong to
get the info. Llook at the header files I don’t have access to QRTP at
this time.

\

  • Mario


\