I want to know is it possible to track physically or Get Information
about the smartphone by just knowing its MAC address connected to our
Wifi.
Yes, it is see e.g. https://ssd.eff.org/en/module/problem-mobile-phones
Smartphones send their MAC address which is visible for surroundings near by, a bit like car register plate in concrete world.
But you don't know who is in the car just based on the plate and the car could be empty.
With smartphone its more likely that same person is using the machine. So if you are able to link MAC address with another personal identifier like name, phone number, SIM info then tracking is better enabled.
Related
I'm writing some code (C++) for ESP32, to act as a BLE beacon. The problem is this: the iPhone doesn't send out its real MAC address, but does a random-generated MAC address, for security. The thing I'm confused about is how do you know if it's a device you've previously paired with?
So let's say I detect a new BLE MAC address, and looking at the manufacturer data I can determine it's an Apple device (first 2 bytes are "4C").
Now I need to know if I've previously paired with that device, so that I can allow the ESP32 to initiate an action (for simplicity let's just say turn on an LED). If that MAC address is in a list of known devices, then I can continue, and if not, I ignore it.
The problem is, if the iPhone is not giving up the real MAC address, the detected MAC address will never match anything. As this is a security situation I'm sure the algorithm for generating those MAC addresses is not known.
To be clear: this code is being written for the ESP32, not the iPhone.
It is in fact not possible to tell if a device has been previously seen, unless you pair and establish a bond with it. Once you pair with the device, long-term keys are exchanged and are used to quickly re-establish the connection.
This is by design. MAC addresses were originally unique, but this allowed tracking people and devices without their consent. You can read more about this in the following ESP-IDF guides:
GATT security server walkthrough
GATT security client walkthrough
So are you using esp32 as a beacon? This dose not involve any pairing or iOS MAC addresses. iOS will just be able to listen and the esp32 will not even know someone is "listening" to its broadcast.
Probably iOS application can store which services it is interested to hear to; may looks like pairing.. but it is a high level application managed technique and not any related to what BT standard calls pairing.
My requirement is like, I want IP and MAC address of devices which are connected to my iOS device's hotspot.
How can I get a list of IP address of those devices?
Does Apple allow to get hotspot related information through code.?
Unfortunately I don't know a way to get the actual client list (or ARP table for that matter).
But you could implement a scanner. Have you thought of that? Isn't the beautiful solution you're most probably looking for, but might be something?
Here would be a scanner library as reference: https://github.com/mavris/MMLanScan
You could also get your devices IP address and network mask, calculate the possible IP range yourself and implement an ARP query per candidate device using sysctl and gethostbyaddr as described in this post
https://stackoverflow.com/a/2269903/1041122
EDIT sidenote:
Did you have a really deep read of the NetworkExtension API from Apple? I don't know it well but since it allows numerous configurations that might be possible as well.
Device is either connected or not-connected to internet. In which scenario it is possible to get the geolocation coordinates using MAC.
If you want to locate a wifi or a cellphone tower there are databases to do so, however I couldn't find a database in fact, only an online service, but behind it should be a database, and you need to enter the data manually. You could also locate a cellphone if you know the mac address of the WIFI or cellphone tower where it is connected, but have access to that info wont be that easy.
I found this, and it is really impressive the amount of data however I couldn't find my wifi there, I guess is not simple to get the location for all the wifi in the world... except for google.
https://wigle.net/
How ever locate people won't be that easy, no one would like the possibility of being easily located by anybody anytime and quickly.
Example about how google uses that info:
https://support.google.com/nexus/answer/1725632?hl=en
The Geolocation API with its getCurrentPosition method works only using WIFI router information and IP addresses. In India where I am, there seems be NO correspondence between IP address and location.
Sometimes it shows I am in Pune - sometimes in Hyderabad - but I am in Mumbai. But When I use the same gMaps application with my mobile devices, it manages to accurately triangulate my position, which is fantastic.
But with the car pooling application I am building I need users to register and inputs their current location automatically using their laptops and desktop computers. How do I do this?
FYI: I am using chrome on Mac OSx
There are essentially four levels of accuracy for geolocation:
GPS, for devices with a GPS receiver
GSM, for mobile devices connected to the mobile phone network
WiFi, for devices within hearing distance of WiFi networks - NB the accuracy is only good if the area has been surveyed, either by the Google streetview vehicles, or by consumers crowdsourcing the information from devices with a real GPS receiver.
IP address - ISPs get allocated a number of blocks, and typically they assign these regionally. In parts of the world where IP ranges are scarce (i.e. not in North America), you can see where the telephone network will connect to different local hubs.
It sounds like it is the last case that you're seeing on your desktop only, which implies the WiFi networks near you haven't been surveyed with enough confidence for the geolocation to work.
We're looking to develop a mobile website. On this mobile website, we'd like to automatically populate a user's location (with proper fallback) based on their IP address. I'm aware of geocoding a location based on IP address (mapping to latitude, longitude and then getting the location with that information).
However, I'm curious how accurate this information is? Are mobile devices assigned IPs when they utilize 3G, EDGE, and GPRS connections? I think so. If that is so, does it map to a relatively accurate location? It doesn't have to be spot on, but relatively accurate would be nice.
Short answer: No.
The network assigns an IP address to the phone when the PDP context is activated (activation of PDP context is telecomms-speak for 'asking for packet data services'). It can be changed under network control, but this usually only happens when the connection has been dormant for some time.
You need to bear in mind that a typical mobile network may have several million users, and since signaling (i.e. address reconfiguration and the like) doesn't generate revenue, but costs the network scarce radio resources, it gets avoided as far as possible.
There is a further issue. Due to the architecture of mobile networks, if you have a visitor to a country who is operating using the roaming service with their home operator, they will in fact 'appear' to be in their home country. This is because the mobile device always connects to the internet through a node called the GGSN in their home network.
This is a major issue for websites which must deal with rightsholders. As an example, the BBC iPlayer service allows people located in the UK to 'catch up' on any BBC TV or radio content free of charge. In many cases, TV rights are geographically licensed, so the BBC is required to make every effort to ensure that the service is only available to users located in the UK.
This is, as I have explained above, impossible for mobile users. If I am using the SIM card of a UK network, I will 'appear' by geolocation to be in the UK regardless of where I actually am in the world.
This is not so much of a problem as yet: streaming a TV program over a 3G connection when roaming in a foreign network is prohibitively expensive (could easily be $100 or upwards for a single program), so this theoretical problem doesn't arise very often as yet. However, as roaming data costs fall (and everyone knows they will), it will become a real issue.
New smart phones (like Apple's iPhone) generally have web browsers that support HTML5 and/or some other form of client-side geolocation.
HTML5, for example, has the ability to geolocate the computer or mobile device based on a) position of the device's GPS, b) Wifi Triangulation and then c) IP address.
This is a client-side approach, and the browser will ask the user if they wish to share their location with you (which may or may not be a deal-breaker for you), but it is capable of providing < 20m accuracy.
See: About Geolocation in HTML 5