This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Ethernet cable insertion detection

Hello,

I need to make sure that my LPC2478 will configure its DHCP only after the physical insertion of the Ethernet cable into the controller (it seems that TCPNet cannot handle a situation where a DHCP enabled controller is startup without a network connection, thus the need to configure TCPNet again or for the firs time once the cable is inserted. Note: of the controller already got an IP address, then had his cable disconnected, there is no problem). It seems that simple interrupt detection won't do the job. Any ideas?

Parents
  • I've recently re-implemented the Ethernet driver that Keil supplied (as part of TCPnet) for the LPC3250.

    I did not want to but, to be blunt, I could not accept the functionality it provided.

    The main reason: it only checked the link type on the startup and, if there were no connection during this time, then there would be a VERY long timeout (due to crude software delays).

    Additionally, after it had decided that there was no connection, it would attempt to configure the interface for 10Mbit/half duplex - Unfortunately, the code was wrong and there would sometimes be no communication. (I notified Keil of this and notice that they have now fixed that part of their driver.)

    You say "... it seems that TCPNet cannot handle a situation where a DHCP enabled controller is startup without a network connection ...".

    I initially though that, but subsequently found that TCPnet does correctly retransmit DHCP messages, but they were not being sent to the cable because the PHY/MAC setup was incorrect.

    My replacement driver added a timeslot that I called from the task which maintains the TCP operation. This provides the driver with the ability to maintain a decent PHY auto-negotiation sequence. The DHCP operates well regardless of the initial connection state and the startup does not include un-necessary delays.

    I'm not familiar with the LPC2478, though suspect that the Keil supplied network module operates in a similar manner to that of the LPC3250.

    If you want more details, let me know

Reply
  • I've recently re-implemented the Ethernet driver that Keil supplied (as part of TCPnet) for the LPC3250.

    I did not want to but, to be blunt, I could not accept the functionality it provided.

    The main reason: it only checked the link type on the startup and, if there were no connection during this time, then there would be a VERY long timeout (due to crude software delays).

    Additionally, after it had decided that there was no connection, it would attempt to configure the interface for 10Mbit/half duplex - Unfortunately, the code was wrong and there would sometimes be no communication. (I notified Keil of this and notice that they have now fixed that part of their driver.)

    You say "... it seems that TCPNet cannot handle a situation where a DHCP enabled controller is startup without a network connection ...".

    I initially though that, but subsequently found that TCPnet does correctly retransmit DHCP messages, but they were not being sent to the cable because the PHY/MAC setup was incorrect.

    My replacement driver added a timeslot that I called from the task which maintains the TCP operation. This provides the driver with the ability to maintain a decent PHY auto-negotiation sequence. The DHCP operates well regardless of the initial connection state and the startup does not include un-necessary delays.

    I'm not familiar with the LPC2478, though suspect that the Keil supplied network module operates in a similar manner to that of the LPC3250.

    If you want more details, let me know

Children