SC&T HKM01B-4K User manual

Product: HKM01B-4K
Date: 1/23/2018
FW Rev:
Doc Type:
1/104
Table of Contents
Table of Contents
Revision History
Overview
Supported Platform
Supported FW Version
Terminology
Preface
How to Access the Console
How to get HKM01B-4K board's IP address
Command Category
Command Syntax Conventions
Console APIs
Link Manager Control
Access Settings in Flash - astparam
Send Event to Link Manager
Get/Set Link Manager Internal Parameters
Get Link Manager State
Simulate Button Press
Link Management
Switch Channel [Client Only]
Switch Channel [Host Only]
Stop Link [Client Only]
Stop Link [Host Only]
Get Current Channel Setting
IP Network Commands
Change Host Name ID
Get Host Name

Product: HKM01B-4K
Date: 1/23/2018
FW Rev:
Doc Type:
2/104
Get IP Address
Get MAC Address
Get Ethernet Link Status and Mode
Node Discovery and Query
Node Discovery and Query
Video Commands
Configure Graphic/Video Mode [Host Only]
Set Anti-Dither Mode [Host Only]
Enable/Disable Loopback Port [Host Only]
Frame Rate Control [Host Only]
Bit Rate Control [Host Only]
Detach/Attach Video Input Port [Host Only]
Upload/Copy Video Downstream Sink’s EDID
Get Current EDID Reported to Upstream [Host Only]
Get Video Source Timing Information
Get Video Engine State
Get Video Sink Information
Turn Off/On Video Output [Client Only]
Pause/Black-out Video Stream [Client Only]
Select Video Input Port [Host Only]
Scale Video Output/Video Hybrid Mode [Client Only]
Take Video Snapshot
Video Wall Commands
Show Picture When Link Down
OSD Commands
Show String OSD [Client Only]
Show Picture OSD [Client Only]
Audio over IP Commands
Audio Source Port Selection [Host Only]
Analog Audio Volume Control

Product: HKM01B-4K
Date: 1/23/2018
FW Rev:
Doc Type:
3/104
USBoIP/KMoIP Commands
Manually Start/Stop USBoIP and KMoIP [Client Only]
Manually Start/Stop USBoIP [Client Only]
Manually Start/Stop KMoIP [Client Only]
Get USBoIP Status [Client Only]
Get KMoIP Status [Client Only]
Get Attached Client IP [Host Only]
USBoIP Device Exporting Policy [Client Only]
IR over IP Commands
IR Guest Mode and Protocol Decode
I2C Access
Initial I2C Bus
Select I2C Bus and Device
Set Range for I2C Read
Read/Write I2C Slave
Misc.
Reboot Device
Turn on/off debug console’s debug message
Reset Setting to Factory Default
Migrate From Legacy Console APIs
Ethernet Switch Configuration
Incompatible
Command Changes
Command Mapping
astparam Changes
Appendix A. Channel to Multicast IP Map
Appendix B. IP Port Usage List
Appendix C. Link Manager Event List
Host
Link Control

Product: HKM01B-4K
Date: 1/23/2018
FW Rev:
Doc Type:
4/104
Button Events
Client
Link Control
Button Events
OSD Control
Appendix D. List of lmparam
Common
Host
Client
Appendix E. Sample Code

Product: HKM01B-4K
Date: 1/23/2018
FW Rev:
Doc Type:
5/104
Revision History
● 2018/01/16:
○ [Misc.] Add “Reset Setting to Factory Default”.
● 2017/11/27:
○ [USBoIP Device Exporting Policy] Add more description.
● 2017/11/14:
○ [Migrate From Legacy Console APIs] Add “Command Mapping” table.
● 2017/11/10:
○ [Appendix D::Client] Add GWIP lmparam. Will be supported after A7.1.1.
for backward compatible with A6.x FW.
● 2017/10/30:
○ [Change Host Name ID] Due to above behavior, we recommended don’t
use astparam, hostname_id, on host device. Use
‘e_reconnect::{ch_select}’ command instead.
○ [IR over IP Commands] Add IR guest mode information.
● 2017/10/5:
○ [Appendix B. IP Port Usage List] Add FW version information.
● 2017/09/12:
○ [Switch Channel (Client Only)] Update Ex7.
● 2017/08/01:
○ [Analog Audio Volume Control] Add “Analog Audio Volume Control”
information.
● 2017/07/24:
○ [Switch Channel (Client Only)] Add more ‘CH_SELECT’ details.
● 2017/07/18:
○ [Manually Start/Stop USBoIP and KMoIP] Add Ex3.
● 2017/07/14:
○ [Node Discovery and Query] Add new ‘--intf’ option for ‘node_query’
command.
● 2017/07/12:
○ Revised “Migrate From Legacy Console APIs::Ethernet Switch
Configuration”.
○ Revised “Overview::Supported Platform”.
● 2017/07/07:
○ First version.

