linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RTL8188RU no injection?
@ 2011-10-26 22:29 Roman Proud
  2011-10-26 23:23 ` Larry Finger
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Roman Proud @ 2011-10-26 22:29 UTC (permalink / raw)
  To: linux-wireless

Hi there,

i hope you guys can help me.
I wanted a new Wifi card, because mine has no injection, what i need sometimes.

So i forced the Internet to find that a 8187 would be best for. So i
bought the 8188 (newer = better?)... i never had thought about so much
difference in just one number... it was horrible to even get the card
work, first no monitor mode works, but now it does (i dunno why
O_o)... The only thing i miss is Package injection.

So my Question. Is it there? is it in the driver and i just have to do
some magic again like i did with the monitor mode?
If not, is there any Patch? (i didn't find anything...)
Or should i simply send the damn thing back and get me an 8187? (its
not that simple, and i like hacking into my linux, so one of the first
both, would be nicer)

Greetings
Roman

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: RTL8188RU no injection?
  2011-10-26 22:29 RTL8188RU no injection? Roman Proud
@ 2011-10-26 23:23 ` Larry Finger
  2011-10-26 23:30 ` Larry Finger
  2011-10-26 23:45 ` Larry Finger
  2 siblings, 0 replies; 12+ messages in thread
From: Larry Finger @ 2011-10-26 23:23 UTC (permalink / raw)
  To: Roman Proud; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1633 bytes --]

On 10/26/2011 05:29 PM, Roman Proud wrote:
> Hi there,
>
> i hope you guys can help me.
> I wanted a new Wifi card, because mine has no injection, what i need sometimes.
>
> So i forced the Internet to find that a 8187 would be best for. So i
> bought the 8188 (newer = better?)... i never had thought about so much
> difference in just one number... it was horrible to even get the card
> work, first no monitor mode works, but now it does (i dunno why
> O_o)... The only thing i miss is Package injection.

Well, your research should have shown that the 8187 chip is an 802.11g version, 
while the 8188 works with 802.11n. That should have given you a clue that the 
driver would be VERY different.

> So my Question. Is it there? is it in the driver and i just have to do
> some magic again like i did with the monitor mode?
> If not, is there any Patch? (i didn't find anything...)
> Or should i simply send the damn thing back and get me an 8187? (its
> not that simple, and i like hacking into my linux, so one of the first
> both, would be nicer)

What kernel are you using? If you want the latest version of wireless code, you 
should be running the version found in the git repo at
git://git.infradead.org/users/linville/wireless-next.git. Your next-best option 
would be to get the bleeding-edge version of compat-wireless and build it for 
your current kernel.

There is a bug in rtlwifi that affects monitor mode in rtl8192cu, rtl8192ce, 
rtl8192se, and rtl8192de. I think it is fixed by the attached patch. At least 
monitor mode works here after the patch is applied. Please let me know if it 
works for you.

Larry




[-- Attachment #2: rtl8192cu_monitor --]
[-- Type: text/plain, Size: 1489 bytes --]

Index: wireless-testing-new/drivers/net/wireless/rtlwifi/core.c
===================================================================
--- wireless-testing-new.orig/drivers/net/wireless/rtlwifi/core.c
+++ wireless-testing-new/drivers/net/wireless/rtlwifi/core.c
@@ -375,6 +375,7 @@ static void rtl_op_configure_filter(stru
 					  rtlpriv->cfg->maps[MAC_RCR_AB]);
 			RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
 				 ("Disable receive multicast frame.\n"));
+			*new_flags |= FIF_ALLMULTI;
 		}
 	}
 
@@ -387,6 +388,7 @@ static void rtl_op_configure_filter(stru
 			mac->rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_ACRC32];
 			RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
 				 ("Disable receive FCS error frame.\n"));
+			*new_flags |= FIF_FCSFAIL;
 		}
 	}
 
@@ -400,6 +402,7 @@ static void rtl_op_configure_filter(stru
 				rtlpriv->cfg->ops->set_chk_bssid(hw, false);
 			} else {
 				rtlpriv->cfg->ops->set_chk_bssid(hw, true);
+				*new_flags |= FIF_BCN_PRBRESP_PROMISC;
 			}
 		}
 	}
@@ -414,6 +417,7 @@ static void rtl_op_configure_filter(stru
 			mac->rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_ACF];
 			RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
 				 ("Disable receive control frame.\n"));
+			*new_flags |= FIF_CONTROL;
 		}
 	}
 
@@ -426,6 +430,7 @@ static void rtl_op_configure_filter(stru
 			mac->rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_AAP];
 			RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
 				 ("Disable receive other BSS's frame.\n"));
+			*new_flags |= FIF_OTHER_BSS;
 		}
 	}
 }

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: RTL8188RU no injection?
  2011-10-26 22:29 RTL8188RU no injection? Roman Proud
  2011-10-26 23:23 ` Larry Finger
@ 2011-10-26 23:30 ` Larry Finger
  2011-10-26 23:45 ` Larry Finger
  2 siblings, 0 replies; 12+ messages in thread
From: Larry Finger @ 2011-10-26 23:30 UTC (permalink / raw)
  To: Roman Proud; +Cc: linux-wireless

On 10/26/2011 05:29 PM, Roman Proud wrote:

Forget the patch I just sent. Monitor mode works with the standard 
wireless-testing kernel.

How do you do Package Injection? Is that done through mac80211?

Larry


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: RTL8188RU no injection?
  2011-10-26 22:29 RTL8188RU no injection? Roman Proud
  2011-10-26 23:23 ` Larry Finger
  2011-10-26 23:30 ` Larry Finger
@ 2011-10-26 23:45 ` Larry Finger
  2011-10-27 13:17   ` Roman Proud
  2 siblings, 1 reply; 12+ messages in thread
From: Larry Finger @ 2011-10-26 23:45 UTC (permalink / raw)
  To: Roman Proud; +Cc: linux-wireless

On 10/26/2011 05:29 PM, Roman Proud wrote:
> Hi there,
>
> i hope you guys can help me.
> I wanted a new Wifi card, because mine has no injection, what i need sometimes.
>
> So i forced the Internet to find that a 8187 would be best for. So i
> bought the 8188 (newer = better?)... i never had thought about so much
> difference in just one number... it was horrible to even get the card
> work, first no monitor mode works, but now it does (i dunno why
> O_o)... The only thing i miss is Package injection.
>
> So my Question. Is it there? is it in the driver and i just have to do
> some magic again like i did with the monitor mode?
> If not, is there any Patch? (i didn't find anything...)
> Or should i simply send the damn thing back and get me an 8187? (its
> not that simple, and i like hacking into my linux, so one of the first
> both, would be nicer)

I found that packetspammer works just fine with rtl8192cu.

Larry


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: RTL8188RU no injection?
  2011-10-26 23:45 ` Larry Finger
@ 2011-10-27 13:17   ` Roman Proud
  2011-10-27 15:05     ` Larry Finger
  0 siblings, 1 reply; 12+ messages in thread
From: Roman Proud @ 2011-10-27 13:17 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-wireless

Hi peops

thx for all youre responses!

Well i didnt really thought about g and n -.-

Im using the latest 8192cu driver from Realtek now, it works just
fine. Also monitor mode works like a charm (yes if i use airmon-ng for
it). My Kernel is (now the default) Arch kernel, on Linux Version
3.0.4

My last problem is the Package injection. Im surprised you are
thinking it could work (ive found many resources that say something
different, but hey its an OpenSource driver ;)

Pls excuse my "stupidness" but im really not sure if i am using
"mac80211", i think so, its leaded in the System.

And yes its Aircrack im trying to work with, and its Aircrack which
tells me i cant use Packet Injection.
I will try Packetspammer as soon as i am at home. If this works i have
to contact Aircrack, am i right?

Greetings
Roman

