wifi

Python: wifi subprocess.CalledProcessError: Command '['/sbin/ifdown', 'wlp4s0']' returned non-zero exit status 1

牧云@^-^@ 提交于 2021-01-27 13:25:44
问题 I am working on a python script to automatically connect to a known Wifi. I am using the following library https://wifi.readthedocs.io/en/latest/ which seems to work very well. The only problem is that when a try to connect to a chosen Wifi through the scheme.activate() command, it returns the following error: Traceback (most recent call last): File "wifi_connection.py", line 100, in <module> print Connect('dotbot', 'pass') File "wifi_connection.py", line 64, in Connect savedcell.activate()

Android Q Wifi connection via WifiNetworkSpecifier lose connection immediately after connection established

时光总嘲笑我的痴心妄想 提交于 2021-01-18 04:22:50
问题 I'm currently trying to connect to a wifi network. I used the below code. WifiNetworkSpecifier specifier = new WifiNetworkSpecifier.Builder() .setSsid(ssid) .setBssid(MacAddress.fromString(bssid)) .setWpa2Passphrase(password) .build(); NetworkRequest request = new NetworkRequest.Builder() .addTransportType(NetworkCapabilities.TRANSPORT_WIFI) .setNetworkSpecifier(specifier) .build(); ConnectivityManager manager = (ConnectivityManager) context.getApplicationContext().getSystemService(Context

Android API to Connect to Wifi Network

戏子无情 提交于 2020-12-15 05:49:47
问题 I'm totaly lost in the versions of WiFi APIs. I want to connect to a configured WiFi Network programmaticaly. As decribed in this question: Connect to wifi network Android programmatically I develop on Android 10 and want to write a code that is also compatible with older Android Versions. On my android 10 the code described does not work. What code do I need to implement the functionality on Android 10? What do I do to write an application that also runs on my other Android 9 phone? Regards

Connect to Wifi in Android Q programmatically

谁都会走 提交于 2020-12-05 07:01:05
问题 I had this function to connect in Wifi network, below Android 10 it works fine, but when I tried on Android 10, I had a successful connection but WITHOUT internet , I knew it's a bug in Android 10 but I found this application which can connect to wifi from Android 10 with no problem. I'm blocked for days. My function : private void connectToWifi(String ssid, String password) { WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE); if (Build.VERSION.SDK_INT < Build.VERSION

Tizen wearable sensor data loss in background after wifi is switched off

痴心易碎 提交于 2020-12-04 11:59:01
问题 I am developing a hybrid application for Tizen Wearable 2.3. For the application, accelerometer and gyroscope sensor data is extracted and written to a file in native service application at a frequency of 100Hz. However, in certain trials I see that data is lost after few minutes upon switching off WiFi. For instance, if I record the data for 10 minutes, while keeping the app in background (display off) and turn off wifi during the fifth minute, the file shows data for only first 5 minutes,

Tizen wearable sensor data loss in background after wifi is switched off

99封情书 提交于 2020-12-04 11:55:22
问题 I am developing a hybrid application for Tizen Wearable 2.3. For the application, accelerometer and gyroscope sensor data is extracted and written to a file in native service application at a frequency of 100Hz. However, in certain trials I see that data is lost after few minutes upon switching off WiFi. For instance, if I record the data for 10 minutes, while keeping the app in background (display off) and turn off wifi during the fifth minute, the file shows data for only first 5 minutes,

On using the WiFi Direct Api on Windows?

白昼怎懂夜的黑 提交于 2020-12-04 07:07:55
问题 I'm currently developing an application where I need to create a link (read: WiFi link ) between a desktop app (on Windows 10) and a tablet (Android, but it is irrelevant). Workflow: Push button -> elevate privileges if required -> Create hosted network-like WiFi network -> Allow device to connect providing a SSID/password/dynamic IP address ... Previously, I used a system call to netsh (running the app with elevated privileges) to create a hosted network. Now it seems it is less and less

On using the WiFi Direct Api on Windows?

青春壹個敷衍的年華 提交于 2020-12-04 07:05:23
问题 I'm currently developing an application where I need to create a link (read: WiFi link ) between a desktop app (on Windows 10) and a tablet (Android, but it is irrelevant). Workflow: Push button -> elevate privileges if required -> Create hosted network-like WiFi network -> Allow device to connect providing a SSID/password/dynamic IP address ... Previously, I used a system call to netsh (running the app with elevated privileges) to create a hosted network. Now it seems it is less and less