Hello,
what is the easiest way (for beginner) to change MAC when I use UDP daemon in example helloWorld.
David
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Reinjith,
I read this document,
but I did not find API which changes MAC address.
I tried to add the "Pa_addMac()" and "Pa_forewardResult()" into "res_mgr_init_pass()" behind "PA_create()" in "resourcemgr.c" from "helloWorld_evmc6678l" example.
But when UDP daemon start, then it comunicates with default MAC, not with my added MAC.
Is this right way or is there the other way to change MAC address in deamon?
David
David,
Our NIMU driver calls the platform function, platform_get_emac_info, to get the hardware's MAC address. Take a look at both the NIMU and Platform libraries in our PDK package. It might not simple; you may have to recompile the libraries to suit your needs.
Will you also be using the Packet Accelerator? By default, we initialize the PA but do not actually use the classification/forwarding capabilities. The CSL function, CSL_CPSW_3GF_setPortMACAddress, is called in NIMU to configure our switch's MAC.
Let me know if this helps.
-Ivan
Ivan,
I took a look at NIMU,CSL and Platform libraries. I found that UDP daemon uses MAC identical to EFUSE MAC. I got this EFUSE by "CSL_BootCfgGetMacIdentifier" but I don't know what is EFUSE and how can I change it. I think that I somewhere saw memory alocation for EFUSE_MAC and EEPROM_MAC. What is difference and when are this MACs establish?
I tried to used "CSL_CPSW_3GF_setPortMACAddress" but without effect on change MAC of UDP daemon.
I still can not change UDPdaemons' MAC and I want use this daemon without direct using Packet Accelerator. Do you have any other ideas to solve MAC changes?
David
David,
The eFUSE mac address is hard-coded in during manufacturing time, so you won't be able to change that. The MAC should be configured before the daemon start. I have never tried changing it after starting the network stack (I would imagine you would have to restart the network if you do so).
You should be able to make a simple change in the NIMU driver or Platform Lib to change your MAC address during the EVM's init. In nimu_eth.c, under the function EMACInit_Core, there is a call to platform_get_emac_info followed by memcpy(ptr_pvt_data->pdi.bMacAddr, emac_info.mac_address, 6);. You can try changing emac_info.mac_address to a custom address of your choice, or change the platform function to fit your requirements. Remember to recompile both the library and your application using this library.
-Ivan