| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 | 
							- <h1>YKUSH Board Commands</h1>
 
- <div class="reference_page_toc">
 
-         <ul>
 
-                 <li><a href="#command_overview">Command overview</a></li>
 
-                 <li><a href="#list_attached_example">List attached boards</a></li>
 
-                 <li><a href="#switch_command_example">Downstream port On/Off switching</a></li>
 
-                 <li><a href="#switch_state_command_example">Port switching state</a></li>      
 
-         </ul>
 
- </div>
 
- <h2 id="command_overview">Command overview</h2>
 
- <p>YKUSH board commands have the following structure.</p>
 
- <p class="command_line">ykushcmd ykush [-s serial_number] [OPTION]</p>
 
- <p>Where:</p>
 
- <table cellpadding="10">
 
-         <tr>
 
-                 <td width="30%" valign="top">-s serial_number</td>
 
-                 <td>
 
-                         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.
 
-                 </td>
 
-         </tr>
 
-         <tr>
 
-                 <td valign="top">-l</td>
 
-                 <td>
 
-                         List attached YKUSH boards.
 
-                         The serial number of each board attached to the host will be displayed.
 
-                 </td>
 
-         </tr>
 
-         <tr>
 
-                 <td valign="top">-d 1|2|3|a</td>
 
-                 <td>
 
-                         Power Down/Off downstream port with the number provided.
 
-                         If <i>a</i> is provided as the port number then all ports will be switched.
 
-                 </td>
 
-         </tr>
 
-         <tr>
 
-                 <td valign="top">-u 1|2|3|a</td>
 
-                 <td>
 
-                         Power Up/On downstream port with the number provided.
 
-                         If <i>a</i> is provided as the port number then all ports will be switched.
 
-                 </td>
 
-         </tr>
 
-         <tr>
 
-                 <td>-g 1|2|3</td>
 
-                 <td>
 
-                         Get state of downstream port.
 
-                 </td>
 
-         </tr>
 
- </table>
 
- <h2 id="list_attached_example">List attached boards</h2>
 
- <p>
 
-         The <b>[-l]</b> option is used to list all attached YKUSH boards.
 
-         All YKUSH board have unique serial numbers which are displayed when this option is used.
 
- </p>
 
- <pre>
 
- <code class="language-bash">
 
- #list the serial number for each of the attached YKUSH boards
 
- $ ykushcmd ykush -l
 
- Attached YKUSH Boards:
 
- 1. Board found with serial number: YK17125
 
- 2. Board found with serial number: YK21493
 
- </code>
 
- </pre>
 
-                 
 
- <h2 id="switch_command_example">Downstream port On/Off switching</h2>
 
- <p>
 
-         When only one YKUSH board is attached to the host the <b>[-s serial_number]</b> option is not required.
 
-         Bellow are some examples.
 
- </p>
 
- <pre>
 
- <code class="language-bash">
 
- #power-down downstream port 1
 
- $ ykushcmd ykush -d 1
 
- #power-down downstream port 2
 
- $ ykushcmd ykush -d 2
 
- #power down downstream port 3
 
- $ ykushcmd ykush -d 3
 
- #power-down all three downstream ports
 
- $ ykushcmd ykush -d a
 
- #power-up downstream port 1
 
- $ ykushcmd ykush -u 1
 
- #power-up downstream port 2
 
- $ ykushcmd ykush -u 2
 
- #power-up downstream port 3
 
- $ ykushcmd ykush -u 3
 
- #power-up all three downstream ports
 
- $ ykushcmd ykush -u a
 
- </code>
 
- </pre>
 
- <p>
 
-         If more than one YKUSH board is attached to the host the <b>[-s serial_number]</b> option should be used.
 
-         Bellow are some examples.
 
- </p>
 
- <pre>
 
- <code class="language-bash">
 
- #list the serial number for each of the attached YKUSH boards
 
- $ ykushcmd ykush -l
 
- Attached YKUSH Boards:
 
- 1. Board found with serial number: YK17125
 
- 2. Board found with serial number: YK21493
 
- #power-down downstream port 1 of the board with serial number YK17125
 
- $ ykushcmd ykush -s YK17125 -d 1
 
- #power-down downstream port 1 of the board with serial number YK21493
 
- $ ykushcmd ykush -s YK21493 -d 1
 
- #power-down downstream port 3
 
- $ ykushcmd ykush -d 3
 
- #power-down all three downstream ports of the board with serial number YK21493
 
- $ ykushcmd ykush -s YK21493 -d a
 
- </code>
 
- </pre>
 
- <h2 id="switch_state_command_example">Port switching state</h2>
 
- <p>
 
-         The current switching state of each downstream port can be fetched from the YKUSH board using the <b>[-g 1|2|3]</b> option.
 
- </p>
 
- <pre>
 
- <code class="language-bash">
 
- #State of downstream port 1
 
- $ ykushcmd ykush -g 1
 
- Downstream port 1 is ON
 
- #power-down downstream port 1
 
- $ ykushcmd ykush -d 1
 
- #State of downstream port 1
 
- $ ykushcmd ykush -g 1
 
- Downstream port 1 is OFF
 
- #list the serial number for each of the attached YKUSH boards
 
- $ ykushcmd ykush -l
 
- Attached YKUSH Boards:
 
- 1. Board found with serial number: YK17125
 
- 2. Board found with serial number: YK21493
 
- #State of downstream port 1 of the board with serial number YK17125
 
- $ ykushcmd ykush -s YK17125 -g 1
 
- Downstream port 1 is OFF
 
- #power-up downstream port 1 of the board with serial number YK17125
 
- $ ykushcmd ykush -s YK17125 -u 1
 
- </code>
 
- </pre>
 
 
  |