No announcement yet.

WebClient not connecting

  • Filter
  • Time
  • Show
Clear All
new posts

  • WebClient not connecting

    When running the standard WebClient example, I get the following output in Serial Monitor:

    Sending GET request to web server
    log> sppc_begin: phpoc wifi shield, firmware 1.5.0
    log> sppc_begin: package 1.5.0
    log> sppc_begin: WiFi INFRA LemnosWL42 ch9
    log> sppc_begin: IPv4
    log> dns: query A >> log> command: error -110
    log> dns: query A >> log> command: error -110
    connection failed

    The setup is:
    Arduino Mega 2560 or Arduino UNO
    Phpoc wifi shield R1 running in infrastructure mode
    Firmware v 1.5.0
    Flash files v 1.5.0

    What could go wrong? Help will be greatly appreciated!

    By the way, accessing web servers through php works fine, including dns.

  • #2
    Well, I guess your problem may be in network configuration for PHPoC Shield.
    The IP address looks okay if you can access to the web apps on the Shield.

    Probably you need to check the DNS server/Gateway address you set on PHPoC Shield.
    Make sure these are the same with the setting you set on your computer.
    Hope that helps


    • #3
      Thanks for your reply, Homer.

      All my computers, mobile devices and the Raspberry use exactly the same addresses for dns and gateway - although I usually choose as subnet mask.

      Remarkably, on the same setup I described, the following script posts info without any problem:

      include_once "config.php";
      <!DOCTYPE html>
      <title>Test outbound</title>
      <meta name="viewport" content="width=device-width, initial-scale=0.7, maximum-scale=0.7">
      body { text-align: center; }
      h1 { font-weight: bold; font-size: 25pt; }
      h2 { font-weight: bold; font-size: 15pt; }
      button { font-weight: bold; font-size: 15pt; }
      <form action="" method="post" id="frmMain">
      <input type="text" id="hdnOffset" name="hdnOffset">
      <input type="text" id="hdnContent" name="hdnContent">
      <input type="submit" id="btn" value="Submit">


      • #4
        The "log> command: error -110" means "Connection timed out"
        It means PHPoC shield cannot reach DNS server.
        please try to config DNS server address in PHPoC shield is


        • #5
          Thanks for your explanation. Unfortunately it didn't solve the problem. Providing a well known IP address, thus bypassing the dns server, didn't help either.

          Next weekend I'm going to dive into the library code - maybe that will shed some light on where things go wrong.

          Thanks anyway, all!


          • #6
            It seems that you can access the web app you uploaded on the shield, to perform a POST script.
            It means PHPoC shield is connected to your local network without any problem, so that you are able to connect to the web server on the shield.

            The issue here is that the shield failed to reach DNS server and access to the Internet outside your local network.
            Typically, the problem comes from gateway/DNS setup.
            But I assume that you also made some modifications on the shield's flash files.

            Normally, there should be no problem if you upload your files to the shield, but in case there are changes in shield's system files, something wrong could happen.
            I think you can try to test with the original shield's flash file and Arduino library as well:

            Let's see if the problem still happens or not.
            Hope to hear good news from you.

            Last edited by Homer; 04-10-2019, 10:46 AM.


            • #7
              Magic. After upgrading the Arduino IDE form 1.8.3 or 1.8.4 (I forgot to make a note) to 1.8.9, the example and some other sketches using PhpocClient worked fine. Of course it's dangerous to derive causality from correlation, but I could imagine that one or more linked libraries were the cause of the problems I encountered.

              Thanks all, especially Homer, for your contributions - I can now continue my little project
              Last edited by Henk; 04-15-2019, 01:44 AM.


              • #8
                Wow that's great to hear
                Welcome, my friend.
                Thank you btw, I will also take note about this.