I don't know if you're talking about a get or set request. To be clear, and
for other people who would like to do so, I give you both get and set
requests for a MAC address with snmp python library that I'm using :
GET :
> oid = netsnmp.Varbind('rbAuBaseStationId', '1')
>
> From: François Dumont [mailto:[email protected]]
> Sent: Wednesday, August 05, 2009 5:56 AM
> Oh yes, sorry, I used "%02s". With "%02X", it's really good !
So wouldn't 'BA:BE:00:00:FA:CE' also have worked?
HTH,
Mike
-
Oh yes, sorry, I used "%02s". With "%02X", it's really good !
Thank you.
2009/8/5 Vincent Bernat
>
> On Wed, 5 Aug 2009 12:47:20 +0100, François Dumont
> wrote:
> > Ok, it works.
> >
> > The result is 186:190:186:190:250:206. Would it be possible to have the
> > same
> > result in hexadecimal
On Wed, 5 Aug 2009 12:47:20 +0100, François Dumont
wrote:
> Ok, it works.
>
> The result is 186:190:186:190:250:206. Would it be possible to have the
> same
> result in hexadecimal ? If not, I can go with that.
It should be hexadecimal. Didn't you use "%02d" instead of "%02x"?
>>
>> On Wed, 5
Ok, it works.
The result is 186:190:186:190:250:206. Would it be possible to have the same
result in hexadecimal ? If not, I can go with that.
Thank you
2009/8/5 Vincent Bernat
>
> On Wed, 5 Aug 2009 10:13:41 +0100, François Dumont
> wrote:
>
> > I tried ":".join("%02x" % ord(a) for a in Hard
On Wed, 5 Aug 2009 10:13:41 +0100, François Dumont
wrote:
> I tried ":".join("%02x" % ord(a) for a in HardwareAddress) but I got the
> error "ord() expected a character, but string of length 6 found".
Yes, try:
":".join("%02x" % ord(a) for a in HardwareAddress[0])
I missed the fact that you g
Hi,
I tried ":".join("%02x" % ord(a) for a in HardwareAddress) but I got the
error "ord() expected a character, but string of length 6 found".
Any idea ?
Thank you
2009/8/4 Vincent Bernat
> OoO Lors de la soirée naissante du mardi 04 août 2009, vers 18:47,
> François Dumont disait :
>
OoO Lors de la soirée naissante du mardi 04 août 2009, vers 18:47,
François Dumont disait :
> oid = netsnmp.Varbind('rbAuBaseStationId', '1')
> HardwareAddress = netsnmp.snmpget(oid, DestHost = RadioID, Community =
> "public", Version = 2)
> print HardwareAddress
> But it'
2009/8/4 Dave Shield
>
> I've logged this as a bug in the project tracker (#2832044)
>
> Dave
>
Thank you.
I have another question : about the display of a MAC address (still using
the python library).
When I do this query :
oid = netsnmp.Varbind('rbAuBaseStationId', '1')
> HardwareAddress = n
2009/8/4 François Dumont :
> Ok, I have found why it didn't work. I've looked the packets with wireshark,
> and the problem was that the python script only sent BA BE, and not the rest
> (00 00 FA CE). So I tried to put something else than 00, like 01 01 FA CE,
> or BA BE FA CE, and it works. So it
Ok, I have found why it didn't work. I've looked the packets with wireshark,
and the problem was that the python script only sent BA BE, and not the rest
(00 00 FA CE). So I tried to put something else than 00, like 01 01 FA CE,
or BA BE FA CE, and it works. So it seems that the agent doesn't like
2009/8/4 François Dumont :
> In fact, I cannot restart the agent with options. I can only push the reset
> button to restart the agent.
Then I'm afraid I cannot help you any further.
Unless you can get hold of a packet dump of the
(failing) python-based request, to compare against
the (working) c
In fact, I cannot restart the agent with options. I can only push the reset
button to restart the agent.
2009/8/4 Dave Shield
> 2009/8/4 François Dumont :
> > I tried an snmpset without the -f option, which is not defined in the
> > available option.
>
> No - I said to restart the *agent* using
2009/8/4 François Dumont :
> I tried an snmpset without the -f option, which is not defined in the
> available option.
No - I said to restart the *agent* using the options -f -Le -d
You've got two client commands - one that works (snmpset)
and one that doesn't (using python). The task now is to
I tried an snmpset without the -f option, which is not defined in the
available option.
snmpset -Le -d -c private -v 2c 10.0.0.1 1.3.6.1.4.1.12394.1.2.7.2.1.3.0 x
> 'ba be 00 00 fa ce'(sorry, wrote '\xba\xbe\x00\x00\xfa\xce' in last
> message, but it's with spaces instead of \x)
>
Here is the
I have found the numeric OID of this object :
1.3.6.1.4.1.12394.1.2.7.2.1.3.0
So I tried this :
oid = netsnmp.Varbind('1.3.6.1.4.1.12394.1.2.7.2.1.3', '0',
> '\xba\xbe\x00\x00\xfa\xce')
> rbAuConfiguredBaseStationId = netsnmp.snmpset(oid, DestHost = "10.0.0.1",
> Community = "private", Version =
2009/8/4 François Dumont :
> Yes, it works with an snmpset (in command line) on that OID
>
>> snmpset -c private -v 2c 10.0.0.1 1.3.6.1.4.1.12394.1.2.7.2.1.3.0 x
>> '\xba\xbe\x00\x00\xfa\xce'
Try restarting the agent using the options
-f -Le -d
(plus anything else that you normally use), a
Yes, it works with an snmpset (in command line) on that OID
snmpset -c private -v 2c 10.0.0.1 1.3.6.1.4.1.12394.1.2.7.2.1.3.0 x
> '\xba\xbe\x00\x00\xfa\xce'
>
2009/8/4 Dave Shield
> 2009/8/4 François Dumont :
> > I have found the numeric OID of this object :
> > 1.3.6.1.4.1.12394.1.2.7.2.1.3.0
2009/8/4 François Dumont :
> I have found the numeric OID of this object :
> 1.3.6.1.4.1.12394.1.2.7.2.1.3.0
[snip]
> And it still doesn't work. The result of the set is 0, the hex string
> doesn't change.
Does it work if you run "snmpset" on that OID?
(with the same community string)
Dave
2009/8/4 François Dumont :
> I tried '\xba\xbe\x00\x00\xfa\xce' but it didn't work.
I can confirm that this syntax does indeed send the required value.
So the problem must lie elsewhere.
One thing I spotted:
>> > oid = netsnmp.Varbind('rbAuConfiguredBaseStationId', '1',.
The python scri
Hi,
I tried '\xba\xbe\x00\x00\xfa\xce' but it didn't work. I tried everything :
with uppercase/lowercase characters, with '\xba\xbe\x00\x00\xfa\xce', with
'\xba:\xbe:\x00:\x00:\xfa:\xce', with 'ba be 00 00 fa ce' with '\xba \xbe
\x00 \x00 \xfa \xce', nothing works.
Thank you
2009/7/31 Vincent Be
OoO Pendant le temps de midi du vendredi 31 juillet 2009, vers 12:49,
François Dumont disait :
> import netsnmp
> oid = netsnmp.Varbind('rbAuConfiguredBaseStationId', '1', 'ba be 00 00 fa
> ce')
> rbAuConfiguredBaseStationId = netsnmp.snmpset(oid, DestHost = "10.0.0.1",
>
22 matches
Mail list logo