Main Content

Unable to Assign IP Address to an Arduino Board Connected to WiFi Shield


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:

  1. Check if the WiFi Shield is properly mounted on the Arduino board.

  2. To open the Configuration Parameters dialog box, navigate to the Modelling tab and in the Setup area, click the gear icon in the Model Settings.

    Select Hardware Implementation > Target hardware resources > WiFi properties. Verify the settings.

  3. Press the Reset button on the WiFi Shield and wait for approximately one minute.

  4. Unplug the Arduino board, plug it back in, and then deploy the model again.

  5. Check to make sure the firmware version of WiFi Shield is updated. For more information, see Upgrade the firmware for the Arduino WiFi shield.

  6. 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, click Apply, and deploy the model again.

See Also