ESP32 wifi setup error

11 ビュー (過去 30 日間)
준기 홍
준기 홍 2022 年 7 月 28 日
回答済み: Raj 2023 年 9 月 1 日
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 件のコメント
ALVIN PERUMAL
ALVIN PERUMAL 2023 年 3 月 11 日
did you resolve it :(
kiroro00
kiroro00 2023 年 5 月 20 日
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.

サインインしてコメントする。

回答 (1 件)

Raj
Raj 2023 年 9 月 1 日
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

カテゴリ

Help Center および File ExchangeSetup and Configuration についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by