LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-08-2020, 09:34 AM   #1
Shaggy1
Member
 
Registered: Oct 2010
Posts: 111

Rep: Reputation: 3
Configuring wireless on command line using wpa_supplicant in Trisquel (Debian based)


I have been attempting to configure wireless manually from the command line on my Thinkpad 400, but have been unable to get a connection. I am using Trisquel 8.0 which I believe is based on Debian:

$ uname -a
Linux technoethical-t400s-b9d0 4.19.0-gnu #1 SMP Mon Oct 22 06:05:01 PDT 2018 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/os-release
NAME="Trisquel GNU/Linux"
VERSION="8.0, Flidas"
ID=trisquel
ID_LIKE=debian
PRETTY_NAME="Trisquel GNU/Linux Flidas (8.0)"
VERSION_ID="8.0"
HOME_URL="https://trisquel.info/"
SUPPORT_URL="https://trisquel.info/wiki"
BUG_REPORT_URL="https://trisquel.info/project/issues"

I am running on a Thinkpad 400s

I am using the following commands to configure:

# disable NetworkManager
systemctl disable NetworkManager

#kill existing wpa_supp
ps -ef | grep wpa
pid=`ps -ef | grep wpa | grep -v grep | awk '{print $2}'`
kill -s SIGQUIT "${pid}"


#check interfaces and find wireles device name
$ iw dev | grep Interface
Interface wlp2s0

#check device is up
$ ip link show wlp2s0 | grep UP

#if not bring it up
$ ip link set wlp2s0 up

# backup config file
$ cp /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.bu

# check ssid can be scanned
$ iw wlp2s0 scan | grep lcwire
SSID: lcwire

# create wpa_supplicant.conf
$ wpa_passphrase lcwire [passphrase] > /etc/wpa_supplicant.conf

# check driver
$ lsmod | grep 9k
ath9k 151552 0
ath9k_common 36864 1 ath9k
ath9k_hw 479232 2 ath9k_common,ath9k
ath 32768 3 ath9k_common,ath9k,ath9k_hw
mac80211 798720 1 ath9k
cfg80211 659456 4 ath9k_common,ath9k,ath,mac80211


$ wpa_supplicant
....
drivers:
nl80211 = Linux nl80211/cfg80211
wext = Linux wireless extensions (generic)
wired = Wired Ethernet driver
none = no driver (RADIUS server/WPS ER)
....


# run wpa_supplicant
$ wpa_supplicant -B -D nl80211 -i wlp2s0 -c /etc/wpa_supplicant.conf -d

After doing this the syslog seem to indicate theat the conneciton is continually being deauthenticated. And at this point running dhclient does not get any responses.



I have a machine with fedora on it where I do a similar set of commands (different driver - use-D ext) and it connects fine.

If I use NetworkManager (which came enabled when I got the system) it also connects fine, though for some reason I have to reboot after powerup for it to work.

I have attached files with output from journalctl (syslog.txt) and the debug output from wpa_supplicant (wpaop.txt). Also output from journalctl for NetworkManager (jcnetman.log) when that is successfully running.

Other Notes:
1./
ifconfig gives me the following:
wlp2s0 Link encap:Ethernet HWaddr c0:cb:38:61:98:59
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:2460 errors:0 dropped:0 overruns:0 frame:0
TX packets:1046 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:421705 (421.7 KB) TX bytes:162400 (162.4 KB)

wlp2s0:avahi Link encap:Ethernet HWaddr c0:cb:38:61:98:59
inet addr:169.254.7.124 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1


Not sure where wlp2s0:avahi comes from - I do not see this on my fedora machine or when I use NetworkManager to bring it up, only the interface with the locally configured ipaddress received from the router.

When the interface is working after rebooting with NetworkManager enabled ifconfig shows:
wlp2s0 Link encap:Ethernet HWaddr c0:cb:38:61:98:59
inet addr:192.168.2.26 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: 2002:5201:e7e1:1234:2e5d:3fc9:79d5:2799/64 Scope:Global
inet6 addr: fe80::d195:9bc6:b6d:ad17/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:47 errors:0 dropped:0 overruns:0 frame:0
TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7586 (7.5 KB) TX bytes:9256 (9.2 KB)


2./
$ rfkill list
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
3: hci0: Bluetooth
Soft blocked: no
Hard blocked: no

Has anyone any idea why I am seeing the deauthentication ?
Does anyone know what the wlp2s0:avahi interface is ? - It seems to have a random (external?) ip addess assigned.

