Tag Archives: raspberry pi

Raspberry Pi lost… and found

How to find my RPi2 on network. I use arp-scan, brewed in my MacOS shell:

$ brew update
$ brew install arp-scan

Optional steps (for proper vendor decoding):

$ get-iab -v -f /usr/local/share/arp-scan/ieee-iab.txt
Renaming /usr/local/share/arp-scan/ieee-iab.txt to /usr/local/share/arp-scan/ieee-iab.txt.bak
Fetching IAB data from http://standards.ieee.org/develop/regauth/iab/iab.txt
Fetched 2452407 bytes
Opening output file /usr/local/share/arp-scan/ieee-iab.txt
4567 IAB entries written to file /usr/local/share/arp-scan/ieee-iab.txt
$ get-oui -v -f /usr/local/share/arp-scan/ieee-oui.txt
Renaming /usr/local/share/arp-scan/ieee-oui.txt to /usr/local/share/arp-scan/ieee-oui.txt.bak
Fetching OUI data from http://standards.ieee.org/develop/regauth/oui/oui.txt
Fetched 3245695 bytes
Opening output file /usr/local/share/arp-scan/ieee-oui.txt
21123 OUI entries written to file /usr/local/share/arp-scan/ieee-oui.txt

Now scan local network (don’t forget sudo):

$ sudo arp-scan --localnet | grep -i 'b8:27:eb'
192.168.1.102	b8:27:eb:dd:e3:c6	Raspberry Pi Foundation

Found.

Bonjour networking for Raspberry Pi

I have a lot of Apple hardware (MacBook, Hackintosh, iPhone, etc.) configured with Bonjour and I want my RPi2 be resolved by network.

apt-get update
apt-get install -y avahi-daemon
update-rc.d avahi-daemon enable
service avahi-daemon stop
vi /etc/default/avahi-daemon

and change the line:

AVAHI_DAEMON_DETECT_LOCAL=1

to

AVAHI_DAEMON_DETECT_LOCAL=0

then start the Avahi-daemon with

service avahi-daemon start

Now we’re can test resolving by ping for example

$ ping raspberrypi.local
PING raspberrypi.local (192.168.1.102): 56 data bytes
64 bytes from 192.168.1.102: icmp_seq=0 ttl=64 time=0.439 ms
64 bytes from 192.168.1.102: icmp_seq=1 ttl=64 time=0.446 ms
^C
--- raspberrypi.local ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.439/0.443/0.446/0.003 ms

Problem solved.