Skip to main content

10. User Guide to the RUBIK Pi 3 Configuration Tool – rubikpi_config

The rubikpi_config tool is located at /usr/bin/rubikpi_config by default and has two operating modes: menu mode and command-line argument mode.

10.1 Command-line argument mode

Run the rubikpi_config command with parameters to enter command-line argument mode. The format is as follows:

rubikpi_config [func_name] [opt_name] [arg1] [arg2]

10.1.1 USB

Command format:

rubikpi_config usb [opt_name] [arg1] [arg2]

Possible values of opt_name include mode and func:

  • mode indicates setting the USB 2.0 mode. The mode can be host or device.

  • func indicates setting the USB 2.0 function. The function can be a USB drive.

Refer to the following examples:

  • Set the USB 2.0 interface to host mode:

    rubikpi_config usb mode host
  • Set the function of RUBIK Pi 3 as a 3 GB USB drive.

    note

    Before setting up RUBIK Pi 3 as a USB drive, set the USB port to device mode first.

    rubikpi_config usb mode device
    rubikpi_config usb func storage 3

10.1.2 40-Pin

Command format:

rubikpi_config pin [func_port] [enable/disable]

Refer to the following examples:

  • Read the status of pin i2c1:

    rubikpi_config pin i2c1
  • Enable i2c1:

    rubikpi_config pin i2c1 enable
    tip
    • After enabling a function, restart RUBIK Pi 3 for the function to take effect.
    • On some ports, multiple mutually exclusive functions are multiplexed. Enabling one function disables the other multiplexed functions, such as i2c2, uart2, and spi2.

10.1.3 Display

Command format:

rubikpi_config display resolut [resolut_value]
  • To read the current resolution, run the above command without specifying resolut_value.

  • To set a resolution, specify resolut_value and run the above command.

    note

    The currently configurable resolutions include: 1280 x 720 x 60, 1920 x 1080 x 60, 2560 x 1440 x 60, 3840 x 2160 x 30, and edidAdaptiveResolution (adaptive).

    For example, to set the resolution to 1920 x 1080 x 60, run the following command:

    rubikpi_config display resolut 1920x1080x60

10.1.4 Fan

Command format:

rubikpi_config fan speed [value(0-255)]
  • To read the current fan speed, run the above command without specifying value.

  • To set the fan speed, specify value and run the above command.

For example, to set the fan speed to 50, run the following command:

rubikpi_config fan speed 50

10.1.5 Audio

Command format:

rubikpi_config audio [card|pcm|output|volume] [value]

Refer to the following examples:

  • Read the card information:

    rubikpi_config audio card
  • Set the audio output to HDMI:

    rubikpi_config audio output hdmi
  • Read the volume information:

    rubikpi_config audio volume 
  • Set the volume to 50:

    rubikpi_config audio volume 50

10.1.6 Temperature

Command format:

rubikpi_config temp [all/zone] [zone_num]
  • To read the temperatures of all zones, specify all.

  • To read the temperature of a specific zone, specify zone [zone_num].

Refer to the following examples:

  • Read the temperature of zone 10:

    rubikpi_config temp zone 10
  • Read the temperatures of all zones:

    rubikpi_config temp all

10.1.7 Wi-Fi

Command format:

rubikpi_config wifi [ssid] [passphrase]

Refer to the following examples:

  • Connect to the network using the SSID and password saved in the configuration file:

    rubikpi_config wifi
  • Connect to the network (SSID=xxx, Password=xxxxxxxx) and update the configuration file.

    rubikpi_config wifi xxx xxxxxxxx

10.1.8 Help

Run the following commands to view all command-line parameter information.

rubikpi_config --help
#or
rubikpi_config -h

10.1.9 Version

Check the software version using parameter -v:

rubikpi_config -v

10.2 Menu mode

Run the following command without any parameters to enter menu mode:

rubikpi_config

The menu output is as follows:

 
*****************Main Menu*******************
1 ==>usb :: usb menu
2 ==>pin :: PIN menu
3 ==>display :: display menu
4 ==>fan :: fan menu
5 ==>audio :: audio menu
6 ==>temp :: temperature menu
7 ==>wifi :: wifi menu
0 ==>quit :: quit
********************************************
Select action =>

In menu mode, type a function item number and press Enter to go to the corresponding function configuration interface.

10.2.1 USB

After running the rubikpi_config command, type "1" and press Enter to go to the USB Menu, which guides you through configuring the mode (host or device) and function (e.g., USB storage) for the USB 2.0 port.