hen the interface is working after rebooting with NetworkManager enabled ifcoinfi shows:
wlp2s0 Link encap:Ethernet HWaddr c0:cb:38:61:98:59
inet addr:192.168.2.26 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: 2002:5201:e7e1:1234:2e5d:3fc9:79d5:2799/64 Scope:Global
inet6 addr: fe80::d195:9bc6:b6d:ad17/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:47 errors:0 dropped:0 overruns:0 frame:0
TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7586 (7.5 KB) TX bytes:9256 (9.2 KB)


2./
$ rfkill list
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
3: hci0: Bluetooth
Soft blocked: no
Hard blocked: no

Has anyone any idea why I am seeing the deauthentication ?
Does anyone know what the wlp2s0:avahi interface is ? - It seems to have a random (external?) ip addess assigned.

When the interface is working after rebooting with NetworkManager enabled ifcoinfi shows:
wlp2s0 Link encap:Ethernet HWaddr c0:cb:38:61:98:59
inet addr:192.168.2.26 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: 2002:5201:e7e1:1234:2e5d:3fc9:79d5:2799/64 Scope:Global
inet6 addr: fe80::d195:9bc6:b6d:ad17/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:47 errors:0 dropped:0 overruns:0 frame:0
TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7586 (7.5 KB) TX bytes:9256 (9.2 KB)


2./
$ rfkill list
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
3: hci0: Bluetooth
Soft blocked: no
Hard blocked: no

Can anyone see/is able to guess what might be wrong with the configuration ?

Has anyone any idea why I am seeing the deauthentication ?

Does anyone know how I can get information from NetworkManager - config files, logs etc. to see if I can tell what it is doing differently ? Is there a means of getting a list of the commands it uses to connect (not sure what it uses - nmcli ?)

Does anyone know what the wlp2s0:avahi interface is and why it is generated ? - It seems to have a random (external?) ip addess assigned.
Attached Files
File Type: txt syslog.txt (3.5 KB, 12 views)
File Type: txt wpaop.txt (7.9 KB, 9 views)
File Type: log jcnetman.log (33.2 KB, 9 views)
 
Old 02-08-2020, 09:51 AM   #2
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,179

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
wpa-supplicant from the command line is a pain. It has been a few years since I had to figure it out. I still have the script in my ~/bin but it was copied over from a few laptops ago.
Code:
sudo ifdown wlan0
sudo ifup wlan0 &
sudo wpa_supplicant -Dnl80211 -c /etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -B
sudo dhclient wlan0
the wpa_supplicant.conf file has the password for the access points as I recall.


Better yet, if you do have a working wired connection, wicd-cli is a command line wireless client that you can install and use like any gui version.
 
Old 02-10-2020, 05:46 AM   #3
Shaggy1
Member
 
Registered: Oct 2010
Posts: 111

Original Poster
Rep: Reputation: 3
Hi

Thank you for your reply.

I continue to have no luck with wpa_supplicant.

A glance at wicd-cli suggests much more flexibility and control and looks like it could help with troubleshooting.
I will try to give that a go, so thank you for the suggestion.


My general issue is that I am currently finding it very difficult to debug wireless issues when something goes wrong (I initially came to this because when I try to change to using another router the wireless connections no longer work).

I do not know how to trace the point of failure due to a combination of a lack of understanding how wireless configuration, initialisation and connection works and lack of knowledge of tools you can use to debug.

Does anyone know of any other resources which may help me understand how to understand and troubleshoot wireless ?
 
Old 04-18-2020, 07:03 AM   #4
Shaggy1
Member
 
Registered: Oct 2010
Posts: 111

Original Poster
Rep: Reputation: 3
Quick update

Do not get a lot of time to look at this, but I have played with nm-cli and see exactly the same issue when using this.

Think it may be something to do with dhclient configuration.
 
  


Reply

Tags
trisquel, wireless, wpa_supplicant



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Ubuntu-Based Trisquel GNU/Linux 8.0 "Flidas" Enters Development with MATE 1.12.1 LXer Syndicated Linux News 0 11-30-2016 07:40 PM
Thinkpenguin Wireless G USB Adapter cannot connect to the internet in Trisquel 6.0 nuxxun Linux - Wireless Networking 2 07-08-2013 04:04 AM
Installing Realtek RTL8192CU wireless drivers in Trisquel 6.0 h3r3t1k Linux - Networking 0 05-06-2013 02:44 PM
LXer: Trisquel to focus on LTS versions with Trisquel 6.0 release LXer Syndicated Linux News 0 03-14-2013 07:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration