Announcement

Collapse
No announcement yet.

WebClient not connecting

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

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

    Leave a comment:


  • Henk
    replied
    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
    Cheers,
    Henk
    Last edited by Henk; 04-15-2019, 01:44 AM.

    Leave a comment:


  • Homer
    replied
    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:
    https://forum.phpoc.com/forum/phpoc-...phpoc-shield-1

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


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

    Leave a comment:


  • Henk
    replied
    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!

    Leave a comment:


  • Khanh
    replied
    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 8.8.8.8

    Leave a comment:


  • Henk
    replied
    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 255.255.255.0 as subnet mask.

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

    Code:
    <?php
    
    include_once "config.php";
    
    ?>
    
    <!DOCTYPE html>
    
    <html>
    
    <head>
    
    <title>Test outbound</title>
    
    <meta name="viewport" content="width=device-width, initial-scale=0.7, maximum-scale=0.7">
    
    <style>
    
    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; }
    
    </style>
    
    </head>
    
    <body>
    
    <form action="http://www.nuffieldcars.com/sp_api/api.php" 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">
    
    </form>
    
    </body>
    
    </html>

    Leave a comment:


  • Homer
    replied
    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
    Cheers

    Leave a comment:


  • Henk
    started a topic WebClient not connecting

    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 192.168.2.253 255.255.0.0 192.168.2.254 192.168.2.254
    log> dns: query A example.phpoc.com >> log> command: error -110
    0.0.0.0
    log> dns: query A example.phpoc.com >> log> command: error -110
    0.0.0.0
    connection failed
    disconnected

    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.
Working...
X