Open Command-Line Session with Raspberry Pi Hardware
This topic shows you how to configure and open a command-line session with the target hardware.
To open a connection to your board:
Connect an Ethernet cable from your host computer to the board.
Communicate with the board:
If you configured your Raspberry Pi® to automatically obtain an IP address using DHCP, communicate with your board using the host name you assigned to the board during the firmware update process.
For example, if the board is named
raspberrypi-ah, enter the following in a MATLAB® Command Window:
h = raspberrypi('raspberrypi-ah') h.openShell()
If you configured your Raspberry Pi to use a static IP address during the firmware update process, use that IP address to communicate with your board.
For example, if the board’s IP address is
192.168.1.2, enter the following in a MATLAB Command Window:
h = raspberrypi('192.168.1.2') h.openShell()
When a PuTTY terminal window opens, press the Enter key on your keyboard. The terminal window displays the Linux® command line.
At the Linux command line, log in by entering the user name and password. For example:
raspberrypi-boardname login: pi Password: raspberry
When you are finished, enter
logouton the Linux command line, and close PuTTY to end the serial connection.
For more information about PuTTY, see https://www.chiark.greenend.org.uk/~sgtatham/putty/.