Open thomasbromehead opened 3 years ago
+1
I have this error pls help
snmpsim-lextudio
version 1.0.3 contains the fix.
@BURNI80 You didn't compile AGENTX-MIB properly and mibdump --destination-directory=pysnmp_mibs ./AGENTX-MIB.txt
is necessary to ensure you use the proper MIB document and compile it to .py. Then your snmpsim-record-mibs
command might start to work.
You are welcome to read etingof/pysnmp/issues/429 to learn more.
Thank you!
Why when I execute: snmpsim-record-mibs --mib-module=BRIDGE-MIB
it ask me for values?
What do I have to write?
@BURNI80 if you read the actual MIB documents, you will see that dot1dBaseBridgeAddress
is of the type MacAddress
, which in turn is OCTET STRING (SIZE (6))
https://github.com/lextudio/sharpsnmppro-mib/blob/master/SNMPv2-TC.txt#L92
So when prompted to input value, you might use something like AAAAAA
to meet the constraint.
Similarly you need the following (and more),
600
for dot1dStpBridgeMaxAge
.100
for dot1dStpBridgeHelloTime
.400
for dot1dStpBridgeForwardDelay
.aa
for dot1dStpPortDesignatedPort
.@lextm
Thanks!!! Anyway to do it full automatic?
What command I need to compile AGENTX-MIB.py to a .snmprec file?
Any idea of why some mibs return 0 OIDs?
And why is generated like this? I mean, with taht strange OIDs
Hi Ilya, Thomas again... lol Been trying to create .snmprec files from MIB files using
snmpsim-record-mibs
but I'm getting the following error:Tried with several MIBs including SNMPv2-MIB which is provided by default in /site-packages/snmpsim etc as well as a correctly formatted one from a DAHUA camera. Set a breakpoint with PDB and couldn't fathom why args.string_pool was NoneType, this is what I get when I call
args.string_pool
:args
seems like a very weird object, I can call non-existing methods on it, even on args.string_pool:args.string_pool.asdadasda
yields the same result as above...This is the stacktrace:
Traceback (most recent call last): File "/home/thomas/snmp-project/venv/bin/snmpsim-record-mibs", line 8, in <module> sys.exit(main()) File "/home/thomas/snmp-project/venv/lib/python3.8/site-packages/snmpsim/commands/mib2rec.py", line 472, in main val = get_value(node.syntax, hint) File "/home/thomas/snmp-project/venv/lib/python3.8/site-packages/snmpsim/commands/mib2rec.py", line 240, in get_value val = ' '.join([args.string_pool[random.randrange(0, len(args.string_pool))] File "/home/thomas/snmp-project/venv/lib/python3.8/site-packages/snmpsim/commands/mib2rec.py", line 240, in <listcomp> val = ' '.join([args.string_pool[random.randrange(0, len(args.string_pool))] TypeError: object of type 'NoneType' has no len()