Command Line Interface
This page contains information that is superseded by the API provided in the kwikwai software
- 1 API design objective
- 2 List of available commands
- 2.1 enter the magic
- 2.2 device information
- 2.3 bonjour
- 2.4 netbios
- 2.5 network
- 2.6 time
- 2.7 verbose
- 2.8 messages
- 2.9 geek upgrade
- 2.10 goodbye cruel world
- 3 Error codes
API design objective
The API is both human and machine readable (no binary or xml).
It reports error in reply, is easy to parse and state less.
There is no prompt to avoid messy display while receiving async stuff.
The command structure is defined to avoid dual levels.
Kwikwai is server on serial, USB and telnet (port 9090, multiple sessions are supported).
USB and serial provide the same interface.
Client sends commands in the form:
command <param1> <param2> ... <CR>
On success, kwikwai answers with:
OK command <answer1> <answer2> ... <CR>
On failure, kwikwai answers with:
ERR command <error_id> <string> <CR>
where <string> is some text describing the error (this text can contains spaces).
Kwikwai may also send two sorts of asynchronous messages:
1) for logging messages (as controlled by the verbose command on serial/usb)
As an example, the message provided to remember entering the password once connected through telnet :
! Password required
2) for events (as controlled by the listen command)
* command <data1> <data2>
A typical CEC message
* cec:message A 00:02:09.380 4F:82:10:00 #
A client may use the first char of the received message to determine the type of the data sent by Kwikwai.
List of available commands
enter the magic
Enter the password (default value is "kwikwai").
password kwikwai OK password
Display the version of the firmware.
version:get OK version:get 1.0r304
Display the device mac address
mac:get OK mac:get 00:50:C2:AD:80:00
Display the bonjour name (default value is "kwikwai").
bonjour:get OK bonjour:get kwikwai
Set the bonjour name. Name length is limited to 63 alphanumerical only characters.
bonjour:set mybelovedkwikwai OK bonjour:set mybelovedkwikwai
Display the netbios name (default value is "KWIKWAI").
netbios:get OK netbios:get KWIKWAI
Set the netbios name. Name length is limited to 15 alphanumerical only characters.
netbios:set myprecious OK netbios:set myprecious
Display the network settings configuration, DHCP or static, the ip address, mask, gateway and dns (the ip address, mask gateway and dns information is relevant only on static configurations).
Default value is DHCP.
ipsettings:get OK ipsettings:get DHCP 192.168.10.200 255.255.255.0 192.168.10.1 192.168.10.1
ipsettings:set <"DHCP">|<"STATIC"> <ip> <mask> <gwy> dns>
Set the network settings configuration by defining DHCP or static, the ip address, mask, gateway and dns. It disconnects the telnet session if reconfigured.
ipsettings:set STATIC 192.168.1.100 255.255.255.0 192.168.1.1 192.168.1.1 OK ipsettings:set STATIC 192.168.1.100 255.255.255.0 192.168.1.1 192.168.1.1 Connection closed by foreign host. unix$
Display the currently allocated ip address, mask, gateway and dns
ipconfig:get OK ipconfig:get 192.168.1.61 255.255.255.0 192.168.1.1 192.168.1.1
Display the local time
time:local:get OK time:local:get 15:06:50
Set the local time. This time configuration is overwritten by the sntp synchronization done once a day unless the server is disabled.
time:local:set 12:34:56 OK time:local:set 12:34:56
Display the offset (in seconds) applied to the local time (default value is 0).
time:offset:get OK time:offset:get 0
Set the offset to change the local time by a certain number of seconds (useful when there is a difference between the time set by the SNTP server and the actual local time)
time:offset:set 3600 OK time:offset:set 3600
Display the sntp server (default value is "time.windows.com" as it seems to be the most commonly accepted server in "protected" environment).
time:sntp:get OK time:sntp:get time.windows.com
Set the sntp server name. The synchronization is done every 24 hours. Set an empty string to disable the sntp synchronization.
Name length is limited to 47, forbidden characters are controls, space and \ / : * ? " ; | and ".".
time:sntp:set time.apple.com OK time:sntp:set time.apple.com
Display the verbose level (default value is 0).
verbose:get OK verbose:get 0
verbose:set <0 | 1 | 2 | 3 | 4>
Set the verbose level.
verbose:set 4 OK verbose:set 4
Display the listening state for CEC (default value is 0)
cec:listen:get OK cec:listen:get 0
cec:listen:set <0 | 1 | >
Set the listening state for CEC. No parameter equals to 0.
cec:listen:set 1 OK cec:listen:set 1
cec:send [<bus_id>] <cec_string>
Send a CEC command on a bus. Currently only one bus is supported (bus_id = "A") and cec_string is byte:byte:byte...
cec:send A FF:36 OK cec:send A
Read the DDC information on a bus. Currently only one bus is supported (bus_id = "A") and page_no is the ddc page number.
ddc:read OK ddc:read A 0 00:ff:ff:ff:ff:ff:ff:00:4c:2d:79:05:00:00:00:00:0b:13:01:03:80:10 :09:78:0a:35:81:a6:56:48:9a:24:12:50:54:bf:ef:80:71:4f:81:40:81:80:a9:40:81:00:b3 :00:95:00:01:01:02:3a:80:18:71:38:2d:40:58:2c:45:00:a0:5a:00:00:00:1e:01:1d:00:bc :52:d0:1e:20:b8:28:55:40:a0:5a:00:00:00:1e:00:00:00:fd:00
Reboot the device in the upgrade mode. The telnet session is disconnected and the device waits for a firmware file to be uploaded through XMODEM or the web interface.
reboot:upgrade OK reboot:upgrade Connection closed by foreign host. unix$
goodbye cruel world
Exit from the kwikwai shell.
exit OK exit Connection closed by foreign host. unix$
- Not authentified
- Unknown command
- Too many arguments (8 max.)
- Bad argument
- DDC time out