Unable to Assign IP Address to an Arduino Board Connected to ESP8266
When deploying code on an Arduino® board connected to an ESP8266 chip, Simulink® generates this error:
Failed to assign IP address to ESP8266.
Try these options sequentially until the IP address is assigned to ESP8266:
Ensure that a power supply of 3.3 V is provided to the ESP8266 chip. If a voltage higher than 3.3 V is supplied, the chip might be damaged.
Make sure the serial port using which the ESP8266 is connected to the Arduino board matches the serial port specified in the Configuration Parameters > Hardware Implementation > Target hardware resources > WiFi properties > Hardware Serial Port.
For example, the Arduino Mega 2560 board has serial port 1 on RX pin 19 and TX pin 18. If the TX and RX pins of ESP8266 are connected to the RX pin 19 and TX pin 18 on the Arduino board, set the Hardware Serial Port parameter to
Reset the ESP8266 chip, wait for approximately one minute, and try again.
Check if the firmware version of ESP8266 is AT version 1.3 or higher. If not, upgrade the firmware.
Unplug the Arduino board, plug it back in, and then deploy the model again.
If the error still persists, assign a static IP to the board. To assign a static IP address, go to WiFi properties and select Use static IP address and disable DHCP. In the IP address parameter specify an IP address to the board, click Apply, and deploy the model again.