note

The USB port here refers to USB 2.0 only.

Select action => 1

*****************USB Menu*******************
1 ==>mode :: usb mode set(none,host,device)
2 ==>dev func :: set usb device function
*******************************************
99 ==>help :: help_menu
0 ==>quit :: quit,return main menu
Select action =>
  • Option 1: Set the USB port mode (host or device)

    Type "1" and press Enter, type the desired USB mode, and press Enter. The following is an example of setting the USB 2.0 port to host mode.

    Select action => 1
    please input mode(host or device) for usb2.0:
    echo host > /sys/kernel/debug/usb/8c00000.usb/qcom_usb2_0_mode
    host
  • Option 2: Set the USB function

    Type "2" and press Enter, type the desired function, and press Enter. The following is an example of setting up RUBIK Pi 3 as a storage device.

    note

    Before setting up RUBIK Pi 3 as a storage device, perform the operations in Option 1 to set the USB port to device mode.

    Select action => 2
    please device func(eg:storage):
    storage
    please input storage size(/G):
    4
    start create mass storage
    ......
    please link PI with PC
    #Connect the USB 2.0 port to a PC. The PC will recognize the storage device you created.

10.2.2 40-Pin

After running the rubikpi_config command, type "2" and press Enter to go to the PIN Menu, which guides you through enabling each function of the 40-pin connector.

Select action => 2

*****************PIN Menu*******************
1 ==>func st get :: get pin function status(enable/disable)
2 ==>func update :: update pin function
*******************************************
99 ==>help :: help_menu
0 ==>quit :: quit,return main menu

Select action =>
  • Option 1: Check the enable status of a function port.

    Type "1", press Enter, type the name of the port you want to check, and press Enter. The following is an example of checking the enable status of i2c1.

    Select action => 1
    all the func port:
    i2c1 i2s1 i2c3 spi2 uart2 i2c2 spi6 uart6 i2c6 spi12 uart12 i2c12 spi8 uart8 i2c8
    please input func port name:i2c1
    i2c1 current state:enable
  • Option 2: Set the enable status of a function port.

    Type "2", press Enter, type the name of the port you want to configure, type the enable status, and press Enter. The following is an example of setting the status of i2c1 to enable.

    Select action => 2
    all the func port:
    i2c1 i2s1 i2c3 spi2 uart2 i2c2 spi6 uart6 i2c6 spi12 uart12 i2c12 spi8 uart8 i2c8
    please input func port name:i2c1

    please input func port config:enable
    i2c1 current status:disable
    i2c1 update status:enable
    note

    After setting the enable status, restart RUBIK Pi 3 for the setting to take effect.

10.2.3 Display

After running the rubikpi_config command, type "3" and press Enter to go to the DISPLAY Menu, which guides you through setting parameters such as the display resolution.

Select action => 3

*****************DISPLAY Menu*******************
1 ==>resolution get :: display resolution get
2 ==>resolution set :: display resolution set
***********************************************
99 ==>help :: help_menu
0 ==>quit :: quit,return main menu

Select action =>
  • Option 1: Check the current resolution.

    Type "1" and press Enter to view the current resolution.

    Select action => 1
    current resolution:1920x1080x60
  • Option 2: Set the resolution.

    Type "2", press Enter, type the resolution you want to set, and press Enter. The following is an example of setting the resolution to 1920 x 1080 x 60.

    Select action => 2
    please input resolution:
    1920x1080x60

10.2.4 FAN

After running the rubikpi_config command, type "4" and press Enter to go to the FAN Menu, which guides you through setting the fan speed.

Select action => 4

*****************FAN Menu*******************
1 ==>speed get :: fan speed get
2 ==>speed set :: fan speed set
*******************************************
99 ==>help :: help_menu
0 ==>quit :: quit,return main menu

Select action =>
  • Option 1: Check the current fan speed.

    Type "1" and press Enter to view the current fan speed.

    Select action => 1
    current speed:
    50
  • Option 2: Set the fan speed

    Type "2", press Enter, type the fan speed (from 0 to 255), and press Enter. The following is an example of setting the fan speed to 50.

    Select action => 2
    Enter fan speed(0-255):50
    fan speed set success[50]

10.2.5 Audio

After running the rubikpi_config command, type "5" and press Enter to go to the AUDIO Menu, which guides you through viewing and configuring audio-related parameters, such as viewing the sound card information, checking the output interface, and adjusting the volume.

