Re: [Solved] Command to Toggle wifi adapter enabled/disabl

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
johnywhy

Re: [Unsolved] Command to Toggle wifi adapter enabled/disabl

Post by johnywhy »

$ lspci -nnk | grep -iA2 net
02:00.0 Network controller [0280]: Ralink corp. RT5390 Wireless 802.11n 1T/1R PCIe [1814:5390]
Subsystem: Foxconn International, Inc. Device [105b:e054]
Kernel driver in use: rt2800pci
03:00.0 Ethernet controller [0200]: Qualcomm Atheros AR8161 Gigabit Ethernet [1969:1091] (rev 10)
Subsystem: ASUSTeK Computer Inc. Device [1043:201f]
Kernel driver in use: alx
based on that, i tried
/etc/modprobe.d/blacklist:
blacklist rt2800pci
but adapter still loaded on boot.

many thx
JeremyB
Level 21
Level 21
Posts: 13880
Joined: Fri Feb 21, 2014 8:17 am

Re: [Unsolved] Command to Toggle wifi adapter enabled/disabl

Post by JeremyB »

johnywhy wrote:
$ lspci -nnk | grep -iA2 net
02:00.0 Network controller [0280]: Ralink corp. RT5390 Wireless 802.11n 1T/1R PCIe [1814:5390]
Subsystem: Foxconn International, Inc. Device [105b:e054]
Kernel driver in use: rt2800pci
03:00.0 Ethernet controller [0200]: Qualcomm Atheros AR8161 Gigabit Ethernet [1969:1091] (rev 10)
Subsystem: ASUSTeK Computer Inc. Device [1043:201f]
Kernel driver in use: alx
based on that, i tried
/etc/modprobe.d/blacklist:
blacklist rt2800pci
but adapter still loaded on boot.

many thx
But does

Code: Select all

lshw -c net
Show Network UNCLAIMED, I think the lshw will show it in caps
johnywhy

Re: [Unsolved] Command to Toggle wifi adapter enabled/disabl

Post by johnywhy »

JeremyB wrote:does

Code: Select all

lshw -c net
Show Network UNCLAIMED, I think the lshw will show it in caps
under what conditions do you want me to try that? With the adapter blacklisted? If so, i don't know which blacklist string you want me to try. I've tried 4 different ones. See post above, and last post on pg 1.

thx!
JeremyB
Level 21
Level 21
Posts: 13880
Joined: Fri Feb 21, 2014 8:17 am

Re: [Unsolved] Command to Toggle wifi adapter enabled/disabl

Post by JeremyB »

Post

Code: Select all

cat /etc/modules
Something must be overriding the blacklist
johnywhy

Re: [Unsolved] Command to Toggle wifi adapter enabled/disabl

Post by johnywhy »

JeremyB wrote:Post

Code: Select all

cat /etc/modules
under what conditions do you want me to try that? With the adapter blacklisted? If so, i don't know which blacklist string you want me to try. I've tried 4 different ones. Plz see first post above, and last post on pg 1.

thx!
JeremyB
Level 21
Level 21
Posts: 13880
Joined: Fri Feb 21, 2014 8:17 am

Re: [Unsolved] Command to Toggle wifi adapter enabled/disabl

Post by JeremyB »

johnywhy wrote:
JeremyB wrote:Post

Code: Select all

cat /etc/modules
under what conditions do you want me to try that? With the adapter blacklisted? If so, i don't know which blacklist string you want me to try. I've tried 4 different ones. See post above, and last post on pg 1.

thx!

Actually just run this

Code: Select all

wget -N -t 5 -T 10 https://github.com/UbuntuForums/wireless-info/raw/master/wireless-info && \
chmod +x wireless-info && \
./wireless-info
and post the wireless-info.txt as most of the info should be there and it should show how a driver can load while being on the blacklist


I do have a script that I have working on my machine and instructions on how to get it working, if this blacklist issue can be fixed
johnywhy

Re: [Unsolved] Command to Toggle wifi adapter enabled/disabl

Post by johnywhy »

OK, so you want me to run wireless-info without the adapter disabled in the blacklist or interfaces files?

Thx!
JeremyB
Level 21
Level 21
Posts: 13880
Joined: Fri Feb 21, 2014 8:17 am

Re: Re: [Unsolved] Command to Toggle wifi adapter enabled/di

Post by JeremyB »

As it is now
johnywhy

Re: Re: [Unsolved] Command to Toggle wifi adapter enabled/di

Post by johnywhy »

JeremyB wrote:As it is now
"now"? But i keep changing things-- blacklisting, then removing the blacklist, etc. Which "now" do you mean? When i posted above it was blacklisted. Now it's not blacklisted.

Btw, the external wifi adapter was not attached when i ran this.
JeremyB wrote:

Code: Select all

wget -N -t 5 -T 10 https://github.com/UbuntuForums/wireless-info/raw/master/wireless-info && \
chmod +x wireless-info && \
./wireless-info
Is this 3 separate commands? Or one command? In your post, there are line-breaks between them.
when i execute the first one at a command line,
i get a new prompt that looks like
>
Then i try to execute the second one,
chmod +x wireless-info && \
and nothing visible happens.
Then i do the third one, and i get:
> ./wireless-info
--2015-09-20 10:35:49-- https://github.com/UbuntuForums/wireles ... eless-info
Resolving github.com (github.com)... 192.30.252.131
Connecting to github.com (github.com)|192.30.252.131|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/Ubunt ... eless-info [following]
--2015-09-20 10:35:50-- https://raw.githubusercontent.com/Ubunt ... eless-info
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 199.27.79.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|199.27.79.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15749 (15K) [text/plain]
Last-modified header missing -- time-stamps turned off.
--2015-09-20 10:35:50-- https://raw.githubusercontent.com/Ubunt ... eless-info
Reusing existing connection to raw.githubusercontent.com:443.
HTTP request sent, awaiting response... 200 OK
Length: 15749 (15K) [text/plain]
Saving to: ‘wireless-info’

100%[==============================================================================================================================>] 15,749 --.-K/s in 0s

2015-09-20 10:35:50 (238 MB/s) - ‘wireless-info’ saved [15749/15749]


Results saved in "/home/boom/wireless-info.txt".

Results also archived in "/home/boom/wireless-info.tar.gz", as they exceed the 19.5 kB size limit for ".txt" attachments on the Ubuntu Forums.
When i try to attach wireless-info.txt, the forum says "extension not allowed". Below i pasted the contents of wireless-info.txt.

