

In the background, periodically write everything from the queue to a SQLite database. Extract the key fields from the Radiotap headers, and write these along with the current timestamp to an in-memory queue. Each differs in what information it contains. 802.11) packet: management, control, and data. For example, one card I tested packets did not include any signal strength data.

Radiotap is a standard for injecting/interpreting these, though what actual information ends up there is up to the card manufacturer. Using a Radiotap decoder means we can access 'pseudo-headers' which are inserted by the card rather than having actually been transmitted. Each packet recieved goes into a function for processing. Note that the nature of this process means we will miss some (many) packets, but for our purposes that shouldn't be a problem.

This is also done via a terminal command. Since cards can only be tuned to one channel at a time, we need to randomly switch channels in the background to ensure we're picking up devices using any channel. There are also a number of others in the 5GHz range, but not all cards support these channels. There are 13 channels in the 2.4GHz band, which are the most commonly used. This is done via a terminal command, as it doesn't seem possible through Python. It differs from the somewhat similar promiscuous mode, which (as I understand it) gives you more information, but requires you to be connected to a network. This means it will passively sniff all wireless traffic it sees. For the same reason pcapy won't work within a virtual environment. Needs to be run with sudo because we're doing system-level stuff.
