Anybus IP for Xilinx using different MAC address for LLPD Multicast packets

anybus-ip-for-xilinx

#1

Hi,

I’m working with the Profinet IRT version of Anybus IP for Xilinx. My custom driver is based on source code from ABCC Starter Kit v3.04.01 and ABCC driver v 5.04.01.

I have used Wireshark to capture the traffic that is generated on the network when the software (Siemens TIA Portal v13) is updating its list of accessible devices. This has exposed a discrepancy with the MAC address.

The MAC address is defined in abcc_identification.h and calls a function that returns a unique MAC address provided by the driver:

#ifndef ETN_IA_MAC_ADDRESS_ENABLE
#define ETN_IA_MAC_ADDRESS_ENABLE TRUE
#define ETN_IA_MAC_ADDRESS_VALUE GetMacAddressStr()
#endif

When I boot up my system for the very first time the default value returned by GetMacAddressStr() is “\x00\x30\x11\x11\xFF\xFF”, which is the default found in the original code from HMS. Then I configure my system to assign a new unique MAC (let’s say “\x00\x40\x89\x78\x56\x34”) which will be returned by GetMacAddressStr() from that moment on.

When I look at the Wireshark trace I do see the expected MAC address 00.40.89.78.56.34 inside the packets corresponding to the lookup response. That is working just fine.

But in the trace I also see a bunch of LLPD packets generated from the Anybus device showing source “HmsIndus_00:00:01” to destination “LLPD_Multicast”. The odd part is that these LLPD packets are showing a source MAC address 00:30:11:00:00:01.

To be honest I’m not familiar with these protocols and possibly everything is all right, but I’m intrigued by the fact that the MAC address used for LLPD packets is different from the one I set with my function. Also, a MAC address is supposed to be unique and that won’t be the case if every single unit we build is using 00:30:11:00:00:01 for LLPD.

Can you please help clarifying whether or not this behavior is expected?

Thanks,
Yannick.


#3

Hi Yannick,

I’m going to look into this one this afternoon and get back to you


#4

could you send us this wireshark log?


#5

Hi Tim,

Sure, please find the log in attachment.

Our device name is “ipdvision” at IP address 192.168.0.124. You can see good responses at packets 87, 89, 91… MAC address is correctly reported as 00:40:89:78:56:34.

But if you look at packets #2,3,4… you’ll see the LLPD multicasts from “HmsIndus_00:00:01” with MAC address 00:30:11:00:00:01.

Shouldn’t these two MAC addresses be identical (or closely related) since the both come from the Anybus IP?

Thanks,

Yannick.

rcsdetect.pcap (25.2 KB)


#6

Hi Yannick,

I think I may need to escalate this one to some colleagues over in Sweden and get back to you


#7

Hey Yannick,

Just heard back from my colleague in Sweden, he was saying that the issue with this is likely because there’s 3 MAC ID’. There’s one MAC ID for each port, they have addresses in attributes 1, 0 and 10 of the host object F9h and have to be consecutive.

Ex: (xx:yy:zz:aa:bb:01), (xx:yy:zz:aa:bb:02), and (xx:yy:zz:aa:bb:03) with the first five octets not changing. I.e. in this case the customer shall use 00:40:89:78:56:34, 00:40:89:78:56:35, and 00:40:89:78:56:36.


#8

Hi Tim,

Please excuse the delay, as I was out for vacation last week.

Thank you for that last response, that makes perfect sense and I will implement the change.

Thanks,

Yannick.


#9

Thanks for the update Yannick, let us know if you run into any other issues with this


#10

Hi again Tim,

I’m looking into the code and I got confused…

I understand that I will need to write attributes 1, 9 and 10 of Ethernet Host Object (F9h) with consecutive MAC values. What I don’t understand is how the MAC address (attribute 1) is currently being set. I would like to understand where this is currently done for attribute #1 so I can append the additional operations for attributes 9 and 10.

Right now the MAC address is being defined in file “abcc_identification.h”, where my function GetMacAddressStr() is returning a unique MAC address value.

// Attribute 1: MAC Address (Array[6] of UINT8)

#ifndef ETN_IA_MAC_ADDRESS_ENABLE

#define ETN_IA_MAC_ADDRESS_ENABLE TRUE

#define ETN_IA_MAC_ADDRESS_VALUE GetMacAddressStr()

#endif

I can see that ETN_IA_MAC_ADDRESS_VALUE is being used only once in function ETN_SetAttrSuccessCallback, where a call is made to the Linux shell (ifconfig) to insure that the address of eth1 matches the actual hardware address. But I find nowhere in the project where the call is made to the actual Ethernet Host Object.

Can you help pinpoint the section of the driver source code where the MAC address is being written to the IP?

Thanks,

Yannick.


#11

Hi Tim,

Ok, I think I figured out where I need to change the MAC address for ports 1 and 2. I’m not sure of what’s happening behind the scenes, but as long as I can change the value I’ll be good.

In abcc_obj_cfg.h:

/*

** Attribute 9: Port 1 MAC Address (Array[6] of UINT8)

*/

#ifndef ETN_IA_PORT1_MAC_ADDRESS_ENABLE

#define
ETN_IA_PORT1_MAC_ADDRESS_ENABLE TRUE

#define ETN_IA_PORT1_MAC_ADDRESS_VALUE “\x00\x30\x11\x00\x00\x01”

#endif

/*

** Attribute 10: Port 2 MAC Address (Array[6] of UINT8)

*/

#ifndef ETN_IA_PORT2_MAC_ADDRESS_ENABLE

#define ETN_IA_PORT2_MAC_ADDRESS_ENABLE TRUE

#define ETN_IA_PORT2_MAC_ADDRESS_VALUE “\x00\x30\x11\x00\x00\x02”

#endif


#12

[Wrong Recipient]


#13

Hi Tim,

I believe that last response you sent was not destined to me…

Yannick.


#14

Hi Yannick,

Whoops sorry about that, I’ll fix this


#15

Hi Yannick,

It seems you can find this in the abcc_obj/etn_obj.c file.
In the Get attribute switch the ETN_IA_MAC_ADDRESS_VALUE is returned for attribute 1, ETN_IA_PORT1_MAC_ADDRESS_VALUE is returned for attribute 9, and ETN_IA_PORT2_MAC_ADDRESS_VALUE is returned for attribute 10.