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.

MCU-PLUS-SDK-AM243X: Enet (ICSS) - how to change used MAC address

Part Number: MCU-PLUS-SDK-AM243X

Hi TI experts,

I am looking for an option to change the used MAC address.

We are using the LWIP and Enet (ICSS) similar to the "enet_lwip_icssg" example provided with SDK 08.02.00.12 and we would like our device to use a manufacturer specific MAC-ID instead of any preprogrammed TI MAC-ID (for example by reading it from a non-volatile memory during startup).

Can this be done by using a specific Enet-API call?

Best regards

Alexander Goehrig

  • Hi Alexander,

    Currently the example application uses a MAC id which is provided by Resource Manger. If you do not want to use this MAC you can still configure your own mac id any time using 

    "ICSSG_MACPORT_IOCTL_SET_MACADDR" ioctl by providing input arguments as your own mac address and mac port number.

    Please refer to the documentation here: software-dl.ti.com/.../group__DRV__ENET__ICSSG.html

    Please let me know if you find any issue in using this.
    Regards,
    Mohan
  • Hi Mohan,

    thank your for your reply. I have had a closer look at the usage of the "ICSSG_MACPORT_IOCTL_SET_MACADDR" command and the Enet_ioctl() function in some of the implementations delivered via the SDK.

    I'm having trouble to get an Enet_Handle to pass to the Enet_ioctl() function.

    In our application we implemented the EnetCb_getFwPoolMem(), EnetApp_initLinkArgs() and EnetApp_getEnetInstInfo() similar to the example I mentioned in my first post and I hoped there would a handle be passed through so I could use it to change the MAC address. Unfortunately I did not find one Disappointed

    Is there any kind of getEntHandle() Mehthod which I could use to obtain such an Enet_Handle?

    Best regards

    Alex

  • Hi Alex,

    I understand your question and i am trying to add an ioctl in the test application and will provide additional details in some time after basic validation.

    Regards,

    Mohan.

  • Hi Alex,

    I have verified that there is a "Enet_getHandle" api available to get the required enet peripheral handle.

    You have to pass appropriate inputs to that API by including required header files.

    We need to provide 2 inputs to the API. for example see below:

    include the required header files( Must needed to include "<mcu_plus_sdk>\source\networking\enet\core\include\enet.h")

    /* Declare a variable of type Enet_handle*/
    Enet_Handle hEnet_new;


    /* Call the API to get required handle with correct options*/
    hEnet_new = Enet_getHandle(ENET_ICSSG_DUALMAC, 2);

    Pass this handle to the required ioctl.

    Please let us know if you find difficulty in getting this.

    Regards,

    Mohan.

  • Hi Alex,

    I have verified that there is a "Enet_getHandle" api available to get the required enet peripheral handle.

    You have to pass appropriate inputs to that API by including required header files.

    We need to provide 2 inputs to the API. for example see below:

    include the required header files( Must needed to include "<mcu_plus_sdk>\source\networking\enet\core\include\enet.h")

    /* Declare a variable of type Enet_handle*/
    Enet_Handle hEnet_new;


    /* Call the API to get required handle with correct options*/
    hEnet_new = Enet_getHandle(ENET_ICSSG_DUALMAC, 2);

    Pass this handle to the required ioctl.

    Please note that the Enet_getHandle() API can be only called after successful Enet_open() API else it will return with NULL.

    Please let us know if you find difficulty in getting this.

    Regards,

    Mohan.

  • Hi Mohan,

    thank you for your response. I tried to integrate the possibility to change the MAC address by implementing a small function to do so:

    void changeMacAddress()
    {
      int32_t status;
      Enet_IoctlPrms prms;
      IcssgMacPort_SetMacAddressInArgs inArgs;
    
      inArgs.macAddr[0] = 0x12;
      inArgs.macAddr[1] = 0x34;
      inArgs.macAddr[2] = 0x56;
      inArgs.macAddr[3] = 0x78;
      inArgs.macAddr[4] = 0x9A;
      inArgs.macAddr[5] = 0xBC;
    
      inArgs.macPort = ENET_MAC_PORT_1;
      uint32_t coreId = EnetSoc_getCoreId();
    
      Enet_Handle enethandle = NULL;
    
      enethandle = Enet_getHandle(ENET_ICSSG_DUALMAC, 2);
    
      EnetAppUtils_print("enethandle achieved: 0x%x\r\n", enethandle);
    
      ENET_IOCTL_SET_IN_ARGS(&prms, &inArgs);
      status = Enet_ioctl(enethandle, coreId, ICSSG_MACPORT_IOCTL_SET_MACADDR, &prms);
      if (status != ENET_SOK)
      {
         EnetAppUtils_print("SET_MACADDR failed: %d\r\n",
                            status);
      }
      else
      {
        EnetAppUtils_print("SET_MACADDR succeeded: %0x:%0x:%0x:%0x:%0x:%0x\r\n",
                           inArgs.macAddr[0], inArgs.macAddr[1], inArgs.macAddr[2] = 0xFF,
                             inArgs.macAddr[3], inArgs.macAddr[4], inArgs.macAddr[5]);
      }
    }

    At first I placed one function call at the end of the EnetApp_initLinkArgs() function, but there was no effect.

    After that I added another changeMacAddress() call in our application, after there was a link-up detected but also there was no change in the used MAC address.

    May be you can see something on the printed log:

    ICSSG Dual MAC Test
    enethandle achieved: 0x805b44bc
    SET_MACADDR succeeded: 12:34:56:78:9A:BC
    EnetPhy_bindDriver: PHY 15: OUI:080028 Model:0f Ver:01 <-> 'dp83869' : OK
    PHY 3 is alive
    PHY 15 is alive
    Host MAC address: 70:ff:76:1d:92:c1
    
    [LWIPIF_LWIP] Enet has been started successfully
    [LWIPIF_LWIP] NETIF INIT SUCCESS
    Icssg_handleLinkUp: icssg1-1: Port 1: Link up: 1-Gbps Full-Duplex
    enethandle achieved: 0x805b44bc
    SET_MACADDR succeeded: SET_MACADDR succeeded: 12:34:56:78:9A:BC

    Has some kind reinitialization to be done after changing the MAC address or did I something wrong in my implementation?

    In general: Is there any way to prevent the Ethernet Driver to use the preconfigured TI MAC address?

    Best regards

    Alex

  • Hi Alex,

    It looks like you are configuring your own mac id then the application flow goes to wait for link and after link up you are again configuring with pre-defined mac id and then one more time you are configuring your own MAC id.

    Because we do not have an option to prevent the default MAC address you can try commenting/removing the code which is doing the MAC config in LwipifEnetAppCb_getHandle() API at the end of the function and configure your own mac id after link up and try sending traffic with your own MAC id as destination.


    Please let me know if you if you face any issues.
    Regards,
    Mohan
  • Hi Mohan,

    thank you for your reply. Yes in my example there where three times when I tried to set the MAC id because I was trying to find the right place in our application to do so.

    If there was something wrong with the SET_MACADDR call I would expect an error returning from the Enet_ioctl() - call.
    If the Ethernet Port was in the wrong state to process that command and I have to do some additonal calls to the Ethernet Driver (e.g. reinit or something like that) I would prefer some hints / comments in the interface API.

    Anyways it sounds a bit stange to me that I have to change code compiled in the enet-lwip-icssg.lib to provide such a - in my view - basic functionality.

    I assume there would be some heavy confusion if an "unknown" TI device appears on the network at startup (e.g. ARP or DHCP) instead of a device from the used manufacturer (e.g. during security network analysis).

    Isn't there any way to set the MAC id before anything happens on the Ethernet? When using Profinet there is a PRU_PN_TPruLoadParameter.ai8uMacAddr parameter for the PRU_PN_loadPru() function to set up the MAC id during initialization.

    Could you please try to reproduce that behaviour using the enet_lwip_icssg - example from the SDK and give me some reliable information about how and when to set the MAC id?

    Best regards

    Alex

  • Hi Alex,

    I totally agree to the point you mentioned.

    We are looking into this issue to find best way to fix this. Will try to fix this at the earliest.

    Regards,

    Mohan.

  • Hi Alex,

    As a quick fix for the issue I brought the MAC address configuration to application and the changes are in the below patch.

    interface_mac_config_patch.PATCH.txt
    Left base folder: C:\backup\mcu_plus_sdk_am64x_08_02_00_12
    Right base folder: C:\ti\mcu_plus_sdk_am64x_08_02_00_12
    --- examples\networking\lwip\enet_lwip_cpsw\test_enet.c	2022-01-27 13:58:12.000000000 +-0530
    +++ examples\networking\lwip\enet_lwip_cpsw\test_enet.c	2022-05-26 17:56:26.000000000 +-0530
    @@ -175,12 +175,24 @@
         *enetType = Board_getEthType();
         *instId   = 0;
         *numMacPorts = 1;
         macPortList[0] = ENET_MAC_PORT_1;
     }
     
    +#if defined(ENET_ENABLE_ICSSG)
    +/* Need to add dummy function to build*/
    +int32_t EnetApp_setEnetInterfaceMacAddr(Enet_Handle hEnet, 
    +                                        uint32_t coreId, 
    +                                        Enet_MacPort macPort,
    +                                        uint8_t macAddr[])
    +{
    +    EnetAppUtils_assert(false);
    +    return (-1);
    +}
    +#endif
    +
     int enet_lwip_example(void *args)
     {
         Enet_Type enetType;
         uint32_t instId;
         Enet_MacPort macPortList[1];
         uint8_t numMacPorts;
    --- examples\networking\lwip\enet_lwip_icssg\test_enet.c	2022-01-27 13:58:12.000000000 +-0530
    +++ examples\networking\lwip\enet_lwip_icssg\test_enet.c	2022-05-26 17:45:30.000000000 +-0530
    @@ -182,12 +182,39 @@
         *enetType = ENET_ICSSG_DUALMAC;
         *instId   = 2;
         *numMacPorts = 1;
         macPortList[0] = ENET_MAC_PORT_1;
     }
     
    +#if defined(ENET_ENABLE_ICSSG)
    +int32_t EnetApp_setEnetInterfaceMacAddr(Enet_Handle hEnet, 
    +                                        uint32_t coreId, 
    +                                        Enet_MacPort macPort,
    +                                        uint8_t macAddr[])
    +{
    +    int32_t status;
    +    Enet_IoctlPrms prms;
    +    IcssgMacPort_SetMacAddressInArgs inArgs;
    +
    +    memset(&inArgs, 0, sizeof(inArgs));
    +
    +    /* Pass custom mac id to memcpy if do not want to use preconfigured MAC */
    +    memcpy(&inArgs.macAddr[0U], &macAddr[0U], sizeof(inArgs.macAddr));
    +    inArgs.macPort = macPort;
    +
    +    ENET_IOCTL_SET_IN_ARGS(&prms, &inArgs);
    +    status = Enet_ioctl(hEnet, coreId, ICSSG_MACPORT_IOCTL_SET_MACADDR, &prms);
    +    if (status != ENET_SOK)
    +    {
    +        EnetAppUtils_print("EnetAppUtils_addHostPortEntry() failed ICSSG_MACPORT_IOCTL_ADD_INTERFACE_MACADDR: %d\r\n",
    +                        status);
    +    }
    +    return status;   
    +}
    +#endif
    +
     int enet_lwip_example(void *args)
     {
         Enet_Type enetType;
         uint32_t instId;
         Enet_MacPort macPortList[1];
         uint8_t numMacPorts;
    --- source\networking\enet\core\lwipif\src\V1\lwipifcb.c	2022-01-27 13:58:13.000000000 +-0530
    +++ source\networking\enet\core\lwipif\src\V1\lwipifcb.c	2022-05-26 16:54:20.000000000 +-0530
    @@ -314,26 +314,18 @@
         EnetAppUtils_printMacAddr(&outArgs->rxInfo.macAddr[0U]);
     
     #if defined(ENET_ENABLE_ICSSG)
         /* Add port MAC entry in case of ICSSG dual MAC */
         if (ENET_ICSSG_DUALMAC == gLwipIfCbObj.enetType)
         {
    -        Enet_IoctlPrms prms;
    -        IcssgMacPort_SetMacAddressInArgs inArgs;
     
    -        memset(&inArgs, 0, sizeof(inArgs));
    -        memcpy(&inArgs.macAddr[0U], &outArgs->rxInfo.macAddr[0U], sizeof(inArgs.macAddr));
    -        inArgs.macPort = gLwipIfCbObj.macPortList[0U];
    -
    -        ENET_IOCTL_SET_IN_ARGS(&prms, &inArgs);
    -        status = Enet_ioctl(handleInfo.hEnet, coreId, ICSSG_MACPORT_IOCTL_SET_MACADDR, &prms);
    -        if (status != ENET_SOK)
    -        {
    -            EnetAppUtils_print("EnetAppUtils_addHostPortEntry() failed ICSSG_MACPORT_IOCTL_ADD_INTERFACE_MACADDR: %d\r\n",
    -                               status);
    -        }
    +        status = EnetApp_setEnetInterfaceMacAddr(handleInfo.hEnet, 
    +                                                 coreId, 
    +                                                 gLwipIfCbObj.macPortList[0U],
    +                                                 &outArgs->rxInfo.macAddr[0U]);
    +        
             EnetAppUtils_assert(status == ENET_SOK);
         }
     #endif
     }
     
     void LwipifEnetAppCb_releaseHandle(LwipifEnetAppIf_ReleaseHandleInfo *releaseInfo)
    --- source\networking\enet\utils\include\enet_apputils.h	2022-01-27 13:58:13.000000000 +-0530
    +++ source\networking\enet\utils\include\enet_apputils.h	2022-05-26 16:56:57.000000000 +-0530
    @@ -408,12 +408,20 @@
     int32_t EnetAppUtils_showRxFlowStats(EnetDma_RxChHandle hRxFlow);
     
     int32_t EnetAppUtils_showTxChStats(EnetDma_TxChHandle hTxCh);
     
     void EnetApp_getEnetInstInfo(Enet_Type *enetType, uint32_t *instId,
                                  Enet_MacPort macPortList[],   uint8_t *numMacPorts);
    +
    +#if defined(ENET_ENABLE_ICSSG)
    +int32_t EnetApp_setEnetInterfaceMacAddr(Enet_Handle hEnet, 
    +                                        uint32_t coreId, 
    +                                        Enet_MacPort macPort,
    +                                        uint8_t macAddr[]);
    +#endif
    +
     void EnetApp_getCpswInitCfg(Enet_Type enetType,  uint32_t instId,   Cpsw_Cfg *cpswCfg);
     void EnetApp_initLinkArgs(EnetPer_PortLinkCfg *linkArgs,   Enet_MacPort macPort);
     bool EnetApp_isPortLinked(Enet_Handle hEnet);
     
     
     /* ========================================================================== */
    

    I have attached the patch file as a text file. Please rename the file by removing .txt and apply on to MCU+SDK 08.02.00.12. You can pass your device mac id in the application it self.

    Please let us know if you find any issues.

    Regards,

    Mohan.

  • Hi Mohan,

    thank you very much for the patch.

    We’ve implemented it, but it’s still not working.

    We added an additional printout after setting “successfully” the MAC-Address.

    The IP-Address is set and our MAC-Address also reports success.

    Host MAC address: 70:ff:76:1d:92:c1

    SET_MACADDR succeeded: 0:69:ff:12:34:56

    But after setting the IP-Address with DHCP the Mac-Address is still 70:FF:76:1D:92:C1.

    Could you please check if you can reproduce this behavior and give as an advice how we could solve this problem.

  • Hi Sven,

    I have verified that there is a print statement which I missed to move to application is causing that confusion. That is just a print message. I have created a new patch file moving this as well and printing mac address which we are passing to ioctl. Can you please try this patch and let me know.


    interface_mac_config_patch_8_3_0_5_new.PATCH.txt
    Left base folder: C:\backup\mcu_plus_sdk_am243x_08_03_00_05
    Right base folder: C:\ti\mcu_plus_sdk_am243x_08_03_00_05
    --- examples\networking\lwip\enet_lwip_icssg\test_enet.c	2022-05-04 13:18:08.000000000 +-0530
    +++ examples\networking\lwip\enet_lwip_icssg\test_enet.c	2022-06-10 10:49:24.000000000 +-0530
    @@ -148,12 +148,41 @@
         *enetType = ENET_ICSSG_DUALMAC;
         *instId   = 2;
         *numMacPorts = 1;
         macPortList[0] = ENET_MAC_PORT_1;
     }
     
    +int32_t EnetApp_setEnetInterfaceMacAddr(Enet_Handle hEnet, 
    +                                        uint32_t coreId, 
    +                                        Enet_MacPort macPort,
    +                                        uint8_t macAddr[])
    +{
    +    int32_t status;
    +    Enet_IoctlPrms prms;
    +    IcssgMacPort_SetMacAddressInArgs inArgs;
    +
    +    memset(&inArgs, 0, sizeof(inArgs));
    +
    +    /* Pass custom mac id to memcpy if do not want to use preconfigured MAC */
    +    memcpy(&inArgs.macAddr[0U], &macAddr[0U], sizeof(inArgs.macAddr));
    +    inArgs.macPort = macPort;
    +
    +    ENET_IOCTL_SET_IN_ARGS(&prms, &inArgs);
    +
    +    EnetAppUtils_print("Host MAC address: ");
    +    EnetAppUtils_printMacAddr(&inArgs.macAddr[0U]);
    +
    +    status = Enet_ioctl(hEnet, coreId, ICSSG_MACPORT_IOCTL_SET_MACADDR, &prms);
    +    if (status != ENET_SOK)
    +    {
    +        EnetAppUtils_print("EnetAppUtils_addHostPortEntry() failed ICSSG_MACPORT_IOCTL_ADD_INTERFACE_MACADDR: %d\r\n",
    +                        status);
    +    }
    +    return status;   
    +}
    +
     int enet_lwip_example(void *args)
     {
         Enet_Type enetType;
         uint32_t instId;
         Enet_MacPort macPortList[1];
         uint8_t numMacPorts;
    --- source\networking\enet\core\lwipif\src\V1\lwipifcb.c	2022-05-04 13:18:09.000000000 +-0530
    +++ source\networking\enet\core\lwipif\src\V1\lwipifcb.c	2022-06-10 10:48:54.000000000 +-0530
    @@ -307,33 +307,21 @@
     
         outArgs->timerPeriodUs   = ENETLWIP_PACKET_POLL_PERIOD_US;
     
         /* Use optimized processing where TX packets are relinquished in next TX submit call */
         outArgs->disableTxEvent = true;
     
    -    EnetAppUtils_print("Host MAC address: ");
    -    EnetAppUtils_printMacAddr(&outArgs->rxInfo.macAddr[0U]);
    -
     #if (ENET_ENABLE_PER_ICSSG == 1)
         /* Add port MAC entry in case of ICSSG dual MAC */
         if (ENET_ICSSG_DUALMAC == gLwipIfCbObj.enetType)
         {
    -        Enet_IoctlPrms prms;
    -        IcssgMacPort_SetMacAddressInArgs inArgs;
    -
    -        memset(&inArgs, 0, sizeof(inArgs));
    -        memcpy(&inArgs.macAddr[0U], &outArgs->rxInfo.macAddr[0U], sizeof(inArgs.macAddr));
    -        inArgs.macPort = gLwipIfCbObj.macPortList[0U];
    -
    -        ENET_IOCTL_SET_IN_ARGS(&prms, &inArgs);
    -        status = Enet_ioctl(handleInfo.hEnet, coreId, ICSSG_MACPORT_IOCTL_SET_MACADDR, &prms);
    -        if (status != ENET_SOK)
    -        {
    -            EnetAppUtils_print("EnetAppUtils_addHostPortEntry() failed ICSSG_MACPORT_IOCTL_ADD_INTERFACE_MACADDR: %d\r\n",
    -                               status);
    -        }
    +        status = EnetApp_setEnetInterfaceMacAddr(handleInfo.hEnet, 
    +                                                 coreId, 
    +                                                 gLwipIfCbObj.macPortList[0U],
    +                                                 &outArgs->rxInfo.macAddr[0U]);
    +        
             EnetAppUtils_assert(status == ENET_SOK);
         }
     #endif
     }
     
     void LwipifEnetAppCb_releaseHandle(LwipifEnetAppIf_ReleaseHandleInfo *releaseInfo)
    --- source\networking\enet\utils\include\enet_apputils.h	2022-05-04 13:18:09.000000000 +-0530
    +++ source\networking\enet\utils\include\enet_apputils.h	2022-06-02 15:04:41.000000000 +-0530
    @@ -408,12 +408,18 @@
     int32_t EnetAppUtils_showRxFlowStats(EnetDma_RxChHandle hRxFlow);
     
     int32_t EnetAppUtils_showTxChStats(EnetDma_TxChHandle hTxCh);
     
     void EnetApp_getEnetInstInfo(Enet_Type *enetType, uint32_t *instId,
                                  Enet_MacPort macPortList[],   uint8_t *numMacPorts);
    +
    +int32_t EnetApp_setEnetInterfaceMacAddr(Enet_Handle hEnet, 
    +                                        uint32_t coreId, 
    +                                        Enet_MacPort macPort,
    +                                        uint8_t macAddr[]);
    +
     void EnetApp_getCpswInitCfg(Enet_Type enetType,  uint32_t instId,   Cpsw_Cfg *cpswCfg);
     void EnetApp_initLinkArgs(EnetPer_PortLinkCfg *linkArgs,   Enet_MacPort macPort);
     bool EnetApp_isPortLinked(Enet_Handle hEnet);
     
     
     /* ========================================================================== */
    


    I have attached the patch file as a text file. Please rename the file by removing .txt and apply on to MCU+SDK 08.03.00.05 version.

    Thank you.

    Regards,

    Mohan

  • Hi Sven,

    Please find the latest patch to fix this problem. 

    interface_mac_config_patch_17062022.txt
    Left base folder: C:\MohanReddy\backup\mcu_plus_sdk_am243x_08_03_00_05
    Right base folder: C:\ti\mcu_plus_sdk_am243x_08_03_00_05
    --- examples\networking\lwip\enet_lwip_icssg\test_enet.c	2022-05-04 13:18:08.000000000 +-0530
    +++ examples\networking\lwip\enet_lwip_icssg\test_enet.c	2022-06-20 13:22:06.000000000 +-0530
    @@ -148,12 +148,31 @@
         *enetType = ENET_ICSSG_DUALMAC;
         *instId   = 2;
         *numMacPorts = 1;
         macPortList[0] = ENET_MAC_PORT_1;
     }
     
    +int32_t EnetApp_getcustomInterfaceMacAddrList(EnetRm_ResCfg *resCfg)
    +{
    +    int32_t status = ENET_SOK;
    +
    +    /* For reference - Note: Allocate sufficient MAC addresses if using more than one interface*/
    +    /* Note: Only update if you want to go with custom mac else just return with ENET_SOK*/
    +
    +    resCfg->macList.macAddress[0][0] = 0x00;
    +    resCfg->macList.macAddress[0][1] = 0x69;
    +    resCfg->macList.macAddress[0][2] = 0xff;
    +    resCfg->macList.macAddress[0][3] = 0x12;
    +    resCfg->macList.macAddress[0][4] = 0x34;
    +    resCfg->macList.macAddress[0][5] = 0x56;
    +
    +    resCfg->macList.numMacAddress = 1;
    +
    +    return status;   
    +}
    +
     int enet_lwip_example(void *args)
     {
         Enet_Type enetType;
         uint32_t instId;
         Enet_MacPort macPortList[1];
         uint8_t numMacPorts;
    --- source\networking\enet\core\lwipif\src\V1\lwipifcb.c	2022-05-04 13:18:09.000000000 +-0530
    +++ source\networking\enet\core\lwipif\src\V1\lwipifcb.c	2022-06-20 13:22:11.000000000 +-0530
    @@ -160,12 +160,18 @@
             enetMcmCfg.perCfg = &icssgCfg;
     #endif
     
         EnetAppUtils_assert(NULL != enetMcmCfg.perCfg);
         EnetAppUtils_initResourceConfig(gLwipIfCbObj.enetType, EnetSoc_getCoreId(), resCfg);
     
    +#if (ENET_ENABLE_PER_ICSSG == 1)
    +    status = EnetApp_getcustomInterfaceMacAddrList(resCfg);
    +        
    +    EnetAppUtils_assert(status == ENET_SOK);
    +#endif
    +
         enetMcmCfg.enetType           = gLwipIfCbObj.enetType;
         enetMcmCfg.instId             = gLwipIfCbObj.instId;
         enetMcmCfg.setPortLinkCfg     = EnetApp_initLinkArgs;
         enetMcmCfg.numMacPorts        = gLwipIfCbObj.numMacPorts;
         enetMcmCfg.periodicTaskPeriod = ENETPHY_FSM_TICK_PERIOD_MS; /* msecs */
         enetMcmCfg.print              = EnetAppUtils_print;
    @@ -328,12 +334,13 @@
             status = Enet_ioctl(handleInfo.hEnet, coreId, ICSSG_MACPORT_IOCTL_SET_MACADDR, &prms);
             if (status != ENET_SOK)
             {
                 EnetAppUtils_print("EnetAppUtils_addHostPortEntry() failed ICSSG_MACPORT_IOCTL_ADD_INTERFACE_MACADDR: %d\r\n",
                                    status);
             }
             EnetAppUtils_assert(status == ENET_SOK);
         }
     #endif
     }
     
     void LwipifEnetAppCb_releaseHandle(LwipifEnetAppIf_ReleaseHandleInfo *releaseInfo)
    --- source\networking\enet\utils\include\enet_apputils.h	2022-05-04 13:18:09.000000000 +-0530
    +++ source\networking\enet\utils\include\enet_apputils.h	2022-06-20 13:21:57.000000000 +-0530
    @@ -408,12 +408,15 @@
     int32_t EnetAppUtils_showRxFlowStats(EnetDma_RxChHandle hRxFlow);
     
     int32_t EnetAppUtils_showTxChStats(EnetDma_TxChHandle hTxCh);
     
     void EnetApp_getEnetInstInfo(Enet_Type *enetType, uint32_t *instId,
                                  Enet_MacPort macPortList[],   uint8_t *numMacPorts);
    +
    +int32_t EnetApp_getcustomInterfaceMacAddrList(EnetRm_ResCfg *resCfg);
    +
     void EnetApp_getCpswInitCfg(Enet_Type enetType,  uint32_t instId,   Cpsw_Cfg *cpswCfg);
     void EnetApp_initLinkArgs(EnetPer_PortLinkCfg *linkArgs,   Enet_MacPort macPort);
     bool EnetApp_isPortLinked(Enet_Handle hEnet);
     
     
     /* ========================================================================== */
    


    I have attached the patch file as a text file. Please rename the file and apply on to fresh MCU+SDK 08.03.00.05 version.

    This patch alone is sufficient and do not need old patch changes. So kindly please apply this and let me know if you face any issue again.

    Regards,

    Mohan.

  • Hi Mohan,

    thanks for your replies and work to solve that issue. We integrated your latest patch and everything is working as expected.

    Case solved for us ;)

    Best regards

    Alex

  • Hi Mohan,

    we recently discovered, that the solution you proposed will unfortunately no longer work with SDK Version V08.03.00.18 since the LwipApp_init() function where the EnetApp_getcustomInterfaceMacAddrList()-call was placed is no longer available in the lwipifcb.c file.

    Are you planning to integrate the custom MAC-address solution in future SDK versions?

    Best regards

    Alex