HTTP request failure in restful_server example in ESP32-S3
-
- Posts: 34
- Joined: Fri Feb 26, 2021 9:03 am
HTTP request failure in restful_server example in ESP32-S3
Hello,
I am using the restful_server example in my ESP32-S3 Devkit.I have connected S3 as Wi-Fi STA to my phone's AP and hosting server via JTAG (option given example). When S3 is connected to my phone's Access point. When I am sending any request to my phone via mDNS uri, ESP is not able to process it, but when I am sending HTTP request from another device connected to my phone's access point then it is able to process the request.
also I am able to get http response when I am requesting uri without mDNS from my phone while being an Access point.
Why am I not able to get response on my phone when I am using mDNS uri while being Access point ?
I am using the restful_server example in my ESP32-S3 Devkit.I have connected S3 as Wi-Fi STA to my phone's AP and hosting server via JTAG (option given example). When S3 is connected to my phone's Access point. When I am sending any request to my phone via mDNS uri, ESP is not able to process it, but when I am sending HTTP request from another device connected to my phone's access point then it is able to process the request.
also I am able to get http response when I am requesting uri without mDNS from my phone while being an Access point.
Why am I not able to get response on my phone when I am using mDNS uri while being Access point ?
Re: HTTP request failure in restful_server example in ESP32-S3
Do you mean you use mDNS uri to explore S3 http server and S3 no response. And you use DNS uri and S3 server can response?
-
- Posts: 34
- Joined: Fri Feb 26, 2021 9:03 am
Re: HTTP request failure in restful_server example in ESP32-S3
I am initializing ESP32-S3 as wifi station and http server witn mdNS using restful_server example code in SDK.
My phone is used as wifi Access Point and S3 is paired with it.
When I am using HTTP request from my phone with uri : http://esp-home.local/api/v1/system/info server is not sending any response.
but when I request with IP of ESP32-S3 : 192.168.5.158/api/v1/system/info then server is giving proper response.
This is not the case when any other phone (Wi-Fi station) is paired to my phone's Access Point and requesting to ESP32's HTTP server with : http://esp-home.local/api/v1/system/info it is working.
I hope it is clear now.
So, what would be reason for not getting response ?
My phone is used as wifi Access Point and S3 is paired with it.
When I am using HTTP request from my phone with uri : http://esp-home.local/api/v1/system/info server is not sending any response.
but when I request with IP of ESP32-S3 : 192.168.5.158/api/v1/system/info then server is giving proper response.
This is not the case when any other phone (Wi-Fi station) is paired to my phone's Access Point and requesting to ESP32's HTTP server with : http://esp-home.local/api/v1/system/info it is working.
I hope it is clear now.
So, what would be reason for not getting response ?
Re: HTTP request failure in restful_server example in ESP32-S3
It seems the ESP32-S3 supports mDNS response because other device connected to your Phone AP can work. The only problem is when you use your AP to request the ESP32-S3 with mDNS uri, S3 no response. You can check when your AP send request, it whether send mDNS query first? Or do your AP support mDNS?
-
- Posts: 34
- Joined: Fri Feb 26, 2021 9:03 am
Re: HTTP request failure in restful_server example in ESP32-S3
Yes my phone does support mDNS, but do ESP32-S3 supports HTTP requests using mDNS from access point it is connected to ?
Re: HTTP request failure in restful_server example in ESP32-S3
I use iPhone as AP and request uri with mDNS, it can work. So ESP supports using mDNS from access point it is connected to.
-
- Posts: 34
- Joined: Fri Feb 26, 2021 9:03 am
Re: HTTP request failure in restful_server example in ESP32-S3
I have verified that it is working in iPhone but in my Android phone it is not working, Are there any settings or work arounds to make this work in android ?
Re: HTTP request failure in restful_server example in ESP32-S3
iPhone is natively supports mdns protocol and Android i not sure. I don't know how to make this work, but you can try other Android mobile phone.
-
- Posts: 34
- Joined: Fri Feb 26, 2021 9:03 am
Re: HTTP request failure in restful_server example in ESP32-S3
I have verified with other android phone as well. Still not working with any of them.
Re: HTTP request failure in restful_server example in ESP32-S3
Maybe Andriod not support mdns in system level, you need find an APP in Andriod that support mdns and ping or request HTTP by mdns domain.