# can you check to see if an Ethernet cable is connected to the Rabbit?

**URL:** <https://forums.digi.com/t/can-you-check-to-see-if-an-ethernet-cable-is-connected-to-the-rabbit/17799>\
**Category:** Rabbit Software\
**Tags:** ethernet, cable, rabbit\
**Created:** [December 13, 2016, 2:12pm UTC](https://forums.digi.com/t/can-you-check-to-see-if-an-ethernet-cable-is-connected-to-the-rabbit/17799 "2016-12-13T14:12:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MDUNCAN78](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@MDUNCAN78](https://forums.digi.com/u/MDUNCAN78)\
**Post date:** [December 13, 2016, 2:12pm UTC](https://forums.digi.com/t/can-you-check-to-see-if-an-ethernet-cable-is-connected-to-the-rabbit/17799/1 "2016-12-13T14:12:39Z")

</div>

I want to check the Ethernet port to see if a Cable is connected. If it is, I will open a socket and communicate with the client. If it is not connected, then I will just run an internal program to process I/Os.

---

<div class="post-metadata">

**Author:** ![TomCollins](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/tomcollins/32/37_2.png) [@TomCollins](https://forums.digi.com/u/TomCollins)\
**Post date:** [December 13, 2016, 5:31pm UTC](https://forums.digi.com/t/can-you-check-to-see-if-an-ethernet-cable-is-connected-to-the-rabbit/17799/2 "2016-12-13T17:31:13Z")

</div>

Take a look at the pd\_havelink() function to see if you’re physically connected, and ifpending() for the status of the connection (e.g., getting a lease from the DHCP server and not completely up).

---

<div class="post-metadata">

**Author:** ![MDUNCAN78](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@MDUNCAN78](https://forums.digi.com/u/MDUNCAN78)\
**Post date:** [December 16, 2016, 11:49am UTC](https://forums.digi.com/t/can-you-check-to-see-if-an-ethernet-cable-is-connected-to-the-rabbit/17799/3 "2016-12-16T11:49:19Z")

</div>

Thank you!  
That worked perfectly. I was trying to do it with a variety of status checks, but couldn’t find one that worked for me.  
Best regards,  
Mike
