determining MAC address of ethernet device

Hi,

I bought a couple inexpensive ethernet connectors on eBay. They are labelled HanRun but I believe that is only the manufacturer of the connector itself. Apparently they use the ENC28J60 chip and so I have added the UIPEthernet library. However, they don't have any kind of sticker showing the MAC address for each device. Can someone recommend a method for discovering that address?

Thanks, Mike

The address just needs to have the right format and be unique on your network. Try

byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

Hi, welcome to the forum.

You can use any mac you like. You decide what it will be and you set it in the sketch :) When you have a few of those, give every Arduino its own mac address, or else the router gets confused. The router identifies a device by its mac address.

Some mac addresses are not accepted by some routers. I often use an online mac generator, but even then I had once a mac address that my router did not accept.

Thanks for the replies. I have an ethernet shield that has a MAC address sticker on it. I entered the string in my code. I'll have to try changing it as an experiment. Or is it just the cheap ones that don't need a specific address?

mmesford: Or is it just the cheap ones that don't need a specific address?

None of them do. I guess one of the few reasons why a cheap one is cheap is that they don't bother giving you something you don't need. If you now have a MAC address that works, there is no need to change it and the real experiment is to change the Ethernet shield.

Nick_Pyner: I guess one of the few reasons why a cheap one is cheap is that they don't bother giving you something you don't need.

I'm guessing because they don't subscribe to the "MAC-police" worldwide, where part of the MAC is supposed to represent the manufacturer. In theory, MACs are supposed to be unique in the world, since the manufacturer has their part of the address assigned, and then they make sure the rest of it's unique in their block of addresses.

The official Arduino Ethernet Shields didn't have that mac address sticker in the past. And the mac used in the examples is DEADBEEFFEED : http://arduino.cc/en/Tutorial/WebServer

But when someone used two Ethernet Shields, and both with DEADBEEFFEED, the router gets confused. As an extra service, the official Arduino Ethernet Shield have now a sticker with the mac address. Since every shield gets an unique mac address, there will be no longer two boards with the same mac. It's a very nice service, but you can still use any mac address you want. It's just a sticker, it has nothing to do with the hardware.