thx!

########## wireless info START ##########

Report from: 20 Sep 2015 10:35 PDT -0700

Booted last: 20 Sep 2015 10:27 PDT -0700

Script from: 14 Jul 2015 17:04 UTC +0000

##### release ###########################

Distributor ID: LinuxMint
Description: Linux Mint 17.2 Rafaela
Release: 17.2
Codename: rafaela

##### kernel ############################

Linux 3.16.0-46-generic #62~14.04.1-Ubuntu SMP Tue Aug 11 16:27:16 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Parameters: ro, quiet, splash, vt.handoff=7

##### desktop ###########################

Xfce

##### lspci #############################

02:00.0 Network controller [0280]: Ralink corp. RT5390 Wireless 802.11n 1T/1R PCIe [1814:5390]
Subsystem: Foxconn International, Inc. Device [105b:e054]
Kernel driver in use: rt2800pci

03:00.0 Ethernet controller [0200]: Qualcomm Atheros AR8161 Gigabit Ethernet [1969:1091] (rev 10)
Subsystem: ASUSTeK Computer Inc. Device [1043:201f]
Kernel driver in use: alx

##### lsusb #############################

Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 13d3:5188 IMC Networks
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

##### PCMCIA card info ##################

##### rfkill ############################

0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
1: asus-wlan: Wireless LAN
Soft blocked: no
Hard blocked: no

##### lsmod #############################

asus_nb_wmi 21128 0
asus_wmi 24094 1 asus_nb_wmi
sparse_keymap 13948 1 asus_wmi
rt2800pci 13630 0
rt2800mmio 20986 1 rt2800pci
rt2800lib 89076 2 rt2800pci,rt2800mmio
rt2x00pci 13287 1 rt2800pci
rt2x00mmio 13603 2 rt2800pci,rt2800mmio
rt2x00lib 55307 5 rt2x00pci,rt2800lib,rt2800pci,rt2800mmio,rt2x00mmio
mac80211 652777 3 rt2x00lib,rt2x00pci,rt2800lib
cfg80211 498458 2 mac80211,rt2x00lib
eeprom_93cx6 13344 1 rt2800pci
crc_ccitt 12707 1 rt2800lib
wmi 19193 1 asus_wmi
video 20128 2 i915,asus_wmi

##### interfaces ########################

auto lo
iface lo inet loopback

##### ifconfig ##########################

eth0 Link encap:Ethernet HWaddr <MAC 'eth0' [IF]>
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:19

wlan0 Link encap:Ethernet HWaddr <MAC 'wlan0' [IF]>
inet addr:192.168.1.128 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::<IP6 'wlan0' [IF]>/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1469 errors:0 dropped:0 overruns:0 frame:0
TX packets:998 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:680153 (680.1 KB) TX bytes:231753 (231.7 KB)

##### iwconfig ##########################

eth0 no wireless extensions.

lo no wireless extensions.

wlan0 IEEE 802.11bgn ESSID:"ASUS-rep"
Mode:Managed Frequency:2.437 GHz Access Point: <MAC 'ASUS-rep' [AC1]>
Bit Rate=43.3 Mb/s Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality=41/70 Signal level=-69 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:39 Invalid misc:85 Missed beacon:0

##### route #############################

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 9 0 0 wlan0

##### resolv.conf #######################

nameserver 127.0.1.1

##### network managers ##################

Installed:

NetworkManager

Running:

root 1153 1 0 10:27 ? 00:00:01 NetworkManager

##### NetworkManager info ###############

NetworkManager Tool

State: connected (global)

- Device: eth0 -----------------------------------------------------------------
Type: Wired
Driver: alx
State: unavailable
Default: no
HW Address: <MAC 'eth0' [IF]>

Capabilities:
Carrier Detect: yes

Wired Properties
Carrier: off

- Device: wlan0 [ASUS-rep 2] --------------------------------------------------
Type: 802.11 WiFi
Driver: rt2800pci
State: connected
Default: yes
HW Address: <MAC 'wlan0' [IF]>

Capabilities:
Speed: 43 Mb/s

Wireless Properties
WEP Encryption: yes
WPA Encryption: yes
WPA2 Encryption: yes

Wireless Access Points (* = current AP)
*ASUS-rep: Infra, <MAC 'ASUS-rep' [AC1]>, Freq 2437 MHz, Rate 54 Mb/s, Strength 51
ASUS: Infra, <MAC 'ASUS' [AC2]>, Freq 2437 MHz, Rate 54 Mb/s, Strength 15

IPv4 Settings:
Address: 192.168.1.128
Prefix: 24 (255.255.255.0)
Gateway: 192.168.1.1

DNS: 192.168.1.1

##### NetworkManager.state ##############

[main]
NetworkingEnabled=true
WirelessEnabled=true
WWANEnabled=true
WimaxEnabled=true

##### NetworkManager.conf ###############

[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq

[ifupdown]
managed=false

##### NetworkManager profiles ###########

[[/etc/NetworkManager/system-connections/ASUS-rep 2]] (600 root)
[connection] id=ASUS-rep 2 | type=802-11-wireless
[802-11-wireless] ssid=ASUS-rep
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/Noisebridge Legacy 2.4 gHz_EXT 1]] (600 root)
[connection] id=Noisebridge Legacy 2.4 gHz_EXT 1 | type=802-11-wireless
[802-11-wireless] ssid=Noisebridge Legacy 2.4 gHz_EXT | mac-address=<MAC 'wlan0' [IF]>
[ipv4] method=auto
[ipv6] method=auto

[[/etc/NetworkManager/system-connections/CBCI-852E-2.4]] (600 root)
[connection] id=CBCI-852E-2.4 | type=802-11-wireless
[802-11-wireless] ssid=CBCI-852E-2.4 | mac-address=<MAC 'wlan0' [IF]>
[ipv4] method=auto
[ipv6] method=auto

[[/etc/NetworkManager/system-connections/SFPL-WIRELESS]] (600 root)
[connection] id=SFPL-WIRELESS | type=802-11-wireless
[802-11-wireless] ssid=SFPL-WIRELESS | mac-address=<MAC 'wlan0' [IF]>
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/Google Starbucks 2]] (600 root)
[connection] id=Google Starbucks 2 | type=802-11-wireless
[802-11-wireless] ssid=Google Starbucks
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/WholeFoodsMarket 1]] (600 root)
[connection] id=WholeFoodsMarket 1 | type=802-11-wireless
[802-11-wireless] ssid=WholeFoodsMarket
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/Triple Voodoo Brewery]] (600 root)
[connection] id=Triple Voodoo Brewery | type=802-11-wireless
[802-11-wireless] ssid=Triple Voodoo Brewery | mac-address=<MAC 'wlan0' [IF]>
[ipv4] method=auto
[ipv6] method=auto