Product: HKM01B-4K
Date: 1/23/2018
FW Rev:
Doc Type:
6/104
Overview
The “Console APIs” interface is so called “Command Line Interface” (CLI). This document
describes the commands which can be used under HKM01B-4K series’ platform’s console
interface. HKM01B-4K uses Linux OS and the console is derived by Bash shell. Console
can be accessed through:
● Debug console: is set to UART port 2 using baud rate at 115200-8n1.
● Telnet port 24: There is built-in telnet server to connect to HKM01B-4K devices.
● Web CGI: Controlled through web protocol. Mapping CGI command to console
command.
Through console APIs, developers can get more control on HKM01B-4K firmware and
extend product's features and capability.
Supported Platform
● AST1520
● AST1525
● AST1510: Only supports commands introduced before A7.0.0. FW >= A7.0.0
doesn’t support AST1510 platform.
● AST1500: Only supports commands introduced before A7.0.0. FW >= A7.0.0
doesn’t support AST1500 platform.
Supported FW Version
Supported FW version is listed in each command. This document is based on A7.0.0.

Product: HKM01B-4K
Date: 1/23/2018
FW Rev:
Doc Type:
7/104
Terminology
Term. Description
HKM01B-4K Refers to all series of AST1500, AST1510, AST1520.. platform.
AST152X Refers to AST1520 and AST1525.
host The HKM01B-4K video encoder board.
Tx Same as ‘host’.
client The HKM01B-4K video decoder board.
Rx Same as ‘client’.
node Generic term for ‘host’ and ‘client’.
device Same as ‘node’.
FW Short of ‘firmware’. Normally refers to HKM01B-4K’s firmware.
HW Short of ‘hardware’. Normally refers to HKM01B-4K’s HW platform.
console FW’s command line interface (CLI).
console API FW provides commands through console as API.
Link Manager A major FW script/program handling most of user space link
management.
astparam A command to access parameters in flash. Also refer to those
parameters accessed through this command.
lmparam A command to access internal parameters of ‘Link Manager’. Also
refer to those parameters accessed through this command.
event Normally refers to control commands sending to ‘Link manager’.
service HKM01B-4K provide many over IP extension functions. It is called
‘service’ in general. For example, video over ip, usb over IP….
channel Most of over IP streaming ‘services’ using different multicast
IP/group. To simplify the process of choosing multicast IP, we use
‘channel’ to represent/mapping each service’s multicast IP/group.
Normally, each host has its own unique channel setting. So that
client can choose which host to connect to by specifying the host’s
‘channel’ number.
switch channel The process of changing ‘channel’ number.
sink Video sink. Refer to TV, monitor which attached to HKM01B-4K’s
client video output port or HKM01B-4K host’s video loopback output
port.

Product: HKM01B-4K
Date: 1/23/2018
FW Rev:
Doc Type:
8/104
source Video source. Refer to video player whichever feed HDMI/DVI video
signal to HKM01B-4K host.
OSD Stands for “On Screen Display”. Client display HW engine ‘overlay’
function to overlay 16bits RGB565 data onto video decode picture.
FW provide ‘String OSD’ and ‘Picture OSD’ APIs for overlay string or
picture onto video decode picture.
USBoIP Short of ‘USB over IP’ extension function. Specially refers to
‘transparent’ type of ‘USB over IP’ extension function. Comparing to
‘KMoIP’ which is ‘emulation’ type.
KMoIP Short of ‘Keyboard/Mouse over IP’ extension function. It is a kind of
USB extension, but uses ‘emulation’ technology instead of
‘transparent’ USBoIP.

