hum, we must have in snmp? could we use string instead numbers? coulbe we create it at runtime?
'client' ask somethink to ow-snmp(daemon) it seek if mib(oid) exist in "snmp file map", if found - work with it, if not - create a new entry (order of filesystem owfs) and put new entries to "snmp file map" after first full read, we have a file with the 'alias'... 2011/1/20 ZIggy <[email protected]>: > Sorry for the long post, but it seems some clarifications are in order. I > think you need to do some basic review of how SNMP works. > <http://www.rzo.free.fr/docs_jean/snmp.pdf> is a reasonable introduction, > but only scratches the surface. > > If you are going to use SNMP, you *will* be using MIBs, OIDs, etc. These are > the fundamentals of SNMP regardless of version (v1, v2c, v3). But If you > want to understand this in a more directly relevant way, download the MIB > for the product that Paul A. referred to from the 'Downloads' tab of the web > page. If you then look at the objects that are defined, you can get some > sense of how this works. > > If you have linux snmp-tools and the standard MIBs installed, you can use > the snmptranslate utility to dump the MIB and see how it's organized. For > example: > > snmptranslate -M /usr/share/mibs/ietf -m ALL -m ./OW_Bridge_MIB_V0.3.mib -T > p .1.3.6.1.4 > > This will start translating the OW_Bridge_MIB beginning at the top of the > EDS branch. The output will illustrate the hierarchy of the MIB: > > +--edsMain(31440) > | > +--edsEnterprise(1) > | | > | +-- -R-- String eCompanyName(1) > | | Textual Convention: DisplayString > | +-- -R-- String eProductName(2) > | | Textual Convention: DisplayString > | +-- -R-- String eMIBVersion(3) > | | Textual Convention: DisplayString > | +-- -R-- String eFirmwareVersion(4) > | | Textual Convention: DisplayString > | +-- -R-- String eFirmwareDate(5) > | Textual Convention: DisplayString > | > +--owTrap(2) > | | > | +--owTrapTable(1) > | | | > | | +--owTrapEntry(1) > | | | Index: owTrapIndex > | | | > | | +-- -R-- INTEGER owTrapIndex(1) > | | +-- -RW- INTEGER owTrapEnable(2) > | | | Range: 0..1 > | | +-- -RW- IpAddr owTrapIP(3) > | | +-- -RW- String owTrapCommunity(4) > | | Textual Convention: DisplayString > | | > | +--owTrapDeviceTable(2) > > and it goes on from there, on to the part where individual devices are > found: > > +--owDevices(10) > | > +--owDeviceTypes(1) > | | > | +--owNone(0) > | | > | +--owUnknown(1) > | | > | +--owDS2406(2) > | | > | +--owDS18B20(3) > | | > | +--owDS18S20(4) > | | > | +--owDS2438(5) > | | > | +--owDS2423(6) > | | > | +--owDS2408(7) > | | > | +--owDS2450(8) > | | > | +--owEDS0064(9) > | | > | +--owEDS0065(10) > | | > | +--owEDS0066(11) > | | > | +--owEDS0067(12) > | | > | +--owEDS0068(13) > | | > | +--owEDS0069(14) > | > +--owDeviceInfo(2) > | | > | +-- -R-- INTEGER owDeviceNumActive(1) > | > +--owDeviceTable(3) > | | > | +--owDeviceEntry(1) > | | Index: owDeviceIndex > | | > | +-- -R-- INTEGER owDeviceIndex(1) > | +-- -R-- INTEGER owDeviceType(2) > | +-- -R-- String owDeviceName(3) > | | Textual Convention: DisplayString > | +-- -R-- String owDeviceDescription(4) > | | Textual Convention: DisplayString > | +-- -R-- String owDeviceFamily(5) > | | Size: 2 > | +-- -R-- String owDeviceROM(6) > | | Size: 16 > | +-- -R-- INTEGER owDeviceHealth(7) > | Range: 0..8 > | > +--owDS2406Table(4) > | | > | +--owDS2406Entry(1) > | | Index: owDeviceIndex > | | > | +-- -R-- EnumVal owDS2406PIOALevel(1) > | | Values: low(0), high(1) > | +-- -R-- EnumVal owDS2406PIOBLevel(2) > | | Values: low(0), high(1) > | +-- -RW- EnumVal owDS2406PIOAFlipFlop(3) > | | Values: low(0), high(1) > | +-- -RW- EnumVal owDS2406PIOBFlipFlop(4) > | | Values: low(0), high(1) > | +-- -R-- EnumVal owDS2406PIOAActivityLatch(5) > | | Values: noActivity(0), yesActivity(1) > | +-- -R-- EnumVal owDS2406PIOBActivityLatch(6) > | | Values: noActivity(0), yesActivity(1) > | +-- -R-- EnumVal owDS2406NumChnls(7) > | | Values: pioAonly(0), pioAandB(1) > | +-- -R-- EnumVal owDS2406PwrSupply(8) > | | Values: pwrParasite(0), pwrExternal(1) > | +-- -RW- EnumVal owDS2406ActivityLatchReset(9) > | Values: noReset(0), yesReset(1) > | > +--owDS18B20Table(5) > | | > | +--owDS18B20Entry(1) > | | Index: owDeviceIndex > | | > | +-- -R-- String owDS18B20Temperature(1) > | | Textual Convention: DisplayString > | +-- -RW- INTEGER owDS18B20UserByte1(2) > | +-- -RW- INTEGER owDS18B20UserByte2(3) > | +-- -R-- EnumVal owDS18B20Resolution(4) > | | Values: nineBits(9), tenBits(10), elevenBits(11), > twelveBits(12) > | +-- -R-- EnumVal owDS18B20PwrSupply(5) > | Values: parasitePower(0), externalPower(255) > > This is how the MIB defines the OIDs that are used in the SNMP commands and > responses between the SNMP manager and the SNMP agent. All the other labels > are for us humans. If you follow this hierarchy down, you will see how this > whole tree is traversed to build the OID. For example: > > .iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).edsMain(31440).owDevices(10).owDS18B20Table(5).owDS18B20Entry(1) > > Now if you want to iterate through a table (such as the owDS18B20Table in > this case) , then you also have to use the indexes, but this should be > enough to give you the basic idea. As I said, SNMP isn't necessarily simple. > > I think the only use case for SNMP is going to be where you want to bring > the device running owfs into an existing SNMP environment. This could be > useful for monitoring and thresholding 1-wire devices without having to > install any other tools or utilities. But I don't know how many would > actually use it. EDS seemed top think it worth the effort to develop an > agent, so who knows. > > One other thing to note is that the EDS product (with the MIB discussed > above) looks like it implements things on the basis of a single flat bus. > DS2409 devices are conspicuously absent. in any case, translating the owfs > paradigm to SNMP should be doable (both are hierarchical tree structures). > There are some utilities (like mib2c) that will help in creating a code > framework once the MIB has been defined, but it's not a trivial task. > > Regards, > Paul Davis > > On 01/20/2011 02:19 PM, Roberto Spadim wrote: > > the first solution without MIBs is possible? > implement MIBs is a second problem we need snmp first to make it.. > > 2011/1/20 Mauricio Culibrk <[email protected]>: > > Nice! ;) > > at least, it's a start... their MIBs... > as far as I understood the "presentation" on their web page, their > system is rather similar to owfs (owhttpd), but with somehow less > "entries" in the hierarchy. > I have not seen their devices (actually, web UI) to jump to any > conclusions or allusions but they could be easily using (some sort of > adapted) owfs for their product ;) > > Regarding "ethical or legal" I really do not know... here the > "environment" is not so strict as in the US so... but I think there > should be no legal issues for using their MIBs as a base/sample. At the > end it's just a "mapping" between numbers (OIDs) and strings... > OK, owfs should use it's own "enterprise ID" in the OID (should be > registered) and I doubt their MIBs should/could be used "unmodified" - > but they can be more than useful as a "learning base"... > > Depending on what should be made visible/accessible via snmp the owfs > MIB could be rather large/different than their implementation... > > regards, > m.culibrk > > On 01/20/2011 06:51 PM, Paul Alfille wrote: > > Actually, EDS has an SNMP mapping and support in some of their producs. See: > > http://www.embeddeddatasystems.com/OW-SERVER--1-Wire-to-Ethernet-Server_p_152.html > > It certainly might make sense to use a similar scheme, but I haven't > investigated it since I don't know if that would be ethical or legal. > > Paul Alfille > > On Thu, Jan 20, 2011 at 11:32 AM, Roberto Spadim<[email protected]> > wrote: > > there´s a onewire snmp solution? > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Owfs-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/owfs-developers > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Owfs-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/owfs-developers > > > > > > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Owfs-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/owfs-developers > > -- Roberto Spadim Spadim Technology / SPAEmpresarial ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Owfs-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/owfs-developers
