network-scan

Wi-Fi scanning without broadcast receiver?

你说的曾经没有我的故事 提交于 2019-12-05 17:25:47
I have created wi-fi scanner. It continually scans for available wi-fi networks. But my question is why would exactly broadcast receiver is needed if i can actually run scanning (invoke startScan() with timer every x seconds) and receive the same results without creating broadcast receiver? This is broadcast receiver code in onCreate() method: i = new IntentFilter(); i.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION); receiver = new BroadcastReceiver(){ public void onReceive(Context c, Intent i){ WifiManager w = (WifiManager) c.getSystemService(Context.WIFI_SERVICE); List<ScanResult> l = w

Java Network Service Scanner

无人久伴 提交于 2019-12-04 20:14:39
I'm trying to write a class that will scan the local network for a service that will be running. The problem is that if the address is not active (no reply) it hangs up on it for 5+ seconds which isn't good. I want to have this scan done in a few seconds. Can anyone offer some advice? My code part is below int port = 1338; PrintWriter out = null; BufferedReader in = null; for (int i = 1; i < 254; i++){ try { System.out.println(iIPv4+i); Socket kkSocket = null; kkSocket = new Socket(iIPv4+i, port); kkSocket.setKeepAlive(false); kkSocket.setSoTimeout(5); kkSocket.setTcpNoDelay(false); out = new

Script that scans IP range and gets user information to Excel sheet. Recycles information

╄→尐↘猪︶ㄣ 提交于 2019-12-04 05:58:41
问题 I need help with a VBS script that produces an Excel sheet with specific user information. It works... Sort of. The problem is that it seems to recycle information producing inaccurate results. Anybody know how I would go about making the script leave areas in the Excel document blank when no information is available? I know it's possible, just need a nudge in the right direction. Thank you! On Error Resume Next Dim FSO Dim objStream Const TriStateFalse = 0 Const FILE_NAME = "Users.csv" Set

Find all IP addresses in local network

你离开我真会死。 提交于 2019-12-04 03:27:00
I want to find all IP addresses of devices in the local network I'm currently connected to using Java code. The useful utility Advanced IP Scanner is able to find various IP addresses in my subnet of 192.168.178/24 : According to this answer, I built my code the following way: import java.io.IOException; import java.net.InetAddress; public class IPScanner { public static void checkHosts(String subnet) throws IOException { int timeout = 100; for (int i = 1; i < 255; i++) { String host = subnet + "." + i; if (InetAddress.getByName(host).isReachable(timeout)) { System.out.println(host + " is

Android BLE Passive scan

前提是你 提交于 2019-12-03 06:04:54
问题 I want to scan BLE advertisers passively within my Android App. But I couldn't found how to do this. According Bluetooth 4.0 Core spec, There exists passive scan mode. Vol 6 : Core System Package [Low Energy Controller volume], Part D:4.1 PASSIVE SCANNING https://www.bluetooth.org/DocMan/handlers/DownloadDoc.ashx?doc_id=282159 "A device can use passive scanning to find advertising devices in the area." And also, android has parameter that determines scan type. (Active/Passive) http:/

Android BLE Passive scan

懵懂的女人 提交于 2019-12-02 19:31:35
I want to scan BLE advertisers passively within my Android App. But I couldn't found how to do this. According Bluetooth 4.0 Core spec, There exists passive scan mode. Vol 6 : Core System Package [Low Energy Controller volume], Part D:4.1 PASSIVE SCANNING https://www.bluetooth.org/DocMan/handlers/DownloadDoc.ashx?doc_id=282159 "A device can use passive scanning to find advertising devices in the area." And also, android has parameter that determines scan type. (Active/Passive) http://androidxref.com/4.3_r2.1/xref/external/bluetooth/bluedroid/stack/btm/btm_ble_gap.c#555 "scan_type: active scan

Script that scans IP range and gets user information to Excel sheet. Recycles information

ε祈祈猫儿з 提交于 2019-12-02 09:26:09
I need help with a VBS script that produces an Excel sheet with specific user information. It works... Sort of. The problem is that it seems to recycle information producing inaccurate results. Anybody know how I would go about making the script leave areas in the Excel document blank when no information is available? I know it's possible, just need a nudge in the right direction. Thank you! On Error Resume Next Dim FSO Dim objStream Const TriStateFalse = 0 Const FILE_NAME = "Users.csv" Set FSO = CreateObject("Scripting.FileSystemObject") Set objStream = FSO.CreateTextFile(FILE_NAME, _ True,

Scan and connect to Wifi networks using Java

我的梦境 提交于 2019-11-30 08:18:39
问题 Need to write a client, which can scan the available WIFI networks and connects to best known using Java. This might be desktop client which does this job. Any pointers would be helpful and appreciate your response. 回答1: You'll have to rely on a JNI library since you can't access a wireless device directly in Java. jWlanScan for Windows. 回答2: I suggest you to act upon your operating system. And for each of the supporting operating system try to analyse the results of the command lines needed

Scan and connect to Wifi networks using Java

可紊 提交于 2019-11-29 06:31:08
Need to write a client, which can scan the available WIFI networks and connects to best known using Java. This might be desktop client which does this job. Any pointers would be helpful and appreciate your response. You'll have to rely on a JNI library since you can't access a wireless device directly in Java. jWlanScan for Windows. I suggest you to act upon your operating system. And for each of the supporting operating system try to analyse the results of the command lines needed to connect the wireless devices. It is quite straight forward and You will not have to work with JNI libraries.

List / Scan for available WiFis iPhone

删除回忆录丶 提交于 2019-11-28 22:06:58
I'm searching for a way to present available WiFis in an iPhone App. So far my research resulted in the following: Apps that implement(ed) such a functionality were removed from the AppStore (means you can't deploy the App via AppStore which is fine for me) Apple hides the functionality that is necessary for a scan in a private framework and you can't find any explanations/comments/examples on "how to use" http://code.google.com/p/iphone-wireless seems to be most promising. anyway, i can't figure out how to include the delivered sources in my code so that it runs on a device Even the adaptions