Bridge, Process and CURL Get

I want to send data up to a remote server using a GET with data using curl on the linino side:

 curl -i -X GET  -g "http://<server ip address/energy/save?json=\"name\":\"device_test\""

When I test this by ssh connection to the YUN there is a correct response:

HTTP/1.1 200 OK
Content-Length: 1
Content-Type: text/html; charset=UTF-8
Date: Mon, 11 Nov 2013 16:44:21 GMT
Server: ip-XXX-XX-XXX-232

0

Then I have tried to create a sketch to send the above curl command using:

    Process telem;
   
    telem.begin("curl");
    telem.addParameter("-i");
    telem.addParameter("-g");
    telem.addParameter("-X");
    telem.addParameter("GET");
    telem.addParameter("http://<server ip address>/energy/save?json=\"name\":\"device_test\"");
    telem.run();

with absolutely no response nor is any send (viewed via tcpdump) performed.

Using the following data string results in success so the "curl" Process call is being handled on linino when configured correctly:

    Process telem;
   
    telem.begin("curl");
    telem.addParameter("-i");
    telem.addParameter("-g");
    telem.addParameter("-X");
    telem.addParameter("GET");
    telem.addParameter("http://<server ip address>/");
    telem.run();

which returns an OK and the website information successfully.

Is there a manner by which the Process/python bridge might be convinced to accept the full string with data to perform the curl correctly?

Thanks

I haven't played with it a lot but you may want to take a look at runShellCommand instead of the begin, addParameter, run routine.

There are several threads about this, here is one
http://forum.arduino.cc/index.php?topic=193994.0

I too suggest runShellCommand. If you want to stick with run and addParameters maybe you need to replace two of them with addParameter("-X GET")

Thank you for the suggestions but... still stuck.

I tried using the runShellCommand(), and when i got no result either, I tried the Examples->Bridge->ShellCommands

Uploaded the code to the Yun via USB and there is absolutely no response nor activity.

If I ssh in to the Linino side, and run the pretty-wifi-info.lua script it works perfectly, however there seems to be no communication to the Arduino via the Bridge when running the Example program.

Are there any debugging steps to determine if the Bridge-Process code is working? I am using either the 1.5.4 beta or the arduino-nightly build systems but with no success on either.

I am able to send data out using YunClient, sending an http request to a remote website and getting the expected response

However, using Process and runShellCommand, there appears to be no communication.

Maybe the result of the curl command is a long string? I had problems with this in the past and now when I do a curl command my result are short strings, no more than ten characters (better less). Check out too the memory available for variables after compiling your sketch. Strange things happen when you are low of memory.

Thanks for all your time and help.

In the end, I do not know what "fixed" things.

I was using the arduino-nightly setup as I had read it had fixed a serial buffer issue. In searching for answers, as I could not get the sample code to work with this build, I went back to the arduino-1.5.4beta I had originally been using.

At this time, the examples and my working code now work.

Cannot pinpoint why the other dev environment was not working for me.