![]() ![]() In any case, the best way to know "who is connected" is to ask the device they're connected to. ![]() The first solution requires parsing a web page and the second requires getting a plain text file from the router and parsing it. Find Your MAC Address Using Command Prompt Step 1: Launch the command prompt To start up the Command Prompt, you can either use the Run box or the Start menu. (the location may change but /tmp is pretty common). You can also get it from /tmp/dnsmasq.leases (on the router) if you're running a router that uses dnsmasq. You can scrape the page with your app and get a list of all currently active DHCP leases. Many routers display the current DHCP leases on a management page. The short least time will auto-renew whenever it expires as long as the client is still there. The very easiest way to do this that I can come up with is to set your router's DHCP lease time to something short like 10 minutes, then ask the router "who is connected". OK, I've removed a bunch of stuff I said, now that I understand you're talking about cell phones and wifi connections. Steps to determine the MAC Address of a remote system Open MS-DOS using CMD command Ping IP Address of device whose MAC address needs to be discovered. If you're on a multi-hop network, it's useless. MAC addresses are stripped off at the first router/switch, so they're not going to be useful for determining what is connected, unless you can access the monitoring port on your router/switch and you only have one.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |