> For the complete documentation index, see [llms.txt](https://dronebridge.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dronebridge.gitbook.io/docs/developer-guide/notes-about-injection.md).

# 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:

{% code title="enable\_monitor" %}

```bash
#!/bin/bash
declare -a wifi_adps=("wlx00c0ca973410" "wlxfgdfgd513d1fg51")

frequency="2472"
bitrate="36"

for adapter in "${wifi_adps[@]}"
do
   echo "$adapter"
   interface="$adapter"
   ip link set "$interface" down
   iw dev "$interface" set type managed
   ip link set "$interface" up
   iw dev "$interface" set bitrates legacy-2.4 "$bitrate"
   ip link set "$interface" down
   iw dev "$interface" set type monitor
   ip link set "$interface" up
   iw dev "$interface" set freq $frequency
done

iwconfigc
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://dronebridge.gitbook.io/docs/developer-guide/notes-about-injection.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