Select action => 5

*****************AUDIO Menu*******************
1 ==>card :: card lists
2 ==>pcm :: pcm lists
3 ==>output get :: output get
4 ==>output set :: output set
5 ==>vol get :: volume get
6 ==>vol set :: volume set
7 ==>test :: test mode
*********************************************
99 ==>help :: help_menu
0 ==>quit :: quit,return main menu

Select action =>
  • Option 1: Check the sound card information.

    Select action => 1
    0 [qcm6490idpsndca]: qcm6490 - qcm6490-idp-snd-card
    qcm6490-idp-snd-card
  • Option 2: Check the PCM information.

    Select action => 2
    00-00: MI2S-LPAIF-TX-PRIMARY multicodec-0 : : capture 1
    00-01: MI2S-LPAIF-RX-PRIMARY multicodec-1 : : playback 1
    ......
  • Option 3: Check the current audio output interface.

    Select action => 3
    current audio out is: hdmi
  • Option 4: Set the audio output interface.

    Type "4", press Enter, type the audio output interface you want to set, and press Enter. The following is an example of setting the audio output interface to HDMI.

    Select action => 4
    Enter the output device(headset, hdmi): hdmi
  • Option 5: Check the volume information.

    Select action => 5
    Simple mixer control 'Master',0
    Capabilities: pvolume pswitch pswitch-joined
    Playback channels: Front Left - Front Right
    Limits: Playback 0 - 65536
    Mono:
    Front Left: Playback 65536 [100%] [on]
    Front Right: Playback 65536 [100%] [on]
  • Option 6: Set the volume.

    Type "6", press Enter, type the volume you want to set (from 0 to 100), and press Enter. The following is an example of setting the volume to 50.

    Select action => 6
    Enter volume level (0-100):50
    ......

10.2.6 Temperature

After running the rubikpi_config command, type "6" and press Enter to go to the Temperature Menu, which provides the temperature information.

Select action => 6

*****************Temperature Menu*******************
1 ==>temp get :: get temperature node
2 ==>temp dump :: dump all temperature node
***************************************************
99 ==>help :: help_menu
0 ==>quit :: quit,return main menu


Select action =>
  • Option 1: Read the temperature of a specific zone.

    Type "1", press Enter, type the number of the temperature zone you want to query, and press Enter.

    Select action => 1
    Enter temperature node[0-35]22
    gpuss1-thermal:40.70 °C
  • Option 2: Read the temperatures of all zones.

    Type "2" and press Enter to print the temperatures of all zones.

    Select action => 2
    pm7325-thermal:37.00 °C
    pm8350c-thermal:37.00 °C
    pm8350c-bcl-lvl0:0.00 °C
    pm8350c-bcl-lvl1:0.00 °C
    ......

10.2.7 Wi-Fi

After running the rubikpi_config command, type "7" and press Enter to go to the WIFI menu, which guides you through Wi-Fi related operations.

Select action => 7

*****************WIFI Menu*******************
1 ==>discovery :: wifi discovery
2 ==>connect :: wifi connect
3 ==>fconnect :: wifi connect by config file
********************************************
99 ==>help :: help info
0 ==>quit :: return main menu


Select action =>
  • Option 1: Search for available networks.

    Type "1" and press Enter to print the SSIDs of all available networks.

    Select action => 1
    SSID:
    SSID: NETGEAR_2G
    SSID: DLSP-V6
    SSID: kaoqinji
    SSID: ThunderSoft-Office
    ......
  • Option 2: Input the network SSID and password to connect.

    Type "2" and press Enter. Follow the prompts to input the SSID and password, then press Enter. The system will automatically connect to the network and update the configuration file at /usr/src/rubikpi-config/rubikpi_config.ini with the provided ssid "xxx" and password "xxxxxxxx".

    Select action => 2
    please input ssid:
    xxx
    please input password:
    xxxxxxxx
  • Option 3: Connect to the network using the SSID and password stored in the configuration file.

    1. First, write the SSID and password of the Wi-Fi network that you want to connect to the configuration file /usr/src/rubikpi-config/rubikpi_config.ini, as shown below:

      ......
      [Wi-Fi]
      ssid=xxx
      passphrase=xxxxxxxx

      ......
    2. Type "3" and press Enter. The system will automatically read the SSID and password from the configuration file and connect to the network.

      Select action => 3
      set wifi xxx success