On 3/8/17 8:25 AM, Rick Stevens wrote:
On 03/07/2017 01:14 PM, Stephen Morris wrote:
> On 3/7/17 3:49 PM, poma wrote:
>> On 06.03.2017 21:44, Stephen Morris wrote:
>>
>>> It has subsequently turned out that wlp4s6 was an old pci wifi card that
>>> I still had in my machine that I thought was dead. I was not aware of
>>> the naming conventions for the device identifiers, so I was not aware
>>> that wlp4s6 was not my USB wifi adapter. So I have been trying all this
>>> time to get the 5GHz channel working on wlp4s6 because of this
>>> misunderstanding when in reality that device doesn't have a 5 GHz
>>> channel.
>>> The whole reason for my USB wifi adapter not being used was because I
>>> needed to download and compile a driver to be able to use the device as
>>> there is no inbuilt support for it.
>>> I would like to thank everybody who provided support for this issue and
>>> apologize for wasting everyone's time (I had a DWA182 which had to have
>>> a driver compiled to be usable so I should have expected the DWA192 to
>>> be in the same situation).
>>>
>>> As a side issue to this, actually getting the USB device working has
>>> highlighted a bug in Fedora that doesn't exist in Ubuntu (Ubuntu has a
>>> different bug that Fedora doesn't have).
>>>
>>> Also Fedora and Ubuntu both use the same naming convention for the pci
>>> wifi adapter but they use a different naming convention for the same USB
>>> wifi adapter plugged into the same USB port. Why is this the case, why
>>> isn't there a Linux wide naming standard?
>>>
>> $ man 8 udevadm
>> ...
>> OPTIONS
>> ...
>> udevadm info [options] [devpath|file]
>> Queries the udev database for device information stored in the
>> udev database. It can also query the properties of a device from its
>> sysfs representation to help creating udev rules that match
>> this device.
>> ...
>>
>> Thus, one can do the following,
>> e.g. for D-Link DWA-192 - if the ifname is "wlp3s0u2":
>>
>> # udevadm info -a -p /sys/class/net/wlp3s0u2
>>
>> In accordance with the properties listed, udev rule can be made,
>> a rule to rename the ifname:
>>
>> e.g.
>> /etc/udev/rules.d/60-persistent-wifi-names.rules:
>> ACTION=="add", ATTRS{idVendor}=="2001",
ATTRS{idProduct}=="331a",
>> NAME="dwa192"
>> ACTION=="add", ATTRS{idVendor}=="2001",
ATTRS{idProduct}=="3315",
>> NAME="dwa182"
>>
>> Re-plug USB device, observe dmesg output.
>>
> Sorry, what I was getting at with my question was:
> Under Fedora I issue iwconfig and it tells me the name of my USB
> wifi adapter is wlp3s0u2,
> Under Ubuntu I issue iwconfig and it tells me the name of my USB
> wifi adapter is wlx6c722000acc4.
>
> Why is there not a core Linux standard that specifies what the name
> of the device must be so that it is the same across all Linux
> Distributions (as in my view it should be). Along those lines, why even
> change the name from wlan0, sure that doesn't indicate what type of
> device it is, but who cares, the driver is written for the chipset in
> the device and will work irrespective of whether the device with that
> chipset is USB or PCI.
Fedora and Ubuntu use different udev naming rules. Under Fedora, the
device name "wlp3s0u2" means "wireless" (the "wl"), on PCI
bus 3
("p3"), subdevice 0 ("s0"), unit 2 ("u2"). Typically, if
you see a
"unit" part in a device name, it's probably a USB device. It makes
perfect sense based on Fedora's udev rules. A wired, PCI-based NIC
might be "enp4s0" (ethernet NIC, PCI bus 4, subdevice 0).
Ubuntu uses a similar prefix ("wl" for wireless), but they have
different udev naming rules. Based on what you've given above, it looks
like just put in an "x" followed by the MAC address of the NIC in hex.
That also makes sense and may be easier to chase than Fedora's in some
cases.
It hadn't registered to me that Ubuntu's convention was the mac
address,
but given that it is, and how the mac address is represented, the "x"
preceding the mac address makes perfect sense.
I'm not saying the either naming convention is right or wrong, what I'm
objecting to is the fact that they are different. In my view it doesn't
matter how the device name is derived as long as whatever derivation a
distribution uses equates to the same name result across all
distributions. In fact as far as I am concerned it serves no sensible
purpose, in this case, to rename wlan0 to wlp3s0u2. After all the device
driver for my device is written specifically for the chipset in the
device, not the device, all the driver is doing is generating the
channel program to tell the chipset what to do for the function being
requested, and whether the device is usb, pci or ethernet is irrelevant
to the driver, all it is doing is sending the the channel program
commands to the device named on the network interface and it is up to
the network interface to take care of how that "data" gets to the device
based on what type of device it is and where it is.
In fact, for me, Fedora's naming convention raises more questions than
it answers. Without knowing anything about the internal hardware design
of a motherboard, how is a usb port on a pci bus, I would expect pci
ports to be on a pci bus and usb ports to be on a usb bus, and relative
to usb ports I would expect there to be a separate bus for usb 2 and usb
3 ports.
The important bit here is each distribution has different rules and
ways
to do things and you really can't argue which one is "right". For
example, Fedora/Red Hat/CentOS uses "rpm" to package things and yum
and/or dnf to install/manage them and you use the SAME tool for most
operations, while Ubuntu uses "deb" to package and apt/dpkg to
install/manage them and I always have trouble remembering which tool to
use at what time (was that "apt-get install" to install and "dpkg
--list" to see what is available? Geeze!").
I agree with you here but
both Ubuntu and Fedora have the same issue. I
get confused in Ubuntu with when to use apt-get and apt. But having said
this I get confused in Fedora between when to use dnf and rpm, I've been
trying to check things with dnf and not succeeding only to find a
similar query on this mailing list and the answer saying to use rpm to
perform the function.
I prefer the consistency of Fedora's mechanism with one command, but
that doesn't mean it's "right". It's just my preference. For
device
names, you modify the udev rules to make the names whatever you prefer.
That's your privilege. You can't do that in Windows or OSX. You're stuck
with whatever they decide to use (I DETEST Windows' "Network Connection
1", Network Connection 2" crap).
The windows naming convention
doesn't bother me (I think it is ideal
anyway, not that I'm a Windows advocate) as I never use it anyway. If I
need to switch between wireless connections I do it through "network
manager" where like in Fedora the connections are named according to the
SSID they use, and if I need to switch between wireless and ethernet
connections I activate/deactivate the relevant connection through
"device manager" and then "network manager" to actually connect.
Under linux the same activation/deactivation/connect/disconnect can be
done through "network manager", but Ubuntu and Fedora seem to have a
different interpretation of what "ONBOOT=yes/no" means. In Fedora if an
adapter is set to "ONBOOT=no" Fedora interprets that to mean never
connect the device to the network, whereas under Ubuntu they interpret
the same statement literally, ie: don't connect the device at boot time,
but connect it at display manager time.
regards,
Steve
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigitalricks(a)alldigital.com -
- AIM/Skype: therps2 ICQ: 226437340 Yahoo: origrps2 -
- -
- Make it idiot proof and someone will make a better idiot. -
----------------------------------------------------------------------
_______________________________________________
users mailing list --users(a)lists.fedoraproject.org
To unsubscribe send an email tousers-leave(a)lists.fedoraproject.org