NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

// Copyright (C) GCT Semiconductor, Inc.
//

var status_url="/status";
var cmd_url="/cmd";

var timeout;

var defaults = {
InterfaceType: "lte",
IMSI: "-",
UICCID: "0",
IMEI: "0",
IMEISV: "0",
DeviceName: "Modem Yota",
RfVersion: "",
AsicVersion: "",
FirmwareVersion: "-",
State: "Check Modem",
UpdateState: "",
UpdateProgress: 0,
ConnectedTime: 0,
NextConnectTime: 0,
ConnectingPhase: "",
SINR: 0,
RSSI: 0,
MCC: "",
MNC: "",
PLMN: "",
RoamingStatus: 0,
ECGI: "",
CGI: "-",
CI: "",
eNBID: "",
HNBN: "",
CSGT: "",
CenterFreq: 0,
TxPWR: 0,
SPN: "",
SessionID: 0,
IsIdle: 0,
IP: "-",
SubnetMask: "",
DefaultGateway: "",
DHCP: "",
DNS: "",
SentBytes: 0,
ReceivedBytes: 0,
MaxDownlinkThroughput: 0,
MaxUplinkThroughput: 0,
CurDownlinkThroughput: 0,
CurUplinkThroughput: 0,
TotalHandoversCount: 0,
SucceededHandoversCount: 0,
IsReadyForUpdate: 0,
NewFirmwareVersion: "",
RSRP: 0,
RSRQ: 0,
SupportsConnectDisabling: 0
};

// Parse yota-access response

function bps(val)
{
if (val >= 1000000)
return (val/1000000).toFixed(2) + ' Mbps';
else if (val >= 1000)
return (val/1000).toFixed(0) + ' Kbps';
else
return val + ' bps';
}

function bytes(val)
{
if ((val/(1024 * 1024 * 1024)) >= 1000)
return (val/(1024 * 1024 * 1024 * 1024)).toFixed(2) + ' TB';
else if ((val/(1024 * 1024)) >= 1000)
return (val/(1024 * 1024 * 1024)).toFixed(2) + ' GB';
else if ((val/ 1024) >= 1000)
return (val/(1024 * 1024)).toFixed(2) + ' MB';
else
return (val/1024).toFixed(0) + ' KB';
}

function convertuicc(val)
{
var uicclen = val.length;

if (uicclen==19)
{
return val.substr(8, 10);
}
else if (uicclen==20)
{
return val.substr(9,10);
}

return "0";
}

function convertIMSI(val)
{
var imsiLen = val.length;

if (imsiLen >= 10)
{
return val.substr(imsiLen-10, 10);
}

return val;
}

function wimax_state_english(state)
{
switch (state) {
case 'Check Modem':
state = 'Please Check the Modem';
break;
case 'Off':
state = "Not Connected";
break;
case 'NoNetwork':
state = "Outside of Yota Network";
break;
case 'ConnectError':
state = "Connection Error";
break;
case 'Waiting':
state = 'Waiting for connection';
break;
case 'Connected':
state = 'Connected to Yota';
break;
default:
{
if (state.length >= 14)
{
var comparetext = 'Autoconnecting';
var len = comparetext.length;

if (comparetext == state.substr(0, len))
{
state = state + ' sec';
}
}
}
break;
}

return state;
}

function wimax_state_russian(state)
{
switch (state) {
case 'Check Modem':
//state = 'Проверьте Ваш модем';
state = 'Пожалуйста, проверьте модем';
break;
case 'Off':
state = 'Выключен';
break;
case 'Scanning':
state = 'Сканирование';
break;
case 'NoNetwork':
state = 'Вне сети Yota';
break;
case 'Connecting':
state = 'Подключение';
break;
case 'ConnectError':
state = 'Ошибка подключения';
break;
case 'Waiting':
state = 'Ожидание подключения';
break;
case 'Connected':
state = 'Подключен к Yota';
break;
default:
{
if (state.length >= 14)
{
var comparetext = 'Autoconnecting';
var len = comparetext.length;

if (comparetext == state.substr(0, len))
{
state = 'Автоподключение: ' + state.substr(len+2, state.length-len+2) + ' сек';
}
}
}
break;
}

return state;
}

function wimax_state_spanish(state)
{
switch (state) {
case 'Check Modem':
//state = 'Compruebe el módem';
state = 'Por favor, marque el módem';
break;
case 'Off':
state='No conectado';
break;
case 'Scanning':
state='Exploración';
break;
case 'NoNetwork':
state='Fuera de la red Yota';
break;
case 'Connecting':
state='Conexión';
break;
case 'ConnectError':
state = 'Conecte un error';
break;
case 'Waiting':
state = 'De espera para la conexión';
break;
case 'Connected':
state='Conectado a Yota';
break;
default:
break;
}

return state;
}

function wimax_update_state_english(state)
{
switch (state) {
case 'Downloading':
break;

case 'Installing':
break;

case 'NotStarted':
wimax.UpdateState = "Preparing Update";
break;

case 'OK':
wimax.UpdateState = "Completed";
break;

case 'DownloadFail':
break;

case 'InstallFail':
break;
}
}

function wimax_update_state_russian(state)
{
switch (state) {
case 'Downloading':
wimax.UpdateState = "Загрузка обновления";
break;

case 'Installing':
wimax.UpdateState = "Обновление";
break;

case 'NotStarted':
wimax.UpdateState = "Подготовка обновления";
break;

case 'OK':
wimax.UpdateState = "Обновление завершено";
break;

case 'DownloadFail':
wimax.UpdateState = "Ошибка при загрузке";
break;

case 'InstallFail':
wimax.UpdateState = "Ошибка при обновлении";
break;
}
}

function wimax_update_state_spanish(state)
{
switch (state) {
case 'Downloading':
wimax.UpdateState = "Descargando";
break;

case 'Installing':
wimax.UpdateState = "Instalando";
break;

case 'NotStarted':
wimax.UpdateState = "Preparación de Actualización";
break;

case 'OK':
wimax.UpdateState = "Completado";
break;

case 'DownloadFail':
wimax.UpdateState = "Error de Descarga";
break;

case 'InstallFail':
wimax.UpdateState = "Error de Instalación";
break;
}
}

var wimax_state_translate = wimax_state_english;
var wimax_update_state_translate = wimax_update_state_english;

function wimax_response_post_process()
{
with (wimax) {
SentBytes -= 0;
ReceivedBytes -= 0;
//SentPackets -= 0;
//ReceivedPackets -= 0;
MaxDownlinkThroughput -= 0;
MaxUplinkThroughput -= 0;
CurDownlinkThroughput -= 0;
CurUplinkThroughput -= 0;
TotalHandoversCount -= 0;
SucceededHandoversCount -= 0;
}
if (wimax.UICCID=="")
wimax.UICCID="0";
if (wimax.MaxDownlinkThroughput < 0 || wimax.MaxUplinkThroughput < 0) {
alert('Max. Throughput negative value: DL=' + wimax.MaxDownlinkThroughput + ' UL=' + wimax.MaxUplinkThroughput);
}

wimax.SentBytes = bytes(wimax.SentBytes);
wimax.ReceivedBytes = bytes(wimax.ReceivedBytes);
wimax.DLCurrentSpeed = bps(wimax.CurDownlinkThroughput);
wimax.ULCurrentSpeed = bps(wimax.CurUplinkThroughput);
wimax.DLMaxSpeed = bps(wimax.MaxDownlinkThroughput);
wimax.ULMaxSpeed = bps(wimax.MaxUplinkThroughput);
wimax.UICC = convertIMSI(wimax.IMSI);
// State to StateName
wimax.StateName = wimax_state_translate(wimax.State);
}

var install_progress = 0;
var reported_update_state;

function wimax_update_page()
{
// Switcher
/*if (wimax.State == "Off")
$('#switcher').addClass('off');
else
$('#switcher').removeClass('off');*/

// Update button
if (wimax.State == 'Connected' && wimax.IsReadyForUpdate == '1')
$('#reload').show();
else
$('#reload').hide();

reported_update_state = wimax.UpdateState;
wimax_update_state_translate(wimax.UpdateState);

for (property in wimax) {
//$("span#"+property).html(wimax[property]);
$("span[id="+property+"]").html(wimax[property]);
}

if (wimax.NSPID == "61") {
$('#skype').html("YSupport");
$('#phone').hide();
$('#mobile').html("+505 225 38 225");
} else {
$('#phone').hide();
}

wimax.UpdateState = reported_update_state;

// FW update
switch (wimax.UpdateState) {
case 'Downloading':
/*case 'Installing':*/
if (wimax.UpdateProgress) {
install_progress = 0;
}
break;

case 'Installing':
install_progress = (install_progress + 20) % 100;
break;

case 'NotStarted':
if ($('a.close').hasClass('finished') || wimax.IsReadyForUpdate == 0)
$('#load').fadeOut("slow");
break;

case 'OK':
$('a.close').addClass('finished');
break;

case 'DownloadFail':
case 'InstallFail':
$('a.close').addClass('finished');
break;

default:
break;
}

if ($('a.close').hasClass('finished')) {
$('#loading-bar').hide();
$('#notice').hide();
$('a.close').show();
}
}

function parse_response(response, status, xhr)
{
var str = response.replace(/n/g, "', ");

str = str.replace(/=/g, ":'");
str = str.substring(0, str.lastIndexOf(','));

for (i=0; i< str.length; i++)
{
str = str.replace("3GPP.", "");
str = str.replace("UICC-", "UICC");
}

try {
wimax = eval('( {' + str + '} )');
wimax = $.extend(true, {}, defaults, wimax);
wimax_response_post_process();
wimax_update_page();
} catch (e) {
;
}

timeout = setTimeout(function() {
$.get(status_url, function(data, status, xhr) {
parse_response(data, status, xhr);
xhr.onreadystatechange = null;
xhr.abort = null;
xhr = null;
data = null;
});
}, 1000);
str = null;
}

function redirect()
{
var code = $('meta#lang').attr('content');

switch (code) {
case "es": /* Spanish */
wimax_state_translate = wimax_state_spanish;
wimax_update_state_translate = wimax_update_state_spanish;
break;
case "ru": /* Russian */
$('#header-bar .YADown').show();
wimax_state_translate = wimax_state_russian;
wimax_update_state_translate = wimax_update_state_russian;
break;
case "bru":
$('#header-bar .YADown').hide();
wimax_state_translate = wimax_state_russian;
wimax_update_state_translate = wimax_update_state_russian;
break;
case "ben":
$('#header-bar .YADown').hide();
wimax_state_translate = wimax_state_english;
wimax_update_state_translate = wimax_update_state_english;
break;
default: /* Others - English */
$('#header-bar .YADown').show();
wimax_state_translate = wimax_state_english;
wimax_update_state_translate = wimax_update_state_english;
break;
}
}

function yota_website()
{
var code = $('meta#lang').attr('content');

switch (wimax.NSPID) {
case '61': // Nicaragua
window.location.assign("http://yota.com.ni/");
break;
default: // Russia
switch (code) {
case "ru": /* Russian */
window.location.assign("http://www.yota.ru/ru/");
break;
case "bru":
window.location.assign("http://www.yota.by/");
break;
case "ben":
window.location.assign("http://www.yota.by/en/");
break;
default: /* Others - English */
window.location.assign("http://www.yota.ru/en/");
break;
}
break;
}
code = null;
}

function skype_connection()
{
switch (wimax.NSPID) {
case '61': // Nicaragua
window.location.replace("skype:YSupport?call");
break;
default: // Russia
window.location.replace("skype:yota.russia?call");
break;
}
}

function YA_download_site()
{
var code = $('meta#lang').attr('content');

switch (wimax.NSPID) {
case '61': // Nicaragua
window.location.assign("http://yota.com.ni/es/devices/modems/key/");
break;
default: // Russia
switch (code) {
case "ru": /* Russian */
window.location.assign("http://www.yota.ru/ru/devices/download/");
break;
case "bru":
window.location.assign("http://www.yota.by/ru/devices/download/");
break;
case "ben":
window.location.assign("http://www.yota.by/en/devices/download/");
break;
default: /* Others - English */
window.location.assign("http://www.yota.ru/en/devices/download/");
break;
}
break;
}
code = null;
}

var wimax = {};
$(function() {

// Default ajax options - disable browser cache
$.ajaxSetup({cache: false, timeout:2000});

$('body').ajaxError(function(e, xhr, options, exception) {
clearTimeout(timeout);
parse_response("", status, xhr);
});

$.get(status_url, function(data, status, xhr) {
parse_response(data, status, xhr);
$('#page').show();
});


// Language
redirect();

// Welcome screen display based on the value of cookie "welcome".
if ($.cookie("welcome") != 'ok') {
$('#welcome').show();
} else {
$('.shadow').hide();
}

// Button handlers
/*$('#switcher').click(function() {
var action = "enable-connect";

$('#switchholder').toggleClass('off');
if (!$(this).hasClass('off'))
action="disable-connect";
$.post(cmd_url, {action: action}, function(data) {});
});*/

$('#logo').click(function() {
yota_website();
});

$('#skype').click(function() {
skype_connection();
});

$('#dnld').click(function() {
YA_download_site();
});

$('#light').click(function() {
$(this).toggleClass('off');
});
$('#reload').click(function() {
$('#upd').show();
});
$('#manreload').click(function() {
$('#upd1').show();
});

$('#upd .close').click(function() {
$('#upd').hide();
});

$('#upd .nobutton').click(function() {
$('#upd').hide();
});

$('#upd .yesbutton').click(function() {
$.post(cmd_url, {action: 'start-update'}, function(data) {});
$('#upd').hide();
$('a.close').removeClass('finished');
$('a.close').hide();
$('#notice').show();
$('#loading-bar').show();
$('div#load').show();
});

$('a.close').click(function() {
$('#load').fadeOut("slow");
});

$('#welcomewin a#welcomeclose').click(function() {
$.cookie('welcome', 'ok', {expires: 365*100, path:'/'});
$('.shadow').hide();
});

$('a.select').click(function() {
$('a.okinst').addClass('enabled');
$('.fileholder').addClass('fileselected');
});

// IE does not understand 'div#lang'
$('div[id=lang] a').attr('href', "#");

$('div[id=lang] a').click(function() {
$('body').hide();
clearTimeout(timeout);
var lang = $(this).attr('id');
$.cookie('lang', lang, {Path: '/'});

window.location.reload();
});
});
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.