lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] how to know PHY link status ?


From: Mrutyunjay
Subject: Re: [lwip-users] how to know PHY link status ?
Date: Thu, 14 Oct 2010 18:16:15 +0530

Thanks 

I did refer to PHY data sheet ad did following in my code for other to refer

//Check Ethernet status
    #ifdef DEBUG
    {
      unsigned long  phy_mr1,phy_mr18;

      phy_mr1 =EthernetPHYRead(ETH_BASE, PHY_MR1 );
      phy_mr18=EthernetPHYRead(ETH_BASE, PHY_MR18);

      //rt_kprintf("\n PHY_MR1: %x , PHY_MR18: %x",phy_mr1,phy_mr18 );

      rt_kprintf("\n Eth0: ");
      if( phy_mr1 & PHY_MR1_LINK   )
      {
        rt_kprintf("Link UP ");
        if( phy_mr18 & PHY_MR18_RATE   )
          rt_kprintf("100 Mbps ");
        else
        rt_kprintf("10 Mbps ");

        if( phy_mr18 & PHY_MR18_DPLX   )
          rt_kprintf("Full \n");
        else
          rt_kprintf("Half \n");
      }
      else
        rt_kprintf("Link DOWN \n");
    }
    #endif


Regards,
Mrutyunjay B Patel


On Tue, Oct 12, 2010 at 1:42 PM, Kieran Mansley <address@hidden> wrote:
On Tue, 2010-10-12 at 13:01 +0530, Mrutyunjay wrote:
> hi,
> need interface to know status of Link
> in OS based LwIP 1.3.2 !
>
> 1. is Ethernet cable connected(hub/switch).
> 2. What is Link speed is connected at
>    a. 10mbps/100mbps.
>    b. full-duplex or half duplex.
> 3. how to enable or disable Auto-Negotiations.

None of that information is available through IP and so it isn't
something that lwIP provides.  You need to access your hardware or
possibly OS if it provides this status.

Kieran


_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users


reply via email to

[Prev in Thread] Current Thread [Next in Thread]