2011/10/27 Larry Finger <Larry.Finger@lwfinger.net>:
> On 10/26/2011 05:29 PM, Roman Proud wrote:
>>
>> Hi there,
>>
>> i hope you guys can help me.
>> I wanted a new Wifi card, because mine has no injection, what i need
>> sometimes.
>>
>> So i forced the Internet to find that a 8187 would be best for. So i
>> bought the 8188 (newer = better?)... i never had thought about so much
>> difference in just one number... it was horrible to even get the card
>> work, first no monitor mode works, but now it does (i dunno why
>> O_o)... The only thing i miss is Package injection.
>>
>> So my Question. Is it there? is it in the driver and i just have to do
>> some magic again like i did with the monitor mode?
>> If not, is there any Patch? (i didn't find anything...)
>> Or should i simply send the damn thing back and get me an 8187? (its
>> not that simple, and i like hacking into my linux, so one of the first
>> both, would be nicer)
>
> I found that packetspammer works just fine with rtl8192cu.
>
> Larry
>
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: RTL8188RU no injection?
  2011-10-27 13:17   ` Roman Proud
@ 2011-10-27 15:05     ` Larry Finger
  2011-10-27 22:00       ` Gábor Stefanik
  0 siblings, 1 reply; 12+ messages in thread
From: Larry Finger @ 2011-10-27 15:05 UTC (permalink / raw)
  To: Roman Proud; +Cc: linux-wireless

On 10/27/2011 08:17 AM, Roman Proud wrote:
> Hi peops
>
> thx for all youre responses!
>
> Well i didnt really thought about g and n -.-
>
> Im using the latest 8192cu driver from Realtek now, it works just
> fine. Also monitor mode works like a charm (yes if i use airmon-ng for
> it). My Kernel is (now the default) Arch kernel, on Linux Version
> 3.0.4
>
> My last problem is the Package injection. Im surprised you are
> thinking it could work (ive found many resources that say something
> different, but hey its an OpenSource driver ;)

Well, I tested with Packetspammer and it worked. As in many cases, the resources 
that say otherwise are wrong.

> Pls excuse my "stupidness" but im really not sure if i am using
> "mac80211", i think so, its leaded in the System.

The drivers for most devices without a hardware MAC use mac80211 and friends. In 
fact, it is a prerequisite for getting a driver included in the mainline 
drivers/net/wireless/ tree. If the driver implements its own MAC layer, then it 
resides in drivers/staging/. Yes, it is loaded on your system, and it handles a 
lot of things for the drivers that use it.

> And yes its Aircrack im trying to work with, and its Aircrack which
> tells me i cant use Packet Injection.
> I will try Packetspammer as soon as i am at home. If this works i have
> to contact Aircrack, am i right?

If Aircrack adds the socket method used by Packetspammer, it will work with 
nearly every driver in the kernel that supports monitor mode. Whether they want 
to do that will be their decision, of course.

Larry

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: RTL8188RU no injection?
  2011-10-27 15:05     ` Larry Finger
@ 2011-10-27 22:00       ` Gábor Stefanik
  2011-10-27 22:18         ` Larry Finger
  2011-10-27 23:12         ` Larry Finger
  0 siblings, 2 replies; 12+ messages in thread
From: Gábor Stefanik @ 2011-10-27 22:00 UTC (permalink / raw)
  To: Larry Finger; +Cc: Roman Proud, linux-wireless

On Thu, Oct 27, 2011 at 5:05 PM, Larry Finger <Larry.Finger@lwfinger.net> wrote:
> On 10/27/2011 08:17 AM, Roman Proud wrote:
>>
>> Hi peops
>>
>> thx for all youre responses!
>>
>> Well i didnt really thought about g and n -.-
>>
>> Im using the latest 8192cu driver from Realtek now, it works just
>> fine. Also monitor mode works like a charm (yes if i use airmon-ng for
>> it). My Kernel is (now the default) Arch kernel, on Linux Version
>> 3.0.4
>>
>> My last problem is the Package injection. Im surprised you are
>> thinking it could work (ive found many resources that say something
>> different, but hey its an OpenSource driver ;)
>
> Well, I tested with Packetspammer and it worked. As in many cases, the
> resources that say otherwise are wrong.
>
>> Pls excuse my "stupidness" but im really not sure if i am using
>> "mac80211", i think so, its leaded in the System.
>
> The drivers for most devices without a hardware MAC use mac80211 and
> friends. In fact, it is a prerequisite for getting a driver included in the
> mainline drivers/net/wireless/ tree. If the driver implements its own MAC
> layer, then it resides in drivers/staging/. Yes, it is loaded on your
> system, and it handles a lot of things for the drivers that use it.
>
>> And yes its Aircrack im trying to work with, and its Aircrack which
>> tells me i cant use Packet Injection.
>> I will try Packetspammer as soon as i am at home. If this works i have
>> to contact Aircrack, am i right?
>
> If Aircrack adds the socket method used by Packetspammer, it will work with
> nearly every driver in the kernel that supports monitor mode. Whether they
> want to do that will be their decision, of course.

As a former Aircrack developer, I can definitely state that Aircrack
uses the same injection method as packetspammer.

However, Realtek's r8192cu driver will never support injection, and it
is not a mac80211 driver. Look for a driver whose module name begins
with "rtl" (not just "r"). AFAIK one is included in recent kernels.

>
> Larry
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: RTL8188RU no injection?
  2011-10-27 22:00       ` Gábor Stefanik
@ 2011-10-27 22:18         ` Larry Finger
  2011-10-27 22:21           ` Gábor Stefanik
  2011-10-27 23:12         ` Larry Finger
  1 sibling, 1 reply; 12+ messages in thread
From: Larry Finger @ 2011-10-27 22:18 UTC (permalink / raw)
  To: Gábor Stefanik; +Cc: Roman Proud, linux-wireless

On 10/27/2011 05:00 PM, Gábor Stefanik wrote:
> On Thu, Oct 27, 2011 at 5:05 PM, Larry Finger<Larry.Finger@lwfinger.net>  wrote:
>> On 10/27/2011 08:17 AM, Roman Proud wrote:
>>>
>>> Hi peops
>>>
>>> thx for all youre responses!
>>>
>>> Well i didnt really thought about g and n -.-
>>>
>>> Im using the latest 8192cu driver from Realtek now, it works just
>>> fine. Also monitor mode works like a charm (yes if i use airmon-ng for
>>> it). My Kernel is (now the default) Arch kernel, on Linux Version
>>> 3.0.4
>>>
>>> My last problem is the Package injection. Im surprised you are
>>> thinking it could work (ive found many resources that say something
>>> different, but hey its an OpenSource driver ;)
>>
>> Well, I tested with Packetspammer and it worked. As in many cases, the
>> resources that say otherwise are wrong.
>>
>>> Pls excuse my "stupidness" but im really not sure if i am using
>>> "mac80211", i think so, its leaded in the System.
>>
>> The drivers for most devices without a hardware MAC use mac80211 and
>> friends. In fact, it is a prerequisite for getting a driver included in the
>> mainline drivers/net/wireless/ tree. If the driver implements its own MAC
>> layer, then it resides in drivers/staging/. Yes, it is loaded on your
>> system, and it handles a lot of things for the drivers that use it.
>>
>>> And yes its Aircrack im trying to work with, and its Aircrack which
>>> tells me i cant use Packet Injection.
>>> I will try Packetspammer as soon as i am at home. If this works i have
>>> to contact Aircrack, am i right?
>>
>> If Aircrack adds the socket method used by Packetspammer, it will work with
>> nearly every driver in the kernel that supports monitor mode. Whether they
>> want to do that will be their decision, of course.
>
> As a former Aircrack developer, I can definitely state that Aircrack
> uses the same injection method as packetspammer.
>
> However, Realtek's r8192cu driver will never support injection, and it
> is not a mac80211 driver. Look for a driver whose module name begins
> with "rtl" (not just "r"). AFAIK one is included in recent kernels.

I accepted his word that Aircrack does not work. He is using the mac80211 driver 
rtl8192cu, which was introduced in 2.6.39. The driver in 
drivers/staging/rtl8192u/ is for a different device.

Larry



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: RTL8188RU no injection?
  2011-10-27 22:18         ` Larry Finger
@ 2011-10-27 22:21           ` Gábor Stefanik
  2011-10-27 22:40             ` Larry Finger
  0 siblings, 1 reply; 12+ messages in thread
From: Gábor Stefanik @ 2011-10-27 22:21 UTC (permalink / raw)
  To: Larry Finger; +Cc: Roman Proud, linux-wireless

2011/10/28 Larry Finger <Larry.Finger@lwfinger.net>:
> On 10/27/2011 05:00 PM, Gábor Stefanik wrote:
>>
>> On Thu, Oct 27, 2011 at 5:05 PM, Larry Finger<Larry.Finger@lwfinger.net>
>>  wrote:
>>>
>>> On 10/27/2011 08:17 AM, Roman Proud wrote:
>>>>
>>>> Hi peops
>>>>
>>>> thx for all youre responses!
>>>>
>>>> Well i didnt really thought about g and n -.-
>>>>
>>>> Im using the latest 8192cu driver from Realtek now, it works just
>>>> fine. Also monitor mode works like a charm (yes if i use airmon-ng for
>>>> it). My Kernel is (now the default) Arch kernel, on Linux Version
>>>> 3.0.4
>>>>
>>>> My last problem is the Package injection. Im surprised you are
>>>> thinking it could work (ive found many resources that say something
>>>> different, but hey its an OpenSource driver ;)
>>>
>>> Well, I tested with Packetspammer and it worked. As in many cases, the
>>> resources that say otherwise are wrong.
>>>
>>>> Pls excuse my "stupidness" but im really not sure if i am using
>>>> "mac80211", i think so, its leaded in the System.
>>>
>>> The drivers for most devices without a hardware MAC use mac80211 and
>>> friends. In fact, it is a prerequisite for getting a driver included in
>>> the
>>> mainline drivers/net/wireless/ tree. If the driver implements its own MAC
>>> layer, then it resides in drivers/staging/. Yes, it is loaded on your
>>> system, and it handles a lot of things for the drivers that use it.
>>>
>>>> And yes its Aircrack im trying to work with, and its Aircrack which
>>>> tells me i cant use Packet Injection.
>>>> I will try Packetspammer as soon as i am at home. If this works i have
>>>> to contact Aircrack, am i right?
>>>
>>> If Aircrack adds the socket method used by Packetspammer, it will work
>>> with
>>> nearly every driver in the kernel that supports monitor mode. Whether
>>> they
>>> want to do that will be their decision, of course.
>>
>> As a former Aircrack developer, I can definitely state that Aircrack
>> uses the same injection method as packetspammer.
>>
>> However, Realtek's r8192cu driver will never support injection, and it
>> is not a mac80211 driver. Look for a driver whose module name begins
>> with "rtl" (not just "r"). AFAIK one is included in recent kernels.
>
> I accepted his word that Aircrack does not work. He is using the mac80211
> driver rtl8192cu, which was introduced in 2.6.39. The driver in
> drivers/staging/rtl8192u/ is for a different device.
>
> Larry

Didn't he say that he is using r8192cu downloaded from realtek.com.tw?

--Gábor

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: RTL8188RU no injection?
  2011-10-27 22:21           ` Gábor Stefanik
@ 2011-10-27 22:40             ` Larry Finger
  0 siblings, 0 replies; 12+ messages in thread
From: Larry Finger @ 2011-10-27 22:40 UTC (permalink / raw)
  To: Gábor Stefanik; +Cc: Roman Proud, linux-wireless

On 10/27/2011 05:21 PM, Gábor Stefanik wrote:
> Didn't he say that he is using r8192cu downloaded from realtek.com.tw?

Yes, I guess he did. Well, that is his fault. He was told to use compat-wireless.

Larry


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: RTL8188RU no injection?
  2011-10-27 22:00       ` Gábor Stefanik
  2011-10-27 22:18         ` Larry Finger
@ 2011-10-27 23:12         ` Larry Finger
  2011-10-29 12:06           ` Roman Proud
  1 sibling, 1 reply; 12+ messages in thread
From: Larry Finger @ 2011-10-27 23:12 UTC (permalink / raw)
  To: Gábor Stefanik; +Cc: Roman Proud, linux-wireless

On 10/27/2011 05:00 PM, Gábor Stefanik wrote:

> As a former Aircrack developer, I can definitely state that Aircrack
> uses the same injection method as packetspammer.

I just built Aircrack and tested it with rtl8192cu on an ALFA AWUS036NHR, which 
has the RTL8188RU chip. It works just as you expected.

Larry



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: RTL8188RU no injection?
  2011-10-27 23:12         ` Larry Finger
@ 2011-10-29 12:06           ` Roman Proud
  0 siblings, 0 replies; 12+ messages in thread
From: Roman Proud @ 2011-10-29 12:06 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-wireless

I really thank you guys for helping me.
I really learned a lot in this thread xD

Its an ALFA AWUS036NHR so i guess its me... but yeah, i also found
that there are many drivers already in the main kernel, but i didnt
know there is a difference between rtl and r and nothing ...

Btw i tried many drivers, not only directly from Realtek. I think my
netbook kernel, was the problem, since i'm on Orginal Arch im getting
straight forward to get this thing working :D

Now where i know that it should work, i can try and try without
worrying that it never will work, so really thx for testing this!

Greetings,
Roman

2011/10/28 Larry Finger <Larry.Finger@lwfinger.net>:
> On 10/27/2011 05:00 PM, Gábor Stefanik wrote:
>
>> As a former Aircrack developer, I can definitely state that Aircrack
>> uses the same injection method as packetspammer.
>
> I just built Aircrack and tested it with rtl8192cu on an ALFA AWUS036NHR,
> which has the RTL8188RU chip. It works just as you expected.
>
> Larry
>
>
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-10-29 12:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-26 22:29 RTL8188RU no injection? Roman Proud
2011-10-26 23:23 ` Larry Finger
2011-10-26 23:30 ` Larry Finger
2011-10-26 23:45 ` Larry Finger
2011-10-27 13:17   ` Roman Proud
2011-10-27 15:05     ` Larry Finger
2011-10-27 22:00       ` Gábor Stefanik
2011-10-27 22:18         ` Larry Finger
2011-10-27 22:21           ` Gábor Stefanik
2011-10-27 22:40             ` Larry Finger
2011-10-27 23:12         ` Larry Finger
2011-10-29 12:06           ` Roman Proud

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).