FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
5545 Discussions

Unable to find Valid MAC address

Honored Contributor II

the hardware and software i use are based on“niosii_ethernet_standard_3c25.zip” and“nichestack_tutorial” from altera pages. 


after running , In NiosII IDE software, 

console is below: 


PHY INFO: [phyid] 0x1 2000 5c90 

PHY INFO: Issuing PHY Reset 

PHY INFO: waiting on PHY link... 

PHY INFO: PHY link detected, allowing network to start. 


SSS INFO: Connecting... 


=============== Software License Reminder ================ 

This software project uses an unlicensed version of the NicheStack TCP/IP 

Network Stack - Nios II Edition. If you want to ship resulting object 

code in your product, you must purchase a license for this software from 

Altera. For information go to: "http://www.altera.com/nichestack (http://www.altera.com/nichestack)" 

================================================== === 

InterNiche Portable TCP/IP, v3.1  

Copyright 1996-2008 by InterNiche Technologies. All rights reserved.  

prep_tse_mac 0 

EEPROM device 24LC0 size is 10 

read[0x000]: control byte 1 was not ACKed 

Signature = 0x0. 


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!! 

Your NEEK LCD daughtercard is not programmed with a correct MAC Address! 

Please contact Altera support for instructions on how to correct this problem! 

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!! 


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!! 

Invalid MAC Address stored at Flash Offset 0x8000 

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!! 


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!! 

Unable to find Valid MAC address. 

Please refer to your Board's User Guide for instructions 

on restoring the MAC Address for your board. 


Hard Code MAC address in get_mac_addr() of iniche_init.c 

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!! 

prepped 1 interface, initializing... 


INFO : TSE MAC 0 found at address 0x07002800 

INFO : PHY National DP83848C found at PHY address 0x01 of MAC Group[0] 

INFO : PHY[0.0] - Automatically mapped to tse_mac_device[0] 

INFO : PHY[0.0] - Restart Auto-Negotiation, checking PHY link... 

INFO : PHY[0.0] - Auto-Negotiation PASSED 

INFO : PHY[0.0] - Checking link... 

INFO : PHY[0.0] - Link established 

INFO : PHY[0.0] - Speed = 100, Duplex = Full 

OK, x=0, CMD_CONFIG=0x00000000 

MAC post-initialization: CMD_CONFIG=0x04000203 

[tse_sgdma_read_init] RX descriptor chain desc (1 depth) created 

mctest init called 

IP address of et1 : 

Created "Inet main" task (Prio: 2) 

Created "clock tick" task (Prio: 3) 

DHCP timed out, going back to default IP address(es) 

Nios II Simple Socket Server starting up. 

Created "monitor_phy" task (Prio: 9) 

Created "Nios II Simple Socket Server" task (Prio: 10) 

[SSS_task] Nios II Simple Socket Server listening on port 30 



The wrong places are in red 

my quastions : 

1:my quartusII version is 9.0,but pdf says 9.1 sp or later,does it matter? 

2: in NIOSII IDE,according to the example,I set DHCP on,it means that ip and gateway all should be set to 0 ? how to set these values manually? 

3: by the function "get_mac_addr()",does the system set NEEK mac address automatically and place it in flash?why the error"Invalid MAC Address stored at Flash Offset 0x8000"and "Unable to find Valid MAC address"generate? 


I am sorry that my English is not very good, 

I am appreciate that somebody could help me!!! 



:) hobby
0 Kudos
6 Replies
Honored Contributor II

Please do not multipost your question

Honored Contributor II

I am sorry about that~ 

I had add you to my friend list,and send a message to you~ 

Can you give me some advice about the above questions~ 

you have help lots of pupil, I am appreciate that you are so kind, 


thanks very much!!
Honored Contributor II

The software in NIOSII IDE is based on Simple_socked_server,I want to kown the communication mechanism clearly,so I post serveral stupid questions below,thanks for your help!!! 


in iniche_init.c: 

1: the funtion "get_board_mac_addr()"seems to get MAC address for nichestack tcp/ip stack system,the MAC address is the address of tse controller,these MAC address are placed in Flash memory,It means that I should write address into Flash,but how to realize it? 

the error "Invalid MAC Address stored at Flash Offset 0x8000",maybe generated by that. 


2:according to the .pdf ,the NEEK development board acts as DHCP client,so the PC acts as DHCP server,I connect NEEK and PC directly,and try to run a DHCP server software on PC. 

the error "DHCP timed out, going back to default IP address(es)"maybe generated by that. 


has somebody ever used sss tenplate ?  

what i analyse above are right ? 





Honored Contributor II

Each Ethernet card needs to have a unique MAC address on a network. The user needs to provide that unique address to the Interniche stack through the get_mac_addr() function. This function usually reads this address from a flash memory, so the actual way this is done depends on the board the software is running onto. If the flash memory is corrupt or has been erased, then this function isn't able to give a unique MAC address anymore. 

You should either try to put back a valid mac address in the flash (the board documentation should say how to do it) or modify the get_mac_addr() to return a MAC address defined by you (do only that for testing!) 

You are right about the DHCP part, but you should try to solve the MAC address problem first, and then look into Dhcp. Using an Ethernet packet sniffer such as Wireshark can help debug Dhcp problems.
Honored Contributor II

thanks for your reply!~ 


The .pdf says :"if get_board_mac_addr() is unable to find MAC address,refer to your board's user guide for instructions on restoring the MAC address,or hard code the MAC address in the get_mac_addr()function" 


I can only restore the factory state, but factory state seems not contain setting MAC address.So,I got ready to restore the MAC address of the NEEK development board ,but according to the chapter "rebuiding the factory image" of NEEK user guide,first I built the boot code ,but I could not generate the file"app_select_boot_code.srec"... 


1:so ,how to restore the MAC address? 

2: Could someone explain for me --"hard code the MAC address "? 


Honored Contributor II

By "hard code the MAC address" I mean that you modify the get_mac_addr() to return a MAC address that you define yourself in the function, instead of have it try to load it from the flash. You need to be sure that you won't have two systems with the same MAC address on the network.