wlan interface number is incrementing upon abnormal shutdown

wifi card with beaglebone black on ubuntu is working good. But on next boot after an abnormal shutdown I can not connect to wifi. I have to run iwconfig and find out wlan interface and update the /etc/network/interfaces with appropriate wlan interface - mostly wlan0 becomes wlan1 becomes wlan2 … -. Here is my iwconfig

$ iwconfig
wlan3 IEEE 802.11bg ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=0 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:on

ppp0 no wireless extensions.

lo no wireless extensions.

eth0 no wireless extensions.

usb0 no wireless extensions.

In the above on next abnormal shutdown wlan3 becomes wlan4.

Please pastebin.com

/etc/udev/rules.d/70-persistent-net.rules

So we can see what udev is doing in that case..

Regards,

http://pastebin.com/CPxDS9kP

Thanks

It looks like a case of you having a device with either a completely
broken mac address or a buggy wireless driver mac read.

So to cheat, remove all "wlan" entries from that file and add just this one..

# USB device 0x0bda:0x8189 (usb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{dev_id}=="0x0",
ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

I just removed the mac address, so "it" should now always load that
device as wlan0..

Regards,

Thats a real cheat :slight_smile:
Is my wifi dongle MAC is changing every time on improper boot? How is that possible? what happens if I connect 2 wifi dongles?
I posted a bug to ubuntu here.

Thats a real cheat :slight_smile:
Is my wifi dongle MAC is changing every time on improper boot? How is that
possible?

Like i mentioned; It looks like a case of you having a device with
either a completely broken mac address or a buggy wireless driver mac
read.

what happens if I connect 2 wifi dongles?

Well, that hack won't work in that case.

I posted a bug to ubuntu here.

Well they don't support "a" kernel for this board, so no
ubuntu/canonical employee will answer it..

Regards,

I posted a bug to ubuntu here.
Well they don’t support “a” kernel for this board, so no
ubuntu/canonical employee will answer it…

then beaglebone.org released https://rcn-ee.net/deb/rootfs/raring/ubuntu-13.04-console-armhf-2013-08-24.tar.xz with codename “raring”?

They responded to the question after all ubuntu is aiming at mobile devices now.

What is Beaglebone.org??

And BeagleBoard.org did not release the Ubuntu distribution. That is all from Robert’s hard work.

Gerald

> I posted a bug to ubuntu here.
Well they don't support "a" kernel for this board, so no
ubuntu/canonical employee will answer it..

then beaglebone.org released
https://rcn-ee.net/deb/rootfs/raring/ubuntu-13.04-console-armhf-2013-08-24.tar.xz
with codename "raring"?

You mean, "i" released that. :wink:

They responded to the question after all ubuntu is aiming at mobile devices
now.

Just wait for their "that's not an official ubuntu/canonical" kernel,
thus we can't help response... :wink:

Regards,

Like i mentioned; It looks like a case of you having a device with
either a completely broken mac address or a buggy wireless driver mac
read.

The device is working good with my ubuntu desktop computer; so would it be the buggy wireless driver mac read? How can I fix it?

Thank you