Zte-MF297D-v1.0 Copy Copiato!
javascript:ftb();function getStatus(){$.ajax({type:"GET",url:"/goform/goform_get_cmd_process",data:{cmd:"Z_PCI,lte_ca_pcell_arfcn,dns_mode,prefer_dns_manual,standby_dns_manual,mcc,mnc,rssi,network_type,wan_lte_ca,lte_rsrp,Z_SINR,rsrq,Z_CELL_ID,Z_eNB_id,lte_ca_pcell_bandwidth,lte_ca_pcell_band,lte_ca_scell_info",multi_data:"1"},dataType:"json",success:function(e){for(signal=e,vars=["Z_PCI","lte_ca_pcell_arfcn","dns_mode","prefer_dns_manual","standby_dns_manual","mcc","mnc","rssi","network_type","wan_lte_ca","lte_rsrp","Z_SINR","rsrq","Z_CELL_ID","Z_eNB_id","lte_ca_pcell_bandwidth","lte_ca_pcell_band","lte_ca_scell_info"],a=0;a<vars.length;a++)window[vars[a]]=e[vars[a]];if(setgraph("rsrp",lte_rsrp,-130,-70),setgraph("rsrq",rsrq,-16,-3),enbid=Math.trunc(Z_eNB_id/256),plmn=mcc.toString()+mnc.toString(),$("#enbid").html(enbid),"22201"==plmn&&(plmn="2221"),"22299"==plmn&&(plmn="22288"),"22250"==plmn&&6==enbid.length&&(plmn="22288"),link_lte="https://lteitaly.it/internal/map.php#bts="+plmn+"."+enbid,$("#lteitaly").attr("href",link_lte),ca="ca_activated"==wan_lte_ca?"CA":"","ca_activated"==wan_lte_ca?$("#ca").css("border-color","red"):$("#ca").css("border-color","#bbb"),mode="LTE_A"==network_type?'<span style="color:red">LTE_A</span>':network_type,$("#mode").html(mode),""!=lte_ca_scell_info){ca_v=lte_ca_scell_info.slice(0,-1).split(";"),ca_txt="";for(var a=0;a<ca_v.length;a++)d=ca_v[a].split(","),b=d[2],w=d[4],ca_txt+='<span style="color:red;">B'+b+"</span>(@"+w+"Mhz)+"}else ca_txt="";for(ca_txt=ca_txt.slice(0,-1),lte_ca_scell_info=ca_txt,lte_ca_pcell_band="B"+lte_ca_pcell_band,"manual"==dns_mode&&(dns_mode=prefer_dns_manual+" ,"+standby_dns_manual),dns_mode=dns_mode.replace(/,+$/,""),dns_mode='<span style="color:red;">'+dns_mode+"</span>",a=0;a<vars.length;a++)$("#"+vars[a]).html(window[vars[a]])}})}function err(e,a,n){alert("Communication Error"),console.log(e),console.log(a),console.log(n)}function setgraph(a,n,o,l){x=(n-o)/(l-o)*100,xs=String(x)+String.fromCharCode(37),e="#"+a+"b",$(e).width(xs),$(e).html(a+" : "+n),x<50?$(e).css("background-color","yellow").css("color","black"):(85<x?$(e).css("background-color","orange"):$(e).css("background-color","green")).css("color","white")}function ltebandselection(){var e=prompt("Please input LTE bands number, separated by + char (example 1+3+20).If you want to use every supported bands, write 'AUTO'.\n\nBEWARE! The WEBUI WILL HANG TILL NEXT REBOOT!","AUTO");if(null!=(e=e&&e.toLowerCase())&&""!==e){var a=e.split("+"),n=0;if(all_bands="0x20080800C5","AUTO"===e.toUpperCase())n=all_bands;else{for(var o=0;o<a.length;o++)n+=Math.pow(2,parseInt(a[o])-1);n="0x"+n.toString(16)}$.ajax({type:"GET",url:"/goform/goform_get_cmd_process",data:{cmd:"wa_inner_version,cr_version,RD",multi_data:"1"},dataType:"json",success:function(e){ad=cookWithRequest(cookWithRequest(e.wa_inner_version+e.cr_version)+e.RD),$.ajax({type:"POST",url:"/goform/goform_set_cmd_process",data:{isTest:"false",goformId:"SET_LTE_BAND_LOCK",lte_band_lock:n,AD:ad},success:function(){$("#band").html('<span style="color:green;">OK</span>')},error:err})}})}}function setdns(){var a,e=(e=prompt("Please input 2 dns servers, separated by \",\" (example 1.1.1.1,1.0.0.1).If you want to use PROVIDER settings, write 'AUTO'.","AUTO"))&&e.toLowerCase();null!=e&&""!==e&&(a=e.split(","),dns_mode="auto"===e?"auto":"manual",$.ajax({type:"GET",url:"/goform/goform_get_cmd_process",data:{cmd:"wa_inner_version,cr_version,RD",multi_data:"1"},dataType:"json",success:function(e){ad=cookWithRequest(cookWithRequest(e.wa_inner_version+e.cr_version)+e.RD),$.ajax({type:"POST",url:"/goform/goform_set_cmd_process",data:{isTest:"false",goformId:"ROUTER_DNS_SETTING",dns_mode:dns_mode,prefer_dns_manual:a[0],standby_dns_manual:a[1],AD:ad},success:function(){$("#band").html('<span style="color:green;">OK</span>')},error:err})}}))}function lockcell(e,n){$.ajax({type:"GET",url:"/goform/goform_get_cmd_process",data:{cmd:"wa_inner_version,cr_version,RD",multi_data:"1"},dataType:"json",success:function(a){ad=cookWithRequest(cookWithRequest(a.wa_inner_version+a.cr_version)+a.RD),$.ajax({type:"POST",url:"/goform/goform_set_cmd_process",data:{isTest:"false",goformId:"LTE_LOCK_CELL_SET",lte_lockcell_pci:e,lte_lockcell_earfcn:n,AD:ad},success:function(e){console.log(a),console.log(e),j=JSON.parse(e),"success"==j.result?alert("Now you have to Reboot!"):alert("Error. Modem didn't like it!")},error:err})}})}function cslock(){c=Z_PCI+","+lte_ca_pcell_arfcn;var e=prompt("Please input PCI,EARFCN, separated by ',' char (example 116,3350). Leave default for lock on current main band.\n\n\nCurrent cells:\n\n"+getBandsInfo(),c);null!=e&&""!==e&&(e=e.split(","),"YES"==prompt("If you want to remove the lock type 0,0! Now, if you are sure, type YES (!UPPERCASE)")&&lockcell(e[0],e[1]))}function reboot(){$.ajax({type:"GET",url:"/goform/goform_get_cmd_process",data:{cmd:"wa_inner_version,cr_version,RD",multi_data:"1"},dataType:"json",success:function(e){ad=cookWithRequest(cookWithRequest(e.wa_inner_version+e.cr_version)+e.RD),$.ajax({type:"POST",url:"/goform/goform_set_cmd_process",data:{isTest:"false",goformId:"REBOOT_DEVICE",AD:ad},success:function(e){console.log(e)},error:err})}})}function i1(){$.ajax({type:"GET",url:"/goform/goform_get_cmd_process",data:{cmd:"hardware_version,web_version,wa_inner_version,cr_version,RD",multi_data:"1"},dataType:"json",success:function(e){v="HW version:"+e.hardware_version+"\nWEB version:"+e.web_version+"\nWA INNER version:"+e.wa_inner_version,alert(v)}})}function i2(){alert(getBandsInfo())}function getBandsInfo(){if(ca_txt=lte_ca_pcell_band+" - PCI,EARFCN:"+Z_PCI+","+lte_ca_pcell_arfcn,""!=signal.lte_ca_scell_info){ca_v=signal.lte_ca_scell_info.slice(0,-1).split(";");for(var a=0;a<ca_v.length;a++)d=ca_v[a].split(","),b=d[2],e=d[3],p=d[0],ca_txt+="\nB"+b+" - PCI,EARFCN:"+p+","+e}return ca_txt}function ftb(){$(".color_background_blue").css("background-color","#456"),$(".headcontainer").hide(),$("body").prepend('<style> #rsrq, #lte_rsrp, #rssi, #enbid, #Z_SINR, #Z_eNB_id, #lte_ca_pcell_band, #allowed, #a1, #a2 {color: #b00; font-weight: strong; } .f {float: left; border: 1px solid #bbb; border-radius: 5px; padding: 10px; line-height: 2em; margin: 5px; } .f ul {margin: 0; padding: 0; } .f ul li {display: inline; margin-right: 10px; } #mode {margin-right: 0 !important; } #enbid {font-weight: bold; text-decoration: underline; } .p {border: 1px solid #ccc; width: auto; height: 20px; } .v {height: 20px; } .sb {padding: 10px; border-radius: 10px; display: inline-block; margin: 10px 0 10px 10px; } .v {padding-left: 20px; } .action,.action:hover{font-weight:bolder;background-color: #448;color:white;padding: 10px;border-radius:10px;margin-right:10px; } </style> <div class="p"> <div class="v" id="rsrpb"></div> </div> <div class="p"> <div class="v" id="rsrqb"></div> </div> <div style="display:block;overflow: auto;"> <div class="f"> <ul> <li>RSRP:<span id="lte_rsrp"></span>dBm</li> <li>RSRQ:<span id="rsrq"></span>dB</li> <li>RSSI:<span id="rssi"></span>dBm</li> <li>SINR:<span id="Z_SINR"></span>dB</li> </ul> </div> <div class="f" id="ca"> <ul> <li id="mode">Che la banda sia con te! Miononno ♥</li> </ul> </div> <div class="f"> <ul> <li>ENB ID:<a id="lteitaly" target="lteitaly" href="#"><span id="enbid">#</span></a></li> <li>CELL ID:<span id="Z_eNB_id">#</span></li> </ul> </div> <div class="f"> <ul> <li>MAIN:<span id="lte_ca_pcell_band"></span>(<span id="lte_ca_pcell_bandwidth"></span>Mhz)</li> <li>CA:<span id="lte_ca_scell_info"></span></li> </ul> </div> </div> <div style="display:block;overflow: auto;"> <div class="f"> <ul> <li><a class="action" onclick="ltebandselection()">SET BANDS</a></li> <li><a class="action" onclick="cslock()">CELL LOCK</a></li> <li><a class="action" onclick="setdns()">DNS MODE</a><span id="dns_mode"></span></li> <li>•</li> <li><a class="action" onclick="reboot()">! REBOOT !</a></li> </div> <div class="f"> <ul> <li><a class="action" onclick="i1()">VERSION</a></li> <li><a class="action" onclick="i2()">INFO BANDS</a></li> </ul> </div> <div class="f"> <ul> <li><a href="#voip_setting">voice</a></li> <li><a href="#configuragtion">config</a></li> </ul> </div> </div>')}signal="",version="1.0",console.log("Code by Miononno - v"+version),console.log("type: signal"),window.setInterval(getStatus,2500);