![]() |
Problem with SNMP - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Indy (https://www.atozed.com/forums/forum-8.html) +--- Forum: Indy General Discussion (https://www.atozed.com/forums/forum-9.html) +--- Thread: Problem with SNMP (/thread-3705.html) |
Problem with SNMP - STest6905 - 12-13-2023 Hello. I have a gasoline generator that has the ability to report its status via the SNMP protocol. If I use a third-party app, I can get a response from querying "1.3.6.1.2.1.1.1.0" and "1.3.6.1.4.1.28634.6.2551906584.2.8206" and it works well. When I tried to write it myself, I notice that the first request is successful but on the second one I get a "NoSuchName" error. ps. Windows 10 x64 RAD Studio XE6 Indy 10.6.0 Here is my simple code: Code: procedure TForm2.Button2Click(Sender: TObject); This also doesn't work: Code: procedure TForm2.Button5Click(Sender: TObject); In the first case, I have a positive result: (oid=1.3.6.1.2.1.1.1.0) Code: Connected In the second case I have an error: Code: Connected If I use a third-party program (MIBViewer), everything works fine: Code: Send snmp get request to 172.17.40.243:161 Can anyone tell me what the problem is? I will be very grateful for the information RE: Problem with SNMP - rlebeau - 12-13-2023 I merged in the information that you had emailed to me privately. In any case, one discrepancy I see is that MIBViewer is requesting "1.3.6.1.4.1.28634.6.2551906584.2.8213" but you are requesting "1.3.6.1.4.1.28634.6.2551906584.2.8206" instead. Is that actually the case, or just a typo? RE: Problem with SNMP - STest6905 - 12-14-2023 (12-13-2023, 06:18 PM)rlebeau Wrote: I merged in the information that you had emailed to me privately. Thank you for pointing out such a nuance, although the list includes both teams. 8213 - battery voltage. 8206 - the number of hours worked. In the 111 program, both commands are passed, and in my program, for some reason, none of them are passed, but only the main one. RE: Problem with SNMP - STest6905 - 12-15-2023 And so several dozen subsequent attempts did not yield anything, everything remained as it was. I didn't think of anything smarter than sending a request via UDP... Surprisingly, everything worked without problems... RE: Problem with SNMP - rlebeau - 12-15-2023 (12-14-2023, 05:59 AM)STest6905 Wrote: In the 111 program, both commands are passed, and in my program, for some reason, none of them are passed, but only the main one. Have you tried using a packet sniffer, like Wireshark, to see how the SNMP packets from TIdSNMP differ from the other program's packets? Its certainly possible that TIdSNMP might have a bug that is not creating the packets correctly, but I would need to see the raw packets from a working setup and a non-working setup to verify that. RE: Problem with SNMP - STest6905 - 12-18-2023 (12-15-2023, 06:15 PM)rlebeau Wrote: Have you tried using a packet sniffer, like Wireshark, to see how the SNMP packets from TIdSNMP differ from the other program's packets? Its certainly possible that TIdSNMP might have a bug that is not creating the packets correctly, but I would need to see the raw packets from a working setup and a non-working setup to verify that. Yes, I used Wireshark to look at the traffic. Here I can provide you with a sample of this protocol. There is not much data. It was from the successful send that I used the data to send over UDP. |