mirror of
https://github.com/ADElectronics/RTL00_WEB_VS.git
synced 2026-07-01 10:45:40 +00:00
update
This commit is contained in:
parent
6a1f93f17b
commit
764b020238
1201 changed files with 527271 additions and 1 deletions
124
RTLGDB/WEBFiles/protect/scan.htm
Normal file
124
RTLGDB/WEBFiles/protect/scan.htm
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>WiFi Scan</title>
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
</head>
|
||||
<body>
|
||||
~inc:menu.inc~
|
||||
<div class="content">
|
||||
<h2 class="title">
|
||||
<div id="scanResult">Stations scanning...</div>
|
||||
</h2>
|
||||
<table id="aps" class="scan">
|
||||
<tr><th>SSID</th><th>BSSID</th><th>Auth</th><th>Ch</th><th>RSSI</th><th>Hd</th></tr>
|
||||
</table>
|
||||
<form id="stform" style="display: none" method='post' action='timeout.htm'>
|
||||
<table class="form">
|
||||
<tr>
|
||||
<td class="label">Select or input SSID:<input type='hidden' name='wifi_rdcfg' value='0x1C00'></td>
|
||||
<td><input name='wifi_st_ssid' maxlength='31' value='~wifi_st_ssid~' id='inputssid'></td>
|
||||
<td class="label">Type password:</td>
|
||||
<td><input name='wifi_st_psw' maxlength='63' value='~wifi_st_psw~'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">BSSID:</td>
|
||||
<td><input name='wifi_st_bssid' maxlength='31' value='~wifi_st_bssid~' id='inputbsid'></td>
|
||||
<td class="label">AutoConnect:</td>
|
||||
<td><input type='hidden' id='wifi_mode' name='wifi_mode' value='3'>
|
||||
<input type='hidden' id='wifi_st_auth' name='wifi_st_auth' value='6'>
|
||||
<input type='checkbox' id='wifi_st_aucn' name='wifi_st_aucn' value='1' onChange="newMode(this);"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="center">
|
||||
<input type='submit' value='Set Config' class="button">
|
||||
<input type='hidden' name='wifi_newcfg' value='0x1a'>
|
||||
</p>
|
||||
</form>
|
||||
<div id="connection"></div>
|
||||
</div>
|
||||
~inc:footer.inc~
|
||||
</body>
|
||||
<script src="/site.js"></script>
|
||||
<script src="/scripts.js"></script>
|
||||
<script type="text/javascript">
|
||||
var AUTH = {
|
||||
0:"OPEN",
|
||||
1:"WEP PSK",
|
||||
2:"WEP Shared",
|
||||
3:"WPA TKIP",
|
||||
4:"WPA AES",
|
||||
5:"WPA2 TKIP",
|
||||
6:"WPA2 AES",
|
||||
7:"WPA2 Mixed",
|
||||
8:"WPA2/WPA AES",
|
||||
9:"UNKNOWN"};
|
||||
var WPST = {
|
||||
0:"DEFAULT",
|
||||
1:"USER",
|
||||
2:"MACHINE",
|
||||
3:"REKEY",
|
||||
4:"PUSHBUTTON",
|
||||
5:"REGISTRAR",
|
||||
6:"NONE"};
|
||||
var BSST = {
|
||||
0:"INFRA",
|
||||
1:"ADHOC",
|
||||
2:"ANY",
|
||||
3:"UNKNOWN"};
|
||||
var cfg = {
|
||||
wifi_st_aucn: "~wifi_mode~" & 1,
|
||||
wifi_mode: "~wifi_mode~" };
|
||||
setFormValues(document.forms[0], cfg);
|
||||
var startTime = new Date();
|
||||
newAJAXCommand('/web.cgi?wifi_scan=1');
|
||||
setTimeout("newAJAXCommand('scan.xml', updateScan)", 1600);
|
||||
function newMode(Obj) {
|
||||
if (Obj.checked) $("wifi_mode").value = ~wifi_mode~ | 1;
|
||||
else $("wifi_mode").value = ~wifi_mode~;
|
||||
}
|
||||
function updateScan(xmlData) {
|
||||
if(!xmlData) return;
|
||||
var total = getXMLValue(xmlData, 'total');
|
||||
if (total==0) {
|
||||
if((new Date()-startTime)>7000) {
|
||||
startTime = new Date();
|
||||
$('scanResult').innerHTML="Scan failed. Try again.";
|
||||
newAJAXCommand('/web.cgi?wifi_scan=1');
|
||||
}
|
||||
else newAJAXCommand('scan.xml', updateScan);
|
||||
return;
|
||||
}
|
||||
$('scanResult').innerHTML="Scan completed. " + total + " station(s) found.";
|
||||
for(i = 0; i < total; i++){
|
||||
var ap=xmlData.getElementsByTagName('ap')[i];
|
||||
var ch=getXMLValue(ap, 'ch');
|
||||
var au=getXMLValue(ap, 'au');
|
||||
var bsid=getXMLValue(ap, 'bs');
|
||||
var ssid=getXMLValue(ap, 'ss');
|
||||
var rs=getXMLValue(ap, 'rs');
|
||||
var hd=getXMLValue(ap, 'hd');
|
||||
var ws=getXMLValue(ap, 'ws');
|
||||
r=document.all.aps.insertRow();
|
||||
c=r.insertCell(0);c.innerHTML="<a href=# >"+ssid+"</a>";c.ssid=ssid;c.bsid=bsid;c.au=au;c.onclick=onApClick;
|
||||
c=r.insertCell(1);c.innerHTML="<a href=# >"+bsid+"</a>";c.ssid=ssid;c.bsid=bsid;c.au=au;c.onclick=onApClick;c.ondblclick=onInfo;c.title='DoubleClick = MF info';
|
||||
(r.insertCell(2)).innerHTML=AUTH[au];
|
||||
(r.insertCell(3)).innerText=ch;
|
||||
(r.insertCell(4)).innerText=rs;
|
||||
(r.insertCell(5)).innerHTML=BSST[hd];
|
||||
}
|
||||
$('stform').style.display='';
|
||||
}
|
||||
function onApClick() {
|
||||
$('inputssid').value=this.ssid;
|
||||
$('inputbsid').value=this.bsid;
|
||||
$('wifi_st_auth').value=this.au;
|
||||
}
|
||||
function onInfo() {
|
||||
s = this.bsid;
|
||||
s=s.substring(0,8);s=s.replace(':','');
|
||||
document.location.href = "http://standards.ieee.org/cgi-bin/ouisearch?"+s.replace(':','');
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
1
RTLGDB/WEBFiles/protect/scan.xml
Normal file
1
RTLGDB/WEBFiles/protect/scan.xml
Normal file
|
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" encoding="windows-1251"?><response>~xml_scan~</response>
|
||||
97
RTLGDB/WEBFiles/protect/setup.htm
Normal file
97
RTLGDB/WEBFiles/protect/setup.htm
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>RTL871X Setup</title>
|
||||
<link rel="stylesheet" href="../style.css">
|
||||
<script src="/scripts.js"></script>
|
||||
<script src="/site.js"></script>
|
||||
</head><body>
|
||||
~inc:menu.inc~
|
||||
<div class="content">
|
||||
<h2 class="title">System Setup</h2>
|
||||
<form method="post" action="">
|
||||
<table class="form">
|
||||
<tr>
|
||||
<td class="label">WEB (HTTP) port:</td>
|
||||
<td><input title='4..65535, 0 - close' name='cfg_web_port' maxlength='5' value='~cfg_web_port~'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">WEB recved timeout:</td>
|
||||
<td><input title='1...65535 sec, 0 - not limited' name='cfg_web_twrec' maxlength='5' value='~cfg_web_twrec~'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">WEB close timeout:</td>
|
||||
<td><input title='1...65535 sec, 0 - not limited' name='cfg_web_twcls' maxlength='5' value='~cfg_web_twcls~'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">PowerSave Enable:</td>
|
||||
<td>
|
||||
<input type="hidden" name='cfg_sleep' value='0'>
|
||||
<input title='If On - LogUART input disable' type='checkbox' name='cfg_sleep' value='1'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">LogUART Printf() enable:</td>
|
||||
<td>
|
||||
<input type="hidden" name='cfg_debug' value='0'>
|
||||
<input title='rtl_printf enable. If Off - High speed upload (>1Mbytes/s).' type='checkbox' name='cfg_debug' value='1'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Web pcb close enable:</td>
|
||||
<td>
|
||||
<input type="hidden" name='cfg_web_twd' value='0'>
|
||||
<input title='(Proxy) Close web connection and deletes TIME_WAIT pcb' type='checkbox' name='cfg_web_twd' value='1'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Checking pin WiFi cfg reset:</td>
|
||||
<td>
|
||||
<input type="hidden" name='cfg_pinclr' value='0'>
|
||||
<input title='Checking reset configuration level on GPIO3 at startup (25 ms)' type='checkbox' name='cfg_pinclr' value='1'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">NetBIOS enable:</td>
|
||||
<td>
|
||||
<input type="hidden" name='cfg_netbios' value='0'>
|
||||
<input title='NetBIOS AP name = "a~wifi_ap_ssid~", Station = "s~wifi_ap_ssid~"' type='checkbox' name='cfg_netbios' value='1'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">SNTP enable:</td>
|
||||
<td>
|
||||
<input type="hidden" name='cfg_sntp' value='0'>
|
||||
<input title='SNTP: pool.ntp.org' type='checkbox' name='cfg_sntp' value='1'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Captive Portal AP:</td>
|
||||
<td>
|
||||
<input type="hidden" name='cfg_cdns' value='0'>
|
||||
<input type='checkbox' name='cfg_cdns' value='1'>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="center">
|
||||
<input type='hidden' name='uart_save' value='2'>
|
||||
<input type='hidden' name='cfg_save' value='1'>
|
||||
<input type='submit' value='Set Config' class="button">
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
~inc:footer.inc~
|
||||
<script type="text/javascript">
|
||||
var cfg = {
|
||||
cfg_sleep:"~cfg_sleep~",
|
||||
cfg_debug:"~cfg_debug~",
|
||||
cfg_web_twd:"~cfg_web_twd~",
|
||||
cfg_pinclr:"~cfg_pinclr~",
|
||||
cfg_netbios:"~cfg_netbios~",
|
||||
cfg_sntp:"~cfg_sntp~",
|
||||
cfg_cdns:"~cfg_cdns~",
|
||||
cfg_mdb_reop:"~cfg_mdb_reop~"
|
||||
}
|
||||
setFormValues(document.forms[0], cfg);
|
||||
</script>
|
||||
</body></html>
|
||||
16
RTLGDB/WEBFiles/protect/timeout.htm
Normal file
16
RTLGDB/WEBFiles/protect/timeout.htm
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>RTL871X WIFI</title>
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
<script src="/scripts.js"></script>
|
||||
</head><body onload="reloadTimer.reload(10)">
|
||||
<h3 class="top">RTL871X Built-in Web server <sup>©</sup></h3>
|
||||
<div class="content">
|
||||
<h3>Timeout <span id='timer'>?</span> sec...</h3>
|
||||
* Redirect: <a href='http://~sys_url~/'>http://~sys_url~/</a> *<br><br>
|
||||
<a href='/index.htm'>Main</a>
|
||||
</div>
|
||||
~inc:footer.inc~
|
||||
</body>
|
||||
</html>
|
||||
203
RTLGDB/WEBFiles/protect/wifi.htm
Normal file
203
RTLGDB/WEBFiles/protect/wifi.htm
Normal file
|
|
@ -0,0 +1,203 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=windows-1251">
|
||||
<title>RTL871X WiFi</title>
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
<script src="/scripts.js"></script>
|
||||
</head><body>
|
||||
~inc:menu.inc~
|
||||
<div class="content">
|
||||
<form method='post' action='timeout.htm'>
|
||||
<table class="form">
|
||||
<tr>
|
||||
<td colspan="2"><h2 class="title">WiFi SoftAP</h2></td>
|
||||
<td colspan="2"><h2 class="title">WiFi Station</h2></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Mode:</td>
|
||||
<td><select name='wifi_mode'>
|
||||
<option value='1'>Station</option>
|
||||
<option value='2'>SoftAP</option>
|
||||
<option value='3'>Station+SoftAP</option>
|
||||
</select></td>
|
||||
<td class="label">Status:</td>
|
||||
<td><select name='wifi_st_status'>
|
||||
<option value='0'>Off</option>
|
||||
<option value='1'>Start</option>
|
||||
<option value='2'>ReConnect</option>
|
||||
<option value='3'>Connected</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">IEEE PHY:</td>
|
||||
<td><select name='wifi_bgn'>
|
||||
<option value='1'>802.11b</option>
|
||||
<option value='3'>802.11g</option>
|
||||
<option value='11'>802.11n</option>
|
||||
</select></td>
|
||||
<td class="label">SSID:</td>
|
||||
<td><input name='wifi_st_ssid' maxlength='31' value='~wifi_st_ssid~'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">AP SSID:</td>
|
||||
<td><input name='wifi_ap_ssid' maxlength='31' value='~wifi_ap_ssid~'></td>
|
||||
<td class="label">BSSID:</td>
|
||||
<td><input name='wifi_st_bssid' maxlength='17' value='~wifi_st_bssid~'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Hidden SSID:</td>
|
||||
<td>
|
||||
<input type='hidden' name='wifi_ap_hssid' value='0'>
|
||||
<input type='checkbox' name='wifi_ap_hssid' value='1'>
|
||||
</td>
|
||||
<td class="label">Use BSSID:</td>
|
||||
<td>
|
||||
<input type='hidden' name='wifi_st_sbss' value='0'>
|
||||
<input type='checkbox' name='wifi_st_sbss' value='1'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">AP Password:</td>
|
||||
<td><input name='wifi_ap_psw' maxlength='63' value='~wifi_ap_psw~'></td>
|
||||
<td class="label">Password:</td>
|
||||
<td><input name='wifi_st_psw' maxlength='63' value='~wifi_st_psw~'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Channel:</td>
|
||||
<td><select name='wifi_ap_chl'>
|
||||
<option value='0'>auto</option>
|
||||
</select></td>
|
||||
<td class="label">Auth Mode:</td>
|
||||
<td><select name='wifi_st_auth'>
|
||||
<option value='0'>OPEN</option>
|
||||
<option value='1'>WEP PSK</option>
|
||||
<option value='2'>WEP Shared</option>
|
||||
<option value='3'>WPA TKIP</option>
|
||||
<option value='4'>WPA AES</option>
|
||||
<option value='5'>WPA2 TKIP</option>
|
||||
<option value='6'>WPA2 AES</option>
|
||||
<option value='7'>WPA2 Mixed</option>
|
||||
<option value='8'>WPA2/WPA AES</option>
|
||||
<option value='9'>UNKNOWN</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Auth Mode:</td>
|
||||
<td><select name='wifi_ap_auth'>
|
||||
<option value='0'>OPEN</option>
|
||||
<option value='1'>WPA_WPA2_PSK</option>
|
||||
</select></td>
|
||||
<td class="label">Gateway:</td>
|
||||
<td><input name='wifi_st_gw' maxlength='31' value='~wifi_st_gw~'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">IP:</td>
|
||||
<td><input name='wifi_ap_ip' maxlength='31' value='~wifi_ap_ip~'></td>
|
||||
<td class="label">Subnet Mask:</td>
|
||||
<td><input name='wifi_st_msk' maxlength='31' value='~wifi_st_msk~'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Subnet Mask:</td>
|
||||
<td><input type='text' name='wifi_ap_msk' maxlength='31' value='~wifi_ap_msk~'></td>
|
||||
<td class="label">AutoReConnect:</td>
|
||||
<td><input name='wifi_st_arec' title='Reconnect Count 1..255.' maxlength='4' value='~wifi_st_arec~'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Gateway:</td>
|
||||
<td><input name='wifi_ap_gw' maxlength='31' value='~wifi_ap_gw~'></td>
|
||||
<td class="label">ReConnectPause:</td>
|
||||
<td><input name='wifi_st_rect' title='Reconnect pause 1..255 sec.' maxlength='4' value='~wifi_st_rect~'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">MAC:</td>
|
||||
<td><input name='wifi_ap_mac' maxlength='17' value='~wifi_ap_mac~'></td>
|
||||
<td class="label">MAC:</td>
|
||||
<td><input name='wifi_st_mac' maxlength='17' value='~wifi_st_mac~'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">DHCP:</td>
|
||||
<td>
|
||||
<input type='hidden' name='wifi_ap_dhcp' value='0'>
|
||||
<input type='checkbox' name='wifi_ap_dhcp' value='1'>
|
||||
</td>
|
||||
<td class="label">DHCP:</td>
|
||||
<td><select name='wifi_st_dhcp'>
|
||||
<option value='0'>DHCP Off</option>
|
||||
<option value='1'>DHCP On</option>
|
||||
<option value='2'>Static IP</option>
|
||||
<option value='3'>Auto fix</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Country Code:</td>
|
||||
<td><input name='wifi_country' maxlength='10' value='~wifi_country~'></td>
|
||||
<td class="label">RSSI:</td>
|
||||
<td>~wifi_st_rssi~ dB</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">RF Tx Power:</td>
|
||||
<td><select name='wifi_txpow'>
|
||||
<option value='0'>100%</option>
|
||||
<option value='1'>75%</option>
|
||||
<option value='2'>50%</option>
|
||||
<option value='3'>25%</option>
|
||||
<option value='4'>12.5%</option>
|
||||
</select></td>
|
||||
<td class="label">IP:</td>
|
||||
<td><input type='text' title='Static ip, if dhcp: off' name='wifi_st_ip' maxlength='31' value='~wifi_st_ip~'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Beacon (ms):</td>
|
||||
<td><input title='100...60000' name='wifi_ap_bint' maxlength='5' value='~wifi_ap_bint~'></td>
|
||||
<td class="label">PowerSave:</td>
|
||||
<td><select name='wifi_st_sleep'>
|
||||
<option value='0'>Sleep Off</option>
|
||||
<option value='1'>IPS</option>
|
||||
<option value='2'>LPS</option>
|
||||
<option value='3'>IPS/LPS</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Max connections:</td>
|
||||
<td><input title='1..3, Default: 3.' name='wifi_ap_mcns' maxlength='1' value='~wifi_ap_mcns~'></td>
|
||||
<td class="label">LPS DTIM:</td>
|
||||
<td><input title='0 - Sleep Off, 1..255 - Sleep On. 1..255 - DTIM.' name='wifi_st_dtim' maxlength='5' value='~wifi_st_dtim~'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">AP Host Name:</td>
|
||||
<td><input title='DHCP, NetBIOS name' name='wifi_ap_hostname' maxlength='16' value='~wifi_ap_hostname~'></td>
|
||||
<td class="label">ST Host Name:</td>
|
||||
<td><input title='DHCP, NetBIOS name' name='wifi_st_hostname' maxlength='16' value='~wifi_st_hostname~'></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="center">
|
||||
<input type='submit' value='Set Config' class="button">
|
||||
<input type='hidden' name='wifi_newcfg' value='0xffff'>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
~inc:footer.inc~
|
||||
<script type="text/javascript">
|
||||
var chlnum = document.forms[0].wifi_ap_chl;
|
||||
for (var i=1; i < 14; i++) {
|
||||
chlnum.options[i] = new Option(((i<10)?'0':'')+i,i);
|
||||
}
|
||||
var cfg = {
|
||||
wifi_mode:"~wifi_cmode~",
|
||||
wifi_st_status: "~wifi_st_status~",
|
||||
wifi_ap_chl:"~wifi_ap_chl~",
|
||||
wifi_ap_auth:"~wifi_ap_auth~",
|
||||
wifi_bgn:"~wifi_bgn~",
|
||||
wifi_st_sleep:"~wifi_st_sleep~",
|
||||
wifi_st_auth:"~wifi_st_auth~",
|
||||
wifi_st_sbss:"~wifi_st_sbss~",
|
||||
wifi_ap_hssid:"~wifi_ap_hssid~",
|
||||
wifi_ap_dhcp:"~wifi_ap_dhcp~",
|
||||
wifi_txpow:"~wifi_txpow~",
|
||||
wifi_st_dhcp:"~wifi_st_dhcp~"
|
||||
}
|
||||
setFormValues(document.forms[0], cfg);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue