Remote Update Guide PolyScope 5

⚠️ Disclaimer

This guide uses internal APIs that are subject to change or removal without notice. It requires SSH access and the use of SSH keys on the robot. Use this method with caution and only in development or controlled environments.

This version of the guide has been tested to update from PolyScope 5.16.1 to 5.25.1 and from 5.25.1 to 5.26.0.

This guide explains how to perform a remote update on a Universal Robot using SSH, SCP, and a script.

Prerequisites

Before proceeding, ensure the following:

  • The robot control box has one and only one USB storage device attached.

    • It must have at least 2 GB free space.

    • It must be FAT-32 formatted.

    • Before starting, there is no .urup-file on the USB.

  • You have SSH access to the robot.

  • In the below guide, define

    • ROBOTIP as the actual IP address of your robot.

    • FILENAME as the name of the update file (e.g. ursys-[...].urup).

  • You have created an SSH key on your local machine and copied it to the robot

    ssh-keygen -t ed25519  # generate local SSH key
    # save the key to your local machine and set file password (may be empty)
    ssh-copy-id root@$ROBOTIP  # copy your key
    
  • The update file is located in your current working directory.

  • The robot arm is powered off, check via the Dashboard Server by

    (echo "robotmode"; echo "quit"; ) | nc $ROBOTIP 29999 | tail -n +2 | head -1
    

    the response to the above command should be POWER_OFF

    • If the response is anything else, make sure the robot is in remote control mode, and stop any running program:

      (echo "stop"; echo "quit"; ) | nc $ROBOTIP 29999 | tail -n +2 | head -1
      

      make sure the response is Stopped and power off the arm:

      (echo "power off"; echo "quit"; ) | nc $ROBOTIP 29999 | tail -n +2 | head -1
      

      now the response should be Powering off. Re-do the initial step to verify that the robotmode is now POWER_OFF

Steps

  1. Get the USB path from the Robot
    Get the USB path on the robot via SSH:

    USB_NAME=$(ssh root@$ROBOTIP "ls /media")
    
  2. Copy the Update File to the USB on the Robot
    Use scp to securely copy the update file to the robot:

    scp $FILENAME root@$ROBOTIP:/media/$USB_NAME/
    

    save the remote file path in a variable

    REMOTE_FILE_PATH=/media/$USB_NAME/$FILENAME
    
  3. Verify the File on the Robot (Optional)

  • SSH into the robot to confirm that the update file exists and looks as expected:

    FILE_CHECK=$(ssh root@$ROBOTIP "urupdate --list-updates")
    PATH_CHECK="${FILE_CHECK%% *}"  # extract the path from the return string
    [[ "$PATH_CHECK" == "$REMOTE_FILE_PATH" ]]
    echo $?
    

    the echo command will capture the error code of the comparison command - when the response is 0 the update file is detected correctly.

  • Optional: For verification of file integrity after copying, also copy the .sha256 file which can be downloaded from the support site along with the .urup file:

    scp $SHAFILE root@$ROBOTIP:/media/$USB_NAME/
    

    Perform the sha verification as described in the download page from where you downloaded the .urup file and the .sha256 file.

  • Get and verify the system requirements as set by the update file:

    ssh root@$ROBOTIP "urupdate --verify-requirements $REMOTE_FILE_PATH"
    echo $?
    

    The echo command will capture the error code of the verification-command - when the response is 0 the requirements are verified.

  1. Trigger the Update via urupdate
    Note: The update process will reboot and restart services on the robot.
    Use urupdate to initiate the update with the full file path:

    ssh root@$ROBOTIP "urupdate --update $REMOTE_FILE_PATH"
    
  2. Delete the Copied Update File (Optional Cleanup)
    After a successful update, you can delete the update file to clean the USB:

    ssh root@$ROBOTIP "rm -rf $REMOTE_FILE_PATH"