Go Down

Topic: Fails invoking a simple php file and html file from arduino yun (Read 591 times) previous topic - next topic


Hello Friends

I am using the httpclient example from arduino yun for executing a php file that i have on a hosting and it should returns me the datetime. However i get the following error from the arduino monitor:

<title>406 Not Acceptable</title>
<h1>Not Acceptable</h1>
<p>An appropriate representation of the requested resource /WebTekDomo/Clases/clsOpFecha.php could not be found on this server.</p>
<p>Additionally, a 406 Not Acceptable
error was encountered while trying to use an ErrorDocument to handle the request.</p>

i get the same result from a simple html file where i put <b>hola</b>

Please tell me what i need to do for this could working fine

PD:  Actually when i invoke this php from my pc it returns the date.

PD2: the code that i am using is the following:

#include <Bridge.h>
#include <HttpClient.h>

void setup() {
  // Bridge takes about two seconds to start up
  // it can be helpful to use the on-board LED
  // as an indicator for when it has initialized
  pinMode(13, OUTPUT);
  digitalWrite(13, LOW);
  digitalWrite(13, HIGH);


  while (!SerialUSB); // wait for a serial connection

void loop() {
  // Initialize the client library
  HttpClient client;

  // Make a HTTP request:

  // if there are incoming bytes available
  // from the server, read them and print them:
  while (client.available()) {
    char c = client.read();



Please help me

Kind regards

Go Up