Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Class: Router
#1
This thread is for discussion of the Router device class. Most any router these days is controllable via this or that type of protocol.

[to be done]
Dean Roddey
Explorans limites defectum
Reply
#2
(reserved for expansion)
Dean Roddey
Explorans limites defectum
Reply
#3
(reserved for expansion 2)
Dean Roddey
Explorans limites defectum
Reply
#4
(reserved for expansion 3)
Dean Roddey
Explorans limites defectum
Reply
#5
I haven't really been able to control any routers to date, with the exception of maybe SNMP. But there isn't much you can control with it except to get stats. I suppose you could write HTTP based drivers for a lot of them, not sure how much you can standardize. A lot of routers do support UPnP which might be another mechanism for controlling things like setup up port forwards.

You have the physical:
Port Up/Down (Probably Read Only)
Port Througput (bps NOT Bps) - Again read only
Port Errors

Might want read only fields for info fields:
Public IP Address, Name, Model, etc.

Device Info:
CPU, Memory

WiFi Info:
SSID
Signal Levels

Here is a sample SNMP config file for an OpenWRT (Linux based) router...
Code:
<!-- System Identification -->

    <!-- System Uptime -->
    <SNMPObject>
        <FieldName>Uptime</FieldName>
        <OID>.1.3.6.1.2.1.1.3.0</OID>
        <CQCType>String</CQCType>
        <StringType>Interval</StringType>
        <IntervalFormat>%(D) Days, %(H) Hours, %(M) Mins</IntervalFormat>
    </SNMPObject>

    <!-- System Name -->
    <SNMPObject>
        <FieldName>Name</FieldName>
        <OID>.1.3.6.1.2.1.1.5.0</OID>
        <CQCType>String</CQCType>
    </SNMPObject>

    <!-- System Location -->
    <SNMPObject>
        <FieldName>Location</FieldName>
        <OID>.1.3.6.1.2.1.1.6.0</OID>
        <CQCType>String</CQCType>
    </SNMPObject>

    <!-- System Description -->
    <SNMPObject>
        <FieldName>Description</FieldName>
        <OID>.1.3.6.1.2.1.1.1.0</OID>
        <CQCType>String</CQCType>
    </SNMPObject>

<!-- Memory Info -->

    <!-- Total Memory -->
    <SNMPObject>
        <FieldName>MemTotal</FieldName>
        <OID>.1.3.6.1.4.1.2021.4.5.0</OID>
        <CQCType>Card</CQCType>
    </SNMPObject>

    <!-- Free Memory -->
    <SNMPObject>
        <FieldName>MemFree</FieldName>
        <OID>.1.3.6.1.4.1.2021.4.11.0</OID>
        <CQCType>Card</CQCType>
    </SNMPObject>

    <!-- % Mem Util -->
    <SNMPObject>
        <FieldName>MemUtil</FieldName>
        <OID>.1.3.6.1.4.1.2021.4.11.0</OID>
        <CQCType>Card</CQCType>
        <InCalc>100-%(V)/$(Router.MemTotal)</InCalc>
    </SNMPObject>

<!-- CPU Info -->
    <!-- % CPU Util 1 Minute Avg -->
    <SNMPObject>
        <FieldName>CPUAvgUtil</FieldName>
        <OID>1.3.6.1.4.1.2021.10.1.3.1</OID>
        <CQCType>Card</CQCType>
    </SNMPObject>

    <!-- % CPU Util User -->
    <SNMPObject>
        <FieldName>CPUUser</FieldName>
        <OID>.1.3.6.1.4.1.2021.11.10.0</OID>
        <CQCType>Card</CQCType>
    </SNMPObject>

    <!-- % CPU Util System -->
    <SNMPObject>
        <FieldName>CPUSystem</FieldName>
        <OID>.1.3.6.1.4.1.2021.11.10.0</OID>
        <CQCType>Card</CQCType>
    </SNMPObject>

    <!-- % CPU Util Idle -->
    <SNMPObject>
        <FieldName>CPUIdle</FieldName>
        <OID>.1.3.6.1.4.1.2021.11.11.0</OID>
        <CQCType>Card</CQCType>
    </SNMPObject>

<!-- Interface Info -->

    <!-- IP Address Table (Static) -->
    <SNMPObject>
        <FieldName>IPAddress-%(i)</FieldName>
        <OID>1.3.6.1.2.1.4.20.1.1</OID>
        <OIDType>StaticTable</OIDType>
        <CQCType>String</CQCType>
    </SNMPObject>

    <!-- Interface Table (Static) -->
    <SNMPObject>
        <FieldName>Interface-%(i)</FieldName>
        <OID>1.3.6.1.2.1.2.2.1.2</OID>
        <OIDType>StaticTable</OIDType>
        <CQCType>String</CQCType>
        <XLAT>Loopback,lo,Ethernet0,eth0,Ethernet1,eth1,LAN,br0,WAN,ppp0</XLAT>
    </SNMPObject>

    <!-- Interface In Utilization Table kbps (Static) -->
    <SNMPObject>
        <FieldName>InUtil-%(i)</FieldName>
        <OID>1.3.6.1.2.1.2.2.1.10</OID>
        <OIDType>StaticTable</OIDType>
        <CQCType>Card</CQCType>
        <InCalc>%(V)*8/1000</InCalc>
    </SNMPObject>

    <!-- Interface Out Utilization Table kbps (Static) -->
    <SNMPObject>
        <FieldName>OutUtil-%(i)</FieldName>
        <OID>1.3.6.1.2.1.2.2.1.16</OID>
        <OIDType>StaticTable</OIDType>
        <CQCType>Card</CQCType>
        <InCalc>%(V)*8/1000</InCalc>
    </SNMPObject>

<!-- Connection Info -->
Wuench
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Reply
#6
Yeh, I was figuring probably UPnP would be the scenario generally, but I honestly know little about this area for routers. I just added this as a class just since it was at least a possibility. It's certainly not a priority or anything. It might turn out that there's no really widely supported subset available for most routers (of the sort that expose anything at all), I dunno.

BTW, I had moderation turned on for this forum by accident. I just turned it off so posts should show up immediately now.
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Class: Security Dean Roddey 34 35,415 01-02-2019, 12:26 PM
Last Post: Dean Roddey
  Class: Weather Dean Roddey 6 6,687 10-11-2018, 11:09 AM
Last Post: Dean Roddey
  Class: Thermostat Dean Roddey 17 26,479 01-29-2016, 10:15 AM
Last Post: Dean Roddey
  Class: SceneCtrl Dean Roddey 20 20,827 03-31-2015, 12:38 PM
Last Post: Dean Roddey
  Class: Irrigation Dean Roddey 8 9,530 01-28-2015, 12:09 PM
Last Post: Dean Roddey
  Class: NowPlaying Dean Roddey 8 9,782 09-23-2014, 02:01 PM
Last Post: Dean Roddey
  Class: Switcher Dean Roddey 9 10,625 08-20-2014, 08:17 AM
Last Post: Dean Roddey
  Class: Projector Dean Roddey 29 27,004 08-11-2014, 08:56 AM
Last Post: Dean Roddey
  Class: Lock Dean Roddey 5 7,189 07-31-2014, 01:24 PM
Last Post: Dean Roddey
  Class: ContactClosure Dean Roddey 7 8,739 07-31-2014, 10:14 AM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)