ENC28J60 + EtherCard == Fails to Initialize??

I have an arduino Uno that I have been learning to tinker with recently, tried adding a Ardruino Ethernet Shield v1.1 with the goal of having a networked client upload sensor data to a remote server

trick is that no existing libraries have been working

tried several

the process goes that while running through setup() the initialization for ether.begin causes the system to hang

I've tried this using IDE 1.0.0, 1.0.1, 1.0.2, and 1.0.3

if I set a static IP for a server example then I am able to ping the server but otherwise get no-where

the ethercard example I referred to has an added snippet at line 29

  if (ether.begin(sizeof Ethernet::buffer, mymac) == 0) 
    Serial.println( "Failed to access Ethernet controller");
  Serial.println("Greetings Ethernet");

so that it will print to the serial monitor regardless of pass or fail, seems that either I've connected something wrong (likely) or something is wrong with the library (unlikely since it's been in use for a bunch of others)

trick is I don't know what I hooked up wrong, the shield slides into the Uno properly... -- that and being able to ping an IP has me scratching my head

got this shield from eBay so perhaps it has an odd configuration that I'm not aware of??

hope the rambling isn't too difficult to follow -- trying to include anything that would be useful to debug

Hi amites,

I actual also work woth the ENC28J60. I use a pollin board where this chip is embedded.
I had the same problems getting even a ping running.

After searching a while I found this answer (An overloaded begin):
ether.begin(sizeof Ethernet::buffer, mymac, 4)

The 4 is the Digital Arduino pin where the Chip Select (CS) from the ENC28J60 is connected.
4 is the Pin which is used for my board. So I would suggest to see if this fits to your board.

Dominik

tried adding a Ardruino Ethernet Shield v1.1 with the goal of having a networked client upload sensor data to a remote server

trick is that no existing libraries have been working

tried several

GitHub - njh/EtherCard: EtherCard is an IPv4 driver for the ENC28J60 chip, compatible with Arduino IDE
GitHub - turicas/Ethernet_ENC28J60: [NOT MAINTAINED, NOT COMPLETED] Implementation of an Arduino-compatible socket layer library that uses Microchip ENC28J60 Ethernet controller.

The Arduino Ethernet Shield does not use an ENC28J60 chip. It uses a W5100. Why are you trying to use these libraries with that chip?

moelski -- THANK YOU!!!

had to set line 26 to

  if (ether.begin(sizeof Ethernet::buffer, mymac, 10) == 0)

in examples/webClient

working

PaulS:: The ENC28J60 chip is the one one this board, all I did was write what I can read on the board -- not saying this is an OFFICIAL Arduino Ethernet Shield -- that's simple what's printed on the board