• Non ci sono risultati.

one packet at the same time in the ring buffer. In order to decrease latencies and further improve the accuracy of time measurements, the random backoff was dis-abled. It is a mechanism present in the Wi-Fi standard that serves to minimize the probability of collision. Collision refers to the event in which one or more devices want to transmit a packet at the same time. In these cases, the device which has detected the channel as busy waits for a random time, called backoff time, before attempting a new transmission. Deactivating the random backoff is equivalent to transmitting the frame immediately after the channel becomes idle. The last rel-evant parameter to which we made a change is the transmission rate. In modern Wi-Fi adapters, the transmission rate is adjusted on the fly by adaptive mecha-nisms, which decide the transmission rate for each frame. The drivers in our Wi-Fi adapters use a rate adaptation algorithm called Minstrel. The way it has been conceived and designed, Minstrel is suitable when the application context makes use of retransmission procedures [34, 35]. Since the latter has been disabled for the aforementioned reasons, it only makes sense to disable this feature. Consequently, the transmission rate must be managed on the application side (with SDMAC).

The authors of SDMAC, through experimental studies, have shown that having a fixed bit rate helps to improve the determinism of a system, and therefore in our case, to obtain more reliable and precise time measurements. For precisely these reasons, the transmission speed was set to 54Mbps, the same used in [33]. The next phase is concerned with detecting whether a transmission has been success-ful. Upon receiving an acknowledgment (success) or upon expiration of a timer (failure), the device generates an interrupt meant to inform the operating system that a response has arrived. Without going into implementation details that are beyond the scope of this thesis, the operating system will handle the interrupt as soon as possible by executing a predefined routine. The latter, in turn, will ex-ecute a set of instructions within the driver, including those used to detect the transmission’s outcome and those to collect statistics associated with it, such as indicators of channel quality. All this information is then propagated in SDMAC from the driver to the application via a character device. Remember that in the meantime, the program is in an indefinite "waiting" state and remains blocked until it receives new data from the character device. Once the information has reached the application, it then proceeds to save it in a database.

• using two PC desktops (transmitter A and transmitter B) with installed a Linux Ubuntu operating system (v.18.04 with kernel v.4.4.0) and equipped with a dual-band TP-Link TL-WDN4800 Wi-Fi adapter managed by the ath9k device driver (v. 4.4.2-1)

• having the sampling time Ts fixed at 0.5 seconds on all channels

• having the transmission speed set to 54Mbps

• having the retransmission process and Minstrel deactivated.

Transmitter A sends two packets every Ts seconds to access point A, one on channel 1 and the other on channel 9. Similarly, transmitter B transmits to access point B on channels 5 and 13.

For each transmission made, the application saves inside a database a record with the following information:

• channel name (ch1, ch5, ch9, or ch13)

• progressive number of a packet. It is global inside a file.

• timestamp in ms according to Unix time

• Time Stamp Counter (TSC) at the time of transmission. The TSC represents the number of CPU cycles from its reset at the time of packet dispatch.

• TSC at the time of ACK reception. Analogous to above but calculated at the time of ACK reception or at the expiration of the ACK timeout.

• outcome of the transmission. 1 in case of success, 0 otherwise

• received signal strength indicator (RSSI) of the ACK. It measures the strength of the received ACK. If the timer expires before the reception of the acknowl-edgment (known as ACK timeout), its value is undefined, thus unreliable.

• link quality according to iwconfig

• signal level according to iwconfig

• bit rate, which is fixed to 54 Mbps in the case of the database acquired in this thesis.

For various reasons (failures, interference, and disconnections), it was not possible to sample continuously on the same channel for the entire duration of the exper-iment, thus breaking the transmissions on each channel into many trunks. Then, the outcomes of the transmissions from each trunk were saved in a separate text file

having as name: <channel>_<trunk>, where <channel> and <trunk> are place-holders for the channel name and the trunk identifier.

Therefore the complete database is partitioned first by channel and then by trunks (see Fig. 4.1). Although only part of the information collected will be used during

time

ssssssssssssssss sssSSSSSSSSSSSSSSSSSs

trunk 1 trunk 2 trunk 3

channel database

A

successful transmissionB failed transmission

Figure 4.1: Transmission’s outcomes of a channel over time

the training and testing of the predictors, the dataset represents a valuable source of information that can be used to conduct other experiments based on this work.

The characteristics of the collected databases are summarized in Table 4.1.

channel F0 (MHz) # files # records/file # records # days code name

1 2412 55 155365.46 8389735 48.55 db_ch1

5 2432 55 153239.07 8274910 47.89 db_ch5

9 2452 23 308187.30 7088308 41.02 db_ch9

13 2472 23 308025.30 7084582 41.00 db_ch13

Table 4.1: Some metrics about the collected database.

Henceforth to refer to the database acquired on a particular channel, we will use the corresponding abbreviation present in the “code name” column.

In summary, experimental data were acquired in an extensive acquisition campaign based on real devices, which lasted more than 40 days. We repurposed an exist-ing application, based on the SDMAC architecture, to transmit periodically with a fixed period a frame on four distinct Wi-Fi channels operating in the 2.4 GHz band.

We then collected and saved the various statistics related to each transmission, such as its outcome, into a database.

Software

Documenti correlati