EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Trouble with OID name using devsnmp.
From: "John A. Priller" <[email protected]>
To: Nicoletta Petrella <[email protected]>, <[email protected]>
Cc: <[email protected]>
Date: Wed, 7 May 2014 07:19:08 -0400
I notice a couple things.  First, in your snmpget command you're using the pure-numeric OID:

    1.3.6.1.4.1.18248.1.1.1.0

While your ai record INP field is using a partially-mapped OID:

    SNMPv2-SMI::enterprises.18248.1.1.1.0

If the IOC isn't properly loading/locating the MIB files it won't be able to resolve the mapping.  That's probably not the issue, seeing as snmpget is able to find the right MIBS when it prints the reply, but it may be worth trying using the pure-numeric OID in the INP field.

Second, you're using -v1 in your snmpget command to specify SNMP v1 protocol.  Is there a line in your IOC startup script to specify you want SNMP v1, that'd look like this?

    devSnmpSetSnmpVersion("192.168.58.96","SNMP_VERSION_1")

This command would need to be set before any database records for the remote host are loaded.

Also, it might be helpful to see what the snmpr iocshell diagnostic command returns for your PV.  Try entering this at the ioc shell prompt:

    snmpr 2 TME:TempTimes10

The first argument is the report level (higher means more reporting, 2 I think is as high as matters) and the second argument is the case-sensitive substring to search for in PV names or OID strings.

On 5/7/2014 3:43 AM, Nicoletta Petrella wrote:

Hi John and Eric,

 

Thank you very much for your answer.

 

I had tried before with INTEGER: and I tried again this morning with

 

record(ai, "TME:TempTimes10")

{

    field(DESC, "TME Temper sensor")

    field(DTYP, "Snmp")

    field(INP,  "@MailScanner warning: numerical links are often malicious: 192.168.58.96 public  SNMPv2-SMI::enterprises.18248.1.1.1.0  INTEGER: 100")

    field(EGU,  "degrees C")

    field(LINR, "LINEAR")

    field(SCAN, "1 second")

    field(HIHI, "250")

    field(HHSV, "MAJOR")

}

 

but I still get 0 as value and still

 

-bash-4.1$ camonitor TME:TempTimes10

TME:TempTimes10                2014-05-07 08:30:49.489621 0 READ INVALID

 

have you got any other idea?

Thank you very much.

Nicoletta

 
2014-05-06 18:00 GMT+01:00 John A. Priller <[email protected]>:
Well spotted, that could indeed be the issue.  In particular try INTEGER: (with the colon), that's the "mask" the code will be looking for in the reply returned from the slave, which occurs directly before the value it's supposed to parse out.

That should work in this case.  Some devices return strings like 'INTEGER: on(1)' where you need to specify the mask as '(' in order to find where the integer to parse out actually is.
 

On 5/6/2014 12:27 PM, Eric Norum wrote:
Disclaimer — I know very little about SNMP.  
But I do see a possible issue.

In the version that works you’re asking for an INTEGER — which is what the snmpget and snmpwalk show as well.

In the version that fails you’re asking for a Float — which doesn’t match.  

Try changing the ‘Float’ in the INP field to ‘INTEGER’ and see if that helps.

On May 6, 2014, at 9:00 AM, Nicoletta Petrella <[email protected]> wrote:

Dear all,

 

