Fixing wlan number in Pups - any value per adapter [SOLVED]

Post Reply
Message
Author
User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

Fixing wlan number in Pups - any value per adapter [SOLVED]

#1 Post by davids45 »

G'day,

I have many Pups on each computer and now each computer connects to the home network and router via Wifi.

I use Pwidgets in 32-bit Pups and Conky in 64-bit Pups to display on the Desktop, the wifi status among other stuff.

I have seen that the naming of the same wifi dongle varies between Pups on the same computer if there's more than one adapter so the Pwidget/Conky Wifi script fails to show wifi details if it is wlan1 when the config script has wlan0, or vice versa. Sometimes the wifi is 'wl' followed by a long string of alphanumeric digits.

I believe Puppy decides what number to give to the wifi adapter. The wifi router/modem uses the MAC address (a constant for the dongle) not any wlan number.

Is the wlan's number assigned by a Puppy to the particular wifi dongle (identified via its MAC address) set by something in /etc/udev/rules.d/70.persistant.netrules or somewhere else?

I don't see this 'persistentnet.rules...' text file in every Pup so am confused (as usual).

For example, I'd like my wifi dongle to be wlan1 in every Pup so my Pwidget/Conky scripts don't have to be edited so often.

I think it would be easier for me when adding a new Pup to do the "set-wlan-dongle-to-wlan1" at Pup set-up than have multiple PWidget/Conky config scripts.

I would also like to know if this permanent fixing of this wlan number for the same wifi dongle would affect the Internet connection wizards.

Thanks.

David S.
Last edited by davids45 on Wed 08 Apr 2020, 01:43, edited 1 time in total.
ozsouth
Posts: 858
Joined: Fri 01 Jan 2010, 22:08
Location: S.E Australia

#2 Post by ozsouth »

@DavidS - using net.ifnames=0 parameter in grub config is supposed to fix this. See:
http://murga-linux.com/puppy/viewtopic. ... 84#1039784
User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

Solution - change the wlans by editing .....

#3 Post by davids45 »

G'day ozsouth,

Thanks for the link. It seems to be for Live Pups.

My issue is my laptop with a poorly performing in-built wifi and a USB dongle that is better but gets relegated to wlan1 or to something like wlxyz123abc.

My pwidgets and conky configs are set to report wlan0. So the better USB, whatever its wlan name given by Puppy, is ignored until I edit each config.

I've found, so far, that a text file in /etc/udev/rules/ called '70-persistent.net-rules', can set which wifi adapter is wlan0 and wlan1, or to any wlan(number) I like if I edit it.

I've edited this file in ScPups and Slacko Pups (where it exists) to make the USB wifi wlan0, saving editing of the pwidget/conky configs. The skip-listed inbuilt wifi (which is sometimes still present?) I set to wlan1.

In Debian & Ubuntu Pups, this '70-persistent-net-rules' file is missing but when I've copied it to /etc/udev/rules/ from a good ScPup, on reboot, the Debian and Ubuntu-based Pups now have the USB adapter as wlan0 as I want.

The Wifi wizards are happy with this change if re-run is needed.

So far, so good.......

David S.
User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#4 Post by bigpup »

Thanks for the link. It seems to be for Live Pups.
I think you need to look at it again.
It gives info about adding a command to the boot loader menu config file menu entry.
Seems to be example command to add to any boot loader menu entry.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)
User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

#5 Post by davids45 »

G'day bigpup,

I had a longer look at ozsouth's link.

Does it work if there are two or more wifi adapters in the computer?

My problem was the naming/numbering of wifi interfaces when there's two in the computer. On my laptop, I wanted my USB adapter to be wlan0 and not the inbuilt adapter which generally got preferment but seems to be the weaker in picking up wifi signals.

Thanks for your interest,

David S.
User avatar
perdido
Posts: 1528
Joined: Mon 09 Dec 2013, 16:29
Location: ¿Altair IV , Just north of Eeyore Junction.?

#6 Post by perdido »

deleted
jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#7 Post by jafadmin »

You are correct that it is done by a udev rule. "/etc/udev/rules.d/70-persistent-net.rules"

It triggers on the mac address of the device. Get the mac addresses using "ifconfig -a | grep -i hwaddr"

example "70-persistent-net.rules" entry:

Code: Select all

# USB device 0x:0x (rt2800usb) use name "w0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:12:3a:b4:56:cd", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="w0"
In my case (BionicPup64) the rule did not exist. I had to create it.
Post Reply