This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PHY loopback for testing

Using NDK 2.0 I have found that when sending packets and then reading them back from the same socket they are received although the PHY loopback is disabled and the Ethernet is disconnected. The sent packets are not reaching the NIMU level (i.e. EmacPktService) which indicates that the NDK is looping back packets at a higher level.

What I'm trying to do is set the PHY loopback with ecfg.MdioModeFlags= MDIO_MODEFLG_LOOPBACK | MDIO_MODEFLG_FD100 in ethdriver.c HwPktOpen which loops back the PHY. I only found out that the packets are looping back at a higher level and never reach the PHY when I use the normal ecfg.MdioModeFlags          = MDIO_MODEFLG_AUTONEG;

Is there any way to stop the NDK looping back when doing a sendto / recvncfrom to the same IP address / UDP port so that all sent packets go to the PHY, through the PHY loopback and back up again?

I have tried SO_DONTROUTE = 1 and SO_USELOOPBACK = 0 in setsockopt to no effect.