Internetconnection doesn't work

Hi,

I'm using the arduino with an ethernet shield (W5100). This worked fine on my regular internetconnection.

Now, I would like to use this with a satelite internet connection. This doesn't seem to work.
The difference with my regular connection is that the ping of this connection is very high (750ms).

I think the internetconnection itself works, beceause I get an IP, mac, ...

#include <SPI.h>
#include <Ethernet.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

IPAddress ip(192,168,1,128);
EthernetClient client;

void setup() {
  Serial.begin(9600);

  Ethernet.begin(mac, ip);

  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() {

String temperatuurbinnen = connectAndRead("GET http://google.be/ HTTP/1.0");
  if (!is_connected || temperatuurbinnen == 0) {
  temperatuurbinnen = dht.readTemperature();
  }

String connectAndRead(String value){

is_connected = false;

Serial.println("connecting...");

delay(2000);

if (client.connect("www.google.be", 80)) {
   is_connected = true;
   Serial.println("connected");
   delay(500);
   // Make a HTTP request:
   client.println(value);
   client.println();
   return readPage(); //go and read the output 
 } 
   else{
    return "connection failed";
  }

}
 
String readPage(){
  //read the page, and capture & return everything between '<' and '>'

  stringPos = 0;
  memset( &inString, 0, 32 ); //clear inString memory

  while(true){

    if (client.available()) {
      char c = client.read();

      if (c == '<' ) { //'<' is our begining character
        startRead = true; //Ready to start reading the part 
      }else if(startRead){

        if(c != '>'){ //'>' is our ending character
          inString[stringPos] = c;
          stringPos ++;
        }else{
          //got what we need here! We can disconnect now
          startRead = false;
          client.stop();
          client.flush();
          Serial.println("disconnecting.");
          return inString;

        }

      }
    }

  }

}

You pass in the Mac and IP, it is hardly surprising that you've got them, but doesn't mean that you have a connection at all. Are you sure the ip is valid for the satallite connection - if you put something else on that connection that uses DHCP does it come back with an IP in that address range?

You are not configuring a gateway so it may not be surprising that you cannot connect to anything outside.
You aer not configuring DNS so you shouldn't expect it to be able to resolve www.google.be.

Try configuring the gateway and DNS and report the results.

Have you seen my attachments? I thing everything with DNS and DHCP should be OK (or am I wrong?).

Try it using DHCP rather than a static ip.

I could only see the one attachment earlier, that from the PC.

How is the arduino connected to the satellite link and is anything else (eg. PC) also connected at the same time. If so can you ping the arduino from the PC as this would tell you whether the arduino is performing as expected.

As suggested, also try using DHCP rather than a static ip, as this can sometimes behave differently.

How do I exactly have to change my code for DHCP? Is it just removing the IP adress?

I tried this code without succes: https://www.arduino.cc/en/Tutorial/DhcpAddressPrinter

I also pinged the arduino (see attachement).

If you tried DHCPAddressPrinter and it failed, did it return "Failed to configure Ethernet using DHCP" after a couple minutes?

Just to be sure, do you have a SD card in the shield's slot? That can cause a DHCP fail.

Yes, it returned "Failed to configure Ethernet using DHCP".

I have no SD card in the shield.

Problem solved. I was connecting with a powerline. However when I connected my computer to this powerline, this worked without any problem. For the arduino this did'nt work.