Go Down

Topic: Connecting ethernet shield to pc using crossover cable (Read 1 time) previous topic - next topic

doors666

My ethernet shield is on its way. Once the sketch is complete, it could be used connected to a hub or connected to a stand alone pc using a crossover cable. There will be no usb connectivity. I understand the hub part, but dont understand how it works when connected to a pc. Will the pc be acting as a hub or do I need to setup the pc so that it can forward the requests. Who will answer the dhcp queries. What about the ip address, gateway etc. Do I need to install some drivers on the pc for the WE5100 chip?

The user will use the web browser running on the pc to control the arduino and fetch and report current status. I searched the web but couldnt find much information on this.

PaulS

Quote
Will the pc be acting as a hub or do I need to setup the pc so that it can forward the requests.

Yes and yes.

Quote
Do I need to install some drivers on the pc for the WE5100 chip?

No. The chip is not driven by the PC. It is driven by the Arduino.

Erdin

Many ethernet chips are auto detecting. Perhaps you don't need a crossover cable.
But you will not have a DHCP server, so have to set IP addresses for both.
If the Arduino is running a website, the PC can read it with a browser.

Why would you want to do this ?
If both the PC and the Arduino are connected with DHCP to a hub, they can connect to each other without problem.
It is much easier with a hub as the 'glue' between the two. If the hub is connected to internet or not, that doesn't matter.

doors666


Quote
Will the pc be acting as a hub or do I need to setup the pc so that it can forward the requests.

Yes and yes.


So I guess I need to set IP forwarding for this.


But you will not have a DHCP server, so have to set IP addresses for both.


How do I do this. Do i have to setup a dhcp server on the pc? that probably wont be ok. How else can i achieve this.

Quote

Why would you want to do this ?
If both the PC and the Arduino are connected with DHCP to a hub, they can connect to each other without problem.
It is much easier with a hub as the 'glue' between the two. If the hub is connected to internet or not, that doesn't matter.


I know, but I have to support both options.

SurferTim

If you use Windows, you can activate Internet Connection Sharing on the ethernet port if the laptop is using the wireless device for the internet connection. It sets up a dhcp server on the ethernet port and does the routing for you.
http://support.microsoft.com/kb/306126

doors666

thanx, I will check out that link about ics. I also need to figure out how to achieve that using some kind of automated install program.

Will this cover the following scenario:
The pc has only one ethernet port. arduino is connected to that. there is no other ethernet or wifi port and the pc is not on the net. Will a browser on the pc  be able to open the site offered by arduino. Will I need to setup ics between ethernet port and localhost to make it work?

SurferTim

Get into your network settings in your computer. Set the ethernet port to static settings:
ip 192.168.0.1
subnet 255.255.255.0
You shouldn't need a gateway

Set the ethernet shield to
ip 192.168.0.2
subnet 255.255.255.0
gateway 192.168.0.1

Your PC browser should load the Arduino page if you use http://192.168.0.2

Go Up