BSP_DEFAULT_ENET_OUI: accept() never return when MAC address is changed

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

BSP_DEFAULT_ENET_OUI: accept() never return when MAC address is changed

Jump to solution
889 Views
arnogir
Senior Contributor II

Hello,

By default, the MAC adress OUI is defined with:

#define BSP_DEFAULT_ENET_OUI                { 0x00, 0x00, 0x5E, 0, 0, 0 }

then when I'm using ENET_get_mac_address, the 3 MSB Bytes are 0x00, 0x00, 0x5E, and the 3 LSB bytes are according transmitted parameter value.

So, when device is initialized with MAC address 00.00.5E.1.30.39, all work correctly.

Then, I only modify the OS code to test:

#define BSP_DEFAULT_ENET_OUI                { 0x53, 0x45, 0x52, 0, 0, 0 }

So device is initialized with the following MAC address: 53.45.52.1.30.39

Then in this case, when I call accept:

DV_Eth_TCPClientSocketID = accept(DV_Eth_TCPSocketID, &DV_Eth_TCPClientSocketAddr, &DV_Eth_TCPClientSocketAddrLen);

MQX wait a socket connexion, but even if I connect my computer software to connect on the socket, accept function never return.

I not test with other MAC address, but why this work with "pre defined MAC OUI" but not with a "specific MAC OUI"?:smileyconfused:

0 Kudos
Reply
1 Solution
574 Views
arnogir
Senior Contributor II

Hello

I found wy not working.

In fact When I change MAC address, my computer has always in ARP cache the association {IP - MAC Address} with old MAC address.

But this association is not almways refresh.

So, when MAC address is changed, if connection was done before on the same IP with another MAC address, we must clear the ARP cache.

So in dos cmd (administrator) enter following commande:

"arp -d"

Then enjoy...

View solution in original post

0 Kudos
Reply
2 Replies
574 Views
arnogir
Senior Contributor II

Anybody have I idea or reproduced the problem?

0 Kudos
Reply
575 Views
arnogir
Senior Contributor II

Hello

I found wy not working.

In fact When I change MAC address, my computer has always in ARP cache the association {IP - MAC Address} with old MAC address.

But this association is not almways refresh.

So, when MAC address is changed, if connection was done before on the same IP with another MAC address, we must clear the ARP cache.

So in dos cmd (administrator) enter following commande:

"arp -d"

Then enjoy...

0 Kudos
Reply