Product: HKM01B-4K
Date: 1/23/2018
FW Rev:
Doc Type:
9/104
Preface
How to Access the Console
There are 3 ways to access the console:
1. UART2 debug port: It is a RS232 interface using 115200-8n1 baudrate setting.
Developer can attach to this debug port to access console.
2. Use telnet: FW has built-in telnetd server and telnet client built in. Developer
can use any telnet client to connect to any HKM01B-4K board. Or write their own
program using telnet protocol to connect to any HKM01B-4K board through IP
network. NOTE: Default use telnet port 24 instead of 23. Use "root" to
login. No password is required for login.
3. Use Web CGI: FW has built-in web server and has a CGI command to mapping console
commands to CGI. Check the Web UI ⇒ System ⇒ Utilities ⇒ Console API Command.
Use telnet or web protocol are recommended way for developing control software.
UART2 debug port is usually used for engineering test and debug. By default, debug port
will output a lot of debug messages. You can turn it off.

Product: HKM01B-4K
Date: 1/23/2018
FW Rev:
Doc Type:
10/104
How to get HKM01B-4K board's IP address
FW default runs "autoip" and uses 169.254.xxx.xxx private IP domain. The IP of target
HKM01B-4K board is resolved by its hostname using mDNS protocol. If developers want
to use "static ip" or "DHCP client", developer will be responsible to maintain the "IP to
board" mapping by themselves. Here are the methods to resolve the IP address using
"autoip" mode.
● Client's GUI: The client's GUI will display the client's IP address and connected
host's IP address.
● Console APIs: Following console APIs are provided:
○ [FW >= A7.0.0] node_query: An enhanced version of node_list. See
“Node Discovery and Query” section for details.
○ [FW < A7.0.0] node_list: use this command to list all HKM01B-4K
boards' hostname and IP address.
○ astresname: use this command to resolve a target's IP address by
providing target's hostname.
● From PC: Following methods are provided:
○ For end users, please reference to “Documents/Web UI/How to Connect to
Web UI” document.
○ Developer can use/implement ASPEED proprietary discovery protocol.
Reference to “node_query” or “node_list” sample code. There is pre-
compiled execute files for Windows OS under “Documents/Console
APIs/SampleCode/”.
○ Use the mDNS libraries. For example:
■ Bonjour: http://developer.apple.com/networking/bonjour/
■ pyZeroConfig: http://sourceforge.net/projects/pyzeroconf/files/

Product: HKM01B-4K
Date: 1/23/2018
FW Rev:
Doc Type:
11/104
Command Category
Different usage scenario is achieved by different type of commands. “Console APIs”
section describes all those commands by usage type. However, by implementation type,
Commands can classified into following types:
● Link manager control:
○ ‘e’ command. Send event to link manager
○ ‘lmparam’ command. Query link manager parameters.
● Flash access control:
○ ‘astparam’ command. Used to read/write parameters into flash. See
“Documents/Console APIs/All about astparam” for details.
● Driver control:
○ ‘sysfs’ driver files. Drivers use Linux ‘sysfs’ filesystem to export proprietary
control interface to user.
● Bash shell commands:
○ echo, cat…. Normally used to access ‘sysfs’.

Product: HKM01B-4K
Date: 1/23/2018
FW Rev:
Doc Type:
12/104
Command Syntax Conventions
Following table describes the syntax used with the commands in this document.
Convention Description
boldface Commands and keywords.
italic Command input that is supplied by you.
[x] Keywords or parameters that appear within square brackets are
optional.
{x} Keywords or parameters within braces must be entered.
x|y Keywords or parameters separated by a vertical bar require you to
choose one option.
x||y Keywords or parameters separated by a double vertical bar allow
you to choose any or all of the options.
Note:
● All commands and parameters are case sensitive.
● “/ # “ in command examples means command prompt. It is not part of
command.

Product: HKM01B-4K
Date: 1/23/2018
FW Rev:
Doc Type:
13/104
Console APIs
Link Manager Control
After FW boots up, the process hands over to ‘link manager’ script. Link manager is the
main process controlling the reset of FW’s life cycle. It maintains connection state
machine. Responsible for taking and response events from low level drivers and users.
To communicate with ‘link manager’, user send event to it by a command named ‘e’.

Product: HKM01B-4K
Date: 1/23/2018
FW Rev:
Doc Type:
14/104
Access Settings in Flash - astparam
Please read “Documents/Console APIs/All about astparam” for details.

Product: HKM01B-4K
Date: 1/23/2018
FW Rev:
Doc Type:
15/104
Send Event to Link Manager
This is the most used command to control the system. This command has two syntax
format. ‘e’ is just a shortcut of ‘ast_send_event -1’. They are basically the same. The
detail usage of events will be described in the reset of this document. And a list of
available events are listed in Appendix C.
Syntax
e{event[::arg1][::arg2]...}
ast_send_event -1 {event[::arg1][::arg2]...}
Parameters
● event: A case sensitive string to represent a event. Usually starts with ‘e_’.
○ Ex: e e_reconnect
● arg: If an event need some arguments, it is usually attached after event string
with ‘::’ token. Some events uses ‘_’ to separate arguments.
○ Ex: e e_reconnect::9999::v
Usage Information
● See Appendix C for the list of available events.
Version History
● FW >= A5.0.0

