SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#51 2012-06-09 17:29:27

ForkTong
#! Member
Registered: 2012-04-19
Posts: 63

Re: HowTo: Connect and roam wifi networks with wpasupplicant

I am already using dhclient... sad

I must have broken something somewhere, because wifi used to work out of the box. This is now starting to make this laptop quite unusable. The best solution I can think of now is actually reinstall #! cause it "used to" work...

Offline

Be excellent to each other!

#52 2012-06-09 18:07:14

xaos52
The Good Doctor
From: Planet of the @s
Registered: 2011-06-24
Posts: 4,602

Re: HowTo: Connect and roam wifi networks with wpasupplicant

Can you post the configuration you are currently using?
X out sensitive info from the config file.

Offline

#53 2012-06-11 19:40:21

ForkTong
#! Member
Registered: 2012-04-19
Posts: 63

Re: HowTo: Connect and roam wifi networks with wpasupplicant

Thanks for the offered assistance, xaos. I'll get back to this once I have a bit of time. hmm

Offline

#54 2012-06-12 19:09:22

ForkTong
#! Member
Registered: 2012-04-19
Posts: 63

Re: HowTo: Connect and roam wifi networks with wpasupplicant

Right, so I spent an hour following the howto and that didn't work. Commented out everything I changed and tried out wicd for shits and giggles, and after changing that to use dhclient, it works. Well I think it works, cause I can connect to my phone's "personal hotspot" and before I wasn't able to connect to anything really. I will try connecting to other protected wifi's tomorrow.

The only stupid thing is, I have no idea what is/was wrong or how it got fixed...

Offline

#55 2012-06-13 10:43:12

ForkTong
#! Member
Registered: 2012-04-19
Posts: 63

Re: HowTo: Connect and roam wifi networks with wpasupplicant

Right, so I tried connecting to the work WiFi just now, and it didn't work. So I logged in to the router on another PC, set security from WEP to WPA and now I can connect.

Does anyone have any idea why WEP wouldn't work? I tried all types of WEP from the config in wicd when trying to connect, it would always seem to authenticate but "hang" on getting IP.

Offline

#56 2012-06-13 11:01:02

xaos52
The Good Doctor
From: Planet of the @s
Registered: 2011-06-24
Posts: 4,602

Re: HowTo: Connect and roam wifi networks with wpasupplicant

Sounds like you have your connection configured for WPA.
I'd say :s how us your configuration, but I have never used wicd and I dont know how to configure it or where it stores its config.

Offline

#57 2012-06-13 12:25:27

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: HowTo: Connect and roam wifi networks with wpasupplicant

ForkTong wrote:

Does anyone have any idea why WEP wouldn't work?

Well, you keep neglecting to post any kind of actual info, so we can only guess big_smile
It may be a kernel thing. If you have an Atheros wireless card, you might be affected by the outages of the driver on WEP connections. This does coincide with some of the symptoms you describe. Otoh, it may be that you simply misconfigured stuff, but we'll never know until you post some info (screenshot of the WICD window, a copy of /etc/network/interfaces or /etc/wpasupplicant files, kernel version, lspci -knn and so on).

Offline

#58 2012-06-13 12:46:15

ForkTong
#! Member
Registered: 2012-04-19
Posts: 63

Re: HowTo: Connect and roam wifi networks with wpasupplicant

Oh it's not that I don't want to post info, it's that I didn't know what info to post wink

uname -r: 3.2.0-0.bpo.1-686-pae

lspci -knn:

00:00.0 Host bridge [0600]: Intel Corporation Mobile 945GME Express Memory Controller Hub [8086:27ac] (rev 03)
    Subsystem: ASUSTeK Computer Inc. Device [1043:8340]
    Kernel driver in use: agpgart-intel
00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 945GME Express Integrated Graphics Controller [8086:27ae] (rev 03)
    Subsystem: ASUSTeK Computer Inc. Device [1043:8340]
    Kernel driver in use: i915
00:02.1 Display controller [0380]: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller [8086:27a6] (rev 03)
    Subsystem: ASUSTeK Computer Inc. Device [1043:8340]
00:1b.0 Audio device [0403]: Intel Corporation N10/ICH 7 Family High Definition Audio Controller [8086:27d8] (rev 02)
    Subsystem: ASUSTeK Computer Inc. Device [1043:8398]
    Kernel driver in use: snd_hda_intel
00:1c.0 PCI bridge [0604]: Intel Corporation N10/ICH 7 Family PCI Express Port 1 [8086:27d0] (rev 02)
    Kernel driver in use: pcieport
00:1c.1 PCI bridge [0604]: Intel Corporation N10/ICH 7 Family PCI Express Port 2 [8086:27d2] (rev 02)
    Kernel driver in use: pcieport
00:1c.3 PCI bridge [0604]: Intel Corporation N10/ICH 7 Family PCI Express Port 4 [8086:27d6] (rev 02)
    Kernel driver in use: pcieport
