Closed Saentist closed 2 years ago
Interesting. I wonder how we can fix this.
A dirty way to do it would be an if-then of "if interface name starts with W, then define as Wireless instead of Ethernet." As, to my knowledge, most distros using both old style and predictable naming will still set a wireless interface name with a wl* at the front, be it wl(macaddresshere) or wl(port here) or wlan0, wlan1 etc.
Dropping it down to just w lets it reach over a broader scope past that, but wl might be safer.
This cannot be practical because lot of modern OS decide to name interface by port irq etc. not as in old time eth0-x wlan0-x Now inserting new adapter chang name of lan interfaces
$iwconfig
lo no wireless extensions.
enp2s0 no wireless extensions.
wlp1s0f0 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=0 dBm
Retry short long limit:2 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Ideally there is a file within /sys we can use to distinguish WiFi devices from Ethernet devices. (I haven't checked yet)
Going off of the Nic names alone is risky as they can be arbitrarily set.
Isn't Bluetooth devices must be show also be in this section?
I'm not sure. Is your computer currently using network over Bluetooth?
When connecting a Linux machine to the network using Bluetooth tethering, I'm not sure what the network devices then look like.
If a Bluetooth dongle is present but not being used to connect to a network, I don't think it will appear as a network device.
@jrgp https://github.com/jrgp/linfo/blob/2f6ff8401df687f1dd21481dd7147425e66ac952/src/Linfo/OS/Linux.php#L986-L988 now we can delete this
I'm not sure. Is your computer currently using network over Bluetooth?
When connecting a Linux machine to the network using Bluetooth tethering, I'm not sure what the network devices then look like.
If a Bluetooth dongle is present but not being used to connect to a network, I don't think it will appear as a network device.
I use bluetooth to collect data from bluetooth sensors to Home assistant.
@jrgp
now we can delete this
Deleted
I'm not sure. Is your computer currently using network over Bluetooth? When connecting a Linux machine to the network using Bluetooth tethering, I'm not sure what the network devices then look like. If a Bluetooth dongle is present but not being used to connect to a network, I don't think it will appear as a network device.
I use bluetooth to collect data from bluetooth sensors to Home assistant.
I'm not sure how this should be shown within Linfo as I'm unsure if those become network interfaces.
Wifi card show as Ethernet