This is a group for folks designing and programming embedded systems using the Rabbit Semiconductor C-programmable microcontroller. This group is not affiliated with either Rabbit or Z-World, but is a user forum for sharing ideas, asking questions,
flaunting knowledge, and other typical user group stuff. The Rabbit is a powerful uC, supported by a full-featured C-compiler.
Is this thread worth a thumbs up?
Ethernet Cable Detection - akisppoli - May 28 14:30:27 2012
Hello Guys,
I have an RCM3700 and i need to detect the presence of the ethernet cable. When
the program starts i can check the presence of the cable with the 'ifpending'
routine and works fine, but if the socket is established in a connection and i
put out the cable the 'ifpending' routine returns always the same as before. I
need it because i must immediateky return to a listen state and close the socket
if this happens.
Thank you.
Akis Politis
(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )Re: Ethernet Cable Detection - Jesus Manuel Conejo Sarabia - May 28 14:49:07 2012
Hi Akis,
I used in a project the pd_havelink(0) instruction to know if there is a
good connection (link) to router, i think it could be useful for you.
Regards
Jesus
De: akisppoli
Responder a:
Fecha: Mon, 28 May 2012 18:30:23 -0000
Para:
Asunto: [rabbit-semi] Ethernet Cable Detection
Hello Guys,
I have an RCM3700 and i need to detect the presence of the ethernet cable.
When the program starts i can check the presence of the cable with the
'ifpending' routine and works fine, but if the socket is established in a
connection and i put out the cable the 'ifpending' routine returns always
the same as before. I need it because i must immediateky return to a listen
state and close the socket if this happens.
Thank you.
Akis Politis
(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )Re: Ethernet Cable Detection - Scott Henion - May 28 14:58:16 2012
On 5/28/2012 2:30 PM, akisppoli wrote:
> Hello Guys,
>
> I have an RCM3700 and i need to detect the presence of the ethernet cable.
When the program starts i can check the presence of the cable with the
'ifpending' routine and works fine, but if the socket is established in a
connection and i put out the cable the 'ifpending' routine returns always the
same as before. I need it because i must immediateky return to a listen state
and close the socket if this happens.
Check the pd_havelink() function for the cable.
You might also want to enable keepalive packets. Look at the docs of
tcp_keepalive(). That will detect if a connection along the way is lost
also.
--
------
Scott G. Henion, Consultant
Web site:
http://SHDesigns.org
------
(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )Re: Ethernet Cable Detection - Theodore Politis - May 28 16:42:15 2012
Jesus and Scott thank you very much for your reply.
I will try it.
Best regards
Akis.
(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )