Author | Forum: PowerSNMP for .NET Topic: Autodiscovery for all network printers |
Brad76 From: San Francisco, CA USA Posts: 5 Member Since: 10/16/09 |
posted May 7, 2010 12:59 PM Hi I need to add a functionality to my snmp project in c# I need to search for network printers from a specific ip range (or subnet). I want to create a sort of autodiscovery where the user gives a range of ip or subnet and the software start searching all the net in that range and get, for example, the model of the printers is it possible? how can I get only printers and not routers etc...? thanks |
K M Drake![]() From: Utica, NY USA Posts: 3406 Member Since: 07/14/00 |
posted May 11, 2010 9:57 AM Hi, For autodiscovery, you would need to perform a Get using the broadcast address for the subnet in question. As far as only Getting printer responses, that is possible if you know of a variable that only the printers supported. Or, if you know of a variable whose value would indicate whether the agent is a printer or not, you could filter through all the responses after the broadcast. Hope it helps, -ken |
Brad76 From: San Francisco, CA USA Posts: 5 Member Since: 10/16/09 |
posted May 11, 2010 12:45 PM thanks for replay but can you explain me better the first point? I mean that I know hot to get a particular info from a printer (knowing its ip address) Which is the best way to "navigate" through the subnet? |
K M Drake![]() From: Utica, NY USA Posts: 3406 Member Since: 07/14/00 |
posted May 12, 2010 12:16 PM Hi, You can use the ManagerSlave.GetResponses method with the subnet's broadcast address. You should receive responses from all agents on the subnet. For more info on broadcast addresses: http://www.topbits.com/broadcast-address.html Otherwise, you would have to iterate through each IP address with individual GetResponse calls, and see which ones returned responses. Hope it helps, -ken |
nervoux From: Milan, Italy Posts: 1 Member Since: 10/31/07 |
posted July 21, 2010 9:47 AM I have implemented the same think, but i have some issue that i dont understand. 1. I ll scan a network subnet ( 192.168.1.1 -> 192.168.1.254 ) 2. Obtain about 80/90 ip up from icmp result. 3. Start 10 thread pool for looking if the device is a snmp. 4. If snmp put in a result list. The problem is that if i use ThreadPull, the result list is random ( the same ip sometimes is snmp sometimes no ), if i use a a mono thread solution works all fine. The function that read mib2system is the same ( copy & paste ) from example provide inside the package. I really confused, and i suspect that some part of Dart SNMP is not complete thread-safe. |
perevera From: Barcelona, Spain Posts: 10 Member Since: 12/15/08 |
posted May 25, 2012 10:53 AM We have a problem somewhat different: We need to discover agents on particular LANs from a server having several interfaces, so the "discover" message must be broadcasted through a particular interface previously selected. This was straightforward with previous versions (1.2) as I could open the manager coupled to a specific IP address, for instance: Dim manager As Dart.PowerSNMP.Manager = New Dart.PowerSNMP.Manager() manager.Open(“192.168.2.1”, 0) But, I don’t know how to get this done with version 4.2. Could you please give me some hints? |
Reply | PowerSNMP for .NET Topics | Forums |
This site is powered by
![]() |