3 questions about the ethernet shield

1) I've read in a book that you need an external power source for the ethernet shield (not USB), but I've also seen people using it without that. Do I need one or not?

2) I'm using an unofficial ethernet shield so it doesn't have a sticker with mac address (it's got a sticker wich says HR911105A, but thats not the mac adress right?). How do i find a mac dress? I've read in a couple of tutorials that it should work to "make up a unique address". How can I make up a unique one?

3) Same problem with the IP address. How do I find one? Ive got a program called Angry IP Scanner, wich generates a list of IP adresses, can I use any of these? (if they aren't used)

Thanks :)

The ethernet shields I've seen take their power from the arduino, so whatever is powering it drives the shield too - you don't need a separate supply.

The MAC address you use has to be unique on the network segment the ethernet capable arduino is attached to. So, although you're supposed to have a globally unique address, in practice, you can use any address you like. A simple solution is to copy the MAC address used in the examples from the ethernet library. Just remember that if you attach two devices, they'll need to have different addresses.

Your IP address needs to be unique on your network too. If your router supports DHCP, you can ask it for an IP address every time the arduino powers up - see examples again. If you need a static address, you need to see how your router is configured and pick one that is in your network segment, preferably outside the range that your router is handing out over DHCP.

In my home network (and many many others), the router is 192.168.1.1. It gives out DHCP addresses starting at 192.168.1.100. I give out static addresses to my machines that need them in the 192.168.1.90 to 192.168.1.99 range.

bestanamnetnogonsin: 1) I've read in a book that you need an external power source for the ethernet shield (not USB), but I've also seen people using it without that. Do I need one or not?

Ethernet shields work fine while powered from the Arduino board. Including power from standard USB ports.

Perhaps you mixed something up with GSM shields, which draw a lot more of current.

Or perhaps you refer to some non-standard USB ports: There are some devices on the market, that are not able to provide 500 mA default current of the USB standard. Such devices as "netbook PCs", "tablet PCs" and even some "notebook PCs". The sometimes provide only 100mA or 200mA instead of 500 mA. In that case you have such a weak USB port with a mobile device, you perhaps can run into trouble.

But you never get in trouble with the Ethernet shield using a standard USB port which provides 500 mA.

bestanamnetnogonsin: 2) I'm using an unofficial ethernet shield so it doesn't have a sticker with mac address (it's got a sticker wich says HR911105A, but thats not the mac adress right?). How do i find a mac dress? I've read in a couple of tutorials that it should work to "make up a unique address". How can I make up a unique one?

The MAC address used must be unique to your own local network only. If you have just one Ethernet shield, you can simply use the MAC address given in the example programs of the Ethernet library. If you have more than one Ethernet shield, modify it to different MAC address. There is just one limit: In your LAN each device must have a different MAC adress, so don't re-use any MAC address of any device that's in your LAN!

bestanamnetnogonsin: 3) Same problem with the IP address. How do I find one? Ive got a program called Angry IP Scanner, wich generates a list of IP adresses, can I use any of these? (if they aren't used)

If your router is "DHCP enabled", your sketch could use DHCP to get an IP address dynamically. The router will know which IP adresses in your network are unused and provide an IP address your sketch can use. If you use a fixed IP address instead, you better use an IP address that belongs to your home LAN, but is not in use in your home LAN. The "fixed IP address" you select must - belong to your home LAN - has not to be used by any other device in your home LAN

Thanks a lot!!! :)

So you don't really need a static IP? It only uses it if it fails to get one via DCHP, right?

The programm i used prints a list of IPs. Some are used, some not. Can I use any of the unused ones?

bestanamnetnogonsin:
So you don’t really need a static IP? It only uses it if it fails to get one via DCHP, right?

The Ethernet shield uses IP adresses as you write the code for doing so.

If you write code for static IP address, the Ethernet shield will use a static IP address.

If you write code to obtain IP address by DHCP, the Ethernet shield will obtain an IP adress from the DCHP server (that’s normally the ‘router’ in your LAN).

bestanamnetnogonsin:
The programm i used prints a list of IPs. Some are used, some not. Can I use any of the unused ones?

I don’t know the devices in your network. It is possible for devices to hide the IP adress they use by not replying to ICMP ECHO requests. It’s not usual, but it’s possible. So your programming tool may fail to find out which IP adresses are actually “unused”. But in normal cases, with a normal home-user networks and normal devices, all the adresses marked as “not in use” are free to be used by other devices.

Perhaps you make sure by looking up the router settings: When a router acts as DHCP server, the IP range is normlly split into ranges:
One range for fixed IP adresses
One range used for IP adresses that the router will maintain for DHCP dynamic IP adresses

If you want to give your device a “fixed” IP adress, you better not take it from the adress range that the router uses for DHCP.