Hello: I have a problem with the MAC address!!! I tried the SAM7x Web server using uIP, I am using WireShark to capture all the Ethernet traffic. I could see that the MAC address from the web server is always (00:00:00:00:00:00) I have tried to change the MAC address in the FreeRTOSConfig.h but no success. I have a switch connected to my Web Server and to two computers.. I can access the web server from those computers… then I have a router connected to the switch and from the router I have another computer… From the computer connected to the router I cant access the web server, I guess is because my MAC address is not a valid one. I am using 1.- Eclipse AT91SAM7X WEB Server Demo 2.- AT91SAM7X-EK prototyping board, I have build, rebuild,, changed with many different values the MAC address but nothing happened. Any Suggestions?
As I recall from my past experience with the lwip demo for the ARM7, the MAC address is configured in file SAM7_EMAC.h. This seems to still be true in the latest FreeRTOS download as well. I’ve used the lwip demo from earlier FreeRTOS versions on a SAM7X-EK board, upgraded to have the SAM7X512 CPU (for our network-intensive application we needed more RAM). Here’s a snippet from SAM7_EMAC.h from FreeRTOS V5.1.0: /* MAC address definition. The MAC address must be unique on the network. */ #define emacETHADDR0 0 #define emacETHADDR1 0xbd #define emacETHADDR2 0x33 #define emacETHADDR3 0x06 #define emacETHADDR4 0x68 #define emacETHADDR5 0x22 These constants are then used in file SAM7_EMAC.c I’m not sure how you’re seeing 00:00:00:00:00:00 as the MAC address, however, since the defaults are otherwise (as shown above).
Oops! Pardon me. I misread your posting and thought you were trying to use lwip. Now I see you’re trying to use uIP instead. My bad. Though I tried uIP on one or both of my SAM7X boards, I don’t think I ever got into the code in any detail. Sorry. Dave
OK, maybe this will help. In looking through the FreeRTOS V5.1.0 uIP demo for ARM7, it looks like the MAC address can be configured via #defines in file uiopts.h. Here’s the pertinent section: /** * Specifies if the uIP ARP module should be compiled with a fixed * Ethernet MAC address or not. * * If this configuration option is 0, the macro uip_setethaddr() can * be used to specify the Ethernet address at run-time. * * hideinitializer */ #define UIP_FIXEDETHADDR 0 #define UIP_ETHADDR0 0x00 /**< The first octet of the Ethernet address if UIP_FIXEDETHADDR is 1. hideinitializer */ #define UIP_ETHADDR1 0xbd /**< The second octet of the Ethernet address if UIP_FIXEDETHADDR is 1. hideinitializer */ #define UIP_ETHADDR2 0x3b /**< The third octet of the Ethernet address if UIP_FIXEDETHADDR is 1. hideinitializer */ #define UIP_ETHADDR3 0x33 /**< The fourth octet of the Ethernet address if UIP_FIXEDETHADDR is 1. hideinitializer */ #define UIP_ETHADDR4 0x05 /**< The fifth octet of the Ethernet address if UIP_FIXEDETHADDR is 1. hideinitializer */ #define UIP_ETHADDR5 0x71 /**< The sixth octet of the Ethernet address if UIP_FIXEDETHADDR is 1. hideinitializer */
Correction: the header file is uiopt.h, not "uipopts.h" as previously posted.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.