Need help troubleshooting Arduino with Ethernet module (ENC28J60)

i managed to get a Nano and ENC28J60 module working yesterday but it won’t work today !
yesterday it worked as a web server;

  // ##############################
 // copy direct from backSoon-ino #
// ################################

// Present a "Will be back soon web page", as stand-in webserver.
// 2011-01-30 <jc@wippler.nl> http://opensource.org/licenses/mit-license.php
 
#include <EtherCard.h>

#define STATIC 0  // set to 1 to disable DHCP (adjust myip/gwip values below)

#if STATIC
// ethernet interface ip address
static byte myip[] = { 192,168,6,7 };  
                    // NOT showing in DCHP Active IP table ?
                     // just pick one NOT currently in use
// gateway ip address
static byte gwip[] = { 192,168,6,3 };
#endif

// ethernet mac address - must be unique on your network
static byte mymac[] = { 0x02,0xDD,0xDD,0x00,0x00,0x01 };
                      // DOESN'T SHOW - HOW TO KNOW ?!
                      
byte Ethernet::buffer[500]; // tcp/ip send and receive buffer

char page[] PROGMEM =
"HTTP/1.0 503 Service Unavailable\r\n"
"Content-Type: text/html\r\n"
"Retry-After: 600\r\n"
"\r\n"
"<html>"
  "<head><title>"
    "Service Temporarily Unavailable"
  "</title></head>"
  "<body>"
    "<h3>This service is currently unavailable</h3>"
    "<p><em>"
      "The main server is currently off-line.
"
      "Please try again later."
    "</em></p>"
  "</body>"
"</html>"
;

void setup(){
  Serial.begin(9600);
  Serial.println("\n[backSoon]");
  
  if (ether.begin(sizeof Ethernet::buffer, mymac) == 0) 
    Serial.println( "Failed to access Ethernet controller");
#if STATIC
  ether.staticSetup(myip, gwip);
#else
  if (!ether.dhcpSetup())
    Serial.println("DHCP failed");
#endif

  ether.printIp("IP:  ", ether.myip);
  ether.printIp("GW:  ", ether.gwip);  
  ether.printIp("DNS: ", ether.dnsip);  
}

void loop(){
  // wait for an incoming TCP packet, but ignore its contents
  if (ether.packetLoop(ether.packetReceive())) {
    memcpy_P(ether.tcpOffset(), page, sizeof page);
    ether.httpServerReply(sizeof page - 1);
  }
//  Serial.println("WAITING!...");
}

as well as a web client;

// Demo using DHCP and DNS to perform a web client request.
// 2011-06-08 <jc@wippler.nl> http://opensource.org/licenses/mit-license.php

#include <EtherCard.h>

// ethernet interface mac address, must be unique on the LAN
static byte mymac[] = { 0x02,0xDD,0xDD,0x00,0x00,0x01 };

byte Ethernet::buffer[700];
static uint32_t timer;

char website[] PROGMEM = "www.google.com";

// called when the client request is complete
static void my_callback (byte status, word off, word len) {
  Serial.println(">>>");
  Ethernet::buffer[off+300] = 0;
  Serial.print((const char*) Ethernet::buffer + off);
  Serial.println("...");
}

void setup () {
  Serial.begin(9600);
  Serial.println("\n[webClient]");

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

  ether.printIp("IP:  ", ether.myip);
  ether.printIp("GW:  ", ether.gwip);  
  ether.printIp("DNS: ", ether.dnsip);  

  if (!ether.dnsLookup(website))
    Serial.println("DNS failed");
    
  ether.printIp("SRV: ", ether.hisip);
}

void loop () {
  ether.packetLoop(ether.packetReceive());
  
  if (millis() > timer) {
    timer = millis() + 5000;
    Serial.println();
    Serial.print("<<< REQ ");
    ether.browseUrl(PSTR("/foo/"), "bar", website, my_callback);
  }
}

but now it won’t even get past setup() - can anybody help with where the problem could be ?

even more fundamental - if the Arduino+Ethernet is not showing in the Router’s Client Table - what would the error be ?

okay this is frustrating, i unplugged the LAN cable and connected it to the computer just to confirm it is working - it is. and then when i plugged it back into the module - it worked also !! (loose wiring ???)

BUT anyhow, it [u]still[/u] won't show in the Router's Client Table list - is this a hardware limitation - on the module's part ?

okay, i think i know what the problem is - and it's probably outside the scope of this forum - perhaps it's more suited to the General Electronics section ? but hopefully someone with experience with Ethernet connections might have some troubleshooting tips - so i'll stick with this thread some more.

it's not a "loose connection" (i think) but it certainly has something to do with the fact that the router doesn't detect the module when it's connected.

i don't know what 'fluked' the "wake-up" earlier when i plugged the cable (back to the module) from testing it on the computer, and i don't think the WOL feature would be relevant here, right ? that's waking up the module FROM the LAN, whereas in this case, it seems like the LAN/router won't wake up or be woken up BY the module... :-/

code-wise, could anyone please explain what that part does ?

void setup(){
  Serial.begin(9600);
  Serial.println("\n[backSoon]");
  
  [b][color=teal]if (ether.begin(sizeof Ethernet::buffer, mymac) == 0) 
    Serial.println( "Failed to access Ethernet controller");[/color][/b]

when it fails, it seems to hang right before that point - nothing gets displayed to the Serial Monitor.