Newbie esp32 user here, making OK progress so far but cant get this simple HTTP client example working.
I am using a neat free PC Utility Open hardware monitor (https://openhardwaremonitor.org/downloads/)).
This App has a built in HTTP Server. I am running it on a remote laptop, I have opened inbound and outbound ports 8085 on the laptop
and I can then see the served webpage on my main pc, including the json data packet request and response. I did this to prove everything was basically OK before I switched to ESP32 as the client
I can connect OK using ESP32 to my ISP and this connects OK to the Server
- if (!client.connect(hostIP, 8085))
- Serial.printf("Failed to connect with hardware server %s!\n", hostIP);
- else
- Serial.printf("Connected with hardware server %s!\n", hostIP); //<-- good this works
I then call a es32 function, thats gets no reply from the remote laptop server
- client.print("GET /data.json HTTP/1.1\r\nHost: 192.168.0.4:8085\r\n");
I would be most grateful if there is anyone that likes a challenge and can try this, can you get the client to work on an ESP32 ?
It has got me totally stumped, it should work but just refuses to play ball
Thanks Geoff