rtel wrote on Friday, April 07, 2006:
Here are a few pointers, most of which I think you already know.
+ The MAC address you have set has since been changed in the FreeRTOS download. It was found that this MAC address (having a 1 in the first octet) was not let through by some of the more intelligent routers. The download now includes the following:
#define emacETHADDR0 0
#define emacETHADDR1 0xbd
#define emacETHADDR2 0x33
#define emacETHADDR3 0x06
#define emacETHADDR4 0x68
#define emacETHADDR5 0x22
as a random address with 0 in the first octet. This does not explain why you are not able to change it however.
+ Changing the MAC address should be as simple as changing the header, doing a rebuild, then reprogramming the flash. I have done this many times with no problem. Is it possible that there is an ARP cache somewhere in your network that needs flushing?
+ Being able to access your demo from the internet needs a bit of infrastructure setup. I don’t know how your internet is setup, but normally there will be an internal (LAN) that has a local IP configuration (172.25.218.nnn, 192.168.nnn.nnn, 10.10.10.nnn, I think from memory), and an external (WAN) that has a public address which is either fixed or dynamically allocated by your ISP. If your SAM7X is on your LAN with a private address you need to setup the LAN/WAN gateway to direct traffic from the public address to the correct private address and port.
Normally an HTTP request will go to port 80. I have three live demo’s running on my private network so they cannot all use port 80 for external access, and I therefore use non standard port numbers externally and use the router to distinguish direct the incoming packets accordingly.
If you just have one board running then its much easier, assuming your SAM7X is using IP address 192.168.0.100:
1) Set your SAM7X to listen on port 80 (this may be the default in the download).
2) Find out what your internet IP address is. An easy way of doing this is to go to www.whatismyip.com. Lets say for example you find it is 22.214.171.124.
3) Setup your router/gateway to direct all port 80 traffic originating from the internet side of the router to local address 192.168.0.100 (NOTE: if you have any other WEB servers on your local network this will stop them working and you will have to switch to a nonstandard port number instead!)
Now when you are on the internet to access the board you type http://126.96.36.199. The request will find its way to your router, which will see it is a request on port 80, and direct the request to your LAN IP address 192.168.0.100. The SAM7X will reply (hopefully) back to the gateway, which will then redirect the traffic back to the request source on the internet.
Easy in theory, can be tricky in practice.
One thing to watch out for is if you are doing this from a residential internet account then some ISP’s don’t let you run a WEB server at home at will block port 80 traffic. If this is the case you are again going to have to switch to a non standard port number to get around it.
Also watch out for your WAN IP address changing. It might get reasigned each time you turn on the router.
Hope this is more helpful than confusing.