Kove--
Posts: 8
Joined: Mon Oct 08, 2018 11:41 am

[resolved] wireless usb card: driver loaded but can't connect

Mon Oct 08, 2018 7:37 pm

After a lot of trouble I managed to load a driver for a tp-link usb wireless card. This is the device in the lsusb output

Code: Select all

Bus 001 Device 006: ID 2357:0109 
I took the driver from this website: http://www.fars-robotics.net/install-wifi (I failed a previous compiling from source, driver was loaded but card didn't work in the gui).

Now the card is working in the gui, but I can't connect to a network.
Trying to do truebleshooting, I've noticed in this thread https://www.raspberrypi.org/forums/view ... 28&t=44044 that raspian by default has some lines in /etc/network/interfaces. Mine was almost empty, so I added some lines regarding wlan0

Code: Select all

cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
But still, if I try to connect to the network I get a strange "failed to disconnect" error in the gui

help...
Last edited by Kove-- on Sat Oct 27, 2018 3:23 pm, edited 1 time in total.

Kove--
Posts: 8
Joined: Mon Oct 08, 2018 11:41 am

Re: wireless usb card: driver loaded but can't connect

Tue Oct 09, 2018 7:39 pm

please help, give me an hint at least

MrEngman
Posts: 3844
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: wireless usb card: driver loaded but can't connect

Tue Oct 09, 2018 8:56 pm

The post you referenced setting up wifi is out of date. Do not edit file /etc/network/interfaces.

File /etc/network/interfaces should look like

Code: Select all

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
with no additional lines added.
File /etc/wpa_supplicant/wpa_supplicant.conf should look like

Code: Select all

country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
        ssid="network-name"
        psk="network_password"
        key_mgmt=WPA-PSK
}
Set the wifi name and password to you wifi settings. Make sure you have the line country=XX, where XX is the sountry code for where you are.

All my Pi work with these settings, Pi 0, Pi 0W, Pi B+, Pi 2B, Pi 3b and Pi 3B+, including with the wifi driver you are using.
Last edited by MrEngman on Wed Oct 10, 2018 7:06 pm, edited 1 time in total.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

Kove--
Posts: 8
Joined: Mon Oct 08, 2018 11:41 am

Re: wireless usb card: driver loaded but can't connect

Tue Oct 09, 2018 9:34 pm

my files are like yours, but I still get the error "failed to disconnect" when I select the wifi network from the dropdown in the top-right corner

Kove--
Posts: 8
Joined: Mon Oct 08, 2018 11:41 am

Re: wireless usb card: driver loaded but can't connect

Wed Oct 10, 2018 6:52 pm

Any idea about what should I check?

MrEngman
Posts: 3844
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: wireless usb card: driver loaded but can't connect

Wed Oct 10, 2018 7:38 pm

Kove-- wrote:
Wed Oct 10, 2018 6:52 pm
Any idea about what should I check?
Presumably you removed the lines referencing wlan0 you added to the /etc/network/interfaces file? Then rebooted?

I have no idea why you are getting the "failed to disconnect" error. There are a very few other posts referencing that error, but no explanation why it happened.

I currently don't use the GUI and all my Pi run headless using wifi of various kinds without issues all running Raspbian Lite OS.

What Pi are you using and which OS and kernel version.

What does the output of command ifconfig show?
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

Kove--
Posts: 8
Joined: Mon Oct 08, 2018 11:41 am

Re: wireless usb card: driver loaded but can't connect

Wed Oct 24, 2018 1:42 pm

Presumably you removed the lines referencing wlan0 you added to the /etc/network/interfaces file? Then rebooted?
yes
What Pi are you using and which OS and kernel version.
Raspbian, how can I find the pi version?

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.14.70-v7+ #1144 SMP Tue Sep 18 17:34:46 BST 2018 armv7l GNU/Linux

What does the output of command ifconfig show?

Code: Select all

pi@raspberrypi:~ $ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.181  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::b784:6c84:3288:286e  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:18:92:a5  txqueuelen 1000  (Ethernet)
        RX packets 5294  bytes 6794176 (6.4 MiB)
        RX errors 0  dropped 5  overruns 0  frame 0
        TX packets 4269  bytes 412299 (402.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 50:3e:aa:73:b6:a8  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 7440 (7.2 KiB)
        RX errors 0  dropped 63  overruns 0  frame 0
        TX packets 0  bytes 7440 (7.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Kove--
Posts: 8
Joined: Mon Oct 08, 2018 11:41 am

Re: wireless usb card: driver loaded but can't connect

Sat Oct 27, 2018 3:06 pm

I just reinstalled Raspbian from the beginning to see if with a fresh start I obtain better results. Now I cant even install the driver.

My commands:

Code: Select all

wget http://www.fars-robotics.net/install-wifi
chmod +x install-wifi 
sudo ./install-wifi 
And I get

Code: Select all

pi@raspberrypi:/tmp $ sudo ./install-wifi

 *** Raspberry Pi wifi driver installer by MrEngman.
 *** Performing self-update
stat: impossibile eseguire stat di './install-wifi': File o directory non esistente
chmod: manca l'operando dopo "./install-wifi.tmp"
Try 'chmod --help' for more information.
 !!! Failed: Error while trying to set mode on ./install-wifi.tmp
What am I doing wrong this time....

Kove--
Posts: 8
Joined: Mon Oct 08, 2018 11:41 am

Re: wireless usb card: driver loaded but can't connect

Sat Oct 27, 2018 3:20 pm

The right command was:

Code: Select all

sudo wget http://downloads.fars-robotics.net/wifi-drivers/install-wifi -O /usr/bin/install-wifi
sudo chmod +x /usr/bin/install-wifi

Kove--
Posts: 8
Joined: Mon Oct 08, 2018 11:41 am

Re: wireless usb card: driver loaded but can't connect

Sat Oct 27, 2018 3:23 pm

Now it works!

Just needed a fresh install.

Return to “Troubleshooting”