2

I am using a TL-WN823N WiFi USB dongle in Ubuntu 16.04. After following this and this answer (should have sticked to just one, I know, but it didn't seem to work) I managed to get it working, but I needed to manually bring the interface up (sudo ifconfig enx98ded01947a7 up) and restart the network manager (sudo service network-manager restart).

Now, whenever I restart the machine, I need to manually perform the same steps. If I only bring the interface up, the network manager won't find any WiFi networks until restarted. When it is restarted, it automatically connects to my WiFi network.

I found several questions on this, and I've been looking at my /etc/network/interfaces file. But after fiddling around with it nothing good has come out of it.

Its original contents were:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

I added the following line, and nothing changed:

allow-hotplug enx98ded01947a7

Now, to the interesting bit. If I add the following line as well:

iface enx98ded01947a7 inet dhcp

the interface is up after a reboot. No WiFi networks are found, though, regardless of how many times I restart the network manager. As soon as I remove this last line and restart the network manager, all works like a charm.

So I need to find a way of having my system automatically connect to my WiFi network when it boots up using an external WiFi USB dongle, without me having to manually bring the interface up and restarting the network manager. I am aware of the possibility of automating this two commands on boot, but that seems hacky and does not address the root of the problem.

1 Answers1

0

In terminal, type gksudo gedit /etc/modules and add rtl8192eu to the end of the file. Save and quit gedit. Restart the computer and the driver for your wireless card will now load at boot time, and your wireless should be more reliable.

You should probably remove any lines that you added to /etc/network/interfaces.

heynnema
  • 70,711
  • Didn't work, still had to do all the dance after a reboot (I removed all the extra lines in /etc/network/interfaces and added rtl18192eu to /etc/moduleswith sudo vim /etc/modules – user2891462 Oct 30 '16 at 23:47
  • Interesting. You may need a rtl8192eu driver update. Search AskUbuntu for rtl8192 and you should find a lot of hits with additional ideas on how to solve your problem. Good luck. – heynnema Nov 01 '16 at 14:47
  • @user2891462 I just noticed that you said you added rtl18192eu to /etc/modules, but it should be rtl8192eu. Recheck your edit. Let me know. – heynnema Nov 01 '16 at 14:49
  • I'm afraid I returned the WiFi connector and switched it to an ethernet bridge, which won't have issues with drivers, so can't really test it any more, sorry :( Thanks for the interest, though. – user2891462 Nov 01 '16 at 14:54
  • Remember to remove your edit from /etc/modules then. Check that your ethernet connection is NOT using the buggy r8169 driver. – heynnema Nov 01 '16 at 14:56
  • I did revert the changes when they didn't fix it, so I can't check if I did right the first time. I'll see how the ethernet connection behaves, and will post if I have issues with it :) – user2891462 Nov 01 '16 at 15:34