Troubleshoot Connecting Issues to Raspberry Pi Hardware
Note
If you are having issues specific to MATLAB® Online™, refer to Troubleshoot Raspberry Pi in MATLAB Online.
Connection Timed Out
Creating a connection to Raspberry Pi® hardware produces the following error:
mypi = raspi
Error using raspi (line 158) Cannot establish an SSH connection to the board with device address "raspberrypi-computername". Caused by: Error using raspi.internal.sshclient/executeCommand (line 96) Error executing command: FATAL ERROR: Network error: Connection timed out
The MATLAB software cannot reach the Raspberry Pi hardware over the network connection. To solve this issue:
Verify the power and network connection on the Raspberry Pi hardware.
Perform steps described in Hardware Setup.
Host Does Not Exist
Creating a connection to Raspberry Pi hardware produces the following error:
mypi = raspi
Error using raspi (line 160) Cannot establish an SSH connection to the board with device address "raspberrypi-computername". Caused by: Error using raspi.internal.sshclient/executeCommand (line 96) Error executing command: Unable to open connection: Host does not exist
If you have just started the Raspberry Pi hardware, wait two to four minutes. Then, try creating a connection again.
If the Raspberry Pi hardware has a different IP address from the previous connection, complete the steps in Get the IP Address of the Raspberry Pi Hardware and Create Connection to a Board That Has Different Settings.
Active Connection Already Exists
Reconnecting to Raspberry Pi hardware produces the following error.
mypi = raspi
Error using raspi (line 146) An active connection to raspberrypi-computername already exists. You cannot create another connection.
The MATLAB Workspace contains one or more handles that were created using the previous connection. The connection is still active.
Clear handles that were created using the previous connection as described in Create Connection to Specific Raspberry Pi Hardware Board