0

The title must come across as bizarre but stay with me. I need to find out the MAC address of my RPi 1 model B's ethernet interface so that I can allow it onto the network (I live in university accommodation so even if connected to the LAN, it won't get even a local IP until I manually add its MAC to the whitelist - so SSH is out).

Problem is, I don't have a USB keyboard or mouse with me right now and getting hold of either isn't really feasible at this moment. What I do have is a TV that I can hook the Pi up to via HDMI (though I do intend to use it headless)

So, I'm wondering if there's any way I could do something along the lines of editing the raspbian image before I copy it across to the SD card so that it automatically runs the relevant commands to output the MAC address to the screen?

If not, any other ideas?

0

4 Answers 4

2

Easiest might be to connect your RPi 1B directly to another computer via an ethernet patch cord and try pinging raspberrypi.local. Assuming both machines have link local addresses, the RPi should respond (assuming it's running raspbian). You will need to load bonjour services if using Windows for this to work. Then view the output of arp raspberrypi.local (on Mac) or arp -a (on Windows).

If you can't ping it by name, try running tcpdump or wireshark on the other computer to watch for packets from the RPi.

You can specify a MAC address by appending the smsc95xx.macaddr=B8:27:EB:59:EB:25 option to /boot/cmdline.txt. (per elinux.org)

0

I assume that you have a laptop or something otherwise that may contain an Ethernet port ?

If you do then you can put noobs lite on the sd card. Which is a net install only version of noobs which means that it will try to obtain an IP address from anything it is plugged into. So if you can .. plug it into the Ethernet port of you laptop and boot it up with noobs lite.

Noobs Lite : https://downloads.raspberrypi.org/NOOBS_lite_latest

Share your internet connection in windows so that the RPi gets an IP from your laptop. Then from there try running arp to see if you can see the MAC address of the Pi

0

Several other options, here's two: Both require a local network linking pc and rpi. Use Advanced IP Scanner - specify the ip address range for your local network. IP address and MAC address are part of the display when a device is found. If you have nmap install, also install zenmap - the gui version of nmap. Again, scan either the ip address of the device or the range (scanning a range can be slow), MAC address is found in the summary section. Tip. Advanced IP Scanner is quicker but not so much data.

0

If you don't have a Linux computer, the simplest way might be to set a MAC address for the ethernet port at boot time.

you can do this by editing the config.txt in the boot partition (/Volumes/bootfs when mounted on MacOS).

Add the following text to the end of the line in config.txt:

 smsc95xx.macaddr=B8:AA:BC:DE:F0:12

You can make the MAC Address anything you want. You can generate a new one at dnschecker.org

Based on an answer to Pi using a random MAC address after every reboot. How do I stop this behavior?

All other ways involve logging into the Raspberry Pi somehow, which requires ext4 support when mounting the SD Card, or knowing the IP address of the computer, which you may not have if the Raspberry Pi is headless and/or the MAC address must be authorized before the Pi can get network access.

Not the answer you're looking for? Browse other questions tagged or ask your own question.