USB Wifi adapter disabled by script - [SOLVED]

After installing the MyDevices script (rpi_9wt1aew62b.sh) my USB wireless adapter is somehow disabled.
This is on a RPi 2 running Raspbian Jessie.

lsusb
Bus 001 Device 007: ID 0bda:8172 Realtek Semiconductor Corp. RTL8191SU 802.11n WLAN Adapter

dmesg | grep USB includes:
[ 5.880641] usb 1-1.5: r8712u: USB_SPEED_HIGH with 4 endpoints
[ 420.538214] usb 1-1.5: USB disconnect, device number 6
[ 429.280478] usb 1-1.5: new high-speed USB device number 7 using dwc_otg
[ 429.413300] usb 1-1.5: New USB device found, idVendor=0bda, idProduct=8172
[ 429.413316] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 429.414869] usb 1-1.5: r8712u: USB_SPEED_HIGH with 4 endpoints

but it looks like it is not loading the firmware now. Any suggestions?
Actually the firmware may be loaded as ifconfig shows:
wlan0 Link encap:Ethernet HWaddr ::81:a2:57:21
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)
but fails to get an ip address so presumably the script has altered a network interfaces setting or dhcp setting?

Any help with this?
If I use ifup wlan0 the wifi device connects but if I then do a networking restart it falls over and I have to do ifup wlan0 again.
It also broke my mqtt settings in OpenHAB from which I have not recovered.
Seems like myDevices and OpenHAB are not compatible.

What can I do to reverse out the install script?

mqtt issue has been resolved by running
sudo apt-get install mosquitto --reinstall

So the install script corrupted the installation somewhere.

Network device issue still to be fixed.

@rebrown sorry for that, hopefully all is well now but if not please post back and I’ll see what I can do to help. As far as I know the install script does not change any networking related settings, however, I can see that it may overwrite your MQTT library. @rsiegel do you know if that’s the case? it should be checking it it’s installed and skipping if it is. I suppose you also could have had an unsupported version. Anyway, If you are still having problems let me know and I’ll see what I can come up with to get your network interface to start up on boot again.

Try disabling security on your wifi router, and try to connect if it conects then you have WPA problem.

I install with apt-get install mosquitto and the version installed is
mosquitto version 1.4.14 (build date Mon, 10 Jul 2017 23:48:43 +0100)

mosquitto is an MQTT v3.1.1/v3.1 broker.

I am not aware if I am doing anything unusual.

And yes the network device is still an issue:
sudo systemctl restart networking.service
crashes the wlan0 device and I have to reconnect using eth0 and then ifup wlan0 once more.

You may be right but can you explain how you reach this conclusion.
cat /var/log/syslog | grep wpa shows:

Jan 6 11:16:50 openHABianPi wpa_supplicant[12747]: wlan0: Trying to associate with :::::8a (SSID=‘MaisonDuSoleil’ freq=2437 MHz)
Jan 6 11:16:50 openHABianPi wpa_supplicant[12747]: wlan0: Association request to the driver failed
Jan 6 11:16:51 openHABianPi wpa_supplicant[12747]: wlan0: Associated with ::
:::8a
Jan 6 11:16:51 openHABianPi wpa_supplicant[12747]: wlan0: WPA: Key negotiation completed with :::::8a [PTK=CCMP GTK=TKIP]
Jan 6 11:16:51 openHABianPi wpa_supplicant[12747]: wlan0: CTRL-EVENT-CONNECTED - Connection to ::
:::8a completed [id=0 id_str=]
Jan 6 11:19:51 openHABianPi wpa_supplicant[12747]: wlan0: CTRL-EVENT-DISCONNECTED bssid=::::**:8a reason=3 locally_generated=1
Jan 6 11:19:51 openHABianPi wpa_supplicant[12747]: wlan0: CTRL-EVENT-TERMINATING
Jan 6 11:44:57 openHABianPi wpa_supplicant[16715]: Successfully initialized wpa_supplicant
Jan 6 11:44:57 openHABianPi wpa_supplicant[16715]: nl80211: Driver does not support authentication/association or connect commands

But how does ifup wlan0 when connected to eth0 get around a WPA problem and allow me to connect to wlan0?

You have it in the log.
Conclusion is from using linux systems over the years :smile: some poorly writen drivers often gave me trouble with wpa, try switching it off or using wpa2 and try to connect

Thanks for your help with this. I believe my fundamental issue is corruption of a config file somewhere as this only occurred after the myDevices script install. This has been a stable 24/7 system running my OpenHAB for a long time.
I have done a reinstall of wpasupplicant and find if I reboot with the wired network connected I can ssh to the wlan0 ipaddress without problem but if I then disconnect without first doing ifup wlan0 I lose the wlan0 connection so ifup wlan0 is still required. I might try some networking re-installs but I may end up having to re-install my system.

A few hours of trawling and I now believe the module being loaded for the wifi device had changed somehow from something in the install script.
Almost back to normal after double-checking which is the correct module and installing.

1 Like