AM2432: Ethernet/IP - Two PHYs with different Mac Address

Part Number: AM2432


Hi all,

 

During certification of my DUT(Ethernet/IP) generic device by ODVA laboratory, a possible issue is showned.

 

On my DUT I have two PHYs which have different MAC Address because one of the two PHY is connected two another device which is sold with ethernet/ip device, so it has another mac.

 

Is there a way to set the two different MACs with API in your stack?

 

Best regards.

 

Stefano

  • Hi Stefano,

    Can you share the SDK version that you're using?

    Regards
    Archit

  • Hi,

    I am using 11.00.00.08.

    Regards

  • Hi Stefano,

    I apologize for the delayed response. As specified in the specification, Vol2-1.34, section 5-5.3.2.3:

    "Devices with multiple ports but a single MAC interface (e.g., a device with embedded switch technology) may use the same value for this attribute in each instance of the Ethernet Link Object."

    Since the EIP Stack uses embedded switch technology, this applies to your use case as well, meaning your device may operate with just one MAC address.

    However, if you want the EIP to report the MAC address from the PHY that isn't handled by the EIP example (custom MAC address), you can easily accomplish this by modifying the array named "EI_APP_TASK_macAddress" in app_task.c.

    Additionally, you would need to add the symbol "_DEBUG_USE_CUSTOM_MAC_ADDRESS" to your predefined symbols as shown below:


    Best regards,
    Pourya

  • Hi Pourya,

    Ok, thank you. 

    But how can I manage two different MAC? In this way I can set value of MAC on both PHYs, right? Because I have two different devices and two PHYs.

    Laboratory has reported me that as result:

    Port 2, which is labeled “****” on the module, uses a different MAC address than port 1. In principle, this would of course be possible. However, in the EthernetLink object, the identical MAC address is specified in attribute 3 for both instances.

    Regards.

    Stefano

  • Hi Stefano,

    I believe you were using an incorrect MAC address; specifically the hidden intermediate PHY address between the second port and the third PHY that's externally exposed, if I recall your project details correctly. Please follow the instructions I provided earlier (use the MAC address of the 3rd PHY since it's the exposed one) and then try again to see if this resolves your issue.

    On the TI AM243x-LP, when you run the example and read Attribute 3 from both Port 1 and Port 2, you'll notice that the MAC address is identical in both cases. More importantly, the MAC address visible in Wireshark matches this same address.

    For your information: The EIP Stack/Example implements the "Device with Multiple Ethernet interfaces and a single IP Address and CIP Interface" topology, as described in Vol2-1.34, Section 6-3.4.

    Best regards,
    Pourya

  • Hi Pourya,

    Just for clear. 

    Do I use EI_APP_TASK_macAddress array or other structrure as mandatory?

    Because in the example I see that 

    // Set MAC address of module
    OSAL_MEMORY_memcpy(tParam.ai8uMacAddr, EI_APP_TASK_macAddress, 6);

    And in EI_APP_TASK_macAddress if define is enabled one Mac Address is copied in the buffer.

    Where am I wrong?

  • Hi Stefano,

    Yes, you should set the content of EI_APP_TASK_macAddress  with the MAC address of the exposed PHY (the TJA1101B). This approach supports the goal of maintaining a single unified MAC address across all ports in your system.

    Please confirm if I've correctly understood your implementation objective.

    Best regards,
    Pourya

  • Hi Pourya,

    No, my goal is to have 2 different mac for the two interface. Because port reached by TJA1101 is on another device with another MAC. 

    So, is it possible set one mac for RJ45 port (phy 83826e) and one mac for phy TJA1101?

    Generally, I'd like to set different MAC.

    Regards

  • Hi Stefano,

    I was away for a few days, sorry for delayed response.
    No, it is not possible to set two different MAC address for different ports. Because as mentioned before, the following topology is supported on Standard SDK:

    "Device with Multiple Ethernet interfaces and a single IP Address and CIP Interface" topology, as described in Vol2-1.34, Section 6-3.4.

    Vol2-1.34, section 5-5.3.2.3:

    "Devices with multiple ports but a single MAC interface (e.g., a device with embedded switch technology) may use the same value for this attribute in each instance of the Ethernet Link Object."

    That's why I was suggesting using one unified MAC address for your device.

    Best regards,
    Pourya