Author Topic: How to change MAC address?  (Read 4950 times)

Offline alager

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
How to change MAC address?
« on: April 16, 2009, 04:19:26 PM »
I'm trying to change the MAC address in the simulator by changing the following line in application.c
Code: [Select]
//{0x00, 0x11, 0x22, 0x33, 0x44, 0xf1},   // ucOurMAC - when no other value can be read from parameters this will be used
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00},     
I think the comment indicates my problem.  So how can I get this value to be used when there is a valid set of parameters already?  Or to put it another way, how can I erase the parameters in the simulator?

I know in my target I can just erase the chip, but that construct doesn't exist for the simulator, that I can find.

Thanks,
Aaron

Offline mhoneywill

  • Full Member
  • ***
  • Posts: 173
    • View Profile
Re: How to change MAC address?
« Reply #1 on: April 16, 2009, 04:33:19 PM »
Hi Aaron,

In the simulator the file FLASH_LM3SXXXX.ini represents the flash memory of the chip being simulated just delete this file and its like you have erased the chip.

I'm simulating the Luminary micro LM3S6965 hence the name of my ini file, this ini file is in the same folder as the Visual C project file.

Cheers

Martin

Offline alager

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Re: How to change MAC address?
« Reply #2 on: April 16, 2009, 05:21:43 PM »
Awesome!  That worked.  Mine was called FLASH_M5223X.ini for the Freescale part.

Thanks,
Aaron

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3191
    • View Profile
    • uTasker
Re: How to change MAC address?
« Reply #3 on: April 16, 2009, 06:18:50 PM »
Hi Aaron

Just be careful with the MAC address on the target. It should start with 00. See following:
http://www.utasker.com/forum/index.php?topic=561.0

It works in the simulator with all addresses but not so on the target. In the development version of the simulator I have added a check of this so that it will generate an exception so that it is clear that it will not work on the target.

Regards

Mark



Offline alager

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Re: How to change MAC address?
« Reply #4 on: April 24, 2009, 07:40:43 PM »
Thanks Mark, i wasn't aware of that MAC limitation.

Aaron