Realtek USB 0bda:8176 as AP?
I am attempting to use a Realtek USB dongle as an access point on a PC running Fedora 15, with hostapd as the user-layer SW.
The USB ID is 0bda:8176, which makes this an rtlwifi:rtl8192cu device.
It works fine in station mode - I can connect to a WPA network. It also works fine as an AP, but only with security disabled. As soon as I enable WPA in the hostapd config file, I can no longer connect.
I've logged both the hostapd and wpa_supplicant sides of the conversation. I'm using the same type of Realtek dongle for both sides.
On the hostapd side, I see "sending 1/4 msg of 4-Way Handshake"
On the wpa_supplicant side, I see "RX message 1 of 4-Way Handshake" followed by "Sending EAPOL-Key 2/4".
However, this message is not received by the hostapd side. Instead I see "WPA: EAPOL-Key timeout" and the association drops.
I went to the IRC group, and got the suggestion to sniff the traffic from a third PC. I've done that, and can make the trace available if anyone wants to see it. Basically, I can see the EAPOL-Key 2/4 in Wireshark, but the packet as received on the AP looks a bit garbled.
Here is what wireshark shows (and it decodes it as msg 2/4):
0000 00 00 1a 00 2f 48 00 00 84 c4 a2 82 00 00 00 00 ..../H.. ........ 0010 10 6c 71 09 c0 00 d9 01 00 00 08 01 00 00 00 e0 .lq..... ........ 0020 4c 05 d6 1f 00 e0 4c 05 de d6 00 e0 4c 05 d6 1f L.....L. ....L... 0030 90 01 aa aa 03 00 00 00 88 8e 01 03 00 75 02 01 ........ .....u.. 0040 0a 00 00 00 00 00 00 00 00 00 01 03 92 92 c7 23 ........ .......# 0050 6b 98 cb b3 05 a0 3a a3 28 4a 73 25 49 d7 2a bb k.....:. (Js%I.*. 0060 b1 e5 0c d0 7c 4a d9 b7 af 21 bc 00 00 00 00 00 ....|J.. .!...... 0070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ 0080 00 00 00 00 00 00 00 00 00 00 00 03 35 84 ee 8c ........ ....5... 0090 17 d3 83 13 e0 40 80 ca 96 c3 6e 00 16 30 14 01 .....@.. ..n..0.. 00a0 00 00 0f ac 02 01 00 00 0f ac 04 01 00 00 0f ac ........ ........ 00b0 02 00 00 95 52 78 36 ....Rx6
and here is what hostapd sees (but it prints EAPOL-Key timeout):
00000000: 00 00 0d 00 04 80 02 00 6c 00 00 00 00 08 02 34 00000010: 00 00 e0 4c 05 de d6 00 e0 4c 05 d6 1f 00 e0 4c 00000020: 05 d6 1f e0 05 aa aa 03 00 00 00 88 8e 02 03 00 00000030: 5f 02 00 8a 00 10 00 00 00 00 00 00 00 01 3f 42 00000040: f6 a8 72 f2 68 22 e8 f4 4f 3f 44 21 7a 82 01 34 00000050: fb 99 dd f0 60 dc f3 28 81 7e d4 ca 6f 35 00 00 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
A lot of the data match up, but a lot don't. I believe I have synchronized the wireshark and hostapd logs, because the messages before and after this one do match. Also, wireshark shows four attempts at EAPOL-Key 2/4, and hostapd shows four of these strange frames.
Has anyone been successful with these chips in AP mode with security?
Any suggestions on things to try? It was suggested to turn off HW crypto, but that doesn't appear to be possible in the rtl8192cu driver, although other rtl8192 devices do support it.
Or should I use a different chipset altogether? Realtek Semi appears to have helped the community, so I don't want to abandon them, but I also need this to work. :-)
Steve
Quoted 5 lines · Steven A. Falco
I am attempting to use a Realtek USB dongle as an access point on a PC running Fedora 15, with hostapd as the user-layer SW.
The USB ID is 0bda:8176, which makes this an rtlwifi:rtl8192cu device.
What kernel are you running? The latest is in wireless-testing, but that will be difficult to clone as long as kernel.org is out of commission. In addition, there are two patches that were sent on 9/3, but have not yet been incorporated due to the k.o problems. They are attached.
I just got a Powermac G4 and I'm fixing the big-endian issues, but that is clearly not your problem.
Larry
Quoted 1 line
From
b29f825b3c7a495ecf415d2810cae9d2f110f05fMon Sep 17 00:00:00 2001
From: George <[email protected]>
Date: Sat, 3 Sep 2011 10:44:32 -0500
Subject: [PATCH 1/2] rtlwifi: rtl8192cu: Fix problem connecting to HT-enabled AP
To: [email protected]
Cc: [email protected],[email protected]
The driver fails to connect to 802.11n-enabled APs. The patch fixes Bug #42262.
--- drivers/net/wireless/rtlwifi/rtl8192cu/trx.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
drivers/net/wireless/rtlwifi/rtl8192cu/trx.c +6 -5
@@ -546,15 +546,16 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw, (tcb_desc->rts_use_shortpreamble ?1 :0 ) : (tcb_desc->rts_use_shortgi ? 1 : 0)));if (mac->bw_40) { -if (tcb_desc->packet_bw) { +if (rate_flag &IEEE80211_TX_RC_DUP_DATA ) {SET_TX_DESC_DATA_BW (txdesc,1 );SET_TX_DESC_DATA_SC (txdesc,3 ); + }else if (rate_flag &IEEE80211_TX_RC_40_MHZ_WIDTH ){ +SET_TX_DESC_DATA_BW (txdesc,1 ); +SET_TX_DESC_DATA_SC (txdesc, mac->cur_40_prime_sc); }else {SET_TX_DESC_DATA_BW (txdesc,0 ); -if (rate_flag &IEEE80211_TX_RC_DUP_DATA ) -SET_TX_DESC_DATA_SC (txdesc, - mac->cur_40_prime_sc); - } +SET_TX_DESC_DATA_SC (txdesc,0 ); + } }else {SET_TX_DESC_DATA_BW (txdesc,0 );SET_TX_DESC_DATA_SC (txdesc,0 );
Signature · 1 line
1.7.6.1
Quoted 1 line
From
811462b15d9e9a23ee6d113ec652c57628230a7bMon Sep 17 00:00:00 2001
From: George <[email protected]>
Date: Sat, 3 Sep 2011 10:47:14 -0500
Subject: [PATCH 2/2] rtlwifi: Fix problem when switching connections
To: [email protected]
Cc: [email protected],[email protected]
The driver fails to clear encryption keys making it impossible to switch connections.
--- drivers/net/wireless/rtlwifi/core.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
drivers/net/wireless/rtlwifi/core.c +8 -0
@@ -610,6 +610,11 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, mac->link_state =MAC80211_NOLINK ;memset (mac->bssid,0 ,6 ); + +/* reset sec info */ +rtl_cam_reset_sec_info (hw); + +rtl_cam_reset_all_entry (hw); mac->vendor =PEER_UNKNOWN ; RT_TRACE(rtlpriv, COMP_MAC80211, DBG_DMESG,
@@ -1063,6 +1068,9 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,*or clear all entry here. */ rtl_cam_delete_one_entry (hw, mac_addr, key_idx); + +rtl_cam_reset_sec_info (hw); +break ;default : RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
Signature · 1 line
1.7.6.1
Quoted 9 lines · Larry Finger
Quoted 5 lines · Steven A. Falco
I am attempting to use a Realtek USB dongle as an access point on a PC running Fedora 15, with hostapd as the user-layer SW.
The USB ID is 0bda:8176, which makes this an rtlwifi:rtl8192cu device.
What kernel are you running? The latest is in wireless-testing, but that will be difficult to clone as long as kernel.org is out of commission. In addition, there are two patches that were sent on 9/3, but have not yet been incorporated due to the k.o problems. They are attached.
I'm using kernel-3.1.0-0.rc3.git0.0.fc16.src.rpm from Fedora 16. I'll apply the patches you provided and test a bit later today.
Steve
Quoted 4 lines
I just got a Powermac G4 and I'm fixing the big-endian issues, but that is clearly not your problem.
Larry
Quoted 5 lines · Steven A. Falco
Quoted 4 lines · Larry Finger
Quoted 3 lines · Steven A. Falco
I am attempting to use a Realtek USB dongle as an access point on a PC running Fedora 15, with hostapd as the user-layer SW.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
The USB ID is 0bda:8176, which makes this an rtlwifi:rtl8192cu device.
What kernel are you running? The latest is in wireless-testing, but that will be difficult to clone as long as kernel.org is out of commission. In addition, there are two patches that were sent on 9/3, but have not yet been incorporated due to the k.o problems. They are attached.
I'm using kernel-3.1.0-0.rc3.git0.0.fc16.src.rpm from Fedora 16. I'll apply the patches you provided and test a bit later today.
I tried the patches. They do not make a difference. Actually, that is not surprising, because the first patch relates to 802.11n but I am using 802.11g, and the second patch has to do with switching networks, but I am coming up cold on this network.
I should receive some USB dongles with different chipsets tomorrow. Hopefully one of them will be better behaved. But if there is more data I can gather to help figure this out, I am happy to do so.
Steve
Quoted 10 lines
Quoted 4 lines
I just got a Powermac G4 and I'm fixing the big-endian issues, but that is clearly not your problem.
Larry
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html