YKUSHXS board commands have the following structure.
ykushcmd ykushxs [-s serial_number] [OPTION]
Where:
-s serial_number | Board serial number to which the command is addressed. When multiple YKUSH boards are connected to a host, this option should be used to specify the board. If more than one board is connected and this option is not provided the command will be sent to the first board in the USB enumeration list. |
-l | List attached YKUSHXS boards. The serial number of each board attached to the host will be displayed. |
-d | Power Down/Off the downstream port. |
-u | Power Up/On the downstream port. |
-g | Get downstream port state. |
The [-l] option is used to list all attached YKUSHXS boards. All YKUSH board have unique serial numbers which are displayed when this option is used.
#list the serial number for each of the attached YKUSHXS boards
$ ykushcmd ykushxs -l
Attached YKUSHXS Boards:
1. Board found with serial number: YK17125
2. Board found with serial number: YK21493
When only one YKUSHXS board is attached to the host the [-s serial_number] option is not required. Bellow are some examples.
#power-down the downstream port
$ ykushcmd ykushxs -d
#power-up the downstream port
$ ykushcmd ykushxs -u
If more than one YKUSHXS board is attached to the host the [-s serial_number] option should be used. Bellow are some examples.
#list the serial number for each of the attached YKUSHXS boards
$ ykushcmd ykushxs -l
Attached YKUSHXS Boards:
1. Board found with serial number: YK17125
2. Board found with serial number: YK21493
#power-down the downstream port of the board with serial number YK17125
$ ykushcmd ykushxs -s YK17125 -d
The current switching state of each downstream port can be fetched from the YKUSH board using the [-g 1|2|3] option.
#State of the downstream port
$ ykushcmd ykushxs -g
Downstream port is ON
#power-down the downstream port
$ ykushcmd ykushxs -d
#State of downstream port
$ ykushcmd ykushxs -g
Downstream port is OFF
#list the serial number for each of the attached YKUSHXS boards
$ ykushcmd ykushxs -l
Attached YKUSHXS Boards:
1. Board found with serial number: YK17125
2. Board found with serial number: YK21493
#State of the downstream port for the board with serial number YK17125
$ ykushcmd ykushxs -s YK17125 -g
Downstream port is OFF
#power-up the downstream port of the board with serial number YK17125
$ ykushcmd ykushxs -s YK17125 -u