1<?php
2
3/**
4 * Observium
5 *
6 *   This file is part of Observium.
7 *
8 * @package    observium
9 * @subpackage poller
10 * @copyright  (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
11 *
12 */
13
14///////////// Senao Access Points (tested with ECB-9500)
15
16// Yes, that's the Kenel version.
17$kenelversion = snmp_get($device, 'entKenelVersion.0', '-OQv', 'SENAO-ENTERPRISE-INDOOR-AP-CB-MIB');
18
19if ($kenelversion)
20{
21  // Only fetch app version when we found a Kenel Version.
22  $appversion = snmp_get($device, 'entAppVersion.0', '-OQv', 'SENAO-ENTERPRISE-INDOOR-AP-CB-MIB');
23  $version = "Kernel $kenelversion / Apps $appversion";
24}
25
26$hwversion = trim(snmp_get($device, 'entHwVersion.0', '-OQv', 'SENAO-ENTERPRISE-INDOOR-AP-CB-MIB'),'" .');
27
28// There doesn't seem to be a real hardware identification.. sysName will have to do?
29// On Engenius APs this is changeable in the system properties!
30$hardware = str_replace('EnGenius ', '', $poll_device['sysName']) . ($hwversion == '' ? '' : ' v' . $hwversion);
31if ($hardware[0] != 'E') { $hardware = ''; } // If the user has changed sysName, don't use it as hardware. Silly check, will work in 99% of cases?
32
33// Operational mode
34$mode = snmp_get($device, 'entSysMode.0', '-OQv', 'SENAO-ENTERPRISE-INDOOR-AP-CB-MIB');
35switch ($mode)
36{
37  case 'ap-router':
38    $features = 'Router mode';
39    break;
40  case 'repeater':
41    $features = 'Universal repeater mode';
42    break;
43  case 'ap-bridge':
44    $features = 'Access Point mode';
45    break;
46  case 'client-bridge':
47    $features = 'Client Bridge mode';
48    break;
49  case 'client-router':
50    $features = 'Client router mode';
51    break;
52  case 'wds-bridge':
53    $features = 'WDS Bridge mode';
54    break;
55  default:
56    $features = '';
57    break;
58}
59
60///////////// Engenius Access Points (tested with ECB-350)
61
62if ($version == '')
63{
64  $version = snmp_get($device, 'modelName.0', '-OQv', 'ENGENIUS-PRIVATE-MIB');
65}
66
67// EOF
68