ESP32 wifi setup error

12 visualizaciones (últimos 30 días)
준기 홍
준기 홍 el 28 de Jul. de 2022
Respondida: Raj el 1 de Sept. de 2023
Hello,
If I press the "program" button to connect ESP32 to wifi from arduinosetup,I receive the IP address at the end, resulting in a warning message, "Failed to get device IP address, Check the WiFi network settings to increase device join the network and program it again."
I used my laptop and esp32 DevkitV1
and network setting
encryption type is WPA/WPA2. SSID and password have no problem and Port number is 9500.
If anyone who had this problem, how did you solve it? and would you help me?
  3 comentarios
ALVIN PERUMAL
ALVIN PERUMAL el 11 de Mzo. de 2023
did you resolve it :(
kiroro00
kiroro00 el 20 de Mayo de 2023
What kind of wifi do you use? Usually there would be no problem if you use standard home wifi (wired modem and router). If you personal hotspot, usually android phones hotspot would work.

Iniciar sesión para comentar.

Respuestas (1)

Raj
Raj el 1 de Sept. de 2023
Hi, just make sure you have followed the steps below correctly.
  1. Install the MATLAB Support Package for Arduino Hardware: Open MATLAB and go to the "APPS" tab in the MATLAB toolbar. Click on "Get More Apps" and search for "MATLAB Support Package for Arduino Hardware". Install the package.
  2. Connect the ESP32 to your computer: Connect your ESP32 board to your computer using a USB cable.
  3. Set up the Arduino hardware in MATLAB: In MATLAB, go to the "HOME" tab in the MATLAB toolbar and click on "Add-Ons" -> "Manage Add-Ons". In the Add-On Manager, click on "Arduino Hardware" and then click on "Configure". Follow the steps to set up the Arduino hardware in MATLAB.
  4. Create a MATLAB script to connect to Wi-Fi: In MATLAB, create a new script and enter the following code:
  5. Replace 'COMX' with the appropriate COM port of your ESP32 board. Replace 'your_wifi_ssid' and 'your_wifi_password' with your Wi-Fi network name and password.
% Connect to the ESP32 board
a = arduino('COMX', 'ESP32', 'Libraries', 'WiFi');
% Set up Wi-Fi credentials
ssid = 'your_wifi_ssid';
password = 'your_wifi_password';
% Connect to Wi-Fi
wifiConnect(a, ssid, password);
% Check if the connection is successful
if ismember('WiFi', a.AvailableLibraries)
disp('Connected to Wi-Fi!');
else
disp('Failed to connect to Wi-Fi.');
end
I hope this works, if it doesn’t, try changing the hotspot, as mentioned in the comments, sometimes, some type of hotspot do not work with ESP.
Additionally refer to the documentation for any more details

Categorías

Más información sobre Setup and Configuration en Help Center y File Exchange.

Productos


Versión

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by