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.

AM6442: mcu+ sdk: lwip, activating hostname leads to Enet IF down and MAC Port Link down

Part Number: AM6442

Tool/software:

Hello,

as the title says I am working with the mcu+ sdk 09.02.00.50 and the https server example. 
Everything works as intended until I activate the option for LWIP_NETIF_HOSTNAME in opt.h.

The netif_set_up() function in App_setupNetif() sets the flag for netif up, but when calling the callback function to check this, the flags are all 0.

Can you help here?

Output without hostname:
==========================
CPSW HTTPS TCP
==========================
Enabling clocks!
EnetAppUtils_reduceCoreMacAllocation: Reduced Mac Address Allocation for CoreId:1 From 4 To 1
Mdio_open: MDIO Manual_Mode enabled
EnetPhy_bindDriver: PHY 1: OUI:080028 Model:23 Ver:01 <-> 'dp83867' : OK
PHY 1 is alive
Starting lwIP, local interface IP is dhcp-enabled
[LWIPIF_LWIP] NETIF INIT SUCCESS
Host MAC address-0 : xx:xx:xx:xx:xx:xx
Enet IF DOWN Event
[LWIPIF_LWIP] Enet has been started successfully
Waiting for network UP ...
Waiting for network UP ...
Waiting for network UP ...
Waiting for network UP ...
Cpsw_handleLinkUp: Port 1: Link up: 1-Gbps Full-Duplex
MAC Port 1: link up
Network Link DOWN Event
Waiting for network UP ...
Waiting for network UP ...


With hostname:
==========================
CPSW HTTPS TCP
==========================
Enabling clocks!
EnetAppUtils_reduceCoreMacAllocation: Reduced Mac Address Allocation for CoreId:1 From 4 To 1
Mdio_open: MDIO Manual_Mode enabled
EnetPhy_bindDriver: PHY 1: OUI:080028 Model:23 Ver:01 <-> 'dp83867' : OK
PHY 1 is alive
Starting lwIP, local interface IP is dhcp-enabled
[LWIPIF_LWIP] NETIF INIT SUCCESS
Host MAC address-0 : xx:xx:xx:xx:xx:xx
Enet IF UP Event. Local interface IP:0.0.0.0
[LWIPIF_LWIP] Enet has been started successfully
Waiting for network UP ...
Waiting for network UP ...
Waiting for network UP ...
Waiting for network UP ...
Cpsw_handleLinkUp: Port 1: Link up: 1-Gbps Full-Duplex
MAC Port 1: link up
Network Link UP Event
Waiting for network UP ...
Waiting for network UP ...
Waiting for network UP ...
Waiting for network UP ...
Enet IF UP Event. Local interface IP:192.168.xx.xx
Network is UP ...
22. 96s : CPU load = 3.49 %
27. 97s : CPU load = 3.54 %



Kind regards,
Jakob

  • Hi Jakob,

    Thanks for your query.

    I am working with the mcu+ sdk 09.02.00.50 and the https server example

    You are working on this example? C:\ti\mcu_plus_sdk_am64x_10_00_00_20\examples\networking\lwip\enet_cpsw_rawhttpserver\am64x-evm

    Everything works as intended until I activate the option for LWIP_NETIF_HOSTNAME in opt.h.

    What is the use case that you are trying to achieve by activating this option?

    Regards

    Ashwani

  • Hi Ashwani,
    no it is the https example, C:\ti\mcu_plus_sdk\examples\networking\lwip\cpsw_lwip_https.
    I am working with the example to familiarize with the integration of the enet driver and the lwip stack to use it in another project. There I would like to set a host name. At the moment nothing more than that. Just by activating the option, with and without actually setting a host name, the netif and the network link are down. 

    Can you reproduce the problem, or is there something fundamental I miss? 

    Regards,
    Jakob

  • Can you reproduce the problem,

    I am working on this. Will keep you updating.

    Regards

    Ashwani

  • There I would like to set a host name. At the moment nothing more than that. Just by activating the option, with and without actually setting a host name, the netif and the network link are down. 

    Can you share what exactly you change, may be a patch file for the project?

    C:\ti\mcu_plus_sdk_am64x_10_00_00_20\examples\networking\lwip\enet_cpsw_rawhttpserver\am64x-evm

    It will be easier for me to reproduce the isssue.

    Regards

    Ashwani

  • In mcu_plus_sdk\source\networking\lwip\lwip-stack\src\include\lwip\opt.h I only activated the option LWIP_NETIF_HOSTNAME.

    --- a/mcu_plus_sdk/source/networking/lwip/lwip-stack/src/include/lwip/opt.h
    +++ b/mcu_plus_sdk/source/networking/lwip/lwip-stack/src/include/lwip/opt.h
    @@ -1641,7 +1641,7 @@
    * field.
    */
    #if !defined LWIP_NETIF_HOSTNAME || defined __DOXYGEN__
    -#define LWIP_NETIF_HOSTNAME 0
    +#define LWIP_NETIF_HOSTNAME 1
    #endif

    /**

    The problem occurs with and without setting a hostname via netif_set_hostname().

    Regards,
    Jakob

  • Thanks ,

    I will try this on my setup and update you.

    Regards

    Ashwani