00:1d.0 USB Controller [0c03]: Intel Corporation N10/ICH 7 Family USB UHCI Controller #1 [8086:27c8] (rev 02)
    Subsystem: ASUSTeK Computer Inc. Device [1043:830f]
    Kernel driver in use: uhci_hcd
00:1d.1 USB Controller [0c03]: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 [8086:27c9] (rev 02)
    Subsystem: ASUSTeK Computer Inc. Device [1043:830f]
    Kernel driver in use: uhci_hcd
00:1d.2 USB Controller [0c03]: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 [8086:27ca] (rev 02)
    Subsystem: ASUSTeK Computer Inc. Device [1043:830f]
    Kernel driver in use: uhci_hcd
00:1d.3 USB Controller [0c03]: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 [8086:27cb] (rev 02)
    Subsystem: ASUSTeK Computer Inc. Device [1043:830f]
    Kernel driver in use: uhci_hcd
00:1d.7 USB Controller [0c03]: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller [8086:27cc] (rev 02)
    Subsystem: ASUSTeK Computer Inc. Device [1043:830f]
    Kernel driver in use: ehci_hcd
00:1e.0 PCI bridge [0604]: Intel Corporation 82801 Mobile PCI Bridge [8086:2448] (rev e2)
00:1f.0 ISA bridge [0601]: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge [8086:27b9] (rev 02)
    Subsystem: ASUSTeK Computer Inc. Device [1043:830f]
00:1f.2 SATA controller [0106]: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA AHCI Controller [8086:27c5] (rev 02)
    Subsystem: ASUSTeK Computer Inc. Device [1043:830f]
    Kernel driver in use: ahci
01:00.0 Ethernet controller [0200]: Atheros Communications AR8132 Fast Ethernet [1969:1062] (rev c0)
    Subsystem: ASUSTeK Computer Inc. Device [1043:838a]
    Kernel driver in use: atl1c
02:00.0 Network controller [0280]: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) [168c:002b] (rev 01)
    Subsystem: AzureWave Device [1a3b:1089]
    Kernel driver in use: ath9k

/e/n/i:

auto lo
iface lo inet loopback

I commented out the stuff I added to work with wpasupplicant, so the other lines in /e/n/i all start with # and so do the files in /etc/wpa_supplicant/

When connecting to the WEP wifi, in wicd, I set it to WEP passphrase, WEP shared/restricted, WEP hex and none of them worked. It's not LEAP WEP or TTLS WEP because you don't require user/pw.

So yeah, it's not about wpasupplicant anymore, sorry for making this thread dirty with wicd stuff.

Offline

#59 2012-06-13 12:50:29

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: HowTo: Connect and roam wifi networks with wpasupplicant

It's the driver. ath9k has trouble with WEP sometimes. Consider it a good thing, you should be using WPA anyway. WEP passphrase is the password itself, if it didn't connect there, it's a driver thing. The fact that you couldn't get anywhere with network manager is also a clue.

Offline

#60 2012-06-13 13:01:18

ForkTong
#! Member
Registered: 2012-04-19
Posts: 63

Re: HowTo: Connect and roam wifi networks with wpasupplicant

Ah okay. I like wicd better so I'll stick to that though. Trouble is, some places I go to still use WEP and I can't just go and tell them to change to WPA. Or maybe I can.

Thanks guys, at least I know now that it's a driver issue.

Offline

#61 2012-10-24 03:42:19

sagirfahmid3
Member
Registered: 2012-06-04
Posts: 13

Re: HowTo: Connect and roam wifi networks with wpasupplicant

El Koraco, I just wanted to thank you for your easy to understand instructions. They worked absolutely FANTASTICALLY for me. I had been trying to get my wireless adapter to connect to a WEP network for quite some time with iwconfig, but it didn't work no matter what I tried. YOUR method did on the first try big_smile

So yah, just wanted to take two minutes of my time to thank you. I actually printed out this page for future reference.

Sincerely, sagir3, a fellow Debian Wheezy user.

Offline

#62 2012-10-24 07:54:24

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: HowTo: Connect and roam wifi networks with wpasupplicant

I'm glad I could help.

Offline

#63 2012-10-24 23:34:43

VDP76
#! Bean Roaster
Registered: 2012-04-12
Posts: 838

Re: HowTo: Connect and roam wifi networks with wpasupplicant

sigma wrote:

I then get this ERROR:

 stephen@Isis:~$ sudo ifdown wlan0 && sudo ifup wlan0
wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
wpa_supplicant: /sbin/wpa_cli daemon failed to start

my apologies for bumping on this old issue but, even tough sigma's post is quite old, I tought it might be helpful in future.
I had the same error while setting up wpa_supplicant and I was able to solve it having my wpa-roam.conf file starting like this

update_config=1
ctrl_interface=DIR=/var/run/wpa_supplicant
ctrl_interface_group=wheel

so GROUP=wheel does the trick, I have found it here..


#!#!#! Forum etiquette #!#!#!
Are you a new member!? Have you introduced yourself?!
CLI basics | LVM | smxi | chrooting | multiarch

Offline

