Go Down

Topic: problem with enc28j60 (Read 423 times) previous topic - next topic


examples of arduino program are running well but i can't see the result in output,i meant on web server
i changed and tested different IP address related to what i wrote
but its not working. please help me solve this problem.
 i set address and 80(server number) but didn't get any result,tell me how to pick and set them two items correctly


Post the code you tried with (don't forget the code tags, that's the </> button in the editor)!

Provide as much information as possible about your network setup and the web server you're trying to access. Is the web server running on your PC? What IP address has your PC? How is your network connected (router, switch, WiFi, etc.)?


i use the example of Arduino (file=>Examples=>Ethercard=>backSoon),it's running well,my network is connected to router.the problem is when i'm using the same network(i mean local network) it works perfect but when i'm checking it through another network or in an another city country,it does not work at all!!!  :(  :smiley-confuse:
please tell me how to do that in an other place?
i use IP Address.

 // Present a "Will be back soon web page", as stand-in webserver.
// 2011-01-30 <jc@wippler.nl>
// License: GPLv2

#include <EtherCard.h>

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

// ethernet interface ip address
static byte myip[] = { 192,168,1,200 };
// gateway ip address
static byte gwip[] = { 192,168,1,1 };

// ethernet mac address - must be unique on your network
static byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x31 };

byte Ethernet::buffer[500]; // tcp/ip send and receive buffer

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

void setup(){

  // Change 'SS' to your Slave Select pin, if you arn't using the default pin
  if (ether.begin(sizeof Ethernet::buffer, mymac, SS) == 0)
    Serial.println( "Failed to access Ethernet controller");
  ether.staticSetup(myip, gwip);
  if (!ether.dhcpSetup())
    Serial.println("DHCP failed");

  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);


You forgot the code tags! Edit your post and insert code tags!

Go Up