issue w MAC address

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
salad0)))
 
Posts: 4
Joined: Sun Jul 18, 2010 2:44 pm

issue w MAC address

Post by salad0))) »

Hi,
I'm sure this is a laughably simple question for a lot of you, but I'm just running into a wall trying to sort this out. Basically, I'm trying to use the "official" arduino ethernet shield (w the WIZnet module), and -although it has the device's MAC address printed on a sticker attached to the shield - I'm somehow missing how to convert that address into a format similar to whats displayed in any of the ethernet library/examples. I've tried converting that address into hexadecimal,w no luck, simply adding"ox" as a prefix to the address itself, using the MAC address straight up as its displayed on the sticker, etc, and none of those seem to work. PLEASE: if anyone can point me in the right direction, I'd be forever grateful. Thank you in advance for any help you can pass along

kruzan
 
Posts: 55
Joined: Fri Feb 11, 2011 7:17 pm

Re: issue w MAC address

Post by kruzan »

Salad0))) wrote:simply adding"ox"
I think it should be 0x (zero)

User avatar
jchristensen
 
Posts: 111
Joined: Mon Jan 03, 2011 11:45 am

Re: issue w MAC address

Post by jchristensen »

If the sticker says 12-34-56-78-9A-BC, then code it as

Code: Select all

byte mac[] = {0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC};

User avatar
salad0)))
 
Posts: 4
Joined: Sun Jul 18, 2010 2:44 pm

Re: issue w MAC address

Post by salad0))) »

Thanks for getting back to me so quickly. Unfortunately, I had tried that (adding "0x" as a prefix to the MAC address that came, printed on a sticker on the shield) solution, but I'm still not getting anywhere w this. Initially, I had assumed it was the MAC address issue that was the stumbling block, but maybe its something else entirely? I can't telnet to the Wiznet module but I can't get a connection. If I ping to the device, I seem to get a connection, but anything I try past that point - running any of the arduino examples - I can't just get anywhere. I've gone through every tutorial that I can find online, but nothing seems to help. I know that this is a wildly vague thing to put out there, but if anyone has a suggestion about some other piece of information you could point me to would (again) be greatly appreciated. And again: thanks for getting back to me in the first place so quickly

User avatar
adafruit_support_bill
 
Posts: 88136
Joined: Sat Feb 07, 2009 10:11 am

Re: issue w MAC address

Post by adafruit_support_bill »

If I ping to the device, I seem to get a connection
What address are you pinging? Ping is by IP address, not MAC.

User avatar
salad0)))
 
Posts: 4
Joined: Sun Jul 18, 2010 2:44 pm

Re: issue w MAC address

Post by salad0))) »

I pinged the device by going into "command prompt" and typing "ipconfig", which should give me the IPv4 address for the server, right? At least, thats how I got the IP address I was using to ping to. I'll try to be as clear as I can w what my setups like, but I'm really new to anything network/internet related, so please be patient w my lack of knowledge. Basically, I have a cable modem that I have connected to the WAN port of an Airport Extreme. From there, I have an ethernet cable/cat5 line directly connected to my laptop (asus, running windows7) and another ethernet cable running from the Airport to the ethernet shield. I have the MAC address of the WIZnet module from the sticker on the shield, and I got my IP address by typing "ipconfig" into Command Prompt. I've been trying to run the "WebServer" example from the Arduino ethernet library, but when I plug the IP/MAC info into the sketch, I have zero luck. I've also tried "chatServer" but when I telnet to the IP address (to port 23) I get a "connection failed" response.If anyone could clue me into where I'm going wrong, I'd be truly grateful. Again, thanks for all the replies so far and especially your patience. Thanks in advance

User avatar
westfw
 
Posts: 2010
Joined: Fri Apr 27, 2007 1:01 pm

Re: issue w MAC address

Post by westfw »

Can you fill in actual numbers? What info are you getting from ipconfig, and what exactly (ip address and mac address) are you putting in your sketch?

User avatar
salad0)))
 
Posts: 4
Joined: Sun Jul 18, 2010 2:44 pm

Re: issue w MAC address

Post by salad0))) »

Sorry, not sure I'm understanding your question(s) exactly, but hopefully this is what you mean: after sending "ipconfig/all" through Command Prompt, I'm getting a IPv4 address listed under "ethernet adapter local area connection", which is 10.0.1.2. There is more info displayed after running the "ipconfig..." command, but it all relates to wireless configuration/info and what I've read about setting up the shield points to not trying it over a wireless network. So,I've been entering the details related to the "Ethernet adapter Local Area Connection" into the IP line in the arduino sketches, along w the MAC address thats printed on the shield itself: 90-A2-DA-00-33-36, re=formatted so its typed into the MAC line of the arduino example as 0x90,0xA2,etc. Any tutorials I've found online describe the setup along those lines: find your server IP address through a command window by searching for it w the "ipconfig" command, and the MAC address is taken from the shield (the newer ones, at least, have that info printed on it). Hopefully, I'm answering your question correctly. Apologies in advance if thats not the case: I'm sorta learning all of this all at once

User avatar
adafruit_support_bill
 
Posts: 88136
Joined: Sat Feb 07, 2009 10:11 am

Re: issue w MAC address

Post by adafruit_support_bill »

It is not clear what you are trying to do here. Can you post the Arduinio code that you are trying to run?

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”