Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can javascript get the SSID of the current WiFi connection?

I need to get the SSID of the currently connected WiFi Network (if it is wifi). Is this possible?

I saw something on it here (http://www.w3.org/TR/system-info-api/#network), but I can't seem to get the code to run. Is there a library I need to import or is this just planned implementations?

I'm writing a phonegap application and need to know whether I should connect to a server locally or if I need to go remotely.

Thanks

like image 442
Poodimizer Avatar asked Jul 19 '13 15:07

Poodimizer


People also ask

Can websites see SSID?

No. The website only knows the public IP address from where you are connecting. Obviously the public IP address is different when you go through your local router than going through a VPN.

How do I find my SSID on my VPN?

Go to Settings → Wi-Fi. Your SSID name appears at the top of the Wireless & networks section under Wi-Fi.

Is Wi-Fi SSID personal information?

Clearly, no individual would be identified or identifiable from such default SSIDs.


2 Answers

It is not possible as of this time. However PhoneGap does let you build plug-ins that will accomplish this task.

There is currently one available from HondaDai under the MIT license located at https://github.com/HondaDai/PhoneGap-WifiInfoPlugin.

** and it works beautifully. After I figured out how it works. His example on how to get the SSID that shows wifi.SSID as a variable is incorrect. It is actually wifi.activity.SSID as there are two JSON objects in the return and I wanted to access the one title activity.

like image 178
Poodimizer Avatar answered Oct 24 '22 23:10

Poodimizer


Poodimizer is right. If you need iOS support, I forked WifiWizard. See: https://github.com/makeroo/WifiWizard

Although only getCurrentSSID is supported due to Apple limitations.

like image 31
makeroo Avatar answered Oct 24 '22 23:10

makeroo