Connect Ethernet Shield via wifi-laptop-ethernet?

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
kdlaun
 
Posts: 21
Joined: Sun Dec 04, 2011 12:43 am

Connect Ethernet Shield via wifi-laptop-ethernet?

Post by kdlaun »

In anticipation of the arrival of my Arduino Ethernet Shield, I'm investigating how best to connect it to my network. I have an available RJ-45 port on my router, but it's not located where I usually do my experimenting. My "shop" is in the basement, where I have a wifi-fed Win7 laptop that I use for most Arduino projects.

I've done a lot of Googling on the subjet and from what I can gather, I should be able to connect the shield to the network via my laptop's harware port. What I haven't been able to find yet is a definitive set of instructions on how to accomplish this that my simple brain can thoroughly comprehend. From what I can tell, a crossover ethernet cable is necessary, but the Win7 configuration is what isn't totally clear.

I've been a computer hobbyist since the early days, but I realize I have much to learn about networking, IP addresses and the like. No time like the present...

Karl
Bloomington, IL

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

Re: Connect Ethernet Shield via wifi-laptop-ethernet?

Post by adafruit_support_bill »

You may or may not need a crossover cable. Many adapters these days will auto-detect.

On you Windows-7 machine, you can go into Control Panel->Network and Internet->Network Connections, right-click on your network adapter and select "bridge connections". This will route traffic between the wired and wireless adapters.

User avatar
bryanmc1988
 
Posts: 6
Joined: Thu Dec 18, 2014 1:59 am

Re: Connect Ethernet Shield via wifi-laptop-ethernet?

Post by bryanmc1988 »

I know this will bring an old thread back up but it also solves my question and help keep the threads count down on repeating questions....

So I had done this and got the laptop WiFi connection bridged with the cat Ethernet cable to the Ethernet shield. Everything looks good


But my issue now is how can I find out the ip address to use for the Ethernet shield as with the bridged connections has its own ip address right? I went into my cmd then entered in "ipconfig /all" without the quotes of course. And got the ip address for the bridge that way but when I uploaded the webserver example sketch from the Ethernet lib. And change the ip address in the sketch and left the Mac address alone then I uploaded the sketch to my mega 2560 board with the Ethernet shield plugged in... Which uploaded fine with no errors.

When I went to the internet browser and enter in the ip address from the sketch I uploaded, it never took me to the web page... It just displays an error as if there was no such address.


Any help or steps I need to do to get the Ethernet shield working right?

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

Re: Connect Ethernet Shield via wifi-laptop-ethernet?

Post by adafruit_support_bill »

What IP address are you using for the Arduino?
What is the IP address of the Ethernet port on your computer?

Are you able to ping the computer from the Arduino: http://playground.arduino.cc/Code/ICMPPing

User avatar
bryanmc1988
 
Posts: 6
Joined: Thu Dec 18, 2014 1:59 am

Re: Connect Ethernet Shield via wifi-laptop-ethernet?

Post by bryanmc1988 »

I'm not sure what the IP address for the arduino is and I'm also not sure what's the address for the Ethernet port is.


When I did the ipconfig /all in the command prompt it list the Ethernet as 198.162.1.100 of I am correct. But not sure how to get the up for the arduino or is this up the arduino up?

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

Re: Connect Ethernet Shield via wifi-laptop-ethernet?

Post by adafruit_support_bill »

ipconfig reports the IP addresses of the Ethernet adapters on your computer. The Arduino IP address is the one you assign to it in your code.

User avatar
bryanmc1988
 
Posts: 6
Joined: Thu Dec 18, 2014 1:59 am

Re: Connect Ethernet Shield via wifi-laptop-ethernet?

Post by bryanmc1988 »

ok so i am finding this a little weird,

so i did the ipconfig and got the ip and mac address off of that :
http://s1.postimg.org/g3dtsqkkf/cmd.jpg


is that mac address the arduino shield mac address ? cause the board i got didnt come with a mac address sticker in the back of it so i have no idea if this is right or not...


anyways i also did a little research and found that i can use the example DhcpAddressPrinter in the ethernet lib to get my ip address, it shows up in the serial print as 192.168.1.115 which i had no idea where this came from or how to change it to a static ip address so that it wont change around every time i plug in the board? or if it even change at all i have no clue...

another thing was i didnt change the mac address from the sketch... i left it as "0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED" which was already in the sketch and just change the ethernet shield ip address and loaded the sketch up and it seems to be working now... and the ping does send back a response every 500 mili-sec.


so is the "0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED" my real mac address for this ethernet shield or is it just something basic that all boards come with? i'm confused...


and i access my router client on the web at "192.168.1.1 " and check the DHCP Active IP Table to show all connected device on the network and it shows this:
client host name: WIZnet8E9514
ip address: 192.168.1.115
Mac address: 02:05:6D:09:4F:3B


which is different then the one in the sketch or mac address i stated above o.0

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

Re: Connect Ethernet Shield via wifi-laptop-ethernet?

Post by adafruit_support_bill »

ipconfig tells you only about the ethernet addressing of your computer. It does not tell you anything about addresses of other devices on the network.

Post the sketch that you are using.

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

Return to “Arduino Shields from Adafruit”