Page 1 of 1
HTTP request failure in restful_server example in ESP32-S3
Posted: Thu May 26, 2022 10:59 am
by Ashvajit.P
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 ?
Re: HTTP request failure in restful_server example in ESP32-S3
Posted: Thu May 26, 2022 11:37 am
by ESP_YJM
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?
Re: HTTP request failure in restful_server example in ESP32-S3
Posted: Fri May 27, 2022 5:22 am
by Ashvajit.P
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 ?
Re: HTTP request failure in restful_server example in ESP32-S3
Posted: Fri May 27, 2022 6:39 am
by ESP_YJM
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?
Re: HTTP request failure in restful_server example in ESP32-S3
Posted: Fri May 27, 2022 9:06 am
by Ashvajit.P
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
Posted: Fri May 27, 2022 12:18 pm
by ESP_YJM
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.
Re: HTTP request failure in restful_server example in ESP32-S3
Posted: Mon May 30, 2022 6:43 am
by Ashvajit.P
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
Posted: Mon May 30, 2022 6:57 am
by ESP_YJM
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.
Re: HTTP request failure in restful_server example in ESP32-S3
Posted: Mon May 30, 2022 7:01 am
by Ashvajit.P
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
Posted: Mon May 30, 2022 7:07 am
by ESP_YJM
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.