I am trying to scan my local network and return a list of all connected devices with there IP, MAC Address & device name.
by device name I mean if it is my iPhone it would say 'Jamies-iPhone' as it would when I check my routers admin application for connected devices.
At the moment I have got as far as getting the IP and MAC using:
sudo nmap 192.168.1.0/24 -sP > file1.txt
It gives me the below output into the file 'file1.txt'
Starting Nmap 6.47 ( http://nmap.org ) at 2016-09-01 18:37 UTC
Nmap scan report for 192.168.1.1
Host is up (0.00027s latency).
MAC Address: 8C:34:FD:E2:E6:48 (Unknown)
Nmap scan report for 192.168.1.3
Host is up (0.0038s latency).
MAC Address: 70:56:82:C6:BE:EE (Apple)
Nmap scan report for 192.168.1.10
Host is up (0.18s latency).
Nmap done: 256 IP addresses (2 hosts up) scanned in 6.42 seconds
but I can not find any information about how to get the device name to show up, it just says 'Apple'. I specifically want to see the name of my apple TV's as I have a few and would like to be able to differentiate between them.