wifi

Programmatically auto-connect to WiFi iOS

二次信任 提交于 2019-12-09 12:59:21
问题 I'm creating an app on Swift, and I need to know, if there's any way I can programatically auto connect an iPhone to a WiFi giving as paremeters the SSID and the Password from that WiFi Network. Thanks in advance. 回答1: Below code will work on Xcode 9 and iOS 11 let WiFiConfig = NEHotspotConfiguration(ssid: "Mayur1", passphrase: "123456789", isWEP: false) WiFiConfig.joinOnce = false NEHotspotConfigurationManager.shared.apply(WiFiConfig) { error in // Handle error or success print(error?

Scanning for wifi signals only in 2.4Ghz band

旧巷老猫 提交于 2019-12-09 12:39:41
问题 I need to scan for available Wi-Fi signals and their strengths. I'm using wifiManager.startScan(); and asynchronous wifiManager.getScanResult(); . On devices without support of 5GHz band it takes about 500ms to get the results, on devices with 5GHz band support it takes about 2s, and that is too much for me. I guess the 1.5s delay is in searching the whole 5GHz band. Is there any way I could tell the device to scan only in the 2.4GHz band, or any other way I could get the results faster (for

iOS Swift connect WiFi programmatically and distinguish between bad password and no WiFi in range

喜你入骨 提交于 2019-12-09 11:33:36
问题 NEHotspotConfiguration works well, but the error is nil both when the SSID I am trying to connect to is not available (out of range or off) or when the password I've submitted is incorrect. What am I doing wrong? I want to be able to distinguish between these two scenarios so I can inform the user accordingly. Code snippet: func connect(ssid: String, password: String, completionHandler: @escaping(Bool?, String?) -> Void) { activityIndicatorView?.startAnimating() guard !isAlreadyConnected(ssid

Other than UDP Broadcast or Multicast, what other methods can I use on a WiFI network to discover computers?

倖福魔咒の 提交于 2019-12-09 07:23:05
问题 I've implemented a simple UDP ping/pong protocol to discover other computers connected to the same WiFI router. This works fine on many WiFI and Ethernet routers, but when I go out on the street to give it a try, many public WiFI networks seem to have either UDP Broadcasts/Multicast disabled, or UDP disabled completely. What other options do I have to discover the computers connected to the WiFI router? (I'd love to create an Ad-Hoc network between the members of my network but this is not

Connect to captive portal wifi using ESP8266

爱⌒轻易说出口 提交于 2019-12-09 06:52:15
问题 I would like to connect an ESP8266 based sensor on a wifi network protected by a captive portal (I've no other option, and I cannot ask for derogation). I have a login/password to connect. From a basic computer, when I'm connected to the network and I do an Internet request (for example, I search "bl" on google), I got a page like this : https://url:1003/fgtauth?12291a0aff04200a <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html

use “netsh wlan set hostednetwork …” to create a wifi hotspot and the authentication can't work correctly

廉价感情. 提交于 2019-12-09 04:02:04
问题 I run netsh wlan show drivers and get the output containing Hosted network supported : Yes : Interface name: Wireless Network Connection Driver : Broadcom 802.11n Network Adapter Vendor : Broadcom Provider : Broadcom Date : 8/22/2013 Version : 6.32.223.1 INF file : C:\Windows\INF\oem75.inf Files : 5 total C:\Windows\system32\DRIVERS\BCMWL664.SYS C:\Windows\system32\bcmihvsrv64.dll C:\Windows\system32\bcmihvui64.dll C:\Windows\system32\drivers\vwifibus.sys C:\Windows\system32\bcmwlcoi.dll Type

Does the Android Device Emulator have a MAC Address?

蓝咒 提交于 2019-12-08 21:44:11
问题 I wrote the following code to get the MAC address: WifiManager wimanager = (WifiManager) getSystemService(Context.WIFI_SERVICE); String address = wimanager.getConnectionInfo().getMacAddress(); Log.d("TOKEN", address); This works perfectly on my phone, but in the Android emulator it returns null. Is this because the Android emulator doesn't have a MAC address? 回答1: It's the same as when you try getting a hold of the bluetooth stuff on the emulator. There is no MacAdress and should return null.

RadioTap headers in scapy

丶灬走出姿态 提交于 2019-12-08 16:01:37
I'm trying to send and receive packets with scapy and read the RadioTap Header. The wireless adapter (and driver) is able to handle those headers, but I can't seem to get them. Whenever I send a normal packet in scapy, is does not contain such a header (thus, sniffing packets and checking one with pkt.haslayer(RadioTap) returns "0", and I am not able to display the header like with pkt[RadioTap].show() ). If I explicitely construct my packets with a RadioTap header (like in a pkt = RadioTap() and view it, I can get a RadioTap header, but it is empty. After sending it and receiving it, I can

Windows Phone 8.1 Device (Lumia 930) and VS2013 debugging works only with disabled WiFi

时光怂恿深爱的人放手 提交于 2019-12-08 15:00:19
问题 There were errors in VS2013 when a Windows Phone 8.1 App is launching for deploy and debug: Error 1 Error : DEP6100 : The following unexpected error occurred during boostrapping stage 'Connecting to the device': SmartDeviceException - Deployment failed because no Windows Phone was detected. Make sure a phone is connected and powered on. AppWP Error 2 Error : DEP6200 : Boostrapping 'Device' failed. Device cannot be found. Deployment failed because no Windows Phone was detected. Make sure a

How to detect wheter running on 3G or Wi-Fi on iPhone?

北城余情 提交于 2019-12-08 13:48:42
问题 Some lines of code? Any experience? 回答1: You can use Apple's Reachability code to retrieve this information: Example: Reachability *reach = [Reachability reachabilityForLocalWiFi]; [reach startNotifier]; NetworkStatus stat = [reach currentReachabilityStatus]; if(stat & NotReachable) { //not reachable } if(stat & ReachableViaWiFi) { //reachable via wifi } if(stat & ReachableViaWWAN) { //reachable via wwan } 回答2: Apple's Reachability class will give you this information. http://developer.apple