wifi

How to get the current connection wifi channel (frequency) in iOS?

前提是你 提交于 2021-02-18 18:14:50
问题 I want to know how to get WIFI channel and frequency information in iOS. It would be better not to get from the private APIs (because I need to submit it to the iTunes Store). 回答1: There's no way to do this using publicly available APIs, as of iOS 7. The OS algorithm controls networking and decides which channel to use based on congestion, interference, and other factors. If you're okay with using private APIs, then you can use Stumbler , a library that exposes the data you're interested in:

How to Connect multiple peers on the iPhone Application over WiFi?

北战南征 提交于 2021-02-18 03:24:16
问题 I have an idea for an ios(iPhone) application to which requires connecting to several peers. I am basing my code on the WiTab (SampleCode-developer.apple.com) example. When my application started each peer creating separate Socket(CFSocket) and publishing through NSNetService Class.In particular instance NSNetServiceBrowser class find available peers. And display their name in TableView.When i select row in the table view the corresponding peer address resolved, a connection established and

How to Connect multiple peers on the iPhone Application over WiFi?

霸气de小男生 提交于 2021-02-18 03:22:38
问题 I have an idea for an ios(iPhone) application to which requires connecting to several peers. I am basing my code on the WiTab (SampleCode-developer.apple.com) example. When my application started each peer creating separate Socket(CFSocket) and publishing through NSNetService Class.In particular instance NSNetServiceBrowser class find available peers. And display their name in TableView.When i select row in the table view the corresponding peer address resolved, a connection established and

Android - connect to wifi programmatically

有些话、适合烂在心里 提交于 2021-02-16 14:12:38
问题 I would like to connect to WiFi network programmatically. Here is my code: wifiManager = (WifiManager) this.getSystemService(Context.WIFI_SERVICE); wifiManager.setWifiEnabled(true); WifiConfiguration config = new WifiConfiguration(); config.SSID = "\"" + ssid + "\""; config.preSharedKey = "\""+ key +"\""; int netId = wifiManager.addNetwork(config); wifiManager.saveConfiguration(); wifiManager.disconnect(); wifiManager.enableNetwork(netId, true); wifiManager.reconnect(); When I have wifi

Android - connect to wifi programmatically

ぐ巨炮叔叔 提交于 2021-02-16 14:08:42
问题 I would like to connect to WiFi network programmatically. Here is my code: wifiManager = (WifiManager) this.getSystemService(Context.WIFI_SERVICE); wifiManager.setWifiEnabled(true); WifiConfiguration config = new WifiConfiguration(); config.SSID = "\"" + ssid + "\""; config.preSharedKey = "\""+ key +"\""; int netId = wifiManager.addNetwork(config); wifiManager.saveConfiguration(); wifiManager.disconnect(); wifiManager.enableNetwork(netId, true); wifiManager.reconnect(); When I have wifi

Android volley doesn't work on local WiFi if 3G/4G is ON

霸气de小男生 提交于 2021-02-11 12:35:11
问题 I have an app that communicates with a Ricoh Theta camera. The camera creates its WiFi network and OSC (Open Spherical Camera) web server (IP 192.168.1.1, port 80), on which I connect my device. Everything works fine if only the WiFi is ON. But when I also put the mobile data ON, then I get a timeout error. No sure if it can be useful, but here is some code: protected void executePost(String request, final String body, final RequestListener listener) { StringRequest stringRequest = new

Wifi Direct Group Owner Address

橙三吉。 提交于 2021-02-10 19:57:13
问题 That's an easy question, I've to get the "Group Owner address" using "Wifi direct", I know that this is in WifiP2pInfo.GroupOwnerAddress, but how can I initialize WifiP2pInfo.groupOnwerAddress to get the Group Owner address in my application? Could someone give me a pass to pass? I'm new in android and java. Many Thanks. 回答1: NetworkInfo networkInfo = (NetworkInfo)intent.getParcelableExtra(extraKey); if (networkInfo.isConnected()) { wifiP2pManager.requestConnectionInfo(wifiDirectChannel, new

Wifi Direct Group Owner Address

妖精的绣舞 提交于 2021-02-10 19:56:41
问题 That's an easy question, I've to get the "Group Owner address" using "Wifi direct", I know that this is in WifiP2pInfo.GroupOwnerAddress, but how can I initialize WifiP2pInfo.groupOnwerAddress to get the Group Owner address in my application? Could someone give me a pass to pass? I'm new in android and java. Many Thanks. 回答1: NetworkInfo networkInfo = (NetworkInfo)intent.getParcelableExtra(extraKey); if (networkInfo.isConnected()) { wifiP2pManager.requestConnectionInfo(wifiDirectChannel, new

CNCopyCurrentNetworkInfo not working with iOS 14

懵懂的女人 提交于 2021-02-10 12:56:32
问题 I have an app that connects to an external device using WIFI and I used to validate that the iPhone is connected to the device by checking the WIFI SSID. This was blocked when iOS 13 was released and I fixed it by requesting location permission to get the SSID. I tried now with iOS 14 beta with location service enabled but couldn't get the WIFI SSID, however the same code works with iOS 13. Here is the log I get when I call CNCopyCurrentNetworkInfo nehelper sent invalid result code [1] for Wi

CNCopyCurrentNetworkInfo not working with iOS 14

与世无争的帅哥 提交于 2021-02-10 12:56:10
问题 I have an app that connects to an external device using WIFI and I used to validate that the iPhone is connected to the device by checking the WIFI SSID. This was blocked when iOS 13 was released and I fixed it by requesting location permission to get the SSID. I tried now with iOS 14 beta with location service enabled but couldn't get the WIFI SSID, however the same code works with iOS 13. Here is the log I get when I call CNCopyCurrentNetworkInfo nehelper sent invalid result code [1] for Wi