MATLAB, or any standalone applications generated with MATLAB, must be allowed to communicate on all types of networks through Windows Defender Firewall. We recommend going through the steps below with your IT team and/or a system administrator.
When allowing access for a standalone application, use Solution 2, or the Advanced Settings.
SOLUTION 1: Use Windows Defender Firewall Prompt on First Connection
When you first try to connect to a target computer from a certain MATLAB release, Windows Defender Firewall prompts you to allow MATLAB to communicate on Private and Public networks:1) Make sure that all options, including Private and Public options, are selected. 2) Click Allow access.
SOLUTION 2: Manually allow MATLAB through Windows Defender Firewall
In case you missed the above prompt, or did not check all options when prompted, you can configure the firewall manually:
1) Find Allow an app through Windows Firewall by using the Windows search.2) Click the Change settings button if necessary to unlock the panel. 3) Click Allow another app. 4) Click Browse to browse for <matlabroot>\bin\win64\matlab.exe. Or, if configuring a standalone application, include the file path for your standalone executable.
5) Click Network Types.
6) As the Network Type for MATLAB, select all options, including Private and Public.
7) Click Add.Important note: You must repeat the above procedure for every installed version of MATLAB or standalone application that you intend to use with (Speedgoat) hardware. If you upgrade MATLAB at any point in the future, you must either make sure to correctly configure the prompt as shown in SOLUTION 1 upon the first connection, or repeat SOLUTION 2 to manually configure the firewall for this new installation.
ADVANCED SETTINGS: Configure firewall rules to allow incoming/outgoing traffic between the host and target.
If the above solutions don't help, try to configure additional Inbound and Outbound Rules in the Advanced Windows Defender Firewall settings:
1) Find Windows Defender Firewall with Advanced Security by using the Windows search.
2) Select Inbound Rules and New Rule.
3) For the Rule Type, select Program, and click Next.4) Select This program path and browse for <matlabroot>\bin\matlab.exe. 5) For the Action, select Allow the connection, and click Next. 6) For the Profile, select the Domain, Private, and Public checkboxes, and click Next.
7) For Name, provide a Name for this inbound rule (for example, Simulink Real-Time inbound), and click Finish.
8) Select Outbound Rules and click New Rule.
9) Repeat steps 3 through 7 for the custom outbound rule.
If any of the above options are not available due to IT policy, or the communication still fails, please contact your IT helpdesk to verify your firewall rules.
Further Troubleshooting
If the above instructions don't help resolve the communication issues with your Speedgoat hardware, refer to the following MATLAB Answers post for further troubleshooting steps: