Trouble with Wireless USB Adapter working on boot up.
I've gotten better at Linux and it's been a while since I have posted. But I just about gave up trying to get my Wifi USB Adapter (TP-Link Archer T1U) to connect to the WAP in the office on boot up. The online research said to use WPA supplicant and I tried to follow the instructions and modified the variable names to match what I am running. I think my issue is either a problem with it using the wrong driver when I try to start it with WPA supplicant, or a possible authentication failure. The following is the reason I type that.
After I restart the PC, or start /etc/init.d/wpa.sh manually I get the following when I check /var/log/wpa_supplicant.log Code:
Successfully initialized wpa_supplicant Now, I have a gut feeling that the driver that is being used when I connect manually is not the same as the driver that the srcipt /etc/init.d/wpa.sh wants to use. On /etc/init.d/wpa.sh, I have: Code:
DRIVER=wext Code:
#lshw -C network If I change DRIVER=wext to DRIVER="RALINK WLAN", on /etc/init.d/wpa.sh I get a different message on the log (/var/log/wpa_supplicant.log) when I start /etc/init.d/wpa.sh. Something along the lines that this driver RLINK can't be used. The following is what I enter manually to make this work but I need it to work automatically when it boots up. Code:
ifconfig ra0 up This works great, but again, if done manually! And yes, I've tried this with a bash script in /etc/init.d/ to see if it connects on bootup, but it doesn't work. Not sure why. Here is some more information that may help you help me: The same manual to me to check that the driver was installed by doing this: Code:
lsmod | grep mt7650 This is the Kernel Version and Ubuntu version I am trying to run this on: Code:
#cat /proc/version My network configuration: Code:
cat /etc/network/interfaces |
Quote:
|
Can you point us at the guide that you've been following?
Otherwise see if this guide helps... https://maintenancecoder.wordpress.c...ntu-14-04-lts/ It uses /etc/network/interfaces with something like the following (adapted for your ra0 network device node)... Quote:
|
ferrari,
Thank you very much for your response! The following is the link that I used as a guide: https://help.ubuntu.com/community/Ne...Line/Automatic Quote:
Code:
/var/log/wpa_supplicant.log Unless you have another suggestion, I'm going to see if I can use iw or hostapd as alternative backend components that use netlink libraries to see if I get better luck communicating with this driver from the backend. Let me see how I can install one at a time and see if I can make it work. GREAT LEARNING EXPERIENCE, I'll keep you posted on the results. Thanks again! |
Glad to have been of help with the learning. I had a quick look at the guide you were working from, but I think the guide I linked to uses a simpler approach for connecting with wpa_supplcant and shows how to implement the wext backend as part of the wireless configuration. It relies only on minimal /etc/wpa_supplicant.conf and /etc/network/interfaces configuration, and easy to follow.
|
ferrari,
Again, thanks for all of your help. I tried that link you sent me and turned off the wpa.sh script on boot up before I tried it. #wpa_supplicant -h Code:
drivers: /etc/wpa_supplicant.conf Code:
ctrl_interface=/var/run/wpa_supplicant Code:
# interfaces(5) file used by ifup(8) and ifdown(8) Code:
#ifdown ra0 This is what I got on the log tail -f /var/log/syslog Code:
Jan 23 17:38:14 clockinout2-OptiPlex-3020 wpa_supplicant[2947]: Successfully initialized wpa_supplicant |
No, there's no need to blacklist anything- its not the issue here.
You mentioned in your opening post that you can connect manually? Can you clarify further and explain what steps or command you do here? I also note from googling "TP-Link Archer T1U wpa_supplicant" and similar there are a lot of people experiencing connectivity issues with this device. It doesn't help that it's not supported by a mainline kernel driver. What I read is accounts of users having better success connecting to 2.4GHz wifi frequencies rather than 5GHz, but not everyone has a choice in the matter if the AP is managed by someone else for example. |
ferrari,
Hello again. The the wireless USB adapter works great if I execute the following after I turn on the machine. ifconfig ra0 up iwpriv ra0 set SiteSurvey=1 iwpriv ra0 set NetworkType=Infra iwpriv ra0 set AuthMode=WPA2PSK iwpriv ra0 set EncrypType=AES iwpriv ra0 set SSID="<my office ssid>" iwpriv ra0 set WPAPSK=<my preshared key> iwpriv ra0 set SSID="<my office ssid>" dhclient ra0 I got these steps straight from the driver manual that I downloaded from the TP-Link website that came with the driver itself. The only reason I wanted to blacklist drivers was to blacklist a driver for another usb wireless of another brand I wanted to try out, but it didn't work. I was a concerned that maybe this other driver would cause some type of conflict. I would not be going through all this trouble if we had extra network ports in the office to connect a cable to the PC. We ran out and they need another station for people to clock in and clock out, and to transfer data from hand held devices on Windows Mobile 5 or 6 to a mapped shared file sever in the LAN that the office uses. (Another task after I can get this resolved.) I already mapped the shared drive with CIFS and it connects on boot up just fine only if I have a network cable connected to the PC but again but we need for the wireless solution to work too. Again, since we are out of network ports and my boss doesn't want to use cheap switches to extend ports on the wall, I need to come up with a solution. I have these commands on an bash script that I run and have thought about putting them in /init/rc.d but, I believe in not being sloppy. I would like a clean disconnect right before shutdown. The following is something I though I could make run and hold the shutdown process until it finishes: https://stackoverflow.com/questions/...n-access-point I'm thinking the MAC is the MAC of the WAP. I'll play with it. Unless you think it isn't necessary, and I should tackle this from another angle, this may be an opportunity for me to learn how to set up the system to run the bash script with the commands at boot up BEFORE the the scripts that mounts the network drive. On shutdown, make sure I disassociate or disconnect from the WAP before it shuts down. |
I forgot to mention that we do manage the WAPs from a dashboard. Here are the relevant settings:
Network access association requirement: Pre-shared key with the key. Encryption Mode: WPA1 & WPA2 Wireless band selection 2.4GHz and 5GHz |
Ok, I think I know what is needed. It's clear that 'wpa-conf' isn't working for you here. You need to have your working commands in a script that gets called once the wireless device interface (ra0) is up. This can be done in /etc/network/interfaces using the 'post-up' directive. So something like this might be sufficient perhaps...
Code:
# interfaces(5) file used by ifup(8) and ifdown(8) Code:
#!/bin/bash https://wiki.debian.org/NetworkConfiguration |
ferrari,
This works on restart great! Thanks! The only problem I'm having now is if I shutdown, wait a few minutes, and then start the PC again. I decided to also do a pre-down as follows: Code:
# interfaces(5) file used by ifup(8) and ifdown(8) https://wiki.debian.org/NetworkConfiguration pre-down is used with VLAN interfaces and my office is part of a VLAN My wifi dissassociate script is the following: Code:
iwconfig ra0 ap 00:00:00:00:00:00 https://stackoverflow.com/questions/...n-access-point ...where it says that when you associate to the NULL AP, it disconnects the adapter. I'm just trying to be as clean as possible. Thank you for the post-up tip, looks like I'm almost there. Restart is working fine, now I need to make sure this works on start up after a power failure for example. |
Quote:
Quote:
More info from the man page... Code:
man /etc/network.interfaces Quote:
|
All times are GMT -5. The time now is 01:45 AM. |