#64 2012-10-24 23:38:12

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: HowTo: Connect and roam wifi networks with wpasupplicant

I thought group wheel was used to run wpa_cli as normal user. Yes, the update config is what you wanted. I'll amend the howto straight away. Good catch.

Last edited by el_koraco (2012-10-24 23:41:21)

Offline

#65 2012-11-23 18:45:47

sevensage
#! CrunchBanger
Registered: 2012-11-10
Posts: 134

Re: HowTo: Connect and roam wifi networks with wpasupplicant

Thank-you el_koraco ... I wanted/needed this ... you da man!


dig +short txt crunchbang.wp.dg.cx

Offline

#66 2013-06-30 03:44:17

drp6
Member
Registered: 2013-06-30
Posts: 48

Re: HowTo: Connect and roam wifi networks with wpasupplicant

First, appreciate that there is this HowTo thread. Second, BRAND NEW Linux user, just installed Crunchbang 11 Waldorf 64-bit to a new desktop that I built (just Linux no other OS). Working on getting my TL-Link WN821N USB wifi adapter working. I have spent several hours to no avail.

My router is an Apple Airport (all Mac household) running a 2.4GHz 802.11n with MAC address filtering (already added this new desktop), ssid is not hidden.

Output of

sudo iwconfig wlan0

is as follows:

wlan0     IEEE 802.11bgn ESSID:off/any
              Mode:Managed   Access Point: Not-Associated   Tx-Power=20 dBm
              Retry  long limit:7     RTS thr: off    Fragment thr:off
              Encryption key:off
              Power Management:off

I turned off the network per the instructions:

sudo service network-manager stop

I skipped the other shutdown commands, didn't think they applied to my setup (maybe they do). Created the wpa_supplicant.conf file, edited my /interfaces file. I originally was getting errors running the wpa_supplicant.conf about my key being 64 characters and it wanted 63 or less. Figured out I was putting quotes around my 64 character hex, but then it still didn't work.

So I tried the wpa_passphrase command to generate the code for the .conf file (which added a #psk="rawpassword" line and also generated a 64character hex different than what my router gives me oddly) - this change didn't work either. Tried adding additional attributes to my wpa_supplicant.conf such as proto=, pairwise=, key_mgmt= but nothing helped.

Current errors. When I try the manual install. When I get to:

sudo iwconfig wlan0 key s:my64characterhexkey

It returns:

Error for wireless request "Set Encode" (8B2A) :
      SET failed on device wlan0; Invalid argument

When I try the wpa_supplicant.conf

sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

I get back:

ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument

Whenever I try:

sudo ifdown wlan0 && sudo ifup wlan0

It always returns:

Listening on LPF/wlan0/f8:d1:11:13:6a:3d
Sending on LPF/wlan0/f8:d1:11:13:6a:3d
Sending on Socket/fallback

DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
No DHCPOFFERS received.
No working leases in persistent database  - sleeping.

Here's my /etc/wpa_supplicant/wpa_supplicant.conf:

network={
     ssid="nameofmynetwork"
     psk=my64characterhexcode
}

Here's my /etc/network/interfaces:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

#wireless
allow-hotplug wlan0
iface wlan0 inet dhcp
     wpa-ssid nameofmynetwork
     wpa-key myactualwifipassword

I'm getting confused on what KEY, Passphrase, ASCII, and Hex are. I'm taking it that KEY,Passphrase, and ASCII all mean the actual wifi password; while Hex is the 64 character hex I get from my router.

Also, not sure if it matters, but my actual wifi password has a space in it. Searched many Linux forums, read thru the wpa_supplicant documentation - really at a lost.

Any ideas?

Thanks for any input!

Last edited by drp6 (2013-06-30 04:19:38)

Offline

#67 2013-06-30 13:22:42

drp6
Member
Registered: 2013-06-30
Posts: 48

Re: HowTo: Connect and roam wifi networks with wpasupplicant

An update as I continue to troubleshoot - I discovered the graphical network manager by right-clicking the networking icon in the system tray. I gave this a shot by adding my network info and rebooted the system. The TL-WN821N now picks up my wifi network, but it didn't use the network profile I added under this graphical network manager - it created its own profile. So I deleted my unused profile from the list.

I went into terminal and tried:

sudo iwconfig wlan0

It responded with:

wlan0     IEEE 802.11bgn  ESSID:"nameofmynetwork"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: F8:1E:DF:F8:DD:71   
          Bit Rate=117 Mb/s   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=36/70  Signal level=-74 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:47   Missed beacon:0

I am typing this on the new computer. So, it is working. I'd still like to figure out why I couldn't get this to work in the terminal and what the issue is with wpa_supplicant.conf that I mention in my previous post. As my intent is to learn as much and do as much through the command line instead of using the GUI interface. Thus why I went with Crunchbang for my install - and it's an awesome distro!

BTW, being new to the forum - I posted here since it related to trying this HowTO instead of a new thread - if I was suppose to create a new thread let me know.

Last edited by drp6 (2013-06-30 13:32:22)

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo