Main Content

Troubleshoot Raspberry Pi in Simulink Online

Raspberry Pi Is Not Listed in raspilist Output

If your board does not appear in the output of raspilist, you can specify a larger timeout value. Use a name-value argument with raspilist to specify the maximum amount of time (in seconds) that you want Simulink® Online™ to scan for Raspberry Pi® hardware boards. For example, scan for boards associated with your credentials for up to 20 seconds.

list = raspilist("Timeout",20)

MathWorks Account Credentials Have Expired

If your board does not appear in the output of raspilist, your MathWorks® Account credentials might have expired. This happens automatically in six months after you setup a device. Two weeks before your credentials expire, your device status indicates "Authentication required". To reauthenticate your credentials, append a flag to the package setup command.

  1. If you are using a version of Raspbian with a desktop environment, open a shell to enter the installation commands. If your device boots into the command line, you can enter the installation commands there. You can also access your device via SSH or another remote access method, as described in Remote Access.

  2. To reauthenticate your MathWorks credentials, enter this command. The rest of the settings in the initial setup remain the same.

    $sudo matlab-rpi-setup --login
    Provide your MathWorks Account credentials.
    Email Address or User ID: jsmith 
    Password: ***********
    

  3. In your Simulink Online session, run the raspilist function again. Your board now appears in the output list.

    raspilist
    ans =
    
      1x4 table
    
    
         Name        SerialNumber       PackageVersion          Status      
        ______    __________________    ______________    __________________
    
    
        "myPi"    "10000000675b0321"       "21.2.0"       "Ready to connect"

Simulink Package on Raspberry Pi Needs to Be Updated

raspilist
ans =

  1x4 table


     Name        SerialNumber       PackageVersion          Status      
    ______    __________________    ______________    __________________


    "myPi"    "10000000675b0321"       "21.2.0"       "Upgrade required"
r = raspi("myPi")
Unable to connect to Raspberry Pi hardware board (myPi) because device status is 'Upgrade required'. To see list of available devices and statuses, run 'raspilist'.

If your Raspberry Pi status indicates "Upgrade required", update the Simulink package on your Raspberry Pi board.

  1. If you are using a version of Raspbian with a desktop environment, open a shell to enter the installation commands. If your device boots into the command line, you can enter the installation commands there. You can also access your device via SSH or another remote access method, as described in Remote Access.

  2. Update the Simulink package for Raspberry Pi by entering these commands in the Raspberry Pi shell:

    $sudo apt-get update
    $sudo apt-get install matlab-rpi

  3. Follow the steps that appear in your command shell. The rest of the procedure is the same as the instructions in Set Up Raspberry Pi Hardware Board.

Two-Step Verification Is Turned On

If you have enabled two-step verification for your MathWorks Account, you must also enter a verification code when authenticating your account credentials on the Raspberry Pi hardware board. For more information about two-step verification, see Frequently Asked Questions.

  1. If you have enabled two-step verification and you enter only your user ID and password when prompted during setup or reauthentication, you will get an error message. You also need to enter the verification code sent automatically via email, text message, or mobile app depending on the primary method of verification that you have selected.

    Email Address or User ID: jsmith 
    Password: ******
    Invalid email address/user ID or password.
    Note: If you have two-step verifcation enabled, see troubleshooting documentation for authentication instructions.
    
  2. Enter your user ID once again. Then, in the password field, enter your password with the verification code appended to it. For example, if your password is "matlab" and your verification code is "456123", enter "matlab456123".

    Email Address or User ID: jsmith 
    Password: ************
    Account credentials successfully authenticated.
    

    Your account is now successfully authenticated.

See Also

| | |

External Websites