Mac Address

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

Mac Address

Jump to solution
1,405 Views
netra
Contributor IV

How to use own mac address instead of using ENET_get_mac_address().

I am using mcf52259 and mqx3.5

Thanks in advance,

nisha

1 Solution
876 Views
butok
NXP Employee
NXP Employee

For example:

_enet_address    enet_address = { <Put here your mac address> };

ipcfg_init_device (BSP_DEFAULT_ENET_DEVICE, enet_address);

View solution in original post

4 Replies
877 Views
butok
NXP Employee
NXP Employee

For example:

_enet_address    enet_address = { <Put here your mac address> };

ipcfg_init_device (BSP_DEFAULT_ENET_DEVICE, enet_address);

876 Views
netra
Contributor IV

Yes, I did this and it works too,

Is there any way to check that whatever mac address set by me is set in controller??

Can we change mac address in run time ??

Andrey thanks for your reply.

Thanks in Advance,

Nisha

0 Kudos
Reply
876 Views
butok
NXP Employee
NXP Employee

Hi Nisha,

>>Is there any way to check that whatever mac address set

You can try ipcfg_get_mac() or ENET_get_address().

>>.Can we change mac address in run time ?


Do release of the ENET device, and after do its initialization with new mac address.

Cheers,

Andrey Butok

876 Views
netra
Contributor IV

This is  the code which i wrote to extract mac address .The mac address replied is always same , although i change the mac address the way u asked me to do in previous post .Ethernet connection is created using the mac address which i give , but while checking the mac address, it doe not match with the value which i gave.

uint_32 rtn;

    IPCFG_IP_ADDRESS_DATA    ipaddr;

    char mac[6];

    ipcfg_get_mac(IPCFG_default_enet_device,mac);

    printf("%x:%x:%x:%x:%x:%x\n",mac[5],mac[4],mac[3],mac[2],mac[1],mac[0]);

0 Kudos
Reply