<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font size="-1" face="Arial">Many thanks </font><small><font
face="Arial">Bjørn
let me reply to this one</font></small><br>
<pre wrap="">Just out of curiousity: Why does the mac address matter to you? It's a
fake address used solely on the USB link between the modem and the
host. It has no meaning outside this link. Or it should not have,
AFAIK.</pre>
You are right that changing the Mac address is not my final
objective <br>
My aim is to be able to change the wwan0 name to something else and
because I am using the udev rules to do it and it is based on the
Mac address this is the reason I would like to fix it<br>
but perhaps there is another solution?<br>
(I have tried and it is like I am not able as something force the
name to be wwan0)<br>
<br>
I have tried to add NAME="" but when I do that the interface is not
visible in the system at all :(<br>
don't hesitate if you have a tips to change the name without
changing the MAC would be very cool :)<br>
<br>
belette <br>
<br>
<div class="moz-cite-prefix">On 09/11/15 17:02, Bjørn Mork wrote:<br>
</div>
<blockquote cite="mid:87611b2mb3.fsf@nemi.mork.no" type="cite">
<pre wrap="">Benoît <a class="moz-txt-link-rfc2396E" href="mailto:benoitne@gmail.com"><benoitne@gmail.com></a> writes:
</pre>
<blockquote type="cite">
<pre wrap="">Just a little one do you know if there is any udev rule I can append
to your command
(SUBSYSTEM=="usb",ATTR{idVendor}=="413c",ATTR{idProduct}=="81a3",ATTR{bConfigurationValue}=="2"
ATTR{bConfigurationValue}="1")
to fix the MAC Address of the interface?
</pre>
</blockquote>
<pre wrap="">
Something like this should do it:
SUBSYSTEM=="net",ACTION=="add",ATTRS{idVendor}=="413c",ATTRS{idProduct}=="81a3",RUN+="/sbin/ip link set %k address 02:00:de:ad:be:ef"
Adjust the path of "ip" if different. And the mac address of course :)
</pre>
<blockquote type="cite">
<pre wrap="">In fact I figured out that everytime I poweroff my system a new MAC is
generated randomly :(
</pre>
</blockquote>
<pre wrap="">
Yup, a random mac is generated every time you reload usbnet.ko. This is
used if we can't read a mac from a CDC ether descriptor, which we
usually can't for QMI devices.
</pre>
<blockquote type="cite">
<pre wrap="">I would love to fix one as soon as the interface is shown to the
system and I think udev is the right place but I don't have the right
attribute (I know the one to fix the name but unfortunately it is
based on MAC..)
</pre>
</blockquote>
<pre wrap="">
The mac address attribute isn't writable, so you have to use netlink to
change it.
Just out of curiousity: Why does the mac address matter to you? It's a
fake address used solely on the USB link between the modem and the
host. It has no meaning outside this link. Or it should not have,
AFAIK.
(except of course if you try to bridge the netdev, but then you probably
have to do some more mangling)
Bjørn
</pre>
</blockquote>
<br>
</body>
</html>