I have got installed a TME - Ethernet Thermometer, (http://www.papouch.com/en/shop/product/tme-ip-ethernet-thermometer/) which supports SNMP protocol, and I would like to read the temperature using EPICS with devSnmp.

 

My simple database is
record(ai, "TME:TempTimes10")
{
    field(DESC, "TME Temperarature sensor")
    field(DTYP, "Snmp")
    field(EGU,  "degrees C")
    field(LINR, "LINEAR")
    field(SCAN, "1 second")
    field(HIHI, "250")
    field(HHSV, "MAJOR")

 

}

 

The ioc runs ok without errors,  but with caget I only get 0 as temperature’s value, and with camonitor I get the value is INVALID

 

-bash-4.1$ camonitor TME:TempTimes10
TME:TempTimes10                2014-05-06 16:43:11.479828 0 READ INVALID

 

 

I posted a similar question a while ago for a different monitor, and at that time I solved  the problem using an OID name as given back from snmpget, but this solution does not work this time.

 

-bash-4.1$ snmpget -v1 -c public 192.168.58.96 1.3.6.1.4.1.18248.1.1.1.0
SNMPv2-SMI::enterprises.18248.1.1.1.0 = INTEGER: 182
-bash-4.1$
The OID name seems to be ok, so I cannot understand why I keep obtaining 0 as a value from caget, and I can get right value from snmp.

 

The same ioc works ok with a different module and with the following database
record(ai, "TCW122B:Temp1Times10")

 

{
    field(DESC, "Temperarature sensor 1")
    field(DTYP, "Snmp")
    field(EGU,  "degrees C")
    field(LINR, "LINEAR")
    field(SCAN, "1 second")
    field(HIHI, "250")
    field(HHSV, "MAJOR")  
}

 

Could anyone help me to understand why I get always 0 using caget but I get right value from snmpget?
Thank you very much.
Kind regards,
Nicoletta

 

The snmpwalk gives

 

-bash-4.1$ snmpwalk -v1 -c public 192.168.58.96
SNMPv2-MIB::sysDescr.0 = STRING: TME
SNMPv2-MIB::sysObjectID.0 = OID: ccitt.9.43.6.1.4.1
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (10197595) 1 day, 4:19:35.95
SNMPv2-MIB::sysContact.0 = STRING:
SNMPv2-MIB::sysName.0 = STRING:
SNMPv2-MIB::sysLocation.0 = STRING:
SNMPv2-MIB::sysServices.0 = INTEGER: 12
IF-MIB::ifNumber.0 = INTEGER: 1
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifDescr.1 = STRING: Network
IF-MIB::ifType.1 = INTEGER: ethernetCsmacd(6)
IF-MIB::ifMtu.1 = INTEGER: 1500
IF-MIB::ifSpeed.1 = Gauge32: 10000000
IF-MIB::ifPhysAddress.1 = STRING: 0:20:4a:c9:63:bd
IF-MIB::ifAdminStatus.1 = INTEGER: up(1)
IF-MIB::ifOperStatus.1 = INTEGER: up(1)
IF-MIB::ifLastChange.1 = Timeticks: (0) 0:00:00.00
IF-MIB::ifInOctets.1 = Counter32: 13254469
IF-MIB::ifInUcastPkts.1 = Counter32: 185466
IF-MIB::ifInNUcastPkts.1 = Counter32: 0
IF-MIB::ifInDiscards.1 = Counter32: 0
IF-MIB::ifInErrors.1 = Counter32: 0
IF-MIB::ifInUnknownProtos.1 = Counter32: 0
IF-MIB::ifOutOctets.1 = Counter32: 356137879
IF-MIB::ifOutUcastPkts.1 = Counter32: 11019
IF-MIB::ifOutNUcastPkts.1 = Counter32: 665
IF-MIB::ifOutDiscards.1 = Counter32: 0
IF-MIB::ifOutErrors.1 = Counter32: 0
IF-MIB::ifOutQLen.1 = Gauge32: 2
IP-MIB::ipForwarding.0 = INTEGER: notForwarding(2)
IP-MIB::ipDefaultTTL.0 = INTEGER: 31
IP-MIB::ipInReceives.0 = Counter32: 44978
IP-MIB::ipInHdrErrors.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::ipInAddrErrors.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::ipForwDatagrams.0 = Counter32: 0
IP-MIB::ipInUnknownProtos.0 = Counter32: 0
IP-MIB::ipInDiscards.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::ipInDelivers.0 = Counter32: 44984
IP-MIB::ipOutRequests.0 = Counter32: 0
IP-MIB::ipOutDiscards.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::ipOutNoRoutes.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::ipReasmTimeout.0 = INTEGER: 0 seconds
IP-MIB::ipReasmReqds.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::ipReasmOKs.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::ipReasmFails.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::ipFragOKs.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::ipFragFails.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::ipFragCreates.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::ipAdEntAddr.192.168.58.96 = IpAddress: 192.168.58.96
IP-MIB::ipAdEntIfIndex.192.168.58.96 = INTEGER: 1
IP-MIB::ipAdEntNetMask.192.168.58.96 = IpAddress: 255.255.255.0
IP-MIB::ipAdEntBcastAddr.192.168.58.96 = INTEGER: 1
IP-MIB::ipAdEntReasmMaxSize.192.168.58.96 = INTEGER: 0
IP-MIB::icmpInMsgs.0 = Counter32: 0
IP-MIB::icmpInErrors.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::icmpInDestUnreachs.0 = Counter32: 0
IP-MIB::icmpInTimeExcds.0 = Counter32: 0
IP-MIB::icmpInParmProbs.0 = Counter32: 0
IP-MIB::icmpInSrcQuenchs.0 = Counter32: 0
IP-MIB::icmpInRedirects.0 = Counter32: 0
IP-MIB::icmpInEchos.0 = Counter32: 0
IP-MIB::icmpInEchoReps.0 = Counter32: 0
IP-MIB::icmpInTimestamps.0 = Counter32: 0
IP-MIB::icmpInTimestampReps.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::icmpInAddrMasks.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::icmpInAddrMaskReps.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::icmpOutMsgs.0 = Counter32: 0
IP-MIB::icmpOutErrors.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::icmpOutDestUnreachs.0 = Counter32: 120
IP-MIB::icmpOutTimeExcds.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::icmpOutParmProbs.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::icmpOutSrcQuenchs.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::icmpOutRedirects.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::icmpOutEchos.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::icmpOutEchoReps.0 = Counter32: 0
IP-MIB::icmpOutTimestamps.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::icmpOutTimestampReps.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::icmpOutAddrMasks.0 = Wrong Type (should be Counter32): INTEGER: 0
IP-MIB::icmpOutAddrMaskReps.0 = Wrong Type (should be Counter32): INTEGER: 0
UDP-MIB::udpInDatagrams.0 = Counter32: 24553
UDP-MIB::udpNoPorts.0 = Counter32: 3526
UDP-MIB::udpInErrors.0 = Counter32: 13349
UDP-MIB::udpOutDatagrams.0 = Counter32: 494

 

 
 
 
..... @@ ........
....@(';')@.......
..0==/--\==0.... 
....../___\........
......_| |_.........

-- 
Eric Norum
[email protected]





-- 
John A. Priller             | Phone : (517) 908-7375
MSU Cyclotron Laboratory    | Fax   : (517) 908-7126
640 S. Shaw Lane room 1300D | Email : [email protected]
East Lansing, MI 48824      | Web   : http://people.nscl.msu.edu/~priller/



--
..... @@ ........
....@(';')@.......
..0==/--\==0.... 
....../___\........
......_| |_.........

-- 
John A. Priller             | Phone : (517) 908-7375
MSU Cyclotron Laboratory    | Fax   : (517) 908-7126
640 S. Shaw Lane room 1300D | Email : [email protected]
East Lansing, MI 48824      | Web   : http://people.nscl.msu.edu/~priller/

Replies:
Re: Trouble with OID name using devsnmp. Nicoletta Petrella
References:
Trouble with OID name using devsnmp. Nicoletta Petrella
Re: Trouble with OID name using devsnmp. John A. Priller

Navigate by Date:
Prev: Re: [CSS] freeze and lost running PV in Boy Screens Maurizio M .
Next: Re: Trouble with OID name using devsnmp. Nicoletta Petrella
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Trouble with OID name using devsnmp. Nicoletta Petrella
Next: Re: Trouble with OID name using devsnmp. Nicoletta Petrella
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·