Wireless LAN Explorer
(WLAN Explorer)
Windows Native Wi-Fi Research Tool
For
Windows 7

 

Background

Microsoft Windows Vista introduced a "new" Native Wi-Fi architecture to support wireless 802.11 communications. The Native Wi-Fi architecture includes a "Native 802.11 Network Monitor Mode" that provides limited capability to monitor 802.11 packets. Vendor support for the Native 802.11 Network Monitor Mode was not particularly good on Windows Vista. However, support seems to be improving somewhat on Windows 7.

The PCAUSA Wireless LAN Explorer (WLAN Explorer) is a the initial output of a internal research project into the Native Wi-Fi 802.11 Network Monitor Mode from the perspective of an ISV. The demonstration tool  includes a NDIS 6 Lightweight Filter (LWF) and a companion Managed user-mode application written in C#. The tool utilizes both the user-mode "WLAN API" as well as kernel-mode NDIS to control the lowest-level Native 802.11 miniport and capture Native 802.11 packets.

The WLAN Explorer tool should be considered as an experimental work-in-progress. Although there are no known faults that could cause faults, some of the controls are totally experimental. Their behavior may be different on different NIC hardware/miniport combinations. It is possible that misuse of some of the experimental controls can place an 802.11 adapter/miniport in a non-functional state. In this case simply disabling and re-enabling the adapter restores operation.

This software is being incrementally updated as time permits.

Below is a brief description of the WLAN Explorer tool.

 

Interface Chooser

When the WLAN Explorer is run it presents a Choose Interface dialog. The Wireless Interfaces drop-list can be use to select a particular Native 802.11 adapter if multiple adapters are installed on the host.

A set of tab pages provides information about the selected interface.

Here are links to representative page screenshots:

bulletGeneral Page
bullet General Statistics Page
bulletIP Information Page
bulletWLAN Page
bullet 802.11 Page
bullet Filters Page

The tab page information is not complete at this release. Some pages are not populated at all at this point.

Press the Capture button to begin capturing on the selected adapter. The Capture dialog (below) will be presented when the Capture button is pressed.

 

Capture Dialog

The current Capture dialog (below) can be broken into three areas:

bulletCapture Controls (Top) - These control capture start/stop and display capture status.
bulletCapture Log (Bottom) - A text box displaying capture log information.
bulletInterface Controls (Right) - This panel includes various controls that can be used to control the adapter miniport.

It is expected that the Capture interface will change significantly in future releases.

Each of these controls will be briefly described below. It is expected that the user of this tool will already be familiar with the basics of 802.11, the Microsoft WLAN API and the Microsoft NDIS API.

 

Capture Controls

These controls are used to start and stop a capture, configure capture parameters and display capture status.

bulletStart Button - Starts a capture operation.
 
bulletStop Button - Stops an in-progress capture.
 
bulletBuffers to Read - Selects the number of buffer reads to perform during the capture.
 
bulletExtended Logging - Controls features used primarily for NDIS development and research.
bulletLog Packets - Capture packets if checked.
bulletLog Requests & Status - Captures NDIS requests and status indications if checked.

The Extended Logging feature allows capturing of NDIS requests (and their completion) a they pass through the PcaFilter LWF driver as well as capturing NDIS status indications made by the lower-level miniport. This feature is useful in understanding how Windows manages a Native 802.11 miniport.

The Capture Status group displays basic information about the status of a capture operation.

The current packet display implementation is very crude.

The current packet read implementation is a process where multiple concurrent asynchronous read operations are initiated Each read is on a buffer that can be filled with multiple log records. As read operations are completed buffers that are read are placed in a Queue. A separate thread de-queues log buffers and generates the log text output.

The current log display implementation outputs information about each log record as verbose formatted text. This is a poor, but easy, way to demonstrate that the tool can fetch Native 802.11 packets and other information. Because of the simplicity and verbosity of this scheme, the text output takes significantly longer than the time to collect packets. An artifact of this simple approach is that the packet display will continue to be updated for a noticeable time after actual packet collection has completed.

 

Capture Log

Captured information is currently displayed in a simple text box. This is totally unsuitable for a production product for various reasons because of performance and resource considerations. However, this console-like output is something that this driver-writer can achieve. Leave it to others to beautify the output.

It may be useful to copy the Capture Log to a text file. To do so simply right-click on the text area. In the context menu select Select all and then copy. Paste from the clipboard into Notepad.

Example Capture Logs are described below. Note that the Capture dialog image above shows a Beacon and a data frame.

 

