This utility enhances the CLI and integrates it into the HOST environment as one. All the commands of CLI become a command on the host. Therefore, all the benefits of a native host commands becomes available to the CLI commands. It can be utilized for any Command line based interface such as Linux Shell, etc.
1.1 Features
1.2 Additional Features
1. It can run the test cases on a device located remotely over Ethernet link even if there is no telnet/SSH enabled CLI available in the target board.
2. It makes it possible to run a test script on multiple targets in synchronized manner.
1.3 Components
1.4 Pre-Requisites
1.5 Quick Start
Download SYSCLI from http://sourceforge.net. Unzip to it.
Open a Cygwin prompt for the folder ./syscli or change directory to syscli
1.5.1 To run a CLI command from SYSCLI
1. Run ./open38400.sh. This starts a SysCli server
2. Now run any CLI command as explained in section 3 SYSCLI Commands.
1.5.2 To Automate a Test Case
1. Make sure that the target board CLI has “call” command implemented.
2. Copy the AXF file to the current folder, the FW of which is flashed.
3. Now keep the ./Test_Sandbox*.pl files as you template and write your own.
1.5.3 To Setup SYSCLI for Remote Access
1. Run ELCI on a remote server with an IP address.
2. Now set this IP address in your local ./ini_syscli_remote.ini file.
3. Now everything remains same as if it’s being executed on the local m/c.
1.5.4 To Setup SYSCLI on single server and multiple clients
1. This method is same as mentioned in above method, except that the IP address can be set same on the other computers for the client SYSCLI.
1.5.5 To Setup SYSCLI on single server with multiple serial devices
1. Run one instance of SYSCLI with “_stay ” command. Here port is the UDP ports, not serial ports.
2. Run another instance of SYSCLI with “_stay ” command.
3. Now run all the commands with the option ./syscli –remote : for one serial device.
4. Now run all the commands with the option ./syscli –remote : for another serial device.
5. E.g. to open COM1 run ./syscli –remote 172.28.179.27:PORT1 _open COM1 115200
6. E.g. to open COM2 run ./syscli –remote 172.28.179.27:PORT2 _open COM2 115200
1.5.6 To Upgrade the SYSCLI Package
Upgrade all the folders except the file ./profile.ini, if it has been personalized to your environment.
Figure 1 1 SYSCLI Architecture
3.1.1 _open
Syntax:
_open Data Bits(8)
This command opens the serial port.
3.1.2 _pause
Syntax:
_pause
It releases the serial device.
3.1.3 _resume
Syntax:
_resume
It reopens the serial device.
3.1.4 _shutdown
Syntax:
_shutdown
It closes the targeted server.
3.1.5 _stay
Syntax:
_stay port number(34529)
It runs a server listening at the port port number, if specified. If port number is not specified then it listens to a default port. It is useful when multiple instances of the server have to run on the same m/c. Each instance can be opened for a different serial device.
3.1.6 _changebaud
Syntax:
_changebaud data bits(8)
3.1.7 Sending Generic Command (requiring response)
Syntax:
[cmd] generic commands
This is used to send the commands string to the target as it is. It can optionally follow _cmd command. But it is not preferred. Do not prepend _cmd unless you command is one of the syscli commands. That is, for example, if suppose, one of the CLI commands happens to be _shutdown, then in that case it can be prepended by _cmd and sent as _cmd _shutdown. But if the command is shutdown (no ‘’ underscore), then the command can be sent as it is.
After sending the generic command, SYSCLI server waits for the response from the target. In doing so it actually waits for the ‘>’ (End Of Transmission EOT) character (again configurable by _seteotchar command) as last character. This special character is sent to the host in preparation for the new command. This gives SYSCLI a hint that the target has finished executing the previous command. SYSCLI then prepares the string sent by the target and send it to the SYSCLI client. SYSCLI client then displays this string, on the screen and exits its execution.
3.1.8 Sending Generic Command (NOT requiring response)
Syntax:
_ generic command <- Preferred method
or
_cmdendquick generic command
Note the underscore usage above and followed by a space. This command is used when you are sure that no EOT char will be sent by the target as response. Example command can be the commands which trigger the XMODEM transfers. (fdl commands). In this case SYSCLI server does not wait for the EOT character. Instead it tries to read few characters any way. It sends a success response and those few characters, to SYSCLI client. The client exits after printing those few characters.
Ex: ./syscli _ fdl 0x83 y
3.1.9 _sxmodem
Syntax:
_sxmodem
This command sends a file to the target using XMODEM protocol.
3.1.10 _seteotchar
Syntax:
_seteotchar
This command sets the EOT character of SYSCLI server. 0x3E = ‘>’.
E.g.
./syscli _seteotchar 0x3E
3.1.11 _addslashr
Syntax:
_addslashr Where option = {0, 1, 2}
This command sets the default command end character. It’s similar to the CR/LF which is sent to the terminal command to indicate a command. If option is 0, then command will end with n. If option is 1, then command will end with rn. If option is 2, then command will end with r.
E.g.
./syscli _addslashr 1 # sets limiter as rn
3.1.12 _sendhex
Syntax:
_senhex hex1 hex2 hex3…..
This command sends the series of hex characters to the serial port.
E.g.
./syscli _sendhex 0x61 0x62 0x63 0x0A # sends “abcn” to serial
3.1.13 _uploadfile
Syntax:
_uploadfile
This command uploads a file to the destination memory address