twocantech
Posts: 3
Joined: Tue Nov 21, 2017 9:40 pm

Multiple Pi 3's - wlan0's all have the same MAC address

Tue Nov 21, 2017 9:57 pm

Hi, I am using 4 Raspberry Pi 3's for a project, using a wireless network.

I have built the first SD card and then cloned the SD cards to give me 4 identical setups, however they all have the same MAC address on the wlan0 interface which means the router is treating them as the same device and issuing the same IP address to them all.

When I look at /proc/cpuinfo they all have different serial numbers.

I have tried looking at /var/udev rules to see if there is a persistant network rule, but could not locate any.

I have tried installing macchanger, but that does not appear to have fixed the problem.

Does anyone have any ideas how I can fix the wifi problem? Has anyone else experienced this issue?

I am hoping to avoid having to create new images and configure each one individually as I don't really have the time, but that is my backup plan.

Many thanks,

Richard

DirkS
Posts: 7726
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Multiple Pi 3's - wlan0's all have the same MAC address

Wed Nov 22, 2017 2:28 pm

twocantech wrote:
Tue Nov 21, 2017 9:57 pm
however they all have the same MAC address on the wlan0 interface
How did you check that? ifconfig?

twocantech
Posts: 3
Joined: Tue Nov 21, 2017 9:40 pm

Re: Multiple Pi 3's - wlan0's all have the same MAC address

Wed Nov 22, 2017 5:41 pm

How did you check that? ifconfig?
Yeah, I used ifconfig and also

Code: Select all

cat /sys/class/net/wlan0/address
Just to be sure.

User avatar
mikerr
Posts: 2520
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Multiple Pi 3's - wlan0's all have the same MAC address

Wed Nov 22, 2017 5:48 pm

Seems it might be a problem with current batch
- someone else mentioned this on twitter today.

You can force a new Mac address like this:

Code: Select all

ifconfig wlan0 hw ether 02:01:02:03:04:08
Or to survive reboots stick the last bit in /etc/network/interfaces

Code: Select all

iface wlan0 
hw ether 02:01:02:03:04:08
Android app - Raspi Card Imager - download and image SD cards - No PC required !

DirkS
Posts: 7726
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Multiple Pi 3's - wlan0's all have the same MAC address

Wed Nov 22, 2017 6:20 pm

mikerr wrote:
Wed Nov 22, 2017 5:48 pm
Seems it might be a problem with current batch
- someone else mentioned this on twitter today.
That was about a couple of Pi0Ws though (rev 900c1)

twocantech
Posts: 3
Joined: Tue Nov 21, 2017 9:40 pm

Re: Multiple Pi 3's - wlan0's all have the same MAC address

Fri Nov 24, 2017 9:20 am

Seems it might be a problem with current batch
- someone else mentioned this on twitter today.

You can force a new Mac address like this:

Code: Select all

ifconfig wlan0 hw ether 02:01:02:03:04:08

Or to survive reboots stick the last bit in /etc/network/interfaces

Code: Select all

iface wlan0
hw ether 02:01:02:03:04:08
Thank you for your advice, I have got a workaround in place now (it is not very elegant, but it works).

So, I should have mentioned I am using the latest raspbian, when I added the above lines into /etc/network/interfaces it broke the wireless networking totally, so I added:

Code: Select all

allow-hotplug wlan0

iface wlan0 inet manual
	hw ether 02:01:02:03:04:08
	wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
This used the alternative MAC address, but the pi would not connect on startup.

I tried using "auto wlan0" instead of "allow-hotplug wlan0" but this caused the pi to ignore the alternative MAC address and connect with the original duplicated one.

So in the end I left the entry in /etc/network/interfaces as above, and added the following into /etc/rc.local:

Code: Select all

# Wireless workaround - reset the wireless adaptor

	ifdown wlan0
	sleep 1
	ifup wlan0
They are all working at the moment, and able to be assigned different IP addresses, not confusing the router now.

Thank you mikerr for your suggestions.

User avatar
DougieLawson
Posts: 30450
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Multiple Pi 3's - wlan0's all have the same MAC address

Fri Nov 24, 2017 12:39 pm

Try running
sudo rpi-update
to get latest bootcode and kernel.

If the problem persists we'll need to flag this to the RPF folks as they may have an engineering problem in a factory somewhere.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 18210
Joined: Sat Jul 30, 2011 7:41 pm

Re: Multiple Pi 3's - wlan0's all have the same MAC address

Fri Nov 24, 2017 3:20 pm

DougieLawson wrote:
Fri Nov 24, 2017 12:39 pm
Try running
sudo rpi-update
to get latest bootcode and kernel.

If the problem persists we'll need to flag this to the RPF folks as they may have an engineering problem in a factory somewhere.
Already investigating.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

Return to “Raspbian”

Who is online

Users browsing this forum: jdonald and 26 guests