Skip to content

Build & Run RPC

Developed in Go* programming language, the Remote Provisioning Client (RPC) application runs on the managed device and communicates with the Remote Provisioning Server (RPS) microservice on the development system. The RPC and RPS configure and activate Intel® AMT on the managed device. Once properly configured, the remote managed device can call home to the Management Presence Server (MPS) by establishing a Client Initiated Remote Access (CIRA) connection with the MPS. See Figure 1.

Getting Started Part 3: Follow along to learn about how to build RPC, some of the information it can provide, and how to activate an AMT device. Additional Resources: RPC as a Library and RPC Commands and Flags

Important - Production Environment

In a production environment, RPC can be deployed with an in-band manageability agent to distribute it to the fleet of AMT devices. The in-band manageability agent can invoke RPC to run and activate the AMT devices.

Figure 1: RPC Configuration
Figure 1: RPC configuration

Figure 1 Details

The RPC on a managed device communicates with the Intel® Management Engine Interface (Intel® MEI, previously known as HECI) Driver and the Remote Provisioning Server (RPS) interfaces. The Driver uses the Intel® MEI to talk to Intel® AMT. The RPC activates Intel® AMT with an AMT profile, which is associated with a CIRA configuration (Step 3). The profile, which also distinguishes between Client Control Mode (CCM) or Admin Control Mode (ACM), and configuration were created in Create a CIRA Config or Create an AMT Profile. After running RPC with a profile, Intel® AMT will establish a CIRA connection with the MPS (Step 4) allowing MPS to manage the remote device and issue AMT commands (Step 5).

Get RPC

There are two ways to get the RPC-Go binary:

See steps below for both options.


Download RPC

Download the latest RPC-Go version from the RPC-Go GitHub Repo Releases Page for the Operating System of the AMT device (Windows or Linux).

After downloading, continue on to Run RPC to Activate, Configure, and Connect the AMT Device.


Build RPC

Alternatively, the RPC-Go binaries can be manually built using Go for development purposes or personal preference.

Flexible Deployment - RPC as a Library

The RPC can be built as an executable file or as a library, which offers the flexibility of deploying in your management agent or client. Read more about building RPC as a library here.

If you are building an executable on a development system, you will copy the executable to the AMT device afterwards.

  1. Change to the rpc-go directory of the cloned open-amt-cloud-toolkit repository.

    cd rpc-go
    
    Haven't Cloned the open-amt-cloud-toolkit Repository?
    • Only clone the rpc-go repository:

      git clone https://github.com/open-amt-cloud-toolkit/rpc-go --branch v2.42.5
      

    • Alternatively, clone the whole toolkit repository:

      git clone https://github.com/open-amt-cloud-toolkit/open-amt-cloud-toolkit --branch v2.26.0 --recursive
      

  2. Open a Terminal (Linux) or Powershell/Command Prompt as Administrator (Windows):

    go build -o rpc ./cmd/main.go
    
    go build -o rpc.exe ./cmd/main.go
    
    docker build -f "Dockerfile" -t rpc-go:latest .
    

    Note

    The image created with the Docker instruction above is only suitable for Docker on a Linux host.

  3. Confirm a successful build:

    RPC must run with elevated privileges. Commands require sudo on Linux or an Administrator Command Prompt on Windows.

    sudo ./rpc version
    
    .\rpc version
    
    sudo docker run --rm -it --device=/dev/mei0 rpc-go:latest version
    


Run RPC to Activate, Configure, and Connect the AMT Device

  1. After downloading or building RPC, copy the executable to the AMT device.

  2. On the AMT device, open a Terminal (Linux) or Powershell/Command Prompt as Administrator (Windows).

  3. Navigate to the directory containing the RPC application.

  4. Run RPC with the activate command to activate, configure, and connect Intel® AMT to the MPS Server. It will take 1-2 minutes to finish provisioning the device.

    REPLACE WITH
    Development-IP-Address Development system's IP address or FQDN, where the MPS and RPS servers are running.
    profileName THe name of the profile created using the Sample Web UI.
    sudo ./rpc activate -u wss://[Development-IP-Address]/activate -n -profile [profileName]
    
    .\rpc activate -u wss://[Development-IP-Address]/activate -n -profile [profileName]
    
    sudo docker run --rm -it --device=/dev/mei0 rpc-go:latest activate -u wss://[Development-IP-Address]/activate -n -profile [profileName]
    
    Note - Other RPC Flags and Commands

    See more about the flags used here and the other available commands of RPC-Go.

    Success

    Figure 2: Example output after configuration
    Figure 2: Example output after configuration

    Troubleshooting

    Run into an issue? Try these troubleshooting steps.

Next up

Manage AMT Device