Search Linux Wireless

Google Summer of Code 2009: Another wireless application

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

we got another application on wireless. See below. And do not forget to apply as mentor at the LF.

   Till

--------------------

Title:  	Automation of testing using mac80211_hwsim and Orbit
Student: 	Qasim Javed
Mentor: 	No mentor assigned
Possible Mentors: 	None
Abstract:
Name: Qasim Javed
Affiliation: University of Texas at Dallas
Enrollment: Computer Science Ph.D. Student
Freenode IRC nick: nixbox
Email address: qasimj@xxxxxxxxx

I am primarily interested in "Automation of testing using mac80211_hwsim and Orbit". I have been exploring the mac80211 stack along with the ath5k drivers which has enabled me to learn about the workings of the stack. Also, I am familiar with networking testbeds. I have worked on Emulab networking testbed before and have also worked on a testbed project in our lab. This has made it easy for me to learn and use the Orbit testbed.

Moreover, by virtue of my research work in wireless networking which includes IEEE 802.11, I am already familiar with the workings of the protocol. This puts me in a very good position to start working on this project.

I have already tried some tests using tools such as Andy green's packetspammer. Specifically, I have tested the power saving mode on STAs and verified that the AP buffers the packets when the STA is in power save mode 2.

This proposal lists the test cases that should be done in my opinion. However, an interaction with the Linux Wireless community will enable me to refine these test cases and come up with a set which can really help the mac80211 and wifi device driver developers.
Content:

About me
I am currently a Ph.D. student in the Computer Science Department at the University of Texas at Dallas. I work in the Distributed Systems lab [1] where I am advised by Dr. Ravi Prakash. We work on problems in wireless networking, specifically, MAC layer issues in IEEE 802.11 and wireless sensor networks. I am also a teaching assistant for the Advanced Operating Systems course offered in the computer science department during Spring 2009 where I am responsible for creating Linux kernel projects and grading them. I graduated with a Masters degree in computer science from the University of Texas at Dallas in Spring 2007. Prior to this, I completed Bachelors in computer science from National University of Sciences and Technology, Pakistan in 2004. I have been using the Linux operating system and developing applications for it since 2002. My undergraduate project was a network intrusion detection system developed for Linux using C and C++ programming languages.

Programming Languages and Platforms
I have been developing applications in C and C++ for the Linux Operating System on the Intel and AVR32 platforms. I am also familiar with Bash, Ruby, and TCL scripting languages. I use ruby for a lot of things including web scraping, data analysis and quick application prototyping. Most of my TCL work involves writing simulation scripts for network simulator 2. I have also used TCL to run experiments on the Emulab networking testbed.

Recent Development Experience
I have been involved in the development of Texas Network Testbed project[2]. I was responsible for developing a communications library for the testbed software in C++. I have also ported the open source Contiki operating system [4] for wireless sensor networks to the EM2420 platform which consists of an Atmel 128L microcontroller along with CC2420 IEEE 802.15.4 radio. I have implemented a distributed consensus protocol in C using the Contiki operating system for wireless sensor nodes. Crossbow Telos-B motes were used as the implementation platform. I conducted experiments and evaluated the performance of the protocol.

As a part of my research work, I have explored the new mac80211 Wifi networking stack in the Linux Kernel. Most of the work was done to understand the new ath5k driver, how it interacts with mac80211, and the implementation of rate control algorithms. I have tinkered with the drivers, specifically, playing with how noise floor calibration works and understanding the Automatic Gain Control mechanism. Most of my implementation work will start from the Fall semester this year. Working on this testing project will be a great opportunity for me as I will be well prepared for the upcoming semester and also serve the Linux Wireless developer and user community.

I have also worked on the Emulab networking testbed. Specifically, I had written ns-2 style TCL scripts to test a consensus protocol on both wired and wireless networks. I evaluated the performance of the protocol by using the results from the experiments.

Idea
I am interested in “Automation of testing using mac80211_hwsim and Orbit”. I selected this project because it is very relevant to the work that I have been doing recently. Also, it will provide me with a great opportunity to further my knowledge of the mac80211 Wifi networking stack. My goal is to ease the task of mac80211 and Wifi device driver developers by providing them an automated test suite. The test suite will allow the developers to test the changes they have made to the mac80211 stack.

Setup
Since I have been exploring the mac80211 stack and the ath5k drivers, I have the latest wireless-testing tree on my Fedora machine. I also use OpenGrok [3] source code search and reference engine for navigating through the Linux kernel source code. I have compiled and tested mac80211_hwsim from the latest wireless-testing git repository. I have also used tcpdump to see all the packets in the "air" via the global monitoring netdevice hwsim0. Moreover, I have experimented with Andy Green's packetspammer tool.

For power save mode testing, I created three radios using mac80211_hwsim kernel module's "radios" parameter. One of the radios was configured as an AP, while the other two were configured as STAs. Both of the STAs were associated with the AP. Debugfs was mounted and one of the STAs was put into power save mode 2. It was noted that "num_sta_ps" debugfs entry on the AP was incremented as a result of the mode change on the STA. The destination MAC address in the Packetspammer tool was modified so that it sent frames to the STA in power save mode. It was noted that "total_ps_buffered" debugfs entry on the AP interface was incremented whenever a packet was injected on the monitor interface associated with the STA which was not in Power Save mode.

To summarize, I have tried the following configurations:

1. One AP, one STA, no authentication
2. One AP, one STA, WPA2, CCMP
3. One AP, one STA, WPA2, TKIP
4. One AP, one STA, WPA2, TKIP on channel 1 and one AP, one STA, WPA2, CCMP on channel 11
5. One AP, two STAs, WPA2, CCMP, one STA in Power Save mode 2.

I have familiarized myself with the Orbit testbed. That includes, reserving slots, setting up an experiment, creating topologies, collecting results using the OML (Orbit Measurement Library) and analyzing the results. As I am already familiar with Ruby, I was able to grasp the syntax of Orbit scripts easily.

Open Source contribution
Recently, I have been involved with the Contiki open source operating system for wireless sensor networks. I ported the OS to the EM2420 wireless sensor nodes which were sold by Ember Corporation. These nodes are equipped with an Atmel 128L microcontroller and a CC2420 radio for communications using the IEEE 802.15.4 protocol.

Project
I have chosen to work on “Automation of testing using mac80211_hwsim and Orbit”. My recent exploration of the mac80211 stack and ath5k drivers is an important reason to choose this project. I think that this project will be very beneficial to the developers who are working on mac80211 and device drivers that use mac80211 and has the potential to save time and effort. Also, it will provide me with an opportunity to contribute to a very useful open source project and also enhance my understanding of the mac80211 stack.

I have been doing research in wireless networking, specifically IEEE 802.11 and IEEE 802.15.4. I have become familiar with both these protocols as a result of my research work. Also, both these protocols were formally taught in the Mobile Computing course which I had taken during my Masters. As most of my work has been at the MAC layer, I am familiar with the CSMA/CA based medium access mechanism which includes the random backoff procedure and the behavior of contention window. Also, I understand active and passive scanning procedures and how probe requests are used in the former while the latter depends on hearing beacons. Moreover, I am also familiar with Enhanced Distributed Channel Access (EDCA) which is a mechanism to provide QoS for IEEE 802.11 networks. I have worked on Infrastructure-based network configurations as well as IBSS or Ad-hoc configurations. I am comfortable with the workings of IEEE 802.11 and can learn things as and when needed. I also feel comfortable browsing the standards document for the information I need regarding the workings of IEEE 802.11 protocol. Also mention IEEE 802.11d and IEEE 802.11h

As a teaching assistant for the Advanced Operating Systems course at the University of Texas at Dallas, I have been responsible for teaching students the basics of Linux Kernel Programming. This includes Linux Kernel Module Programming, System Calls, Netfilter, synchronization primitives within the kernel.

Automation of testing involves two things:
1. Writing the test cases, which involves writing shell scripts for hostapd and wpa_supplicant. 2. Validating the tests, which requires finding out the result of the scripts, whether the test succeeded or failed.

Validation of tests depends on the kind of tests being conducted. Essentially, there are two types of tests. Firstly, tests that can be done without transmitting or receiving anything, such as whether Master or AP mode is supported by the card. Secondly, tests that require transmission or reception of frames, for example, whether power save mode works correctly.

For the first type of tests, validation can be done using the output of "iw" utility. For the second type of tests, scripts need to transmit relevant frames via frame injection and then the entries in debugfs can be used for validation of these tests. An example of this has been provided earlier where I had tested the Power Save mode. In some cases, especially those where there are no relevant debugs entries, peeking into the traffic going on between the nodes may be required. This can done by writing a program which uses the pcap library to switch the relevant interface to monitor mode and then apply rules. These rules can be written by extending expect.