[[/etc/NetworkManager/system-connections/Metreon Guest]] (600 root)
[connection] id=Metreon Guest | type=802-11-wireless
[802-11-wireless] ssid=Metreon Guest | mac-address=<MAC 'wlan0' [IF]>
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/Doctors_Lounge]] (600 root)
[connection] id=Doctors_Lounge | type=802-11-wireless
[802-11-wireless] ssid=Doctors_Lounge | mac-address=<MAC 'wlan0' [IF]>
[ipv4] method=auto
[ipv6] method=auto

[[/etc/NetworkManager/system-connections/ASUS_EXT 1]] (600 root)
[connection] id=ASUS_EXT 1 | type=802-11-wireless
[802-11-wireless] ssid=ASUS_EXT | mac-address=<MAC 'wlan0' [IF]>
[ipv4] method=auto
[ipv6] method=auto

[[/etc/NetworkManager/system-connections/WholeFoodsMarket]] (600 root)
[connection] id=WholeFoodsMarket | type=802-11-wireless
[802-11-wireless] ssid=WholeFoodsMarket | mac-address=<MAC 'wlan0' [IF]>
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/RandysPlace]] (600 root)
[connection] id=RandysPlace | type=802-11-wireless
[802-11-wireless] ssid=RandysPlace | mac-address=<MAC 'wlan0' [IF]>
[ipv4] method=auto
[ipv6] method=auto

[[/etc/NetworkManager/system-connections/Sparky'sDiner]] (600 root)
[connection] id=Sparky'sDiner | type=802-11-wireless
[802-11-wireless] ssid=Sparky'sDiner
[ipv4] method=auto
[ipv6] method=auto

[[/etc/NetworkManager/system-connections/Wifi-Repeater]] (600 root)
[connection] id=Wifi-Repeater | type=802-11-wireless
[802-11-wireless] ssid=Wifi-Repeater | mac-address=<MAC 'wlan0' [IF]>
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/Google Starbucks 1]] (600 root)
[connection] id=Google Starbucks 1 | type=802-11-wireless
[802-11-wireless] ssid=Google Starbucks | mac-address=<MAC address>
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/ASUS-rep]] (600 root)
[connection] id=ASUS-rep | type=802-11-wireless
[802-11-wireless] ssid=ASUS-rep | mac-address=<MAC 'wlan0' [IF]>
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/izninja]] (600 root)
[connection] id=izninja | type=802-11-wireless
[802-11-wireless] ssid=izninja | mac-address=<MAC 'wlan0' [IF]>
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/MelsDriveInGuests1]] (600 root)
[connection] id=MelsDriveInGuests1 | type=802-11-wireless
[802-11-wireless] ssid=MelsDriveInGuests1 | mac-address=<MAC 'wlan0' [IF]>
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/Noisebridge Legacy 2.4 gHz 1]] (600 root)
[connection] id=Noisebridge Legacy 2.4 gHz 1 | type=802-11-wireless
[802-11-wireless] ssid=Noisebridge Legacy 2.4 gHz | mac-address=<MAC address>
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/NETGEAR_EXT]] (600 root)
[connection] id=NETGEAR_EXT | type=802-11-wireless
[802-11-wireless] ssid=NETGEAR_EXT | mac-address=<MAC 'wlan0' [IF]>
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/THE-LAB]] (600 root)
[connection] id=THE-LAB | type=802-11-wireless
[802-11-wireless] ssid=THE-LAB | mac-address=<MAC 'wlan0' [IF]>
[ipv4] method=auto
[ipv6] method=auto

[[/etc/NetworkManager/system-connections/ASUS]] (600 root)
[connection] id=ASUS | type=802-11-wireless
[802-11-wireless] ssid=ASUS | mac-address=<MAC address>
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/CafeLaTaza]] (600 root)
[connection] id=CafeLaTaza | type=802-11-wireless
[802-11-wireless] ssid=CafeLaTaza | mac-address=<MAC address>
[ipv4] method=auto
[ipv6] method=auto

[[/etc/NetworkManager/system-connections/Chicken Tikka Masala Burrito_EXT]] (600 root)
[connection] id=Chicken Tikka Masala Burrito_EXT | type=802-11-wireless
[802-11-wireless] ssid=Chicken Tikka Masala Burrito_EXT | mac-address=<MAC 'wlan0' [IF]>
[ipv4] method=auto
[ipv6] method=auto

[[/etc/NetworkManager/system-connections/SFPL-WIRELESS_EXT]] (600 root)
[connection] id=SFPL-WIRELESS_EXT | type=802-11-wireless
[802-11-wireless] ssid=SFPL-WIRELESS_EXT | mac-address=<MAC 'wlan0' [IF]>
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/SFPL-WIRELESS-rep]] (600 root)
[connection] id=SFPL-WIRELESS-rep | type=802-11-wireless
[802-11-wireless] ssid=SFPL-WIRELESS-rep | mac-address=<MAC 'wlan0' [IF]>
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/Chicken Tikka Masala Burrito]] (600 root)
[connection] id=Chicken Tikka Masala Burrito | type=802-11-wireless
[802-11-wireless] ssid=Chicken Tikka Masala Burrito | mac-address=<MAC 'wlan0' [IF]>
[ipv4] method=auto
[ipv6] method=auto

[[/etc/NetworkManager/system-connections/Target Guest Wi-Fi]] (600 root)
[connection] id=Target Guest Wi-Fi | type=802-11-wireless
[802-11-wireless] ssid=Target Guest Wi-Fi | mac-address=<MAC 'wlan0' [IF]>
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/ROAD-HOUSE-CAFE]] (600 root)
[connection] id=ROAD-HOUSE-CAFE | type=802-11-wireless
[802-11-wireless] ssid=ROAD-HOUSE-CAFE | mac-address=<MAC 'wlan0' [IF]>
[ipv4] method=auto
[ipv6] method=auto

[[/etc/NetworkManager/system-connections/ASUS_EXT]] (600 root)
[connection] id=ASUS_EXT | type=802-11-wireless
[802-11-wireless] ssid=ASUS_EXT | mac-address=<MAC 'wlan0' [IF]>
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/#SFWiFi]] (600 root)
[connection] id=#SFWiFi | type=802-11-wireless
[802-11-wireless] ssid=#SFWiFi
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/ASUS-rep 1]] (600 root)
[connection] id=ASUS-rep 1 | type=802-11-wireless
[802-11-wireless] ssid=ASUS-rep | mac-address=<MAC address>
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/Doctors_Lounge_EXT]] (600 root)
[connection] id=Doctors_Lounge_EXT | type=802-11-wireless
[802-11-wireless] ssid=Doctors_Lounge_EXT | mac-address=<MAC 'wlan0' [IF]>
[ipv4] method=auto
[ipv6] method=auto

[[/etc/NetworkManager/system-connections/OneTouchJ]] (600 root)
[connection] id=OneTouchJ | type=802-11-wireless
[802-11-wireless] ssid=OneTouchJ | mac-address=<MAC 'wlan0' [IF]>
[ipv4] method=auto
[ipv6] method=auto

[[/etc/NetworkManager/system-connections/Wifi-Repeater 1]] (600 root)
[connection] id=Wifi-Repeater 1 | type=802-11-wireless
[802-11-wireless] ssid=Wifi-Repeater | mac-address=<MAC 'wlan0' [IF]>
[ipv4] method=auto
[ipv6] method=auto

[[/etc/NetworkManager/system-connections/Google Starbucks]] (600 root)
[connection] id=Google Starbucks | type=802-11-wireless
[802-11-wireless] ssid=Google Starbucks | mac-address=<MAC 'wlan0' [IF]>
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/OneTouchJ 1]] (600 root)
[connection] id=OneTouchJ 1 | type=802-11-wireless
[802-11-wireless] ssid=OneTouchJ | mac-address=<MAC address>
[ipv4] method=auto
[ipv6] method=auto

[[/etc/NetworkManager/system-connections/PIZZA JOINT-Guest]] (600 root)
[connection] id=PIZZA JOINT-Guest | type=802-11-wireless
[802-11-wireless] ssid=PIZZA JOINT-Guest | mac-address=<MAC address>
[ipv4] method=auto
[ipv6] method=auto

[[/etc/NetworkManager/system-connections/RandysPlace 1]] (600 root)
[connection] id=RandysPlace 1 | type=802-11-wireless
[802-11-wireless] ssid=RandysPlace | mac-address=<MAC address>
[ipv4] method=auto
[ipv6] method=auto

[[/etc/NetworkManager/system-connections/Noisebridge Legacy 2.4 gHz_EXT]] (600 root)
[connection] id=Noisebridge Legacy 2.4 gHz_EXT | type=802-11-wireless
[802-11-wireless] ssid=Noisebridge Legacy 2.4 gHz_EXT | mac-address=<MAC 'wlan0' [IF]>
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/Google Starbucks_EXT]] (600 root)
[connection] id=Google Starbucks_EXT | type=802-11-wireless
[802-11-wireless] ssid=Google Starbucks_EXT | mac-address=<MAC 'wlan0' [IF]>
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/Noisebridge Legacy 2.4 gHz]] (600 root)
[connection] id=Noisebridge Legacy 2.4 gHz | type=802-11-wireless
[802-11-wireless] ssid=Noisebridge Legacy 2.4 gHz | mac-address=<MAC address>
[ipv6] method=auto
[ipv4] method=auto

[[/etc/NetworkManager/system-connections/Mel's Drive-In Free WiFi y]] (600 root)
[connection] id=Mel's Drive-In Free WiFi y | type=802-11-wireless
[802-11-wireless] ssid=Mel's Drive-In Free WiFi y | mac-address=<MAC 'wlan0' [IF]>
[ipv6] method=auto
[ipv4] method=auto

##### iw reg get ########################

Region: America/Los_Angeles (based on set time zone)

country 00:
(2402 - 2472 @ 40), (3, 20)
(2457 - 2482 @ 40), (3, 20), PASSIVE-SCAN, NO-IBSS
(2474 - 2494 @ 20), (3, 20), NO-OFDM, PASSIVE-SCAN, NO-IBSS
(5170 - 5250 @ 40), (3, 20), PASSIVE-SCAN, NO-IBSS
(5735 - 5835 @ 40), (3, 20), PASSIVE-SCAN, NO-IBSS

##### iwlist channels ###################

eth0 no frequency information.

lo no frequency information.

wlan0 14 channels in total; available frequencies :
Channel 01 : 2.412 GHz
Channel 02 : 2.417 GHz
Channel 03 : 2.422 GHz
Channel 04 : 2.427 GHz
Channel 05 : 2.432 GHz
Channel 06 : 2.437 GHz
Channel 07 : 2.442 GHz
Channel 08 : 2.447 GHz
Channel 09 : 2.452 GHz
Channel 10 : 2.457 GHz
Channel 11 : 2.462 GHz
Channel 12 : 2.467 GHz
Channel 13 : 2.472 GHz
Channel 14 : 2.484 GHz
Current Frequency:2.437 GHz (Channel 6)

##### iwlist scan #######################

eth0 Interface doesn't support scanning.

lo Interface doesn't support scanning.

Channel occupancy:

2 APs on Frequency:2.437 GHz (Channel 6)

wlan0 Scan completed :
Cell 01 - Address: <MAC 'ASUS-rep' [AC1]>
Channel:6
Frequency:2.437 GHz (Channel 6)
Quality=43/70 Signal level=-67 dBm
Encryption key:off
ESSID:"ASUS-rep"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
9 Mb/s; 12 Mb/s; 18 Mb/s
Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
Mode:Master
Extra:tsf=0000000740829332
Extra: Last beacon: 144ms ago
Cell 02 - Address: <MAC 'ASUS' [AC2]>
Channel:6
Frequency:2.437 GHz (Channel 6)
Quality=17/70 Signal level=-93 dBm
Encryption key:off
ESSID:"ASUS"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s
Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
Mode:Master
Extra:tsf=0000021d656fc183
Extra: Last beacon: 164ms ago

##### module infos ######################

[rt2800pci]
filename: /lib/modules/3.16.0-46-generic/kernel/drivers/net/wireless/rt2x00/rt2800pci.ko
license: GPL
firmware: rt2860.bin
description: Ralink RT2800 PCI & PCMCIA Wireless LAN driver.
version: 2.3.0
author: http://rt2x00.serialmonkey.com
srcversion: E643C8F6A545F357EEB41AF
depends: rt2x00lib,rt2800lib,rt2800mmio,rt2x00mmio,rt2x00pci,eeprom_93cx6
intree: Y
vermagic: 3.16.0-46-generic SMP mod_unload modversions
signer: Magrathea: Glacier signing key
sig_key: 42:70:EE:2F:79:25:EC:FF:7D:DB:B5:97:82:CC:0D:B2:6E:5C:03:29
sig_hashalgo: sha512
parm: nohwcrypt:Disable hardware encryption. (bool)

[rt2800mmio]
filename: /lib/modules/3.16.0-46-generic/kernel/drivers/net/wireless/rt2x00/rt2800mmio.ko
license: GPL
description: rt2800 MMIO library
version: 2.3.0
author: http://rt2x00.serialmonkey.com
srcversion: 4F1D9212CBFF4F4BE09171A
depends: rt2800lib,rt2x00lib,rt2x00mmio
intree: Y
vermagic: 3.16.0-46-generic SMP mod_unload modversions
signer: Magrathea: Glacier signing key
sig_key: 42:70:EE:2F:79:25:EC:FF:7D:DB:B5:97:82:CC:0D:B2:6E:5C:03:29
sig_hashalgo: sha512

[rt2800lib]
filename: /lib/modules/3.16.0-46-generic/kernel/drivers/net/wireless/rt2x00/rt2800lib.ko
license: GPL
description: Ralink RT2800 library
version: 2.3.0
author: http://rt2x00.serialmonkey.com, Bartlomiej Zolnierkiewicz
srcversion: EDDCA794C9E4C3981037918
depends: rt2x00lib,mac80211,crc-ccitt
intree: Y
vermagic: 3.16.0-46-generic SMP mod_unload modversions
signer: Magrathea: Glacier signing key
sig_key: 42:70:EE:2F:79:25:EC:FF:7D:DB:B5:97:82:CC:0D:B2:6E:5C:03:29
sig_hashalgo: sha512

[rt2x00pci]
filename: /lib/modules/3.16.0-46-generic/kernel/drivers/net/wireless/rt2x00/rt2x00pci.ko
license: GPL
description: rt2x00 pci library
version: 2.3.0
author: http://rt2x00.serialmonkey.com
srcversion: 7856EF56F97508465F566A2
depends: rt2x00lib,mac80211
intree: Y
vermagic: 3.16.0-46-generic SMP mod_unload modversions
signer: Magrathea: Glacier signing key
sig_key: 42:70:EE:2F:79:25:EC:FF:7D:DB:B5:97:82:CC:0D:B2:6E:5C:03:29
sig_hashalgo: sha512

[rt2x00mmio]
filename: /lib/modules/3.16.0-46-generic/kernel/drivers/net/wireless/rt2x00/rt2x00mmio.ko
license: GPL
description: rt2x00 mmio library
version: 2.3.0
author: http://rt2x00.serialmonkey.com
srcversion: 37A76810C0FE9E4E11476DA
depends: rt2x00lib
intree: Y
vermagic: 3.16.0-46-generic SMP mod_unload modversions
signer: Magrathea: Glacier signing key
sig_key: 42:70:EE:2F:79:25:EC:FF:7D:DB:B5:97:82:CC:0D:B2:6E:5C:03:29
sig_hashalgo: sha512

[rt2x00lib]
filename: /lib/modules/3.16.0-46-generic/kernel/drivers/net/wireless/rt2x00/rt2x00lib.ko
license: GPL
description: rt2x00 library
version: 2.3.0
author: http://rt2x00.serialmonkey.com
srcversion: 71EFA3CA86D02D0528C49EE
depends: mac80211,cfg80211
intree: Y
vermagic: 3.16.0-46-generic SMP mod_unload modversions
signer: Magrathea: Glacier signing key
sig_key: 42:70:EE:2F:79:25:EC:FF:7D:DB:B5:97:82:CC:0D:B2:6E:5C:03:29
sig_hashalgo: sha512

[mac80211]
filename: /lib/modules/3.16.0-46-generic/kernel/net/mac80211/mac80211.ko
license: GPL
description: IEEE 802.11 subsystem
srcversion: 5375B0354B6CF7C84FC1934
depends: cfg80211
intree: Y
vermagic: 3.16.0-46-generic SMP mod_unload modversions
signer: Magrathea: Glacier signing key
sig_key: 42:70:EE:2F:79:25:EC:FF:7D:DB:B5:97:82:CC:0D:B2:6E:5C:03:29
sig_hashalgo: sha512
parm: max_nullfunc_tries:Maximum nullfunc tx tries before disconnecting (reason 4). (int)
parm: max_probe_tries:Maximum probe tries before disconnecting (reason 4). (int)
parm: beacon_loss_count:Number of beacon intervals before we decide beacon was lost. (int)
parm: probe_wait_ms:Maximum time(ms) to wait for probe response before disconnecting (reason 4). (int)
parm: ieee80211_default_rc_algo:Default rate control algorithm for mac80211 to use (charp)

[cfg80211]
filename: /lib/modules/3.16.0-46-generic/kernel/net/wireless/cfg80211.ko
description: wireless configuration support
license: GPL
author: Johannes Berg
srcversion: 046346857FD53951C911443
depends:
intree: Y
vermagic: 3.16.0-46-generic SMP mod_unload modversions
signer: Magrathea: Glacier signing key
sig_key: 42:70:EE:2F:79:25:EC:FF:7D:DB:B5:97:82:CC:0D:B2:6E:5C:03:29
sig_hashalgo: sha512
parm: ieee80211_regdom:IEEE 802.11 regulatory domain code (charp)
parm: cfg80211_disable_40mhz_24ghz:Disable 40MHz support in the 2.4GHz band (bool)

##### module parameters #################

[rt2800pci]
nohwcrypt: N

[mac80211]
beacon_loss_count: 7
ieee80211_default_rc_algo: minstrel_ht
max_nullfunc_tries: 2
max_probe_tries: 5
probe_wait_ms: 500

[cfg80211]
cfg80211_disable_40mhz_24ghz: N
ieee80211_regdom: 00

##### /etc/modules ######################

lp
rtc

##### modprobe options ##################

[/etc/modprobe.d/50-8188eu.conf]
blacklist r8188eu

[/etc/modprobe.d/blacklist-ath_pci.conf]
blacklist ath_pci

[/etc/modprobe.d/blacklist.conf]
blacklist evbug
blacklist usbmouse
blacklist usbkbd
blacklist eepro100
blacklist de4x5
blacklist eth1394
blacklist snd_intel8x0m
blacklist snd_aw2
blacklist i2c_i801
blacklist prism54
blacklist bcm43xx
blacklist garmin_gps
blacklist asus_acpi
blacklist snd_pcsp
blacklist pcspkr
blacklist amd76x_edac

[/etc/modprobe.d/blacklist-rare-network.conf]
alias net-pf-3 off
alias net-pf-6 off
alias net-pf-9 off
alias net-pf-11 off
alias net-pf-12 off
alias net-pf-19 off
alias net-pf-21 off
alias net-pf-36 off

[/etc/modprobe.d/iwlwifi.conf]
remove iwlwifi \
(/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) \
&& /sbin/modprobe -r mac80211

[/etc/modprobe.d/mlx4.conf]
softdep mlx4_core post: mlx4_en

##### rc.local ##########################

exit 0

##### pm-utils ##########################

##### udev rules ########################

[/etc/udev/rules.d/70-persistent-net.rules]
# PCI device 0x1969:0x1091 (alx)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="<MAC 'eth0' [IF]>", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x1814:0x5390 (rt2800pci)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="<MAC 'wlan0' [IF]>", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
# USB device 0x:0x (r8188eu)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="<MAC address>", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan1"

##### dmesg #############################

[ 15.038615] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 1502 detected
[ 15.044650] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5390 detected
[ 19.483429] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2860.bin'
[ 19.660618] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.34
[ 19.788228] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 20.987622] wlan0: authenticate with <MAC 'ASUS-rep' [AC1]>
[ 20.995915] wlan0: send auth to <MAC 'ASUS-rep' [AC1]> (try 1/3)
[ 20.997359] wlan0: authenticated
[ 20.999247] wlan0: associate with <MAC 'ASUS-rep' [AC1]> (try 1/3)
[ 21.003110] wlan0: RX AssocResp from <MAC 'ASUS-rep' [AC1]> (capab=0x401 status=0 aid=2)
[ 21.003238] wlan0: associated
[ 21.003522] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 47.902271] [UFW BLOCK] IN=wlan0 OUT= MAC=<MAC 'wlan0' [IF]>:<MAC 'ASUS-rep' [AC1]>:86:dd SRC=fe80:0000:0000:0000:eaab:faff:fe10:c5d6 DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=130 CODE=0
[ 77.892606] [UFW BLOCK] IN=wlan0 OUT= MAC=<MAC 'wlan0' [IF]>:<MAC 'ASUS-rep' [AC1]>:08:00 SRC=192.168.10.1 DST=224.0.0.1 LEN=28 TOS=0x00 PREC=0x00 TTL=1 ID=0 DF PROTO=2
[ 107.882975] [UFW BLOCK] IN=wlan0 OUT= MAC=<MAC 'wlan0' [IF]>:<MAC 'ASUS-rep' [AC1]>:86:dd SRC=fe80:0000:0000:0000:eaab:faff:fe10:c5d6 DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=130 CODE=0
[ 137.876543] [UFW BLOCK] IN=wlan0 OUT= MAC=<MAC 'wlan0' [IF]>:<MAC 'ASUS-rep' [AC1]>:08:00 SRC=192.168.10.1 DST=224.0.0.1 LEN=28 TOS=0x00 PREC=0x00 TTL=1 ID=0 DF PROTO=2
[ 167.867807] [UFW BLOCK] IN=wlan0 OUT= MAC=<MAC 'wlan0' [IF]>:<MAC 'ASUS-rep' [AC1]>:86:dd SRC=fe80:0000:0000:0000:eaab:faff:fe10:c5d6 DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=130 CODE=0
[ 197.856482] [UFW BLOCK] IN=wlan0 OUT= MAC=<MAC 'wlan0' [IF]>:<MAC 'ASUS-rep' [AC1]>:08:00 SRC=192.168.10.1 DST=224.0.0.1 LEN=28 TOS=0x00 PREC=0x00 TTL=1 ID=0 DF PROTO=2
[ 227.849518] [UFW BLOCK] IN=wlan0 OUT= MAC=<MAC 'wlan0' [IF]>:<MAC 'ASUS-rep' [AC1]>:86:dd SRC=fe80:0000:0000:0000:eaab:faff:fe10:c5d6 DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=130 CODE=0
[ 257.836582] [UFW BLOCK] IN=wlan0 OUT= MAC=<MAC 'wlan0' [IF]>:<MAC 'ASUS-rep' [AC1]>:08:00 SRC=192.168.10.1 DST=224.0.0.1 LEN=28 TOS=0x00 PREC=0x00 TTL=1 ID=0 DF PROTO=2
[ 287.825512] [UFW BLOCK] IN=wlan0 OUT= MAC=<MAC 'wlan0' [IF]>:<MAC 'ASUS-rep' [AC1]>:86:dd SRC=fe80:0000:0000:0000:eaab:faff:fe10:c5d6 DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=130 CODE=0
[ 317.821703] [UFW BLOCK] IN=wlan0 OUT= MAC=<MAC 'wlan0' [IF]>:<MAC 'ASUS-rep' [AC1]>:08:00 SRC=192.168.10.1 DST=224.0.0.1 LEN=28 TOS=0x00 PREC=0x00 TTL=1 ID=0 DF PROTO=2
[ 318.425572] [UFW BLOCK] IN=wlan0 OUT= MAC=<MAC 'wlan0' [IF]>:88:87:17:bf:b3:de:08:00 SRC=192.168.1.92 DST=224.0.0.251 LEN=32 TOS=0x00 PREC=0x00 TTL=1 ID=44531 PROTO=2
[ 347.811355] [UFW BLOCK] IN=wlan0 OUT= MAC=<MAC 'wlan0' [IF]>:<MAC 'ASUS-rep' [AC1]>:86:dd SRC=fe80:0000:0000:0000:eaab:faff:fe10:c5d6 DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=130 CODE=0
[ 377.797804] [UFW BLOCK] IN=wlan0 OUT= MAC=<MAC 'wlan0' [IF]>:<MAC 'ASUS-rep' [AC1]>:08:00 SRC=192.168.10.1 DST=224.0.0.1 LEN=28 TOS=0x00 PREC=0x00 TTL=1 ID=0 DF PROTO=2
[ 378.316565] [UFW BLOCK] IN=wlan0 OUT= MAC=<MAC 'wlan0' [IF]>:88:87:17:bf:b3:de:08:00 SRC=192.168.1.92 DST=224.0.0.251 LEN=32 TOS=0x00 PREC=0x00 TTL=1 ID=1614 PROTO=2
[ 407.791737] [UFW BLOCK] IN=wlan0 OUT= MAC=<MAC 'wlan0' [IF]>:<MAC 'ASUS-rep' [AC1]>:86:dd SRC=fe80:0000:0000:0000:eaab:faff:fe10:c5d6 DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=130 CODE=0
[ 437.776980] [UFW BLOCK] IN=wlan0 OUT= MAC=<MAC 'wlan0' [IF]>:<MAC 'ASUS-rep' [AC1]>:08:00 SRC=192.168.10.1 DST=224.0.0.1 LEN=28 TOS=0x00 PREC=0x00 TTL=1 ID=0 DF PROTO=2
[ 438.202611] [UFW BLOCK] IN=wlan0 OUT= MAC=<MAC 'wlan0' [IF]>:88:87:17:bf:b3:de:08:00 SRC=192.168.1.92 DST=224.0.0.251 LEN=32 TOS=0x00 PREC=0x00 TTL=1 ID=45363 PROTO=2
[ 467.769669] [UFW BLOCK] IN=wlan0 OUT= MAC=<MAC 'wlan0' [IF]>:<MAC 'ASUS-rep' [AC1]>:86:dd SRC=fe80:0000:0000:0000:eaab:faff:fe10:c5d6 DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=130 CODE=0
[ 497.758288] [UFW BLOCK] IN=wlan0 OUT= MAC=<MAC 'wlan0' [IF]>:<MAC 'ASUS-rep' [AC1]>:08:00 SRC=192.168.10.1 DST=224.0.0.1 LEN=28 TOS=0x00 PREC=0x00 TTL=1 ID=0 DF PROTO=2
[ 498.080366] [UFW BLOCK] IN=wlan0 OUT= MAC=<MAC 'wlan0' [IF]>:88:87:17:bf:b3:de:08:00 SRC=192.168.1.92 DST=224.0.0.251 LEN=32 TOS=0x00 PREC=0x00 TTL=1 ID=14258 PROTO=2
[ 498.081225] [UFW BLOCK] IN=wlan0 OUT= MAC=<MAC 'wlan0' [IF]>:e0:c9:7a:8e:58:1f:08:00 SRC=192.168.1.110 DST=224.0.0.251 LEN=32 TOS=0x00 PREC=0x00 TTL=1 ID=38583 PROTO=2
[ 527.750414] [UFW BLOCK] IN=wlan0 OUT= MAC=<MAC 'wlan0' [IF]>:<MAC 'ASUS-rep' [AC1]>:86:dd SRC=fe80:0000:0000:0000:eaab:faff:fe10:c5d6 DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=130 CODE=0