Interface Controls

These controls should be considered experimental. Several of them are "state dependent" and a suitable state implementation has not yet been implemented. In addition, some controls such as specifying the PHY ID are not yet provided.

The bottom line here is that although as far as known these controls perform the requested operation, the results may be somewhat unexpected. Will be so until the "right mojo" is provided.

The interface controls do not change any value until the companion Apply button is pressed.

 

Auto-Configuration

The Auto-Configuration control uses the user-mode Native Wi-Fi Api WlanSetInterface function and the wlan_intf_opcode_autoconf_enabled OpCode to enable or disable auto-config for the selected interface.

Background Scan

The Background Scan control uses the user-mode Native Wi-Fi Api WlanSetInterface function and the wlan_intf_opcode_background_scan_enabled OpCode to enable or disable background scan for the selected interface.

Packet Filter

The Packet Filter control provides a limited capability to control the NDIS packet filter on the selected interface. In the current implementation choosing Promiscuous selects a packet filter of NDIS_PACKET_TYPE_ALL_802_11_FILTERS. The control uses a NDIS set information request on OID_GEN_CURRENT_PACKET_FILTER.

Monitor Mode

The Monitor Mode control uses the user-mode Native Wi-Fi Api WlanSetInterface function and the wlan_intf_opcode_current_operation_mode OpCode to set the current operation mode for the selected interface.

Current Channel

The Current Channel control uses a NDIS set information request on OID_DOT11_CURRENT_CHANNEL to set the channel on the selected interface.

802.11 Miniport Reset

The Miniport Reset control uses a NDIS set information request on OID_DOT11_RESET_REQUEST to reset the 802.11 station MAC and PHY layers.

NIC Power Off

The NIC Power Off control uses a NDIS set information request on OID_DOT11_NIC_POWER_STATE to control the NIC power state.

Refresh Control Information

The state of all interface controls is updated by querying the 802.11 miniport after the Apply button is pressed on any control. To update the state of the interface controls at any time press the Refresh button.

More to come...

Quirks and To-Do List

Quirks

There are some behaviors that simply aren't understood at this point. As of this writing all Native 802.11 adapter/miniport combinations tested so far have their own "personality". Inconsistent behavior makes it difficult to finish the Native Wi-Fi controls.

Of course, some of the inconsistency could be blamed on the new WLAN Explorer software as well as an incomplete understanding of the Native Wi-Fi API.

As of this release only a few of the Capture controls are implemented. Use of these controls should probably be avoided.

In some cases the WLAN Explorer application will report that it cannot open the supporting NDIS driver. This problem has been identified as being caused when a 802.11 miniport driver unexpectedly fails a query on NDIS 6.0 Emulated 802.11 miniports. The fix is to improve the WLAN Explorer exception handling.

 

To-Do List

There is plenty left to-do:

  1. Complete Native Wi-Fi Controls on Capture dialog.
  2. Complete implementation of Chooser TAB pages.
  3. Add timestamp and sequence numbers to packet information .
  4. Expose existing capability to log per-packet Native Wi-Fi OOB data in addition to frame data.
  5. Expose existing support for capturing on 802.3 adapters.
  6. Expose existing support to select and capture at different filter levels on Vista and later OSes.
  7. Expose existing support for operation on pre-Vista OSes using a NDIS 5 protocol driver. Includes capture of 802.3 frames, but not 802.11 frames.

 

Example Capture Logs

Here are some examples of the Capture Logs taken from WLAN Explorer:

Packet Capture Log

This log includes captures of beacon and data packets. Here is an excerpt showing capture of an outbound ping and its reply:

Block 6; Type NdisLogPacket; Length 132
Packet Length 92 - Outbound
Version: 0; Frame Type: Data
Sub-Type : Data
Control Bits: ToDS
Address1 : 00-18-39-B1-FD-5D
Address2 : 00-12-0E-B9-DD-8B
Address3 : 00-23-EE-1C-A5-CE

Frame Header: (24 bytes)
0000 08 01 00 80 00 18 39 B1 : FD 5D 00 12 0E B9 DD 8B ......9 ]... .
0010 00 23 EE 1C A5 CE 00 00 : .# . ..........

Frame Body:(68 bytes)
0000 AA AA 03 00 00 00 08 00 : 45 00 00 3C 3D 7F 00 00 ......E..<=...
0010 80 01 5D B5 C0 A8 0F 3B : C0 A8 0F 01 08 00 16 B4 ..] .; .....
0020 00 01 36 A7 61 62 63 64 : 65 66 67 68 69 6A 6B 6C ..6 abcdefghijkl
0030 6D 6E 6F 70 71 72 73 74 : 75 76 77 61 62 63 64 65 mnopqrstuvwabcde
0040 66 67 68 69 : fghi............

Block 7; Type NdisLogPacket; Length 132
Packet Length 92 - Inbound
Version: 0; Frame Type: Data
Sub-Type : Data
Control Bits: FromDS, ProtectedFrame
Address1 : 00-12-0E-B9-DD-8B
Address2 : 00-18-39-B1-FD-5D
Address3 : 00-23-EE-1C-A5-CE

Frame Header: (24 bytes)
0000 08 42 2C 00 00 12 0E B9 : DD 8B 00 18 39 B1 FD 5D .B,.... ...9 ]
0010 00 23 EE 1C A5 CE 40 D9 : .# . @ ........

Frame Body:(68 bytes)
0000 AA AA 03 00 00 00 08 00 : 45 00 00 3C 6A DF 00 00 ......E..<j ..
0010 FF 01 B1 54 C0 A8 0F 01 : C0 A8 0F 3B 00 00 1E B4 . T .. .;...
0020 00 01 36 A7 61 62 63 64 : 65 66 67 68 69 6A 6B 6C ..6 abcdefghijkl
0030 6D 6E 6F 70 71 72 73 74 : 75 76 77 61 62 63 64 65 mnopqrstuvwabcde
0040 66 67 68 69 : fghi............

 

Click here to view a sample WLAN Explorer packet capture log.

 

NDIS Request and Status Log

This capture was taken with only Log Requests & Status selected in the Extended Logging control. The capture begins with an active connection. The connection was disconnected and then re-connected towards the end of the capture.

Click here to view a sample WLAN Explorer NDIS request and status log.

 

About the WLAN Explorer Application

For better or worse the WLAN Explorer application is written exclusively as Managed Code using C#.

 

Download WLAN Explorer

The current release should be considered to be an ALPHA release. It is not fully featured and is not widely tested. Certainly there has been very little out-of-house testing.

This is a ALPHA version to be used only by developers who have a specific interest in Windows Native Wi-Fi.

Please exercise caution when considering testing of WLAN Explorer at this stage in development.

The Capture controls are not fully functional at this point and their misuse may cause wireless connectivity to break. As far as known connectivity can be restored by disabling and re-enabling the 802.11 adapter. In rare cases it may be necessary to uninstall/re-install the 802.11 driver using the Device Manager to restore connectivity.

WLAN Explorer is provided as a Windows Installer MSI package.

Click here to download The WLAN Explorer Windows Installer (32-Bit Edition).
2261.00KB (2315264 bytes)

Click here to download The WLAN Explorer Windows Installer (64-Bit Edition).
1804.00KB (1847296 bytes)

 

 

Install WLAN Explorer

All that should be required is to run the installer. The installer installs the supporting NDIS filter driver.

Uninstall WLAN Explorer using the Add/Remove programs facility as you would any other software. The uninstaller should uninstall the supporting NDIS filter driver.

 

WLAN Explorer Update Notifications

If you have an interest in receiving notifications when WLAN Explorer is updated, please send an E-Mail with subject "WLAN Explorer Update Notification Request". I'll send a notification occasionally as updates are posted. Send the request to:

tdivine AT pcausa DOT com

 

Release Notes

Release Overview

V4.00.00.24 June 1, 2010 Fixed bug that caused "Unexpected error opening adapter" exception on Vista when NDIS 5 filters were present.
V4.00.00.23 February 25, 2010 Added exception handler for dealing with packet read operations that are cancelled.
V4.00.00.15 January 28, 2010 Initial technology demonstration release.

[Detailed Release Notes]

 

Hit Counter01/28/10

 

PCAUSA Home · Privacy Statement · Products · Ordering · Support · Utilities · Resources
Mailing Lists  · PCAUSA Newsletter · PCAUSA Discussion List
 
Rawether for Windows and WinDis 32 are trademarks of Printing Communications Assoc., Inc. (PCAUSA)
Microsoft, MS, Windows, Windows 95, Windows 98, Windows Millennium, Windows 2000, and Win32 are registered trademarks and Visual C++ and Windows NT are trademarks of the Microsoft Corporation.
Send mail to webmaster@pcausa.com with questions or comments about this web site.
Copyright © 1996-2010 Printing Communications Assoc., Inc. (PCAUSA)
Last modified: February 04, 2010