Opened 10 years ago

Closed 10 years ago

#2703 closed defect (duplicate)

psk2 problems in sta mode with atheros

Reported by: nlinux Owned by: developers
Priority: normal Milestone:
Component: base system Version:
Keywords: Cc:


I'm using the following settings with madwifi for atheros and I keep getting psk2 error. If I change to psk it works fine using the same key, but not for psk2.

I've also updated to the the latest kamikaze trunk (Rev 9548) and this problem is there.

        option device   wifi1
        option network  lan
        option mode     'sta'
        option ssid     'testing'
        option encryption       'psk2'
        option hidden   0            
        option isolate  '0'        
        option txpower  '23'
        option bgscan   '0'
        option wds      '0'
        option key      '11111111' 

syslog shows this:

Dec 31 19:00:33 tester kernel: device ath2 entered promiscuous mode
Dec 31 19:00:34 tester : Line 7: Invalid passphrase length 64 (expected: 8..63) 'a56dda46a4aff0e8c2d5fd0cbc0038707e1e711287d7806d0d3b4424814438e6"'. 
Dec 31 19:00:34 tester : Line 7: failed to parse psk '"a56dda46a4aff0e8c2d5fd0cbc0038707e1e711287d7806d0d3b4424814438e6"'. 
Dec 31 19:00:34 tester : Line 8: WPA-PSK accepted for key management, but no PSK configured. 
Dec 31 19:00:34 tester : Line 8: failed to parse network block. 
Dec 31 19:00:34 tester : Failed to read or parse configuration '/var/run/wpa_supplicant-ath2.conf'. 

Attachments (0)

Change History (4)

comment:1 Changed 10 years ago by b.candler@…

I see this too. For now my solution is to edit /lib/wifi/ and change

passphrase=`wpa_passphrase ${ssid} "${key}" | grep psk | grep -v \#| cut -d= -f2`



comment:2 Changed 10 years ago by b.candler@…

The problem is that a precomputed hex PSK must not be quoted. This is demonstrated by the sample output from wpa_passphrase:

$ wpa_passphrase foo barbarbar

and can be confirmed by looking at wpa_config_parse_psk() in wpa_supplicant/config.c

Suggested fix:

---     Fri Jan  4 11:09:36 2008
+++  Fri Jan  4 11:10:37 2008
@@ -254,7 +254,7 @@
                                                case "$enc" in
-                                                               passphrase="${key}"
+                                                               passphrase="\"${key}\""
@@ -269,7 +269,7 @@
-       psk="$passphrase"
+       psk=$passphrase

comment:3 Changed 10 years ago by frederic.nadeau@…


I build kamikaze from trunk this morning(10217) and confirm this bug. Configuration are more or less the same and syslog output is the same(exept psk key of course).

I just like to confirm fix. Manually changing on the router fixed the issued.

Thanks for the fix, I was also looking for a solution. Can this be added to trunk?

comment:4 Changed 10 years ago by nbd

  • Resolution set to duplicate
  • Status changed from new to closed

dupe of #1939

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.