########## wireless info END ############
JeremyB
Level 21
Level 21
Posts: 13880
Joined: Fri Feb 21, 2014 8:17 am

Re: [Unsolved] Command to Toggle wifi adapter enabled/disabl

Post by JeremyB »

Right now the driver for the USB wifi is blacklisted, I thought you wanted to be able to disable the internal card?
johnywhy

Re: [Unsolved] Command to Toggle wifi adapter enabled/disabl

Post by johnywhy »

That's odd, there's nothing in my blacklist file.

It was not plugged in when I ran wireless-info. But anytime I plug it in, it activates and connects no problem.

How can you tell it's blacklisted?

Yes, it's the internal card I want to disable.

Thx!
JeremyB
Level 21
Level 21
Posts: 13880
Joined: Fri Feb 21, 2014 8:17 am

Re: [Unsolved] Command to Toggle wifi adapter enabled/disabl

Post by JeremyB »

[/etc/modprobe.d/50-8188eu.conf]
blacklist r8188eu

Was in the info and the udev results didn't show any other driver that might work for the usb, you might want to see if it does work after plugging it in. After plugging it in, wait a minute then post

Code: Select all

lshw -c net
and it will show UNCLAIMED if there is no driver or list the driver in the rest of the results
Buzzsaw
Level 6
Level 6
Posts: 1318
Joined: Sat Aug 23, 2014 12:53 pm

Re: [Unsolved] Command to Toggle wifi adapter enabled/disabl

Post by Buzzsaw »

Something must be overriding the blacklist
After adding one or more lines to /etc/modprobe.d/blacklist.conf, you have to update the copy of 'blacklist.conf' in the 'initramfs' archive file, otherwise the module(s) will still be loaded at boot:

Code: Select all

sudo update-initramfs -u
Last edited by Buzzsaw on Sun Sep 20, 2015 3:59 pm, edited 2 times in total.
JeremyB
Level 21
Level 21
Posts: 13880
Joined: Fri Feb 21, 2014 8:17 am

Re: [Unsolved] Command to Toggle wifi adapter enabled/disabl

Post by JeremyB »

Buzzsaw wrote:
Something must be overriding the blacklist
After adding one or more lines to /etc/modprobe.d/blacklist.conf, you have to update the copy of 'blacklist.conf' in the 'initramfs' archive file, otherwise the module(s) will still be loaded at boot:

Code: Select all

sudo update-initramfs -u
I have never needed to use that command to blacklist a module
Buzzsaw
Level 6
Level 6
Posts: 1318
Joined: Sat Aug 23, 2014 12:53 pm

Re: [Unsolved] Command to Toggle wifi adapter enabled/disabl

Post by Buzzsaw »

I remember many years ago I tried to blacklist the 'ipw2200' module, and I couldn't understand why it still got loaded after being added to /etc/modprobe.d/blacklist.conf. I didn't know about 'initramfs' then, of course.
johnywhy

Re: [Unsolved] Command to Toggle wifi adapter enabled/disabl

Post by johnywhy »

Ok, couple things--

wrong blacklist file i was editing a file called "blacklist", not "blacklist.conf". I tried again, using the correct blacklist file, but internal adapter is still listed in network manager on reboot WITHOUT using the initramfs command.

Then i tried again with initramfs, and internal wifi is still loading on boot.

