Problem Statement
I am trying to make an application for Android that can detect nearby smartphone devices. I need to discover smartphone devices regardless of their connection to a WLAN or their operating system. The only requirement is that their bluetooth or wifi setting is enabled. I am trying to capture the MAC Address and maybe RSSI of these devices. An example of an application I am trying to emulate is Meshlium.
Methods Already Considered
Android Classic Bluetooth:
I have followed the guide to discover devices that aren't currently paired with my device.
The smartphones I am trying to discover need to be in "discovery" mode in order to be found. For most modern phones that means they need to be on their bluetooth settings page.
Android P2P (Wifi Direct):
I have followed the guide again and can't discover smartphones nearby.
Similar to bluetooth, both devices (mine and the device I am trying to find) need to be both trying to discover wifi direct devices.
Also it seems iOS doesn't support wifi direct anyways.
Google Nearby:
Nearby Connections works only with devices running an application that is using the nearby connections api. So only devices with the app currently running the advertising or discovery feature will be available for detection.
Wifi Network Service Discovery:
This lets me see devices that are currently advertising services on a network and not the actual devices themselves.
Device Specifications
The device I am using is running android version 6.0.1 and Model number rk3368-box. The device also has root permissions.
Question
Is there a way on my android device to discover the nearby smartphones with the only requirement being their wifi or bluetooth is enabled? Perhaps packet sniffing the probe requests of the devices? I have researched packet sniffing but can't find any solid resources for Android. Also I would love to be able to do so in c# and Xamarin.Android if possible.
Update
Is a custom ROM an option? I am not looking to make an application for the play store, but one for custom hardware. Perhaps when I enable the wifi hotspot on the device it logs the probe requests from the devices nearby and saves as a file to export later?
There is no way to do this. And there shouldn't be- unless I'm working with you (in which case multiple of the above will work) its a massive invasion of my privacy for you to be able to detect my device.
If you are able to find mac address for WLAN adaptor of a device than try to search for bluetooth devices having mac address same as WLAN adaptor but last digit changed by 1.
This way you can find a Bluetooth device even if it's visibility is hidden
Related
Recently, I had to connect my mobile to the internet by using a USB cable since neither WiFi or cellular data are possible in my case. So the only solution left is to use Ethernet and a USB-to-Ethernet adapter, but android 8, android 8.1 does not have Ethernet settings because the default IP acquisition method is dynamic allocation (DHCP), but in my case I need to manually set a static IP.
So after some research I've found this article : https://www.programmersought.com/article/91373846940/
and this Git:
https://github.com/Dufre/Android-Settings-Ethernet/blob/master/0001-Ethernet-Add-Static-IP-Settiings.patch
The problem is that I couldn't figure out how to proceed.
If anyone could provide some assistance, it would be tremendous!
I decided to build a tool to display the battery level of a pair of Bluetooth headphones, since I got this feature on Android, but not on Windows. For some reason, it just doesn't display in the settings.
I'm using UWP and with the Device Enumerator I managed to pull a list of connected devices. Is there any way to get the battery level from this point? I've seen that people are using RFCom or GATT, but their issue involves connecting to the device, which I think is redundant since the tool is supposed to work on already connected devices.
I've searched for this for some time, but I can't find anything about my problem. What I would like to do is to connect an android phone to PC via bluetooth or wifi (already done using sockets) and use the PC's headset (with microphone) to talk on the phone.
I've found some examples/tutorials on how to stream music but I would need live audio from the microphone and it should be full duplex.
Is this possible?Any comments are appreciated
I think you may be able to accomplish this in the bluetooth settings for the device (in this case, the device is your PC)
On your android phone, you go to your bluetooth settings, select settings icon next to the the paired device (probably the PC name), and then select with the check boxes what activities you want to use the device for. All available activities such as phone calls and media will and keyboard will show up here. If it does not show up, then it must not be a supported bluetooth capability either on your phone or the PC.
I want to develop an app for the Windows Phone app store that communicates with my car's OBD2 port via Bluetooth.
Long story short, the app will use the bluetooth serial port to send a hex value and retrieve the corresponding value in the ECU's register. There's an android app called Torque which does this.
I can't figure out how to use the serial port though. The only bluetooth functionality mentioned is high-level stuff like pushing objects, pairing, etc. But nothing about setting baud rates or writing to a specific COM port.
Is this possible on WP7/*? Or alternatively, how can I make this possible and get my app approved for distribution?
UPDATE: I haven't been able to get my hands on a WP8 device yet, so I can't verify whether or not this is possible using SSP.
As a bonus note in case you came here looking for alternatives: you can also NOT connect to ad-hoc wifi connections, so the wife-based OBD2 adapters are no good either. There is an ugly way of connecting to the latter which involves having a laptop in your car which is simultaneously connected in ad-hoc mode the the device and is also acting as a wifi hotspot. It is utterly impractical.
Using the Bluetooth Serial Port (SSP) is not possible with public APIs of Windows Phone 7.x. As you've kind of guessed already, the app will likely not be approved for the marketplace if private APIs are P/invoked or otherwise used.
Consider upgrading to Windows Phone 8 as the Bluetooth SSP is partially available there, see Nokias Developer site for example.
I have few queries aboubt network statistics for application development on windows phone.
1)Is there any way(APIS), we can scan wifi AP in windows?
If it is connected to AP how to get SSID,BSSID and MAC address?
2)how to get CELL ID and local information?
3)Application Layer (TCP, UDP & ICP throughput, latency, etc)?
4) Bluetooth apis for device connected and device?
I was finding very info from msdn.
like Bluetooth connect and discover able devices.
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj207007(v=vs.105).aspx
coming to (wifi,cellular,ethernet) they have mention common class networkinformatio will it be helpful?
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202867(v=vs.105).aspx
http://msdn.microsoft.com/en-us/library/windowsphone/develop/microsoft.phone.net.networkinformation(v=vs.105).aspx
Short answers to big questions:
You cannot find WiFi SSIDs and Mac address directly from the WP8 SDK.
You cannot get information on the physical layout of the cellular netwrok directly from the WP8 SDK.
You cannot get network transport statistics directly from the WP8 SDK.
You can use Bluetooth APIs to enumerate over paired devices and open BT-SPP sockets.