ENC28j60 problem

Hi all,
I am using enc28j60 module (from ebay) to arduino uno with uipethernet lib,
I want to add some data to my server, I take a php hosting from 0fees and now I can send the data to my server using : http://ashutest123.0fees.us/dataupload1.php?data=somedata and check the uploaded list of data in the table as http://ashutest123.0fees.us/showdata.php ——— u can take a view yourself.

I am using my college lan net which has the following settings,
proxy url : 192.168.1.1 proxy port : 3128 proxy type squid
ip : 192.168.2.208 subnet mask : 255.255.252.0 gateway : 192.168.1.1 dns : we normally leave blank

I write the following code :

#include <UIPEthernet.h> // Used for Ethernet
// **** ETHERNET SETTING ****
// Arduino Uno pins: 10 = CS, 11 = MOSI, 12 = MISO, 13 = SCK
// Ethernet MAC address - must be unique on your network - MAC Reads T4A001 in hex (unique in your network)
byte mac[] = { 0x54, 0x34, 0x41, 0x30, 0x30, 0x31 };                                      
// For the rest we use DHCP (IP address and such)
EthernetClient client;
char server[] = "ashutest123.0fees.us"; // IP Adres (or name) of server to dump data to
int  interval = 5000; // Wait between dumps
void setup() {
  Serial.begin(9600);
  Ethernet.begin(mac);
  Serial.println("Tweaking4All.com - Temperature Drone - v2.0");
  Serial.println("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n");
  Serial.print("IP Address        : ");
  Serial.println(Ethernet.localIP());
  Serial.print("Subnet Mask       : ");
  Serial.println(Ethernet.subnetMask());
  Serial.print("Default Gateway IP: ");
  Serial.println(Ethernet.gatewayIP());
  Serial.print("DNS Server IP     : ");
  Serial.println(Ethernet.dnsServerIP());
}
void loop() {
  // if you get a connection, report back via serial:
  if (client.connect(server, 80)) {
    Serial.println("-> Connected");
    // Make a HTTP request:
    client.print( "GET /dataupload1.php?");
    client.print("data=");
    client.print( "thanksGOD" );
    client.println( " HTTP/1.1");
    client.print( "Host: " );
    client.println(server)
    client.println( "Connection: close" );
    client.println();
    client.println();
    client.stop();
  }
  else {
    // you didn't get a connection to the server:
    Serial.println("--> connection failed/n");
  }
  delay(interval);
}

but when I run it I get all localip, gateway, etc as 0.0.0.0 and no data uploads to my server

Please help me

thanks in advance

You need to show us ALL the serial output.

You make a request to a server. It generates a reply. Why are you not reading the reply? Perhaps a clue-by-four will appear and whack you.

Hi thanks for your reply, I will post all serial output when I do my Netlab in my college, i don’t have wired conn. in my home

however I can setup a wifi hotspot using my mobile phone (android) so i decided to give a try to ESP8266 esp-12 got from ebay

I connected it this way : pls see attachment

now I fired the serial monitor and,

AT


OK
AT+GMR

AT version:0.25.0.0(Jun  5 2015 16:27:16)
SDK version:1.1.1
Ai-Thinker Technology Co. Ltd.
Jun 23 2015 23:23:50

OK
AT+CWMODE?

+CWMODE:3

OK
AT+CWLAP

+CWLAP:(3,"ashuwifi",-51,"b2:ee:45:a5:16:86",1)

OK
WIFI DISCONNECT
WIFI CONNECTED
WIFI GOT IP
 AT+CIFSR

+CIFSR:APIP,"192.168.4.1"
+CIFSR:APMAC,"5e:cf:7f:00:dc:d5"
+CIFSR:STAIP,"192.168.43.37"
+CIFSR:STAMAC,"5c:cf:7f:00:dc:d5"

OK
AT+CIPSTART="TCP","ashutest123.0fees.us",80

CONNECT

OK
AT+CIPSEND=70


OK

I then write : GET http://ashutest123.0fees.us/dataupload.php?data=hello1 HTTP/1.1 pressed enter in the send field of the serial monitor then,

> 
busy s...

Recv 70 bytes

SEND OK
CLOSED

but no data uploaded to my server

please help me where i am wrong

thanks

esp.png

I then write : GET http://ashutest123.0fees.us/dataupload.php?data=hello1 HTTP/1.1 pressed enter in the send field of the serial monitor then,

The WiFi shield only supports one protocol (http://), so there is no need to supply that.

You have already connected to the server, so there is no need to supply that.

The GET request should be GET dataupload.php?data=hello1 HTTP/1.1 .

Do you have access to the server? Can you look at the http daemon's log files?

Where are you reading the reply from the server? If you did, perhaps a clue by four would whack you.

Hi thanks for reply,

i got a very strange behav,

AT+CIPSTART="TCP","ashutest123.0fees.us",80

CONNECT

OK
AT+CIPSEND=70


OK
>

then i write in the send field : GET /dataupload.php?data=aashish HTTP/1.1 and pressed enter 15 times (< 15 times gives nothing and connection CLOSED)

busy s...

Recv 70 bytes

SEND OK

+IPD,999:HTTP/1.1 200 OK
Server: nginx
Date: Sun, 22 Nov 2015 05:07:43 GMT
Content-Type: text/html
Content-Length: 859
Vary: Accept-Encoding

<html><body><script type="text/javascript" src="/aes.js" ></script><script>function toNumbers(d){var e=[];d.replace(/(..)/g,function(d){e.push(parseInt(d,16))});return e}function toHex(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==Array?arguments[0]:arguments,e="",f=0;f<d.length;f++)e+=(16>d[f]?"0":"")+d[f].toString(16);return e.toLowerCase()}var a=toNumbers("f655ba9d09a112d4968c63579db590b4"),b=toNumbers("98344c2eee86c3994890592585b49f80"),c=toNumbers("543e4c7a34050aaf12a7fd94bf6da5f5");document.cookie="__test="+toHex(slowAES.decrypt(c,2,a,b))+"; expires=Thu, 31-Dec-37 23:55:55 GMT; path=/";location.href="http://185.27.134.147/dataupload.php?data=aashish&ckattempt=1";</script><noscript>This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support</noscript></body></html>CLOSED

it seems that now it send ok, but when i go to : http://ashutest123.0fees.us/showdata.php the text ‘aashish’ is not sent

Note : i can send using url in browser as : http://ashutest123.0fees.us/dataupload.php?data=somedata

and can view the database entries as,
http://ashutest123.0fees.us/showdata.php

please help me, i can’t figureout what is happning,

thanks in advance