Mac Address

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Mac Address

跳至解决方案
1,252 次查看
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 解答
723 次查看
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);

在原帖中查看解决方案

4 回复数
724 次查看
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);

723 次查看
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 项奖励
回复
723 次查看
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

723 次查看
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 项奖励
回复