Author Topic: Precompiled Demo for M52259DEMO has 0's for MAC Address  (Read 7734 times)

Offline sam512bb

  • Newbie
  • *
  • Posts: 7
    • View Profile
Precompiled Demo for M52259DEMO has 0's for MAC Address
« on: December 03, 2010, 07:32:43 PM »
Good day All,
I was trying to evaluate the uTasker for the Coldfire 52259 Demo board and using the precompiled s-records (uTaskerV1.3_M52259DEMO_USB_ETHERNET.S19) result in a 0 MAC address (0:0:0:0:0:0)... A 0 Mac address prevents me from evaluating the Ethernet portion of the demo, as my router will not route any packets to/from a 0 Mac Address device.  Is there a way to set the MAC address even temporarily?  I looked through the serial (USB) config options, but could not seem to find this capability... Any suggestions?

That being said, I have to say that Mark has done a tremendous amount of work on uTasker with very impressive results!

Cheers,

Sam

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: Precompiled Demo for M52259DEMO has 0's for MAC Address
« Reply #1 on: December 03, 2010, 07:53:17 PM »
Hi Sam

I have experienced some DHCP servers that will ignore MAC address 00:00:00:00:00:00 but not routers, but I don't exclude things like this.

There is a "secret" command to set the MAC address via UART.
If you look in the file debug.c you can see it:

// Special secret menu - not displayed as menu...
//
static const DEBUG_COMMAND tSecretCommands[] = {
    {"MAC",               0,                 DO_IP,            DO_SET_MAC },
};


You need to enter the command "MAC 00-11-22-33-44-55" (note that the delimiter '-' is used rather than ':' although this is defined in config.h:
#define MAC_DELIMITER  '-'                                           // used for display and entry of mac addresses

so can be changed to your favorite if required.

This will cause the MAC address to be programmed to FLASH and the command will no longer allow further changes (it will subsequently give the error message "MAC may not be modified!!"). The idea behind it is that it could be useful to set a one-time programmable address in production environments but not allow users to change it later.

It can, of course, be reset by deleting all FLASH memory.

Usually, when Ethernet is possible with zeroed MAC, the same command can be used via TELNET or the setting modified (also one-shot) on the LAN web page (this is what is used for discussion in the tutorial).

Regards

Mark

PS. Is your name derived from the ATMEL SAM7X, or are you a proud 512BB owner?? ;-)

Offline sam512bb

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Precompiled Demo for M52259DEMO has 0's for MAC Address
« Reply #2 on: December 03, 2010, 10:11:20 PM »
Good day Mark,

Thank you for the prompt response and the information!

I do not have the source and so I could not look into any of the files.  I wanted to "play" with the demo for a bit before I go forward with a license, etc.

Your command worked great!  You have thought of everything!

Cheers,

Sam