Raspberry Pi – How to spoof MAC address

April 2, 2016 by Pat - Comments - 2 min read

raspberry pi spoof mac addressI’ve tried a lot of Raspberry Pi projects and the only one I’ve stuck with is tracking airplanes using ADSB and feeding that data to FlightAware using their PiAware system. The PiAware image for the Pi uses the eth0 MAC address to create a unique ID for the feeder you’re running. The downside with doing this is that if your Raspberry Pi breaks, dies, or if you upgrade to a new one like the Raspberry Pi 3, then PiAware will create a whole new feeder site. So much for your awesome feeder streak!

The solution is to spoof your eth0 MAC address on the new Raspberry Pi! I’ve done this method with 3 Raspberry Pi upgrades for PiAware and have a 580+ day streak going (at time of writing)!

This method is tested and working on the Raspberry Pi 3! I recently upgraded my Raspberry Pi B+ feeder to a Raspberry Pi 3 and this works great!

All you have to do is get the MAC address from your old Pi’s eth0. Just run ifconfig eth0 then write down the hardware address.

Then on the new Raspberry Pi, don’t connect to the internet yet! Add this line of code below to /boot/cmdline.txt. This way you can change the MAC before PiAware makes it’s initial connection, preventing a new site from being created.

smsc95xx.macaddr=xx:xx:xx:xx:xx:xx

Add that line to the end of the existing line within /boot/cmdline.txt and replace the xx:xx:xx:xx:xx:xx with the eth0 MAC from your old Pi.

Reboot your Pi, log back in and run ifconfig eth0. Your MAC address should show the spoofed address! Connect to the internet and start feeding ADSB data to FlightAware keeping that well deserved streak alive!

Share this post:

About Pat

I'm an I.T. systems engineer by day and in my spare time I code. I've made WordPress websites and plugins, weewx extensions and static html sites using Jekyll. I'm a technologist at heart and I enjoy tinkering on many different technology projects. Here on my site you will find some of the projects I've worked on, and other random bits of knowledge that I hope help someone along the way.

mentions