50
Advanced Operation
3. Use the
save device-edid
command to save the EDID of the sink device (attached
to the decoder) to the Management Platform, using the following convention:
save device-edid [id] [filename]
Make sure to replace
[id]
with the identifier of the sink device containing the EDID
you wish to capture. You can specify either a MAC address or a name identifier.
Follow the identifier with the name of the EDID file. For example:
zyper$ save device-edid SonyXBR4 myEDID
4. After executing this command, two files will be created under the following directory:
/srv/ftp/files/myEDID
/srv/ftp/files/myEDID.txt
myEDID
is a binary EDID data file in standard format.
myEDID.txt
contains
the decoded EDID in standard ASCII text.
These files must remain in this directory when disabling Auto EDID mode.
5. To force a ZyPer encoder to use the saved EDID you need to have the MP load the
binary EDID file onto the desired encoder.
zyper$ load encoder-edid [id] [filename]
Make sure to replace
[id]
with the identifier of the source device you want to load the
EDID onto. You can specify either a MAC address or a name identifier.
Follow the identifier with the name of the EDID file. For example:
zyper$ load encoder-edit BlueRay1 myEDID
6. To return to Auto EDID mode, for any reason, enter the following command at the
prompt:
zyper$ set server auto-edid-mode enabled
51
Advanced Operation
Using AJAX/JSON
The AJAX/JSON programming interface allows developers to control the Management
Platform within browser-based applications. All calls to the server are asynchronous post/
receive operations using Javascript and do not require any specific HTML or CSS code.
We will present two examples in this section: Login authentication and command request/
response.
Login Authentication
There are two methods to authenticate with the server. The first and recommended method
is to pass the username and password to
rcLogin.php
. The second method is to pass
the username and password in every AJAX request.
Once the server accepts the username and password, it will generate a secure cookie
called “userToken”. This cookie will expire one hour after the last AJAX command is
received by the server. After the cookie expires, all other AJAX requests will result in a
failed authentication until
rcLogin.php
is called again. The following code excerpt is from
the
zyperLogin()
function within
zyper.html
:
...
...
xmlhttp=new XMLHttpRequest();
xmlhttp.onreadystatechange = function(){
if (xmlhttp.readyState == 4 && xmlhttp.status == 200){
procLoginResp(xmlhttp.responseText);
}
}
postdata = “”;
po= encodeURIComponent(“serverSocketName”) + ‘=’ +
encodeURIComponent(socketName) + ‘&’ +
encodeURIComponent(“username”) + ‘=’ +
encodeURIComponent(username) + ‘&’ +
encodeURIComponent(“password”) + ‘=’ +
encodeURIComponent(password) + ‘&’;
xmlhttp.open(“POST”, url, true);
xmlhttp.setRequestHeader(“Content-Type”, “application/x-www-form-
urlencoded”);
xmlhttp.send(postdata);
}
The response is a string value. The variable
resp
can be “Success”, “Failed”, or “Server
not running”.
function procLoginResp(jsonData) {
var resp = JSON.parse(jsonData);
...
...
Содержание ZyPer
Страница 1: ...User Manual Updated March 2017 ZyPer Management Platform...
Страница 5: ...1 Getting Started...