Hi.
I have a arduino-esp8266 that pretend to send data to openwrt router.
Openwrt is a small REST-API server with a shell script that simply write a file.
So, calling to OPENWRT is something like:
http://OPENWRT/cgi-bin/AS.cgi?status=OK
AS.cgi contain that code:
echo "$REQUEST_METHOD $CONTENT_LENGTH" >> $LOGDATA
echo "$QUERY_STRING" >> $LOGDATA
echo "$POST_STRING" >> $LOGDATA
and LOGDATA is something:
GET
status=OK
Arduino code is:
connect_result=client.connect(APIserver, 80);
if (connect_result) {
client.print("GET ");
client.print(endpoint + "?");
client.print(data);
client.println(" HTTP/1.0");
client.println("");
client.stop();
} else {
Serial.println("API connection failed:" + connect_result );
}
Now, the tests:
-
From PC(web browser) -> OPENWRT OK
(See log up) -
From Android(Wifi connected-web browser) -> OPENWRT OK
-
From ESP8266-Arduino -> PC(Apache server) OK
Apache log:
192.168.1.82 - - [05/Mar/2020:18:43:39 +0100] "GET /cgi-bin/AS.cgi?status=COMIENZO HTTP/1.0" 404 1053 "-" "-"
- From ESP8266-Arduino -> OPENWRT NOK
Nothing happens, No logs, no info.
How I can diagnose the problem? Where are the uhttpd logs?
Thanks.
Al