wifi

How do I get Python to know what Wifi the user is connected to?

夙愿已清 提交于 2019-12-04 05:43:48
I'm 14, pardon my Python knowlege. I'm trying to make this program that will only run while I'm at school (on the school's Wifi) using an if/else statement like this: if ontheschoolwifi: Keep running the program else: close the program because im not at school and wont need it I'd like to know how to let python know how to get what wifi it is connected to. Thank you, in advance, for your help :) import subprocess if "SchoolWifiName" in subprocess.check_output("netsh wlan show interfaces"): print "I am on school wifi!" For Mac OS query the airport using os module. "/System/Library

iOS WiFi network switching

不打扰是莪最后的温柔 提交于 2019-12-04 05:37:50
My company is developing an iPhone accessory that requires a relatively high connectivity rate to the phone. Due to MFi limitations (USB 2 communications in HOST mode fair only around 100KBps), we're looking at hosting a WiFi ad-hoc network on our accessory, and connecting to that network with the iPhone's WiFi. This could really work out great in many regards, except we can't seem to find an (Apple-approved) way to programmatically switch the iPhone's WiFi connectivity. Ideally the app would automatically connect to the accessory's network when visible, and then re-connect to the user's

Android: How to create EAP wifi configuration programmatically?

与世无争的帅哥 提交于 2019-12-04 04:38:19
问题 I know how to create Open/WEP/PSK/PSK2 configuration programmatically. ex. WifiConfiguration conf = new WifiConfiguration(); conf.SSID = "ssid"; conf.preSharedKey = "\"password\""; conf.status = WifiConfiguration.Status.ENABLED; conf.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.OPEN); conf.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP40); conf.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP104); conf.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP

How to send data using curl from Linux command line?

こ雲淡風輕ζ 提交于 2019-12-04 03:35:53
I am trying to transmit data out of an embedded Linux device over the wifi connection. I have curl and wget on the device. How would I transmit data out of the device using curl or wget ? Any pointers welcome. there is a "--post-file" option in wget: wget --post-file=filetoSend URL If it is only (key,value) pairs that you want to send then curl -d key1=value1 -d key2=value2 <URL> But if it is some file that you want to send then curl --data-binary @<file path> <URL> this is a get: curl "http://www.google.com/?hl=en&q=search" for a post you have to use the option "-d" and specify the key=value

Detect wifi connectivity in c#

妖精的绣舞 提交于 2019-12-04 03:17:39
I am working on an asp.net (or winforms) app that is supposed to detect wifi connectivity and strength. The intention is to provide the field agents with an indicator that they can connect to our main office What would I need to detect wifi connectivity? You can't do it in ASP.NET. ASP.NET is a server-side technology which renders client-side browsable code. In order to do this, you would have to develop something that is embedded in the page (ActiveX, Java, Flash, Silverlight) and even then, you would have to have the appropriate security permissions from the user to access the APIs necessary

Wireless accessory configuration in iOS: EAWiFiUnconfiguredAccessoryBrowser will detect unconfigured accessories only once

♀尐吖头ヾ 提交于 2019-12-04 02:56:01
I am using EAWiFiUnconfiguredAccessoryBrowser to detect EAWiFiUnconfiguredAccessory . The code to start the accessory search it's the following: - (void)viewDidLoad { [super viewDidLoad]; if (_accessories == nil) { _accessories = [[NSMutableArray alloc] init]; } if (_browser == nil) { _browser = [[EAWiFiUnconfiguredAccessoryBrowser alloc] initWithDelegate:self queue:nil]; _browser.delegate = self; } } Unfortunately it does find accessories only the first time the View loads. If I go back to the previous view and then reload the view it does not find them. I tried: recreating the browser

How to tell with Objective-C if the iPhone is connected to a wifi network?

隐身守侯 提交于 2019-12-04 02:37:06
In the context of an Objective-C, iPhone application, I need to be able to tell whether the iPhone is connected to a wifi network, and if possible listen to changes in this state. Does anyone know how to do this? thanks, gabouy Dave Check out the Reachability sample . Gordon McCreight As others mentioned, the Reachablity sample is a good place to start, however, their answers don't spell it out enough for my tastes. Within the Reachablity sample the code is spread out and doesn't show you how to handle the simplest case. For the simplest case (not listening to changes in state) I can save you

Android using wifimanager to connect to WPA-PSK secured network

折月煮酒 提交于 2019-12-04 02:21:43
问题 so I have trawled true all threads in here and any where else where google would take me. But still I am having problems connecting to WPA PSK networks. Here is my code, I have 2 edittext fields from which I read SSID and PSK and then one checkbox to select if SSID is hidden or not. EditText mSSID = (EditText) findViewById(R.id.wifiTVssidcurrent); String networkSSID = mSSID.getText().toString(); EditText mWPA = (EditText) findViewById(R.id.wifiTVwpacurrent); String networkWPA = mWPA.getText()

Finding out distance between router and receiver?

旧街凉风 提交于 2019-12-04 01:38:33
问题 A general question: is it possible to retrieve information about how far away e.g. a computer is from a wifi-router. For instance I want to get data on my computer if I'm 10 meters away from my home-wifispot or 2 meters. Any idea if that is even possible? Edit: How about bluetooth? Is it possible to get information about how far away bluetooth-connected devices are one from another? 回答1: I would recommend a measuring line or just good-old-fashioned guesstimating. There is no "simple" way to

What is the difference between active scan and passive scan?

偶尔善良 提交于 2019-12-04 01:19:39
What is the difference between mWifiManager.startScanActive() and mWifiManager.startScan() . What is the difference between active scan and passive scan ? Passive scanning listens to beacons sent by the access points. That means waiting for the beacon to be sent (usually a few seconds). An active scanning will emit probes to those APs immediately. please note that an active scan will consume more energy and as "ordinary" wifi access points broadcast their beacons several times per second, an active scan is rarely needed. e.g. requesting a list of wifi networks in reach takes approx 0.7 seconds