rubikpi_config 使用指南
rubikpi_config 是一个运行在 RUBIK Pi 3 中的配置工具。
通过 rubikpi_confg
命令可以方便的配置 40-Pin、LED、风扇等接口。
rubikpi_config 提供两种模式:
-
命令行模式
- 使用
rubikpi_config pin i2c1 enable
等类似命令完成接口配置。
- 使用
-
菜单模式
- 使用
rubikpi_config
命令进入菜单,根据提示完成接口配置。
- 使用
备注
在官方发布的镜像中,rubikpi_config 工具可能并非最新版本,若您在使用过程中发现了问题,可使用
sudo apt install --only-upgrade package_name
命令更新工具,或访问 https://github.com/rubikpi-ai/tools/tree/rubikpi_config 根据 README 中的提示更新工具。
命令行模式
使用 rubikpi_config -h
命令查看使用方法,命令执行结果:
This is the config tool for RUBIK Pi.
Select working mode:
rubikpi_config ---> When executed without arguments, enter the menu mode
rubikpi_config [function] [args...] ---> When executed with arguments, enter cmdline mode
CMDLINE MODE:
rubikpi_config [function] -h View Help Information
function:
pin 40 pin header function control(e.g. i2c1, spi2)
fan Fan status control
temp Temperature information view
res Resource information view(e.g. CPU usage, memory usage)
led LED parameter settings
thermal Thermal switch settings
debug Debugging information printing
display Display parameter settings(e.g. resolut)
audio audio information view and parameter settings
bt Switching protocol stack
OTHER
-h, --help Print help information
-v Print version information
40-Pin
- 查看使用方法
rubikpi_config pin -h
示例输出:
This is the config tool for RUBIK Pi.
PIN
Use examples
rubikpi_config pin [operation port] [enable/disable]
operation port:
i2c1, i2c3, spi2, uart2_2w, uart2_4w, i2c2, spi6, uart6_2w, uart6_4w, i2c6, spi8, uart8_2w, uart8_4w, i2c8, spi12, uart12_2w, uart12_4w, i2c12, i2s2
-
部分命令示例:
- 使能两线模式的串口 6
rubikpi_config pin uart6_2w enable
示例输出:
Note: The update is complete and will take effect after restart.
重启系统后会出现
/dev/ttyHS6
节点,可使用 2.2.4 UART 小节的方法测试串口 6。- 获取两线模式串口 6 的使能状态
rubikpi_config pin uart6_2w
示例输出
uart6_2w current status:enable
Debug
- 查看使用方法
rubikpi_config debug -h
示例输出:
This is the config tool for RUBIK Pi.
debug print
Use examples:
rubikpi_config debug uart Get serial port printing status
rubikpi_config debug uart on Enable serial port printing
rubikpi_config debug uart off Close serial port printing
-
部分命令示例:
- 关闭串口终端
rubikpi_config debug uart off
示例输出:
Console status set success
The modification will take effect after the system restarts.重启串口终端在进入 kernel 后将无打印信息
Thermal
- 查看使用方法
rubikpi_config thermal -h
示例输出:
This is the config tool for RUBIK Pi.
thermal
Use examples:
rubikpi_config thermal cpu [enabled/disabled] cpu thermal on/off control
rubikpi_config thermal cpu cpu thermal status get
-
部分命令示例:
- 获取当前 CPU 热管理状态
rubikpi_config thermal cpu
示例输出:
current cpu thermal is:disabled
Fan
- 查看使用方法
rubikpi_config fan -h
示例输出:
This is the config tool for RUBIK Pi.
FAN
Use examples:
rubikpi_config fan speed [speed_value]
speed value:
speed value: 0-255, 0 is stop, 255 is max speed
-
部分命令示例:
- 将风扇的转速设置为 255。
rubikpi_config fan speed 255
备注
在将风扇转速设置为一个固定值前,需要使用 rubikpi_config thermal disable
命令将 CPU 热管理关掉。
LED
- 查看使用方法
rubikpi_config led -h
示例输出:
This is the config tool for RUBIK Pi.
LED
Use examples:
rubikpi_config led heartbeat [on/off] heartbeat led on/off control
rubikpi_config led heartbeat [blue/green/red] heartbeat led Color selection
rubikpi_config led heartbeat heartbeat brightness and color get
rubikpi_config led brightness [0-511] heartbeat brightness set
rubikpi_config led [blue/green/red] [0-511] led brightness set
rubikpi_config led [blue/green/red] led brightness get
rubikpi_config led off leds off
-
部分命令示例:
- 关闭心跳灯
rubikpi_config led heartbeat off
Display
- 查看使用方法
rubikpi_config display -h
示例输出:
This is the config tool for RUBIK Pi.
display
Use examples:
rubikpi_config display resolut [resolution_value]
resolution_value:
edidAdaptiveResolution 1280x720x60 1920x1080x60 2560x1440x60, 3840x2160x30