Forum Discussion
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- Browse the Simple Socket Server source code. In one of the source files (IIRC network_utilities.c) you should find a function named get_mac_addr() or get_board_mac_addr(). Change the function body in order to return a fixed MAC address instead of asking you to enter one. Regards --- Quote End --- Thank you Cris!As your tips shows for me,I read the function get_mac_addr and get_board_mac_addr().Then i guess the problem may caused by the code below,is it rigth? if (!error) { mac_addr[0] = IORD_8DIRECT(last_flash_sector, 4); mac_addr[1] = IORD_8DIRECT(last_flash_sector, 5); mac_addr[2] = IORD_8DIRECT(last_flash_sector, 6); mac_addr[3] = IORD_8DIRECT(last_flash_sector, 7); mac_addr[4] = IORD_8DIRECT(last_flash_sector, 8); mac_addr[5] = IORD_8DIRECT(last_flash_sector, 9); printf("Your Ethernet MAC address is %02x:%02x:%02x:%02x:%02x:%02x\n", mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]); } But i don't know how to change the code properly.Could you give me a little tips?Thank you!