Mac Address

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,256件の閲覧回数
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 解決策
727件の閲覧回数
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 返答(返信)
728件の閲覧回数
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);

727件の閲覧回数
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 件の賞賛
返信
727件の閲覧回数
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

727件の閲覧回数
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 件の賞賛
返信