Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
tips:airos [2019/02/28 10:03] – created scipio | tips:airos [2019/03/15 11:24] (current) – [SNMP] scipio | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== AirOS ====== | ====== AirOS ====== | ||
+ | |||
+ | ===== SNMP ===== | ||
+ | |||
+ | < | ||
+ | snmpwalk -c lessinianet.snmp -v 1 10.210.12.249 IF-MIB:: | ||
+ | IF-MIB:: | ||
+ | IF-MIB:: | ||
+ | IF-MIB:: | ||
+ | IF-MIB:: | ||
+ | IF-MIB:: | ||
+ | IF-MIB:: | ||
+ | IF-MIB:: | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | snmpget -c lessinianet.snmp -v 1 10.210.12.249 IF-MIB:: | ||
+ | IF-MIB:: | ||
+ | </ | ||
+ | |||
+ | Cercando dalla prima query i " | ||
+ | |||
+ | ===== http API ===== | ||
+ | |||
<code php> | <code php> | ||
<?php | <?php | ||
- | // airOS-getFile_HTTPS() from Omniflux: | + | // airOS-getFile_HTTP() from Omniflux: |
// https:// | // https:// | ||
Line 10: | Line 33: | ||
// the output is a bunch of JSON with the current radio stats | // the output is a bunch of JSON with the current radio stats | ||
- | // airOS_getFile_HTTPS | + | // airOS_getFile_HTTP |
- | $out = airOS_getFile_HTTPS | + | |
+ | #$out = airOS_getFile_HTTP | ||
+ | #$out = airOS_getFile_HTTP (" | ||
+ | $out = airOS_getFile_HTTP (" | ||
print $out; | print $out; | ||
- | function | + | function |
{ | { | ||
Line 27: | Line 53: | ||
// Login AirOS >= 8.5.0+ OR get cookie with session ID for AirOS < 8.5.0 | // Login AirOS >= 8.5.0+ OR get cookie with session ID for AirOS < 8.5.0 | ||
- | curl_setopt ($ch, CURLOPT_URL, | + | curl_setopt ($ch, CURLOPT_URL, |
curl_setopt ($ch, CURLOPT_POST, | curl_setopt ($ch, CURLOPT_POST, | ||
curl_setopt ($ch, CURLOPT_POSTFIELDS, | curl_setopt ($ch, CURLOPT_POSTFIELDS, | ||
Line 43: | Line 69: | ||
preg_match ('/ | preg_match ('/ | ||
- | curl_setopt ($ch, CURLOPT_URL, | + | curl_setopt ($ch, CURLOPT_URL, |
curl_setopt ($ch, CURLOPT_POST, | curl_setopt ($ch, CURLOPT_POST, | ||
$retfile = curl_exec ($ch); | $retfile = curl_exec ($ch); | ||
- | curl_setopt ($ch, CURLOPT_URL, | + | curl_setopt ($ch, CURLOPT_URL, |
curl_setopt ($ch, CURLOPT_HTTPHEADER, | curl_setopt ($ch, CURLOPT_HTTPHEADER, | ||
curl_setopt ($ch, CURLOPT_POST, | curl_setopt ($ch, CURLOPT_POST, | ||
Line 57: | Line 83: | ||
else | else | ||
{ | { | ||
- | curl_setopt ($ch, CURLOPT_URL, | + | curl_setopt ($ch, CURLOPT_URL, |
curl_setopt ($ch, CURLOPT_POST, | curl_setopt ($ch, CURLOPT_POST, | ||
curl_setopt ($ch, CURLOPT_POSTFIELDS, | curl_setopt ($ch, CURLOPT_POSTFIELDS, | ||
curl_exec ($ch); | curl_exec ($ch); | ||
- | curl_setopt ($ch, CURLOPT_URL, | + | curl_setopt ($ch, CURLOPT_URL, |
curl_setopt ($ch, CURLOPT_POST, | curl_setopt ($ch, CURLOPT_POST, | ||
$retfile = curl_exec ($ch); | $retfile = curl_exec ($ch); | ||
Line 71: | Line 97: | ||
return $retfile; | return $retfile; | ||
} | } | ||
- | |||
?> | ?> | ||
Line 613: | Line 638: | ||
" | " | ||
} | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | |||
+ | risposta CPE | ||
+ | <code javascript> | ||
+ | { " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
} | } | ||
</ | </ |