David - thanks, possibly a deeper analysis than I need? No, I'm not interested in internet connectivity, it is the modem/router itself.
There have been some problems - not my responsibility, but it affects software connecting to the web via them of course (and the people switch them over, and I need to monitor when that happens). Getting the info from the local IP (ie, 10.1.1.1 = to log into the things) is OK, and I can use HttpWebRequest / HttpWebResponse and just check the response stream for certain short strings typical of the routers. But I will certainly try with SNMP; I don't understand your second point; I don't think the last 2 are relevant. _____ Ian Thomas Victoria Park, Western Australia _____ From: [email protected] [mailto:[email protected]] On Behalf Of David Connors Sent: Tuesday, May 01, 2012 4:40 PM To: ozDotNet Subject: Re: [OT] Detect ADSL modem in use You say ADSL modem but you're asking about Internet connectivity. Options are broadly (in order of less crappy to more crappy): * Use SNMP to pull the interface status * Work out what the IP of the default gw is for the modem and ping that * Ping a known site on the internet * Do something layer 4+ like using a web browser control Give us a bit more context around the business problem and I can provide better advice. OTOH if you are asking which remote office the user accessing your web application is coming from is from, the best option is to get the modems fixed IPs On Tue, May 1, 2012 at 6:03 PM, Ian Thomas <[email protected]> wrote: Don't ask why . What would be the best way to programmatically detect the modem in use at any particular time? For the sites under consideration, each modem (different makes) has a logon ip of 10.1.1.1 (it's one of the common addresses that the manufacturers use), so I'm thinking that a method might be to start a browser process (or open a web page with that address in a form), and look for some modem-specific text there). Or is there a much simpler method not dependent on ad hoc testing of modems? _____ Ian Thomas Victoria Park, Western Australia -- David Connors | <mailto:[email protected]> [email protected] | <http://www.codify.com> www.codify.com Codify Pty Ltd Phone: +61 (7) 3210 6268 | Facsimile: +61 (7) 3210 6269 | Mobile: +61 417 189 363 V-Card: <https://www.codify.com/cards/davidconnors> https://www.codify.com/cards/davidconnors Address Info: <https://www.codify.com/contact> https://www.codify.com/contact
