Results 1 to 2 of 2

Thread: How to detect Ethernet cable connection before start a Network Interface?

  1. #1
    Join Date
    Apr 2015
    Posts
    1
    Rep Power
    1

    Post How to detect Ethernet cable connection before start a Network Interface?

    Hello,

    I am using Altera Cyclone-V and uC/OS-II OS & TCP/IP package building a Network Interface in this way:

    1. Call Net_Init();
    2. Call NetIF_Add();
    3. Call NetIF_Start();
    4. Call NetIPv4_CfgAddrAdd();

    Everything works fine except if I by accident forgot to plug in the Ethernet cable. If the cable is missing, Step C NetIF_Start() will return “NET_PHY_ERR_TIMEOUT_AUTO_NET” error.This error is not recoverable even with the cable plugging back to the device.I will have to reboot the device.
    Is there any way I can check the cable connection before Step C? I tried functions like NetIF_LinkStateGet(), NetIF_IO_Ctrl(), but they only report the Link status after the interface is established.BTW, the HW is done and I can’t physically check the Ethernet port status.
    Another option is when function NetIF_Start() returns an error due to the missing of the cable, what is a correct procedure to re-initialize the Network interface and wait for the cable connection.
    Thanks,
    Chad

  2. #2
    Join Date
    May 2013
    Posts
    4
    Rep Power
    1

    Default Re: How to detect Ethernet cable connection before start a Network Interface?

    I also met this issues if I plug out the cable. Immediately I plug in cable and can't PING the board.

Similar Threads

  1. Replies: 3
    Last Post: June 15th, 2017, 10:49 PM
  2. Replies: 5
    Last Post: December 24th, 2015, 11:53 PM
  3. NIOS EDS 9.1 does not detect USB connection.
    By luirro777 in forum General Software Forum
    Replies: 3
    Last Post: January 19th, 2011, 11:10 AM
  4. Cannot detect device with own JTAG cable
    By sebastian.f in forum Quartus II and EDA Tools Discussion
    Replies: 6
    Last Post: November 26th, 2009, 05:59 AM
  5. dynamically detect ethernet link
    By Skud in forum MicroC/OS-II Forum
    Replies: 1
    Last Post: November 6th, 2009, 08:03 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •