How to create a connection without knowing the remote IP address?
Posted: Sun Apr 03, 2022 10:41 am
Hello,
We have a customer application for which we need, via Wifi, to send it 2 information (delay and temperature) and then upload historical data.
I expect to use ESP32 module in AT command.
Imagine the remote object consisting of a small simple controller connected to the ESP32 module via the UART. The microcontroller controlling the ESP32 module via AT commands on serial port.
On the other side, a computer application (or mobile phone) to send the temperature and a time, then retrieve the history.
How can the PC connect to the ESP32?
In all the TCP or UDP connection examples, we need to know the IP address on both sides, even with a UDP connection!
I am therefore looking for a way for the PC to first connect in SoftAP to configure the ESP32 (SSID and PSWD of the local networks),
Then with that the ESP32 connects to the Wifi network.
The PC will then be able to access the ESP32 on this Wifi network.
But in all these steps, with the examples, we must create a connection on the ESP32 side with the PC's IP address and the PC must connect with the ESP32's IP address (Assigned dynamically by a DHCP server)
How to connect and send data (SSID, PSWD, PC IP) so that the ESP32 then connects to the network (SSID, PSWD) and create a Client/Server connection with the PC IP it received. ..?
ESP32 and local microcontroler will not have any display to get its IP address assigned by the DHCP.
Have you an example for that?
We have a customer application for which we need, via Wifi, to send it 2 information (delay and temperature) and then upload historical data.
I expect to use ESP32 module in AT command.
Imagine the remote object consisting of a small simple controller connected to the ESP32 module via the UART. The microcontroller controlling the ESP32 module via AT commands on serial port.
On the other side, a computer application (or mobile phone) to send the temperature and a time, then retrieve the history.
How can the PC connect to the ESP32?
In all the TCP or UDP connection examples, we need to know the IP address on both sides, even with a UDP connection!
I am therefore looking for a way for the PC to first connect in SoftAP to configure the ESP32 (SSID and PSWD of the local networks),
Then with that the ESP32 connects to the Wifi network.
The PC will then be able to access the ESP32 on this Wifi network.
But in all these steps, with the examples, we must create a connection on the ESP32 side with the PC's IP address and the PC must connect with the ESP32's IP address (Assigned dynamically by a DHCP server)
How to connect and send data (SSID, PSWD, PC IP) so that the ESP32 then connects to the network (SSID, PSWD) and create a Client/Server connection with the PC IP it received. ..?
ESP32 and local microcontroler will not have any display to get its IP address assigned by the DHCP.
Have you an example for that?