#466: athkey does not work properly?
------------------------------------------+---------------------------------
Reporter: [EMAIL PROTECTED] | Owner:
Type: defect | Status: new
Priority: minor | Milestone:
Component: madwifi: other | Version: trunk
Resolution: | Keywords: wep, athkey
Patch_attached: 0 |
------------------------------------------+---------------------------------
Changes (by mrenzmann):
* priority: major => minor
* version: => trunk
Old description:
> i'm setting up an access point like this:
>
> wlanconfig ath0 create wlandev wifi0 wlanmode ap
> iwpriv ath0 mode 2
> iwconfig ath0 channel 10
> iwconfig ath0 essid 'bla'
> athkey -i ath0 1 wep 11111111111111111111110000
> iwconfig ath0 key restricted
> ifconfig ath0 inet 10.23.0.1 up
>
> now iwconfig shows correctly:
>
> access-point:~# iwconfig ath0
> ath0 IEEE 802.11b ESSID:"bla"
> Mode:Master Frequency:2.457 GHz Access Point:
> 00:11:22:33:44:55
> Bit Rate:0 kb/s Tx-Power:16 dBm Sensitivity=0/3
> Retry:off RTS thr:off Fragment thr:off
> Encryption key:1111-1111-1111-1111-1111-1100-00 Security
> mode:restricted
> Power Management:off
> Link Quality=29/94 Signal level=-66 dBm Noise level=-95 dBm
> Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
> Tx excessive retries:0 Invalid misc:0 Missed beacon:0
>
> now i'm setting up the client (with iwconfig ath0 key, this time):
>
> iwconfig ath0 essid bla
> iwconfig ath0 key 11111111111111111111110000
> ifconfig ath0 10.23.0.5 up
>
> iwconfig shows me this:
>
> client:~# iwconfig ath0
> ath0 IEEE 802.11g ESSID:"bla"
> Mode:Managed Frequency:2.457 GHz Access Point:
> 00:11:22:33:44:55
> Bit Rate:11 Mb/s Tx-Power:18 dBm Sensitivity=0/3
> Retry:off RTS thr:off Fragment thr:off
> Encryption key:1111-1111-1111-1111-1111-1100-00 Security
> mode:restricted
> Power Management:off
> Link Quality=17/94 Signal level=-78 dBm Noise level=-95 dBm
> Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
> Tx excessive retries:0 Invalid misc:0 Missed beacon:0
>
> that looks good so far, but pinging won't work :(
> A workaround can be done like this:
>
> access-point:~# iwconfig ath0 key 11111111111111111111110000
>
> now pinging works just fine. I even can set the keys with athkey now on
> the access point, like this:
>
> access-point:~# athkey -i ath0 1 wep 11111111111111111111112222
> client:~# iwconfig ath0 key 11111111111111111111112222
>
> It seems the access-point first needed some iwconfig-ass-kicking before
> actually using the key. I wonder why we can't just use iwconfig ath0 key
> [0] 11111111111111111111112222, as suggested by man iwconfig.
>
> # iwconfig ath0 key [0] 11111111111111111111112222
> Error for wireless request "Set Encode" (8B2A) :
> invalid argument "[0]".
>
> WEP without key indexing works just fine, but i'd like all 4 keys.
> access-point is running madwifi-ng 1472, client is running some pretty
> old madwifi-old.
New description:
i'm setting up an access point like this:
{{{
wlanconfig ath0 create wlandev wifi0 wlanmode ap
iwpriv ath0 mode 2
iwconfig ath0 channel 10
iwconfig ath0 essid 'bla'
athkey -i ath0 1 wep 11111111111111111111110000
iwconfig ath0 key restricted
ifconfig ath0 inet 10.23.0.1 up
}}}
now iwconfig shows correctly:
{{{
access-point:~# iwconfig ath0
ath0 IEEE 802.11b ESSID:"bla"
Mode:Master Frequency:2.457 GHz Access Point:
00:11:22:33:44:55
Bit Rate:0 kb/s Tx-Power:16 dBm Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
Encryption key:1111-1111-1111-1111-1111-1100-00 Security
mode:restricted
Power Management:off
Link Quality=29/94 Signal level=-66 dBm Noise level=-95 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
}}}
now i'm setting up the client (with iwconfig ath0 key, this time):
{{{
iwconfig ath0 essid bla
iwconfig ath0 key 11111111111111111111110000
ifconfig ath0 10.23.0.5 up
}}}
iwconfig shows me this:
{{{
client:~# iwconfig ath0
ath0 IEEE 802.11g ESSID:"bla"
Mode:Managed Frequency:2.457 GHz Access Point:
00:11:22:33:44:55
Bit Rate:11 Mb/s Tx-Power:18 dBm Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
Encryption key:1111-1111-1111-1111-1111-1100-00 Security
mode:restricted
Power Management:off
Link Quality=17/94 Signal level=-78 dBm Noise level=-95 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
}}}
that looks good so far, but pinging won't work :(
A workaround can be done like this:
{{{
access-point:~# iwconfig ath0 key 11111111111111111111110000
}}}
now pinging works just fine. I even can set the keys with athkey now on
the access point, like this:
{{{
access-point:~# athkey -i ath0 1 wep 11111111111111111111112222
client:~# iwconfig ath0 key 11111111111111111111112222
}}}
It seems the access-point first needed some iwconfig-ass-kicking before
actually using the key. I wonder why we can't just use iwconfig ath0 key
[0] 11111111111111111111112222, as suggested by man iwconfig.
{{{
# iwconfig ath0 key [0] 11111111111111111111112222
Error for wireless request "Set Encode" (8B2A) :
invalid argument "[0]".
}}}
WEP without key indexing works just fine, but i'd like all 4 keys.
access-point is running madwifi-ng 1472, client is running some pretty old
madwifi-old.
Comment:
Please be aware that athkey is provided for development/debugging purposes
only and shouldn't be used for "real world" installations. Use the usual
WEP key setup stuff (iwconfig) instead.
Key indexes start with 1 iirc, that is most probably the reason why [0]
causes an error.
--
Ticket URL: <http://madwifi.org/ticket/466>
MadWifi <http://madwifi.org/>
Multiband Atheros Driver for Wireless Fidelity