wifi

Application never receives RSSI_CHANGED_ACTION

早过忘川 提交于 2019-12-10 13:09:21
问题 I am new to Android programming and am trying to understand the concept of BroadcastReceivers. In order to help myself, I am just trying to write a small application that monitors Wifi signal strength. Now, from my understanding I can simply wait to receive the RSSI_CHANGED_ACTION broadcasted by the system. The RSSI should change frequently which means I should be receiving this notification frequently...however, never do I receive it once. I have watered my code down to the bare minimum so

Detect wifi enabled (regardless of whether it's connected)

一世执手 提交于 2019-12-10 12:58:23
问题 For a GPS tracking app, recording location signals with WIFI turned on results in really imprecise data or data with gaps. I've used the Reachability queries to detect if wifi is available prior to starting tracking. The problem is that if when that query is made the wifi is enabled but not connected to a network, it shows that the internet is not reachable via wifi, but that's not an indication of if the setting is disabled in the settings app. This means that if the user starts running and

is it possible to turn off wifi or switch iPhone to offline mode in codes in swift 4?

喜欢而已 提交于 2019-12-10 12:26:42
问题 I want to know is there any way to turn on or off the iPhone wifi or switch the device to offline mode in codes in swift 4 or not I know that apple may not allow the app can do such things to be distributed in App Store But it's Not important I just want to know is there any codes to do that or not (Just in swift 4) 回答1: 5 Solutions Collect From Internet About “How to turn off internet connection, bluetooth and WIFI programmatically?” Ans You can’t. Apple does not allow 3rd party apps to

Simplest way to connect WiFi python

烂漫一生 提交于 2019-12-10 12:23:46
问题 I would like to connect to my wifi network using python. I know the SSID and the key for the network, and it's encrypted in WPA2 security. I have seen some libraries like wireless and pywifi but the first didn't work and the second was too complicated. What is the simpelest way to connect to wifi? what is the best library/way? My failed code using wireless library (I've installed it via pip, of course): from wireless import Wireless wire = Wireless() wire.connect(ssid='myhome',password=

python broadcast 802.11 frames, using the socket module

好久不见. 提交于 2019-12-10 12:08:57
问题 I'm trying to capture and send a beacon frame using the following code def SniffIncomingProbes(): #create a general socket to monitor ongoing traffic sniffer = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.htons(0x0003)) sniffer.bind((interface, 0x0003)) #byte [30] in the packet is the packet type/subtype field #\x40 is a probe request, \x80 is a beacon probe while True: if frame_subtype==8: packet = sniffer.recvfrom(2048)[0] if packet[30] == "\x80": #byte [67] in the packet

Google Map update with WiFi but not with 3G

牧云@^-^@ 提交于 2019-12-10 11:48:27
问题 I've made an app that determines the location (balloon) and shows it on Google Maps (with roads, city etc) so an active internet is needed. This works fine when I'm using WiFi but not on 3G. It determines the location and the location-output tot Google Maps is allright (including a balloon) but the Maps (with road, rivers, city etc) will not update. Hereby my manifest-settings: <uses-library android:name="com.google.android.maps" /> </application> <uses-permission android:name="android

iOS 13: Using the new NEHotspotConfiguration.init(ssidPrefix: String) does not seem to work

痞子三分冷 提交于 2019-12-10 11:39:17
问题 I am currently running Xcode 11.0 and iOS 13.1 (beta). I am experimenting with the newly added functionality in iOS 13 of being able to connect to Wifi hotspots where only the prefix is known: Apple Docs This is perfect for headless accessory's Wifi setup, as you would not need to ask the user to switch to the OS settings in order to connect to the accessory's wifi. But unfortunately I cannot make it work as expected. My code ( Swift 5 ): if #available(iOS 13, *) { // The accessory's wifi

Cannot understand 802.11 Data Frame format in PcapNG file

余生长醉 提交于 2019-12-10 11:18:09
问题 I have PcapNG files created by Wireshark, which I try to parse with python-pcapng . However, I cannot figure out how to reconcile the output I receive from FileScanner 's packet_payload_info with the 802.11 Data frame format : This is the output I get (my code is at the bottom): magic_number 0xa0d0d0a SectionHeader(version_major=1, version_minor=0, section_length=-1, options=Options({'shb_userappl': [u'Dumpcap 1.12.4 (v1.12.4-0-gb4861da from master-1.12)'], 'shb_os': [u'Mac OS X 10.10.2,

How to detect wifi network change in iOS

梦想的初衷 提交于 2019-12-10 10:56:21
问题 I am working on iOS application and I would need to detect when network changes either from Wifi connection to another Wifi connection or between Wifi and 3G. I have tried using Reachability library but it seems it does not detect changes between Wifi connections. What can I use? Target of the application would be App Store so I can't use private methods of Apple. UPDATE: After some testing I have found out that when testing using simulator it works perfectly. I get notifications without any

Restrict network access to only via WiFi

↘锁芯ラ 提交于 2019-12-10 10:48:14
问题 it is no problem to check if a valid WiFi connection exists. But how can I ensure only this WiFi connection is used for network access? Assumed following scenario: I check if a valid WiFi-connection exists (and may be I verify if a working Internet connection exists too) now this WiFi connection is interrupted I start transmitting data over network and now the mobile connection is used because WiFi died recently How can I avoid that? 回答1: Check if WiFi connection exists: ConnectivityManager