System Service and Usage

From ESS-WIKI
Jump to: navigation, search

Service

Advantech has built five common network services for am335x advantech platform: tftp service, ftp service, ssh service, telnet service and http service. Please refer to Service to learn more.

Other Application

Network configuration

Configuration via Console

It's important to note that our file system has ported netplug to manage the network services, so it is not recommended that users manually execute ifconfig, route, dhclient or other related commands to configure the network.

The network usually gets dynamic IP address by default. If static IP address is needed, you can refer to the below steps:

1. Firstly, open "/etc/netcfgfile/temp.static.netcfg.eth0" and "/etc/netcfgfile/temp.static.netcfg.eth1" file, then modify ETH0_IP, ETH1_IP, NAMESERVER,DEFAULT_GW and other variables based on your own specific needs.

2. Secondly, execute the following commands to copy the configuration file to the appropriate location.

advantech# cp /etc/netcfgfile/temp.static.netcfg.eth0 /etc/adv.d/netcfg.eth0
advantech# cp /etc/netcfgfile/temp.static.netcfg.eth1 /etc/adv.d/netcfg.eth1

3. Lastly, reboot the device.

Date/Time Configuration

You can use the tool we provide to modify the system time. Click on the "Time Settings" icon on the screen. Then Advantech Date/Time Settings utility will be started.
RTENOTITLE
After the time is adjusted, please click “OK” button, and the date will be saved. Meanwhile, the RTC time will be synchronized to the time you just set.

About System

If you want to know the version information of this system, you can use "version" command to achieve this as flowing:

root@am335x-adv:~# version
Bsp version: RSB-4220 V2.00
Device name: RSB-4220
Release date: 2016-09-08
Kernel version: 4.1.6-g52c4aa7

Brightness Control

We provide a gui application to control the brightness. So, you can conveniently adjust the screen brightness.
RTENOTITLE

Serial Tools

We have five serial ports, named ttyO1~ttyO5. And we provide a serial test tool to let it easily to validate the serial ports.
RTENOTITLE

Matrix GUI User‘s Guide

Overview

When you boot up the target system, Matrix GUI should be automatically started. Matrix is an HTML 5 based application launcher created to highlight available applications and demos provided. There are two forms of Matrix, local and remote Matrix. All of the example applications and demos are available using either the local or remote version. Matrix comes as a 6x4 matrix of icons or as a 4x3 matrix depending on the display resolution. The launcher for Matrix is just a simple QT application that displays a Webkit base browser that points to the URL http://localhost:80.

RTENOTITLE

Launching and Stopping Matrix

If the Matrix GUI does not start with the system, you can manually start the program by the following command:

advantech# /etc/init.d/matrix-gui-2.0 start

If you want the Matrix to start with the system by default, please run the following command

advantech# ln -s /etc/init.d/matrix-gui-2.0 /etc/rc5.d/S97matrix-gui-2.0

When you want to cancel the default startup, just remove the S97matrix-gui-2.0 file. For more information on the use of Matrix, please refer to the following website: http://processors.wiki.ti.com/index.php/Matrix_Users_Guide.

Adding a Matrix Application

Below are step-by-step instructions for Adding a New Application/Directory to Matrix.

  • Create a new folder on your target file system at /usr/share/matrix-gui-2.0/apps/. The name should be a somewhat descriptive representation of the application or directory. The folder name must be different from any existing folders at that location.
  • Create a desktop file based on the parameters discussed below. It is recommended the name of the desktop file match the name of the newly created folder. No white spaces can be used for the desktop filename. The desktop file parameters should be set depending on if you want to add a new application or a new directory to Matrix. The Type field must be set according to

your decision. The desktop file must have the desktop suffix.

  • Update the Icon field in the desktop to refer to any existing Icon in the /usr/share/matrix-gui-2.0 directory or subdirectories. You can also add a new 96x96 png image and place it into your newly created folder.
  • Optionally for applications you can add a HTML file that contains the application description in your newly created directory. If you add a description page then update the X-Matrix-Description field in the .desktop file.
  • Refresh Matrix using the application "Refresh Matrix" located in the Settings submenu. Blank template icons for Matrix can be found here:

http:// gforge.ti.com/gf/download/frsrelease/712/5167/blank_icons_1.1.tar.gz The .desktop file is based on standard specified at the URL: http:// standards.freedesktop.org/desktop-entry-spec/latest/ Additional fields were added that are unique for Matrix. Format for each parameter: <Field>=<Value> The fields and values are case sensitive.

Add a Startup items when boot

  • Remove a Startup items:
update-rc.d [-n] [-f] [-r <root>] <basename> remove 

basename is your service script name

 eg. update-rc.d -f matrix-gui-2.0 remove 
  • Add a Startup items:

Firstly,You must ensure that the service script is exists,then run the flowing command:

 update-rc.d [-n] [-r <root>] [-s] <basename> start|stop NN runlvl [runlvl] [...] . 

start|stop : when system start /shutdown the basename wiil run automatically
NN: 0~99
runlvl: advantech AM335x platform runlevel is 5(default);

 eg. update-rc.d networking start 40 5 . 

then you can find the S40networking in rc5.d directory;

Other special function

Wifi Configuration and Usage

Wifi module introduction

RSB-4221 supports Marverll SD8897 wifi/bt modules throught M.2. To use Marverll SD8897 wifi/bt modules, you have to boot the linux system from emmc and do following setting under uboot:

AM335X RSB-4221 U-Boot# setenv mmcargs setenv bootargs console=${console} ${optargs} root=${mmcroot} rootfstype=${mmcrootfstype} M2WIFIFlag=TRUE
AM335X RSB-4221 U-Boot# saveenv

If you want to use SD card instead of wifi module, you should execute the below command under uboot because the system can not detect SD card when the above command has been executed.

AM335X RSB-4221 U-Boot# setenv mmcargs setenv bootargs console=${console} ${optargs} root=${mmcroot} rootfstype=${mmcrootfstype}
AM335X RSB-4221 U-Boot# saveenv

Wifi command introduction

Wifi control related commands have been included, so you can execute the below commands to connect wifi when the module is powered on.

advantech# wifi-wpaon WIFI_SSID WIFI_PASSWORD

Note: This command is used to connect to the account whose wifi name is WIFI_SSID using WIFI_PASSWORD.

advantech# wifi-off

Note: This command is used to turn off wifi function.

Otg Mode Selection

USB connector of RSB4220 supports two modes: Host and Slave, which require software and hardware support.The system is set to Host mode by default. If you do not need to switch between the two modes, no operation is required; if you need to switch, please refer to the following steps:

1. Please refer to the below figure to select otg mode

RTENOTITLE

2. Execute one of the following commands to switch to the corresponding mode after the terminal is powered on.

root@am335x-adv:/ # echo “host” > /etc/otg-mode

or

root@am335x-adv:/ # echo “peripheral” > /etc/otg-mode

Note: The first command sets USB connector to Host mode, while the second one sets it to Slave mode. It should be consistent with the jumper setting in Step1.

3. Reboot the system.