Product: HKM01B-4K
Date: 1/23/2018
FW Rev:
Doc Type:
16/104
Get/Set Link Manager Internal Parameters
lmparam is usually used to query some of link manager’s internal parameters. This
command also provide a method to set the value of specified parameter. However, it is
rarely useful and may confuse link manager script results in unexpected problem.
Appendix D has a list of useful lmparam.
Syntax
lmparam {g|s}{key [value]}
lmparam dump
Parameters
● g: Get value of specified key. When ‘g’, no [value] is needed.
● s: Set specified key to value. [value] is only required when ‘s’.
● key: Appendix D has a list of useful lmparam keys.
● dump: Dump all lmparam key/value.
Usage Information
● Don’t use ‘set’ command unless you know what you are doing.
● In FW >= A7.0.0, Link manager is divided into sub-link managers per services.
Like “video link manager (vLM)”. And they also has similar commands like
lmparam. For example, vLM has ‘vlmparam’ command. uLM has ‘ulmparam’
command.
● Link manager internal parameters is implementation dependent. Which means
their define may changes when FW changes. Please avoid using it, especially
parameters that are not mentioned in this document.
Version History
● FW >= A6.0.0
Examples
Ex1: Get ‘STATE’
/ # lmparam g STATE
s_srv_on/ #
Ex2: Set ‘TEST’ to value ‘on’
/ # lmparam s TEST on
/ #
Ex3: Dump all lmparam key/value

Product: HKM01B-4K
Date: 1/23/2018
FW Rev:
Doc Type:
17/104
/ # lmparam dump
IS_HOST=y
STATE=s_srv_on
ACCESS_ON=y
DBG=0
SHARE_USB=y
SHARE_USB_AUTO_MODE=n
SHARE_USB_ON_FIRST_PEER=y
CH_SELECT=9999
……….
REMOTE_EDID_PATCH=00000001
LOOPBACK_EDID_PATCH=00000000
LOOPBACK_DEFAULT_ON=y
V_RX_DRV=it6802
V_FRAME_RATE=0
/ #

Product: HKM01B-4K
Date: 1/23/2018
FW Rev:
Doc Type:
18/104
Get Link Manager State
Syntax
lmparam g STATE
Result
● Host
○ s_init: System is under initialization.
○ s_idle: System is idle. Services are stopped.
○ s_attaching: Services are started, but no client attached or no video
source.
○ s_srv_on: Services are started.
○ s_error: Fatal error.
● Client
○ s_init: System is under initialization.
○ s_idle: System is idle. Services are stopped.
○ s_srv_on: Services are started.
○ s_error: fatal error.
Example
Ex1: Get link manager current state.
/# lmparam g STATE
s_srv_on
/#

Product: HKM01B-4K
Date: 1/23/2018
FW Rev:
Doc Type:
19/104
Simulate Button Press
Evaluation board has built-in two button. FW defined a set of button behavior. User can
use following ‘e’ commands to trigger those button behavior with the need to actually
press the button. Button’s behavior can be customized. For details, please read
document “LED and Button/AST1500 Button Function Descriptions”.
Syntax
e{button_event}
Parameters
● button_event: See Appendix C for available button events.
Usage Information
● See document “LED and Button/AST1500 Button Function Descriptions” for
details.
Version History
● FW >= A5.0.0
Examples
Ex1: Simulate button 1 short press.
/ # e e_button_link
/ #

Product: HKM01B-4K
Date: 1/23/2018
FW Rev:
Doc Type:
20/104
Link Management
Table of contents
Other SC&T Extender manuals

SC&T
SC&T HE04SEK User manual

SC&T
SC&T HE01SL User manual

SC&T
SC&T CA101HDP User manual

SC&T
SC&T HE01F-4K6G User manual

SC&T
SC&T DP02U User manual

SC&T
SC&T Cable Series User manual

SC&T
SC&T HE01SE User manual

SC&T
SC&T HE01SI User manual

SC&T
SC&T 4K HDMI KVM USB/RS232/IR/Analog Audio CAT5e Extender over IP... User manual

SC&T
SC&T IP03PT User manual