initramfs gave me:
$ sudo update-initramfs -u
[sudo] password for boom:
update-initramfs: Generating /boot/initrd.img-3.16.0-46-generic
Warning: No support for locale: en_US.utf8
Here are the contents of my blacklist.conf:
# This file lists those modules which we don't want to be loaded by
# alias expansion, usually so some other driver will be loaded for the
# device instead.

# evbug is a debug tool that should be loaded explicitly
blacklist evbug

# these drivers are very simple, the HID drivers are usually preferred
blacklist usbmouse
blacklist usbkbd

# replaced by e100
blacklist eepro100

# replaced by tulip
blacklist de4x5

# causes no end of confusion by creating unexpected network interfaces
blacklist eth1394

# snd_intel8x0m can interfere with snd_intel8x0, doesn't seem to support much
# hardware on its own (Ubuntu bug #2011, #6810)
blacklist snd_intel8x0m

# Conflicts with dvb driver (which is better for handling this device)
blacklist snd_aw2

# causes failure to suspend on HP compaq nc6000 (Ubuntu: #10306)
blacklist i2c_i801

# replaced by p54pci
blacklist prism54

# replaced by b43 and ssb.
blacklist bcm43xx

# most apps now use garmin usb driver directly (Ubuntu: #114565)
blacklist garmin_gps

# replaced by asus-laptop (Ubuntu: #184721)
blacklist asus_acpi

# low-quality, just noise when being used for sound playback, causes
# hangs at desktop session start (Ubuntu: #246969)
blacklist snd_pcsp

# ugly and loud noise, getting on everyone's nerves; this should be done by a
# nice pulseaudio bing (Ubuntu: #77010)
blacklist pcspkr

# EDAC driver for amd76x clashes with the agp driver preventing the aperture
# from being initialised (Ubuntu: #297750). Blacklist so that the driver
# continues to build and is installable for the few cases where its
# really needed.
blacklist amd76x_edac

# blacklist internal wifi adapter
blacklist RT5390
blacklist wlan0
blacklist Ralink corp. RT5390 Wireless 802.11n 1T/1R PCIe
old dongle: i believe the r8188eu that appears as blacklisted is an older dongle that i'm not using. The new dongle that i'm using is Ralink RT2870, installed using these instructions: http://askubuntu.com/a/554278 and my thread here: http://forums.linuxmint.com/viewtopic.php?f=53&t=204834. When i plug in the new dongle, it appears in network manager and works fine. i get this:
$ sudo lshw -c net
*-network
description: Wireless interface
product: RT5390 Wireless 802.11n 1T/1R PCIe
vendor: Ralink corp.
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlan0
version: 00
serial: 0c:84:dc:09:2b:80
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=rt2800pci driverversion=3.16.0-46-generic firmware=0.34 ip=192.168.43.243 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
resources: irq:17 memory:f7d00000-f7d0ffff
*-network
description: Ethernet interface
product: AR8161 Gigabit Ethernet
vendor: Qualcomm Atheros
physical id: 0
bus info: pci@0000:03:00.0
logical name: eth0
version: 10
serial: ac:22:0b:0d:ee:96
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm pciexpress msi msix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=alx latency=0 link=no multicast=yes port=twisted pair
resources: irq:45 memory:f7c00000-f7c3ffff ioport:e000(size=128)
*-network
description: Wireless interface
physical id: 1
logical name: ra0
serial: 00:e1:b0:27:84:71
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=RALINK WLAN multicast=yes wireless=Ralink STA
thx!
JeremyB
Level 21
Level 21
Posts: 13880
Joined: Fri Feb 21, 2014 8:17 am

Re: [Unsolved] Command to Toggle wifi adapter enabled/disabl

Post by JeremyB »

blacklist for the file name may not be sufficient as Linux is probably just looking at .conf files no matter what the name is.

To blacklist the internal driver do

Code: Select all

echo "blacklist rt2800pci" | sudo tee /etc/modprobe.d/rt2800pci.conf
Reboot and see if it doesn't work, then check to see if the USB module is loaded with the USB wifi inserted with

Code: Select all

lsmod | grep mt7601Usta
johnywhy

Re: [Unsolved] Command to Toggle wifi adapter enabled/disabl

Post by johnywhy »

JeremyB wrote:To blacklist the internal driver do

Code: Select all

echo "blacklist rt2800pci" | sudo tee /etc/modprobe.d/rt2800pci.conf
ok, that worked. The adapter is not visible in Network Manager. Great! (note, we also disabled it ok using the interfaces file, on pg 1).

this command works to re-enable after boot
sudo ip link set wlan0 up
great!

however, that did not work on first try, so before i mark this solved, i'm going to use it a while.

thx!
Last edited by johnywhy on Sun Sep 20, 2015 6:57 pm, edited 1 time in total.
JeremyB
Level 21
Level 21
Posts: 13880
Joined: Fri Feb 21, 2014 8:17 am

Re: [Unsolved] Command to Toggle wifi adapter enabled/disabl

Post by JeremyB »

johnywhy wrote:
JeremyB wrote:To blacklist the internal driver do

Code: Select all

echo "blacklist rt2800pci" | sudo tee /etc/modprobe.d/rt2800pci.conf
ok, that worked. The adapter is not visible in Network Manager. Great! (note, we also disabled it ok using the interfaces file, above).

this command works to re-enable after boot
sudo ip link set wlan0 up
great!

however, that did not work on first try, so before i mark this solved, i'm going to use it a while.

thx!
If it is disabled after rebooting, the only command you need is

Code: Select all

sudo modprobe rt2800pci
And if you want to disable without rebooting

Code: Select all

sudo modprobe -r rt2800pci
johnywhy

Re: [Unsolved] Command to Toggle wifi adapter enabled/disabl

Post by johnywhy »

ok, so i'm trying to consolidate the whole solution.
First, we do this, to disable the internal wifi adapter on boot:
JeremyB wrote:To blacklist the internal driver do

Code: Select all

echo "blacklist rt2800pci" | sudo tee /etc/modprobe.d/rt2800pci.conf
which is equivalent to

Code: Select all

sudo leafpad /etc/modprobe.d/rt2800pci.conf
and then entering "blacklist rt2800pci" into the file.

then we use the following to enable the card after boot:

Code: Select all

sudo modprobe rt2800pci
we cannot (should not?) use the interfaces file nor blacklist.conf to blacklist this adapter. we cannot (should not?) use the following to enable the card after boot:

Code: Select all

sudo ip link set wlan0 up

sudo ifconfig rt2800pci up
is this all correct?

thx!
Locked

Return to “Networking”