I'm working on an ethernet connection with the ENC28J60. During development, I'd like to connect the chip to my computer directly (i.e. not via a gateway). This computer is running XP, has a primary network interface over WLAN (local IP (DHCP assigned), default gateway, subnet mask and I do not use the ethernet for other connections.

How should I setup the network? Normally, you'd use the default settings with DHCP to get an IP address assigned, however now, I think I have to set this up manually. Is this correct? How should I setup the ethernet configuration on my computer?

The ENC28J60 and its PIC's configuration use the IP address for themselves, and for the default gateway.

  • \$\begingroup\$ I'm not sure if this is the correct / best place to ask this. Perhaps Super User or Server Fault are more appropriate, but I'm not familiar with those sites. Are they more appropiate? \$\endgroup\$ – user17592 Apr 21 '13 at 11:19
  • \$\begingroup\$ What are the IP-address details for your wlan o your PC? \$\endgroup\$ – jippie Apr 21 '13 at 12:16
  • \$\begingroup\$ @jippie local: (DHCP assigned), default gateway:, subnet mask: I added them to the question \$\endgroup\$ – user17592 Apr 21 '13 at 12:17
  • \$\begingroup\$ Ah, OK, so 192.168.0.x should work on the wired interface. \$\endgroup\$ – jippie Apr 21 '13 at 12:20
  • 1
    \$\begingroup\$ You might find this interesting software: wireshark.org It is commonly called a sniffer and can spit out all data/packets it receives/sends on one or more interfaces. You want to filter on your wired interface. Mind you that many institutions like universities have this kind of software on their black list, you are not allowed to have it installed. This is because you can often easily find usernames/passwords and other personal infomation on the network. \$\endgroup\$ – jippie Apr 21 '13 at 12:22

The gateway is a just a default network node used to find addresses not in the routing table. Wikipedia has quite a good article that explains it here:

Default gateway

But in your case for a start I'd set the computer to have a fixed IP address of which should work, later you can use 'route print' to see how XP sets up the routing table for that device, but it may not appear depending on other settings. You can setup mutiple IP addresses per adapter so your 'other stuff' like the Internet will still work.

| improve this answer | |
  • \$\begingroup\$ The gateway has nothing to do with routing tables. The gateway is where a node will send a packet when the destination IP address is not on its local net. \$\endgroup\$ – Olin Lathrop Apr 21 '13 at 12:40

What you want to do is set up static addresses. The address assigned to your PC when it is connected to your LAN is irrellevant. You are trying to set up your own LAN consisting of only the PC and the PIC, if I understand your question correctly.

Pick something, like 192.168.0.xxx addresses. In that case, you can set up your net like this:

Network mask:

Actually the router doesn't matter because there is no router, but the PC software will probably make you fill in something. You can make the three addresses anything from 1 to 254 within the same network. It doesn't matter as long as they are unique.

You should also use a crossover cable if you are connecting two end devices directly to each other. Some device can auto-flip, so this might not be necessary.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy