When deploying code on an Arduino® board connected to WiFi Shield, Simulink® generates this error:
Failed to assign IP address to Arduino board
Try these options sequentially until the IP address is assigned to Arduino board:
Check if the WiFi Shield is properly mounted on the Arduino board.
Browse to Simulation > Model Configuration Parameters > Hardware Implementation > Target hardware resources > WiFi properties and verify the settings.
Press the Reset button on the WiFi Shield and wait for approximately one minute.
Unplug the Arduino board, plug it back in, and then deploy the model again.
Check to make sure the firmware version of WiFi Shield is updated. For more information, see Upgrade the firmware for the Arduino WiFi shield.
If the error still persists, assign a static IP to the board. To assign a static IP address, browse to Simulation > Model Configuration Parameters > Hardware Implementation > Target hardware resources > WiFi properties and select Use static IP address and disable DHCP. In the IP address parameter, specify an IP address, click Apply, and deploy the model again.