Notes About Injection

Atheros AR9271

A great chip with open source drivers & firmware. However it got some very strange behaviour when it comes to injection bit rates. Path of packets is as follows:
  • Data rate specified in Radiotap header. Visible in Wireshark on sending interface
  • Data rate gets overwritten by driver to 1Mbit?! Visible as a second packet in Wireshark in sending interface
  • Sent packet has data rate configured by iw dev "$interface" set bitrates legacy-2.4 11
  • Data rate must be set while interface is in managed mode. Command will fail if device is on monitor mode
The final data rate used by the system for sending is not visible in Wireshark on the sending interface. This means that the firmware decides about the final data rate. To verify the transmission rate a second adapter is required. Rates can be set using following script:
enable_monitor
1
#!/bin/bash
2
declare -a wifi_adps=("wlx00c0ca973410" "wlxfgdfgd513d1fg51")
3
4
frequency="2472"
5
bitrate="36"
6
7
for adapter in "${wifi_adps[@]}"
8
do
9
echo "$adapter"
10
interface="$adapter"
11
ip link set "$interface" down
12
iw dev "$interface" set type managed
13
ip link set "$interface" up
14
iw dev "$interface" set bitrates legacy-2.4 "$bitrate"
15
ip link set "$interface" down
16
iw dev "$interface" set type monitor
17
ip link set "$interface" up
18
iw dev "$interface" set freq $frequency
19
done
20
21
iwconfigc
Copied!
Last modified 2yr ago
Copy link