ESP32 Wifi not working though Wifi Extender

muckypup
Posts: 1
Joined: Thu Mar 11, 2021 11:06 am

ESP32 Wifi not working though Wifi Extender

Postby muckypup » Thu Mar 11, 2021 11:14 am

Got an odd issue I hope someone has some advice on.

I have a server in the house running a Flask WebAPI which can accept POST’ed data. I also have a DFRobot FireBeetle ESP32 which deep sleeps, wakes, takes readings, connects to WIFI, POSTs the data to the server and goes back to sleep again. Fairly simple stuff.

When I connect the ESP32 into the same network as the server, everything works fine. The POSTs take milliseconds. However that WIFI network is not available where I want the sensor. I I have one of those external WIFI extenders which reaches where I want the sensor.

The problem is when I connect the ESP32 to a WiFi extender. It fails to POST the data successfully to the server. I can connect through the extender with my phone (and POST via the pone) and that works fine, but the ESP32 will connect successfully to the WIFI network (and get a valid IP address on that network) but POSTs to the server fail. Sometimes with “read timed out” sometimes with “software caused connection to abort”. I tried manually setting the ip/gateway/default route etc but it made no difference. I tired changing the timeouts but it just takes longer to report the error.
  1. [D][WiFiGeneric.cpp:374] _eventCallback(): Event: 0 - WIFI_READY
  2. [D][WiFiGeneric.cpp:374] _eventCallback(): Event: 2 - STA_START
  3. Connecting to WiFi…
  4. [D][WiFiGeneric.cpp:374] _eventCallback(): Event: 7 - STA_GOT_IP
  5. [D][WiFiGeneric.cpp:419] _eventCallback(): STA IP: 192.168.10.100, MASK: 192.168.10.1, GW: 192.168.0.1
  6. [D][WiFiGeneric.cpp:374] _eventCallback(): Event: 7 - STA_GOT_IP
  7. [D][WiFiGeneric.cpp:419] _eventCallback(): STA IP: 192.168.10.100, MASK: 192.168.10.1, GW: 192.168.0.1
  8. Connected, IP address: 192.168.10.100
  9. POSTING to http://192.168.0.23:5555/api/record : “temperature” : 16.25, “humidity” : 52.04, “temperature2” : 16.70, “pressure” : 1009.39
  10. [V][HTTPClient.cpp:239] beginInternal(): url: http://192.168.0.23:5555/api/record
  11. [D][HTTPClient.cpp:287] beginInternal(): host: 192.168.0.23 port: 5555 url: /api/record
  12. POSTing…[D][HTTPClient.cpp:573] sendRequest(): request type: ‘POST’ redirCount: 0
  13.  
  14. [E][WiFiClient.cpp:258] connect(): socket error on fd 54, errno: 113, “Software caused connection abort”
  15. [D][HTTPClient.cpp:1112] connect(): failed connect to 192.168.0.23:5555
  16. [W][HTTPClient.cpp:1411] returnError(): error(-1): connection refused
  17. POST FAILED to http://192.168.0.23:5555/api/record
  18. connection refused
  19. [D][HTTPClient.cpp:394] disconnect(): tcp is closed
I have tried manually setting the Gateway to 192.168.10.1 with a subnet mask of 255.255.255.0 but this made no difference.

Code on the ESP BTW is written in C++ on PlaformIO using Arduino framework.

Any suggestions?

Thanks

Who is online

Users browsing this forum: No registered users and 116 guests