1. Automating the testing of mac80211 and cfg80211 using mac80211_hwsim

The IEEE 802.11 standard specifies Protocol Implementation Conformance Statement (PICS) proforma in Annex A of the standards document. This can be used to select tests that would be necessary for testing the conformance of the implementation with the standard. These tests can serve as the starting point for automating the testing of mac80211. Following are some of the things that can be tested.

IEEE 802.11d
Regulatory tests (mac80211_hwsim module regtest parameter)
Write a script that performs the different regulatory tests supported by mac80211_hwsim. According to the documentation, all the tests can be performed with a maximum of 6 radios.

Open System Authentication
Test using hostapd and wpa_supplicant, validation using interface properties, such as whether the STAs associated with the AP.

Shared Key Authentication
Test using hostapd and wpa_supplicant, validation using interface properties, such as whether the STAs associated with the AP. Debugfs entries in the "keys" folder can also be used for verification.

Deauthentication
Test using hostapd and wpa_supplicant, validation using interface properties, such as whether the STAs dissociated from the AP.

Duplicate Detection
Test using modified PacketSpammer tool, validation using debugfs entry.

Fragmentation/Defragmentation
Fragmented frames can be created using modified PacketSpammer tool and debugfs entries such as "received_fragment_count" can be utilized for validation

Rejection of packets with incorrect CRC
Again, debugfs can be used to validate this. We will need to create a packet with a wrong checksum and inject it on an interface.

Power Save
Debugfs can be used to test Power Saving mode. Every STA created using mac80211_hwsim has a "ps" entry. This can be used to change the power saving mode for the STA. Each AP also has an entry called "num_sta_ps" which indicates the number of STAs associated with this AP that have changed to Power Save mode. Moreover, "total_ps_buffered" can be used to check how many frames are buffered for an STA in the power save mode. These entries in combination with modified PacketSpammer tool can allow testing of the power save mode. I have done some manual tests using these entries already.

RTS/CTS
Broadcast/Multicast
MAC Level Acknowledgements
Association/Re-association
Probe request/response
Suspend/Resume

IEEE 802.11h
Measurement reports
Quiet intervals
Channel Switching

2. Automating the testing of Wifi device drivers using the Orbit testbed

Orbit testbed will be used for testing various device drivers. Some of the things that can be tested for each device driver are as follows:

Transmit power levels support
Multirate Support
Extended Rate PHY support
QoS support
unicast at different rates
broadcast/multicast at different rates in the BSSBasicRateSet

Orbit Traffic Generator (OTG) can be used to test unicast at different rates and broadcast at different rates in the BSSBasicRateSet. Validation of tests can be performed by checking the current rate being used by the driver. Also, statistics available in debugfs can be used for validation.

As mentioned on the Wiki, sandboxes on the Orbit testbed can be used for the above tests as they have a nice mix of hardware available for testing.

Libmac [5] provides frame capture and injection facilities. It also allows manipulation of a subset of wireless interface parameters at both aggregrate and per-frame levels. This can be very useful for testing device drivers on the Orbit testbed. Test cases can be written so that they use libmac to inject packets with certain field values. This allows virtually limitless possibilities for testing on the Orbit testbed. A good way to approach the problem would be to write an application based on libmac. Shell scripts can then be written to use the application to perform certain tests and validate them.

Time
If selected, I will be working full time 40 hours/week on this project.

Schedule
This is just a preliminary schedule. I will create a more detailed schedule after interacting with the Linux Wireless developer community as I will be more prepared and confident about what exactly has to be implemented.

1-2 weeks, Interacting with the Linux Wireless community to come up with possibly better test cases and ideas regarding the project 3-4 weeks, test case implementation for mac80211_hwsim, this includes writing shell scripts, for testing and validation
3-4 weeks, test case implementation for orbit testbed
2 weeks, testing and debugging
1-2 weeks, website showing test results for mac80211 and device drivers


References
[1] http://dslab.utdallas.edu/
[2] http://dslab.utdallas.edu/tnt.php
[3] http://opensolaris.org/os/project/opengrok/
[4] http://www.sics.se/contiki/
[5] http://www.orbit-lab.org/wiki/Documentation/Libmac
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux