using the SDK. Please do not forget to enable SNMP v3.\\
can be run in the SDK test window.
<code c status_snmp.are>/* DESC: This script extends MIB entries of the SNMP agent
* with values from nb_status
* Copyright (coffee) 2014 NetModule AG, Switzerland
*/
if (nb_snmp_register("TEMPERATURE", 1, "s", "ro") == -1)
exit(1);
if (nb_snmp_register("RSRQ", 2, "s", "ro") == -1)
exit(2);
if (nb_snmp_link() == -1)
exit(3);
while (1) {
status = nb_status("wwan");
if (nb_snmp_update("TEMPERATURE", struct_get(status, "MOBILE1_MODULE_TEMPERATURE")) == -1)
exit(4);
if (nb_snmp_update("RSRQ", struct_get(status, "MOBILE1_RSRQ")) == -1)
exit(5);
sleep(5); /* update frequency */
} </code>