HTTP request failure in restful_server example in ESP32-S3

Ashvajit.P
Posts: 34
Joined: Fri Feb 26, 2021 9:03 am

HTTP request failure in restful_server example in ESP32-S3

Postby Ashvajit.P » Thu May 26, 2022 10:59 am

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 ? :?:

ESP_YJM
Posts: 300
Joined: Fri Feb 26, 2021 10:30 am

Re: HTTP request failure in restful_server example in ESP32-S3

Postby ESP_YJM » Thu May 26, 2022 11:37 am

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?

Ashvajit.P
Posts: 34
Joined: Fri Feb 26, 2021 9:03 am

Re: HTTP request failure in restful_server example in ESP32-S3

Postby Ashvajit.P » Fri May 27, 2022 5:22 am

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 ?

ESP_YJM
Posts: 300
Joined: Fri Feb 26, 2021 10:30 am

Re: HTTP request failure in restful_server example in ESP32-S3

Postby ESP_YJM » Fri May 27, 2022 6:39 am

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?

Ashvajit.P
Posts: 34
Joined: Fri Feb 26, 2021 9:03 am

Re: HTTP request failure in restful_server example in ESP32-S3

Postby Ashvajit.P » Fri May 27, 2022 9:06 am

Yes my phone does support mDNS, but do ESP32-S3 supports HTTP requests using mDNS from access point it is connected to ?

ESP_YJM
Posts: 300
Joined: Fri Feb 26, 2021 10:30 am

Re: HTTP request failure in restful_server example in ESP32-S3

Postby ESP_YJM » Fri May 27, 2022 12:18 pm

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.

Ashvajit.P
Posts: 34
Joined: Fri Feb 26, 2021 9:03 am

Re: HTTP request failure in restful_server example in ESP32-S3

Postby Ashvajit.P » Mon May 30, 2022 6:43 am

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 ?

ESP_YJM
Posts: 300
Joined: Fri Feb 26, 2021 10:30 am

Re: HTTP request failure in restful_server example in ESP32-S3

Postby ESP_YJM » Mon May 30, 2022 6:57 am

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.

Ashvajit.P
Posts: 34
Joined: Fri Feb 26, 2021 9:03 am

Re: HTTP request failure in restful_server example in ESP32-S3

Postby Ashvajit.P » Mon May 30, 2022 7:01 am

I have verified with other android phone as well. Still not working with any of them.

ESP_YJM
Posts: 300
Joined: Fri Feb 26, 2021 10:30 am

Re: HTTP request failure in restful_server example in ESP32-S3

Postby ESP_YJM » Mon May 30, 2022 7:07 am

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.

Who is online

Users browsing this forum: No registered users and 349 guests