I was wondering if Android phones have a MAC address when connected to the internet over 3G? I'm assuming they do, so I guess my real question is whether or not there is anyway of accessing it? I haven't found anything from looking through the APIs or by googling, but maybe I missed something.
Thanks in advance
MAC address is specific to network technologies that implement the IEEE 802 standard, such as ethernet. 3G is not an IEEE 802 network, so MAC address really doesnt apply.
That said, there should be very few reasons to use the MAC address in your app, unless youre writing a network driver or doing something specific with the TCP/IP network.
Often people reach for MAC address thinking that it represents a unique device id, when really you should use something like http://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID to get a unique id that will work across all of the different hardware combinations for android, some of which might include no IEE 802 network whatsoever.
I have never seen any reference to a 3G MAC address anywhere. The closest thing to a 3G MAC address that I know of is the IMEI/MEID code.
android.telephony.TelephonyManager.getDeviceId() will return the IMEI/MEID code.
If you are trying to uniquely identify app installs then see: http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
Related
I need to get my own device's MAC address which I thought should be really simple but after some research it seems likely impossible.
Any one had any experience on this before? I need to get the BLE MAC on both OS.
You cannot get your own MAC address on iOS. It has never been possible to get the Bluetooth MAC. In the past developers used the WiFi MAC address as a unique device identifier. Apple has now ensured that MAC addresses are inaccessible as a privacy protection.
I have a device on my local network. I know its MAC address, and want to find its IP. Because android doesn't seem to allow sending direct ARP queries (unless I'm mistaken), I've decided to take another approach: I scan all available devices on the local network.
That's where I'm stuck. I now have a list of IPs, and would like to check their MAC address to find which one is the one I'm looking for.
Could any of you please recommend a way to proceed?
I've looked at various answers, but not found the definitive one.
My question is, on an android device with wifi, is the wifi MAC address always available whether wifi is enabled or not? (I know the bluetooth MAC address isn't).
I've found answers which say it definitively is and definitely isn't.
I know for shore that your MAC address will never be available an any WAN and LAN connections.
Have grate time of day.
Programmatically, I got Mac addresses of other Wifi enabled devices from my device on the same network. Same I need to apply here. Is there any apps or any other possibilities to get an IP addresses of each wifi enabled devices on the network by using those Mac addresses on Android?
If you're looking for an android app, you could try Network Discovery which work very well and can list all the devices on your local network with the corresponding IP and address.
If you're looking for code instead, well the application is available on github and does (amongst other things ) basically the same thing than explained by Yahel : it reads /proc/net/arp .
Note : I'm NOT the author of this application.
This person does the exact opposite so it should work for you.
The trick is to read the ARP cache table from the device.
http://www.flattermann.net/2011/02/android-howto-find-the-hardware-mac-address-of-a-remote-host/
I want to know about all the device that are connected to the dhcp server.
I have the IP of the device it may be a android phone or printer but I think dhcp is having the information of this devices.
I got something like the "vendor information " in the dhcp protocol stack.
My doubt is I have to identify at least a android phone is on the network ,
Is it possible by this.or how to Identify a android phone is one the network.I have the IP of the android also but I am not getting any information from any way.
I got something like nmap but this tool is not giving a perticular details of the phone.The information provided by the nmap is confusing I am not able to identify whether it is a phone or a linux system as both the system having linux as the os.
Then i got this dhcp -vendor information : but I don't have any idea about how to read these data..
kindly give any suggestion.....Needed for my project.
Thanks
The problem you will have is that modern day switches will stop you sniffing traffic destined for specific MAC addresses so if its hard-wired then you are going to run into trouble. If on the other-hand its a unsecured WiFi connection, or a network with hubs (rare now!) rather than switches then you may have a chance.
You'd need to switch the ethernet controller into promiscuous mode and listen for the DHCP REQUEST and DHCP OFFER commands, inspect the contents and see whats going on.
Another method would be to listen for ARP and RARP requests on the network and use a hardware lookup table for the MAC id to determine who makes the chip-sets, its not going to give you awesome accuracy since a lot of chips are re-used on different devices but it may give you a little bit more info.
In terms of the DHCPd server, unless you have access to that physical machine I'm afraid your probably out of luck, DHCP is a designed as a offering protocol, not a querying protocol.