Good morning,
I am working as firmware engineer for a company and I am using an Esp32S3.
At the moment, the Esp32S3 can be used as a WIFI access point (On external demand using BLE) in order to update
the firmware of the chip (OTA WIFI). => On request using BLE, the chip can be turned to a WIFI access point accessible from a laptop in order to update the firmware of the chip.
In my application, I would also like the Esp32S3 to connect to an external WIFI access point (If this external WIFI access point is present) and I would like the Esp32S3 to exchange personnal datas using this access point so that they can be visualised/accessible on a backoffice.
My questions are the following :
- Is it possible to have a permanent connexion to an external WIFI access point and to turn ON the "internal" WIFI access point of the chip (On demande only) at the same time ? Or do I have to close the connexion to the external WIFI access point when a user requests firmware WIFI OTA update (This would turn ON the internal WIFI access point) ?
- If the answer is yes (A can have a connexion with the two access points at the same time), is there an example that I can use in order to test it or to integrate it on my personnal program please ? Where can I find informations/documentation about this feature please ?
- If the answer is yes, is it possible to exchange datas using these two access points at the same time ? (For example : Send datas to the external access point and update the firmware of the chip using WIFI OTA on the internal access point at the same time ?). How to do it/how to test it ?
- In term of protocol, are there special protocols that I can use with a WIFI connection to an external access point in order to exchange informations with a backoffice (We do have a backoffice where informations could be displayed). With this/these protocols, could you explain me if it would be possible to send datas from the Esp32S3 chip to the backoffice (Periodically for example) and also send datas from the backoffice to the Esp32S3 chip (On user request from the backoffice) ?
This question because I already have done such a thing using a microcontroller and a LTE-M/NBIOT chip and the MQTT protocol was used for that. A proof of concept was done and we managed to display firmware informations on our backoffice.
I would like to do the same proof of concept using my Esp32S3 and the external WIFI access point.
Thank you for your help on this subject, this is really important.
Best regards,
Thomas TRUILHE
Esp32S3 : How to connect to an external access point using WIFI and how to exchange datas.
-
ThomasESP32
- Posts: 281
- Joined: Thu Jul 14, 2022 5:15 am
-
MicroController
- Posts: 2661
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Esp32S3 : How to connect to an external access point using WIFI and how to exchange datas.
I think you may want to reconsider your workflow regarding information retrieval.
Much of the information you're asking for, including example code, is readily available via a quick google search. Generally, I recommend studying the ESP-IDF documentation, both to first get an overview about what's there and to become more efficient in working with it. It is an indispensable tool you should have open in a browser at any time and make constant use of whenever you're not sure about something.
Also very relevant are the provided IDF examples which demonstrate in code many features and their use; you should have them at hand at least whenever you're about to start using some unfamiliar IDF functionality.
And again, use Google or the search engine of your choice to unlock the host of information that's already out there.
As to your first question, notice that with WiFi we have "access points" ("AP") and "stations" ("STA"), so your question would be if the S3 can be both AP and STA at the same time.
Much of the information you're asking for, including example code, is readily available via a quick google search. Generally, I recommend studying the ESP-IDF documentation, both to first get an overview about what's there and to become more efficient in working with it. It is an indispensable tool you should have open in a browser at any time and make constant use of whenever you're not sure about something.
Also very relevant are the provided IDF examples which demonstrate in code many features and their use; you should have them at hand at least whenever you're about to start using some unfamiliar IDF functionality.
And again, use Google or the search engine of your choice to unlock the host of information that's already out there.
There are different options available. Your best bet would probably be to use the/a protocol your "backoffice" already supports.In term of protocol...
Why not try it out: Google for ESP32 MQTT and see what you get.I already have done such a thing using [...] the MQTT protocol
As to your first question, notice that with WiFi we have "access points" ("AP") and "stations" ("STA"), so your question would be if the S3 can be both AP and STA at the same time.
-
lbernstone
- Posts: 1131
- Joined: Mon Jul 22, 2019 3:20 pm
Re: Esp32S3 : How to connect to an external access point using WIFI and how to exchange datas.
and the answer is yes, there is a STA+AP mode where the two functions can coexist. The main caveat is that they must use the same frequency (channel), so figure out which channel the STA will use, and start the AP on that same channel.
-
MicroController
- Posts: 2661
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Esp32S3 : How to connect to an external access point using WIFI and how to exchange datas.
That's cheating! You're not supposed to do the homework I gave him!and the answer is ...
-
ThomasESP32
- Posts: 281
- Joined: Thu Jul 14, 2022 5:15 am
Re: Esp32S3 : How to connect to an external access point using WIFI and how to exchange datas.
Perfect, thank you for your answer.
But because you have more knowledge than me, I will ask you the following question :
Do you have any knowledge about MQTT ?
I used MQTT on a LTE-M, NB-IOT network on another project in order to send datas to a Broker (Using its IP address).
Do you know if it is possible to do the same job, and to use the same MQTT protocol over WIFI (Using an external WIFI access point ??).
=> Do you know if MQTT can be used over WIFI, Ethernet and so on the same way ??
If the answer is YES, do you know if the Esp32S3 has librairies that can be used in order to deal with MQTT (Not using Arduino but ESP-IDF in C++).
Thank you for your help, this question because I am not an expert.
Best regards,
But because you have more knowledge than me, I will ask you the following question :
Do you have any knowledge about MQTT ?
I used MQTT on a LTE-M, NB-IOT network on another project in order to send datas to a Broker (Using its IP address).
Do you know if it is possible to do the same job, and to use the same MQTT protocol over WIFI (Using an external WIFI access point ??).
=> Do you know if MQTT can be used over WIFI, Ethernet and so on the same way ??
If the answer is YES, do you know if the Esp32S3 has librairies that can be used in order to deal with MQTT (Not using Arduino but ESP-IDF in C++).
Thank you for your help, this question because I am not an expert.
Best regards,
-
MicroController
- Posts: 2661
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Esp32S3 : How to connect to an external access point using WIFI and how to exchange datas.
Why not try it out: Google for ESP32 MQTT and see what you get.I already have done such a thing using [...] the MQTT protocol
I failed miserably=> Do you know if MQTT can be used over WIFI...
-
lbernstone
- Posts: 1131
- Joined: Mon Jul 22, 2019 3:20 pm
Re: Esp32S3 : How to connect to an external access point using WIFI and how to exchange datas.
You do what you can to educate, but if nobody is listening...
Critical thinking is going to disappear anyhow now that AI is the first step for most problems, so you might as well just let all that stuff dribble out of your brain
Critical thinking is going to disappear anyhow now that AI is the first step for most problems, so you might as well just let all that stuff dribble out of your brain
Who is online
Users browsing this forum: PetalBot, Qwantbot and 3 guests