orpheconsoleVersion 1.0.4

Quick Examples

OrpheConsole

Quick Examples

This chapter introduces common OrpheConsole operations, including connecting to a device under test (DUT) through a serial console, using SSH, transferring files, and accessing services remotely through OrpheLink.

Environment

  1. An OrpheConsole device.
  2. A device under test (DUT) with an RJ45 management port or serial port.
  3. The OrpheConsole must be powered on and connected to the DUT through Ethernet or a serial interface.

OrpheConsole connected to a DUT

Command Reference

OrpheConsole command reference

Additional OrpheConsole command reference

Check Available Serial Ports

Check the available serial devices on the system:

bash
/dev/ttyUSB

Check the available serial device

Connect to the DUT Through Serial

On OrpheConsole, connect to the DUT with the default baud rate:

bash
serial /dev/ttyUSB0

To specify the serial communication rate (baud rate), append a value such as 115200 to the command:

bash
serial /dev/ttyUSB0 115200

Connect to the DUT through a serial port

After connecting successfully, you can operate the DUT through OrpheConsole.

Operate the connected DUT

To exit the serial session and return to the host terminal prompt, press Ctrl+J.

Connect to OrpheConsole Through SSH

On OrpheConsole, run the following SSH command and enter the default password:

bash
ssh [email protected]

Default password:

text
password

Sign in to OrpheConsole through SSH

!TIP Compared with the serial console, SSH supports faster configuration and automation.

Transfer Files Through SFTP

To use SFTP on OrpheConsole, you can first install the SFTP client package:

bash
opkg update
opkg install openssh-sftp-client

Install the OpenSSH SFTP client

On your own computer, open a terminal and run this SFTP command to connect to the DUT (192.168.2.165):

bash
sftp [email protected]

After transferring the file, connect to the DUT through its serial port and use ls to confirm that the file is saved in the destination directory, such as /tmp.

Verify the transferred file on the DUT

Transfer Files to the DUT with SCP

The following example transfers test.txt from the local PC to the DUT at 192.168.2.165.

bash
scp test.txt [email protected]:/tmp/

Transfer the file to the DUT with SCP

Transfer Files from the DUT to OrpheConsole

On OrpheConsole, use SCP to transfer a file from the DUT (192.168.2.165) to OrpheConsole's current directory.

bash
scp [email protected]:/home/oprueba/test.txt ./

Confirm the file on OrpheConsole

In this example, OrpheConsole forwards port 8085 to port 80 on the DUT (192.168.2.165), then Jump to Service in OrpheLink provides access to a service on the DUT, such as the OpenWrt LuCI Web UI.

1. Install the Required Packages

On OrpheConsole, install socat and screen:

bash
opkg install socat
opkg install screen

2. Start a Screen Session and Forward the Port

bash
screen -S socat

Within the session, run:

bash
socat TCP-LISTEN:8085,reuseaddr,fork TCP4:192.168.2.165:80

This forwards OrpheConsole port 8085 to DUT port 80, assuming that the DUT Web UI runs on port 80.

Configure port forwarding with socat

  1. Sign in to OrpheLink and click Inventory.
  2. Click the device name.
  3. Open Setting.
  4. Select the Jump to Service settings.
  5. Click Add to add a service.
  6. Click the save icon.
    Configure Jump to Service
  7. Select Client-Web-UI from the Jump to Service list.
    Select Client-Web-UI

You can now access the DUT's OpenWrt LuCI Web UI remotely through OrpheLink.

Access the DUT LuCI Web UI through OrpheLink