-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Packet injection only works on channels 1 to 11 #118
Comments
Hm... no idea. @erikarn do you know? blacklisted by eeprom? |
Weird. Um, can you see if ath9k is passing frames to the firmware?
A
…On Nov 29, 2016 7:35 PM, "Oleksij Rempel" ***@***.***> wrote:
Hm... no idea. @erikarn <https://github.com/erikarn> do you know?
blacklisted by eeprom?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#118 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABGl7VWgJM1PDK09QcH5Vak8j_sta7-7ks5rDO8fgaJpZM4K96_f>
.
|
You can use this patch to get rid of all country restrictions: https://github.com/bortek/EZ-WifiBroadcast/blob/master/Patches/ez-wifibroadcast-1.4-kernel-4.4-patches.diff Plese note, there are more changes to the drivers in the patch (changed medium access parameters, increased transmit power, changes to the fw loading mechanism, etc.) you may want to only use the portions that remove country restrictions. |
I can confirm this behavior, also on reg DE. Channel 1-11 works, on other channels no data is passed to the firmware. So I guess this is not an firmware issue rather than reg DB related. @rodizio1 Thanks for your inspiring patches. Very helpful! |
some or all of this changes should probably go mainline. |
Thanks for all your help. @rodizio1 your patch allowed me to use packet injection in the 5 GHz band. Besides, the higher TX power is perfect for our purpose of causing WIFI interference inside of a shielded environment. Hannes |
Latest FW code is not able to set minimal rate for injected packages: Testing is welcome. |
Merry Christmas :) Just tried it, iw ec086b1c7834 set bitrates legacy-2.4 18 says: dmesg output:
Dongle is a TPLink 722N with AR9271 chipset, running Kernel 4.4.32 on a Raspberry Pi3. |
beside, the configuration suggested by wifi videobraodcast tool didn't worked for me. Probably with similar error. So i use this script: wlan="wlx00c0ca570d7d" cd wifibroadcast airmon-ng stop $mon |
quick test of your patch: disabling carrier sense made my alfa quickly stuck at 1Mbps tx rate and frozen link, sure i could reconnect easily but shortly after that it happens again. reverted changes first in mac.h only - didn't help then reverted mac.c and htc_drv_main.c - it works fine just like before. common_init.c - we can go here all the way from 2192 to 2732, the crap is ch14 and i'll explain later why. this should be fine i guess:
before messing with carrier sensing the card would reset in a loop and could not connect to the network, i knew this is because of bad and long usb cable so i reverted .max_power to 20 after that i could connect successfully so this means your txpower patch really does work. each time i tried to increase txpower the same way there was no difference, but one thing i missed was change in reg.c - i assume now this file is also important to patch. about regd.c : usually i #define ATH9K_2GHZ from 2312 to 2484 MHz and have all these channels available but i see you defined all channels beyond 14 as a ch14. my card is now detected as abgn, under 2.4 mode i have channels 2192-2484 and to use channels above 2484 i have to select 5GHz mode (didn't try if it will work) but this kind of setup would prevent one from scanning whole 2GHz band at once. further problems appear when you try to do this on latest hostapd releases, AP mode will not work, STA mode will work, monitor mode will not work (while STA is connected). there is hostapd version that allows negative channels without special patching hostapd-2015-03-25-1, but it still requires util.c patch, ieee802_11_common.c frequency patch and removing ch14 checks from hw_features.c only thing i haven't tried are htc fw mods to allows different bitrates fw load. |
olerem: This wouldn't be a problem, after all it's just some lines in a script. However, I have the feeling that this will make things more unstable. Things like bringing up or down interfaces or plugging/unplugging usb stuff is somehow flaky with the Pi and USB Atheros cards and leads to usb hanging and kernel crashes etc. sometimes. And then I've been fighting for every second to reduce boot-up time, I got it just under 10 seconds now until the videostream appears. I would rather not lose one or two seconds again with ifconfig up/down. Would it be much work for you to make it possible to set it in monitor mode also? psyborg55: Disabling carrier sense is not a good idea, you will not gain anything but just interfere with other wifi networks around you. There is a reason it's not activated by default in the patch and that it prints a dmesg log line with more than one exclamation mark when it is activated ;) This is just for doing tests and veryfing changes in a shielded environment. Regarding the channel numbers: It's not easy to get that right, it depends a lot on userspace programs also. Channel 14 is also a special case because it doesn't fit the "5Mhz-ladder" of the other channels. Since this patch is mainly intended for use with wifibroadcast anyway, I just decided to not bother with channel numbers at all and just set the channel with e.g. "iwconfig wlan0 channel 2462M" |
Quoting myself:
Yep, it did :( Only thing I changed was the script function that configures the interfaces. About every 2nd time or so the cards hang during that. Added some "sleep 1" lines between the iw commands, now it seems to be better. Apart from that, I made a small program that injects packets for testing purposes via raw sockets. In contrast, the wifibroadcast tx program (which injects packets via pcap_inject) is not affected by this. |
it feels like this part of mac80211 interface is not good tested or have not enough options for this work. |
Setting bitrate with iw while in monitor mode works with Ralink rt2800usb cards (without any patches). Setting bitrate per packet would be even nicer, yes :) I have this already working with Ralink rt2800usb cards and this kernel patch: https://github.com/bortek/EZ-WifiBroadcast/blob/master/Patches/mac80211-radiotap-bitrate_mcs_rtscts.linux-4.4.patch. It works via a Radiotap header (www.radiotap.org) in-front of the IEEE802.11 frames that contains info on how to send the packet (i.e. tell the hardware to not wait for an ACK when injecting, etc.) Telling the hardware to inject a frame with CTS-to-self protection also does not seem to work. |
I work in a research group that examines coexistence issues between wireless networks on the ISM bands. We are using a Netgear WNDA3200 stick, which features an AR7010+AR9280. We perform packet injection in order to simulate WiFi traffic and interfere with devices under test. However we were only able to perform packet injection on channels 1 to 11, despite the region was set to Germany. When using channel 12 or 13 or any channel on the 5 GHz band, the host programs report a successful packet transmission, however no packets are sent over the air.
Do you have any idea why packet injection is limited to channels 1 to 11? Is the region ignored in monitor mode? Is there any possibility to get injection working on higher channels?
Thanks in advance
Hannes
The text was updated successfully, but these errors were encountered: