SNMP reading OBJECT IDENTIFIER

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SNMP reading OBJECT IDENTIFIER

Jump to solution
779 Views
kappa74
Contributor IV

Good morning,

I have a problem about SNMP OBJECT IDENTIFIER: I don't understand how reading an object identifier in SNMP.

I need to change the value of sysObjectID which is now .0.0. (this is the default).

The structure to read its value in 1213.c file is:

const RTCSMIB_VALUE MIBVALUE_sysObjectID = {

    RTCSMIB_NODETYPE_OID_PTR,

    NULL

};

The value is a pointer to NULL.

Do you have an example which shows how to change its value (example .1.3.6.1.2.1.1.1 SysDescr)?

Thank you

Best Regards

Mirko

Labels (1)
0 Kudos
1 Solution
465 Views
kappa74
Contributor IV

Hi thiagow,

I solved in this way.

I defined the node of the my machine

const RTCSMIB_NODE MIBNODE_machine = {

   1,

   NULL,

   (RTCSMIB_NODE_PTR)&MIBNODE_analog_input,

   (RTCSMIB_NODE_PTR)&MIBNODE_board,

   0,

   NULL,

   NULL, 0, NULL, NULL

};

and then in the struct of MIBVALUE_sysObjectID I inserted the pointer to the MIBNODE_machine

const RTCSMIB_VALUE MIBVALUE_sysObjectID = {

    RTCSMIB_NODETYPE_OID_PTR,

    (void _PTR_)(RTCSMIB_VALUE_PTR)&MIBNODE_machine

};

In this way it's working.

Best Regards

View solution in original post

0 Kudos
3 Replies
465 Views
thiagow
Contributor III

I have the same problem that you. I need to set a OID VALUE another mib object, but MQX can't. I have been tried using RTCSMIB_NODETYPE_OID_FN too, but I can't know what kind of value I need to set. I believe that MQX have a bug in this case or setting a complete OID value ( ex.:  .1.3.6.1.23.56) in another OID it's not implemented yet. Does anybody can check this?

0 Kudos
466 Views
kappa74
Contributor IV

Hi thiagow,

I solved in this way.

I defined the node of the my machine

const RTCSMIB_NODE MIBNODE_machine = {

   1,

   NULL,

   (RTCSMIB_NODE_PTR)&MIBNODE_analog_input,

   (RTCSMIB_NODE_PTR)&MIBNODE_board,

   0,

   NULL,

   NULL, 0, NULL, NULL

};

and then in the struct of MIBVALUE_sysObjectID I inserted the pointer to the MIBNODE_machine

const RTCSMIB_VALUE MIBVALUE_sysObjectID = {

    RTCSMIB_NODETYPE_OID_PTR,

    (void _PTR_)(RTCSMIB_VALUE_PTR)&MIBNODE_machine

};

In this way it's working.

Best Regards

0 Kudos
465 Views
thiagow
Contributor III

Thank you, I solved my problem with your tip. Best Regards. --- Thiago

0 Kudos