Re: Anwesenheitserkennung für Raspberry PI
Verfasst: Di 11. Apr 2017, 22:01
ja
Code: Alles auswählen
Nmap scan report for iPhone6s.fritz.box (192.168.10.59)
Host is up (0.076s latency).
PORT STATE SERVICE
62078/tcp open iphone-sync
5353/udp open|filtered zeroconf
MAC Address: 00:xx:xx:27:75:3E (Unknown)
Code: Alles auswählen
sudo apt-get install hping3
sudo hping3 -2 -c 10 -p 5353 -i u1 SMARTPHONE_IP -q
Code: Alles auswählen
sudo nmap -sU -sT SMARTPHONE_IP -p U:5353,T:62078
Code: Alles auswählen
arp -an | grep "SMARTPHONE_IP"
Code: Alles auswählen
pi@raspi_home:~/Documents $ sudo hping3 -2 -c 10 -p 5353 -i u1 192.168.10.59 -q
HPING 192.168.10.59 (eth0 192.168.10.59): udp mode set, 28 headers + 0 data bytes
--- 192.168.10.59 hping statistic ---
10 packets transmitted, 0 packets received, 100% packet loss
round-trip min/avg/max = 0.0/0.0/0.0 ms
Code: Alles auswählen
pi@raspi_home:~/Documents $ sudo nmap -sU -sT 192.168.10.59 -p U:5353,T:62078
Starting Nmap 6.47 ( http://nmap.org ) at 2017-04-11 22:14 CEST
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 2.18 seconds
Code: Alles auswählen
pi@raspi_home:~/Documents $ arp -an | grep "192.168.10.59"
? (192.168.10.59) auf 00:xx:xx:27:75:3e [ether] auf eth0
Code: Alles auswählen
pi@raspi_home:~/Documents $ ./new_presencecheck2marker.sh
2017-04-12_00-27-28144028487 - Start Presence Check
2017-04-12_00-27-28166901299 - 192.168.10.59 check running
2017-04-12_00-27-37151681707 - 192.168.10.59 online
2017-04-12_00-27-37170447553 - -----
2017-04-12_00-27-37191143384 - Presence activ
2017-04-12_00-27-37376443866 - LightManager Marker Update Status:
2017-04-12_00-27-37395484710 - -------------------------------------
Code: Alles auswählen
STATUS=$( curl -s http://${LMA_IP}/control?key=${SCENE_ON} )
Code: Alles auswählen
curl http://${LMA_IP}/control?key=${SCENE_ON}