network-scan

How Scan devices in a LAN network

做~自己de王妃 提交于 2019-12-30 01:38:12
问题 I would like to do a scan in a LAN network to find devices linked. I'm developping an app in IOS for IPAD How do I do??? 回答1: Because those are mobile devices I will assume you want to find devices on a wireless network. Theoretically, since wifi uses shared medium for communication, you can passively listen for traffic flowing through the network and collect data about client without sending any packets. This is something that is commonly referred to as a promiscuous mode . In practice there

android BluetoothDevice.getName() return null

断了今生、忘了曾经 提交于 2019-12-28 00:56:30
问题 On sometime, BluetoothDevice.getName() return null. How can i fix it? remoteDeviceName maybe null in following code. And i need distinguish my device and other devices by remoteDeviceName. BluetoothAdapter.getDefaultAdapter().startLeScan(new LeScanCallback() { @Override public void onLeScan(final BluetoothDevice device, final int rssi, byte[] scanRecord) { String remoteDeviceName = device.getName(); Log.d("Scanning", "scan device " + remoteDeviceName); }); 回答1: Finally, i found out the

startscan() has result after 10 min when phone get into idle state

纵然是瞬间 提交于 2019-12-20 04:35:17
问题 I am trying to scan wifi networks every 2 minutes. I am using service for that. When the phone is "active" or "in use" after startscan() called I get SCAN_RESULTS_AVAILABLE_ACTION in 6 sec. So i can scan for wifis periodically. But after the phone has not been touched by anyone for a certain time (10 min) startscan() stops "working" and only after 10 min getting result. Anybody experienced this? 回答1: According to this I have found the solution - this is because the Wifi sleep policy. You can

Android listing BLE devices after device scan

…衆ロ難τιáo~ 提交于 2019-12-17 18:27:22
问题 Can u provide me the simple code for scanning the nearby BLE devices and list it by device name and MAC ID. I tried this using sample code provided in http://developer.android.com/guide/topics/connectivity/bluetooth-le.html. But didn't work, any reference link or ideas since i am new to BLE app. 回答1: This example is based on the developers web you posted and works great for me. This is the code: DeviceScanActivity.class package com.example.android.bluetoothlegatt; import android.app.Activity;

How to print the current local network name in swift

让人想犯罪 __ 提交于 2019-12-13 09:47:35
问题 I am creating an iOS app which displays the current local network name at the top of the screen, and so forth. I am trouble-shooting different ways to display this but I can't manage the current program. Can someone help me out? I've looked at several GitHub, stack overflow, and youtube comments about this, but nome of them worked. In the current Xcode I'm using which is Xcode(10.4.2) I'm using a label(correct me if I should use something else) to display the current Wifi named --> (WiFi: ...

Scanning for WiFi with Java [closed]

旧城冷巷雨未停 提交于 2019-12-10 17:29:20
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . How would one go about scanning for WiFi networks with Java? I have been looking on google but the only snippets I could find were for the Android OS. 回答1: As far as I know, standard (non-Android, J2SE) Java doesn't permit this: Finding SSID of a wireless network with Java Android

Find all IP addresses in local network

只愿长相守 提交于 2019-12-09 16:37:54
问题 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

Listening to WiFi packets

落花浮王杯 提交于 2019-12-08 13:37:57
问题 I'm only in the pre-first stage of the project, so the question is very straight forward and basic. I like to listen to (using Java/C++) every WiFi packets in the range of my laptop, all I care for are the message headers and the very existence of the message so encryption doesn't really play a role here. Is there a way to get that from Windows(8)/Ubuntu? I didn't manage to find any sort of API form Broadcom, so I guess accessing the card directly won't be trivial. If that's impossible then I

Wi-Fi scanning without broadcast receiver?

十年热恋 提交于 2019-12-07 07:14:55
问题 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,

Java Network Service Scanner

社会主义新天地 提交于 2019-12-06 15:06:04
问题 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,