This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

jetson

Create connection to NVIDIA Jetson hardware

Syntax

obj = jetson
obj = jetson(deviceaddress,username,password)

Description

example

obj = jetson creates a connection, obj, from the MATLAB® software to the NVIDIA® Jetson hardware. Use this syntax to connect or reconnect to the same hardware.

You do not need to supply the device address, user name, and password. The jetson object reuses these settings from the most recent successful connection to the Jetson hardware.

After connecting to the hardware, you can use the obj to interact with the Jetson hardware. To close the connection, use clear to remove obj and any other connections that use obj.

example

obj = jetson(deviceaddress,username,password) overrides the device address, user name, and password from the previous connection. Use this syntax to connect to hardware whose settings are different from the previous successful connection.

The Jetson hardware has two default user names: 'nvidia' and 'ubuntu'. For 'nvidia', the default password is 'nvidia'. For 'ubuntu', the default password is empty: 'ubuntu'. It is a good security practice to create a strong password after the first login.

After changing the hardware password, or after connecting from the MATLAB software to a different piece of Jetson hardware, use this syntax.

You can use the connection to interact with the Jetson hardware and attached devices such as a web camera.

Examples

collapse all

This example shows you how to create a connection from the MATLAB software to the NVIDIA Jetson hardware. The Jetson hardware is connected to the same TCP/IP network as the host computer. This example uses the device address, user name, and password settings from the most recent successful connection to the Jetson hardware.

Create a connection, hwJetson, from the MATLAB software to NVIDIA Jetson hardware.

hwJetson = jetson
Checking for CUDA availability on the Target...
Checking for 'nvcc' in the target system path...
Checking for cuDNN library availability on the Target...
Checking for TensorRT library availability on the Target...
Checking for prerequisite libraries is complete.
Gathering hardware details...
Gathering hardware details is complete.
 Board name        : NVIDIA Jetson TX2
 CUDA Version      : 9.0
 cuDNN Version     : 7.0
 TensorRT Version  : 3.0
 Available Webcams :  
 Available GPUs    : NVIDIA Tegra X2

hwJetson = 

  jetson with properties:

      DeviceAddress: '192.168.1.15'
               Port: 22
          BoardName: 'NVIDIA Jetson TX2'
        CUDAVersion: '9.0'
       cuDNNVersion: '7.0'
    TensorRTVersion: '3.0'
            GpuInfo: [1×1 struct]
         webcamlist: []

The GPU Coder™ Support Package for NVIDIA GPUs establishes an SSH connection to the Jetson hardware using the settings stored in memory. It checks for the CUDA® toolkit, cuDNN, and TensorRT libraries on the target hardware and displays this information on the MATLAB Command Window. To set up the environment variables on the board for the compiler and the libraries, see Install and Setup Prerequisites for NVIDIA Boards.

To get the L4T software version on the Jetson board, use the getL4TVersion() method of the jetson connection object.

getL4TVersion(hwJetson);
Jetson L4T version is: L4T R28.2.0.

To start a PuTTY SSH terminal session on the Jetson board, use the openShell() method of the jetson connection object.

openShell(hwJetson);
Using username "ubuntu".
Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 4.4.38-tegra aarch64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

30 packages can be updated.
0 updates are security updates.

Last login: Sat Aug 11 19:38:08 2018 from 172.28.216.242
ubuntu@tegra-ubuntu:~$ ls
Desktop    gpucoderTX2       Music     remoteBuildDir  Videos
Documents  jetson_clocks.sh  Pictures  tegrastats      weston.ini
Downloads  MATLAB            Public    Templates
ubuntu@tegra-ubuntu:~$

After logging into the Linux® shell, you execute shell commands such as ls as shown.

To close the connection, use clear to remove hwJetson and any other connections that use hwJetson.

clear hwJetson;

This example shows you how to create a connection from the MATLAB software to the NVIDIA Jetson hardware that has different device address, user name, and password settings from the previous successful connection.

Create a connection, hwJetson, from the MATLAB software to NVIDIA Jetson hardware.

hwJetson = jetson('172.31.213.168','nvidia','nvidia');
Checking for CUDA availability on the Target...
Checking for 'nvcc' in the target system path...
Checking for cuDNN library availability on the Target...
Checking for TensorRT library availability on the Target...
Checking for prerequisite libraries is complete.
Gathering hardware details...
Gathering hardware details is complete.
 Board name        : NVIDIA Jetson TX2
 CUDA Version      : 9.0
 cuDNN Version     : 7.0
 TensorRT Version  : 3.0
 Available Webcams :  
 Available GPUs    : NVIDIA Tegra X2

hwJetson = 

  jetson with properties:

      DeviceAddress: '172.31.213.168'
               Port: 22
          BoardName: 'NVIDIA Jetson TX2'
        CUDAVersion: '9.0'
       cuDNNVersion: '7.0'
    TensorRTVersion: '3.0'
            GpuInfo: [1×1 struct]
         webcamlist: []

Input Arguments

collapse all

IP address or host name of the hardware, specified as a character vector.

To use the host name, you must connect an Ethernet cable to the Ethernet port of the board. Use Linux commands to configure the hardware IP address and associate the host name with the IP address.

Example: '169.254.0.2'

Example: 'gpucoder-tegratx2-1'

Data Types: char

Linux user name, specified as a character vector.

Example: 'ubuntu'

Data Types: char

Linux user password, specified as a character vector.

Example: 'ubuntu'

Data Types: char

Output Arguments

collapse all

A connection from the MATLAB software to the Jetson hardware, returned as a jetson object.

Introduced in R2018b