Frequently Asked Questions about WRAPI:
1. What is WRAPI?
2. How does WRAPI work?
3. How do I download WRAPI?
4. What do I need to get WRAPI to work on my system?
4. Do I need to write any code to get WRAPI to work?
5. When I free memory that was allocated by WRAPI.dll for DeviceList and AP_List, in my WRAPI application, why do I get an Access Violation error?
6. Does WRAPI work with all vendor hardware?
1. What is WRAPI?
WRAPI 2.0 consists of a set of wireless LAN monitoring tools built for WindowsXP-based systems. The WRAPI software library (wrapi.dll) allows applications running in userspace on mobile end stations to query information about the IEEE 802.11 network they are attached to. WRAPI works with any IEEE 802.11b wireless network hardware vendor.
WRAPI functions obtain information about the wireless LAN using the NDIS User Mode I/O Protocol (NDISUIO).
NDISUIO is a connection-less, NDIS 5.1 compliant protocol driver. It allows user-mode applications to establish and tear-down bindings to network adapters (Ethernet, WLAN etc.) Further, it also supports setting packet filters, sending and receiving data, and handling plug-and-play events. Therefore, as an NDIS_aware component, NDISUIO can directly open an NDIS miniport driver (i.e. network card driver) to send requests, set, and query information. NDISUIO provides an interface between a user-mode application and NDIS using DeviceIoControl (similar to the Unix ioctl). The NDISUIO driver (ndisuio.sys) is already installed in your system under:
More information about NDISUIO can be obtained from MSDN.
Click here to download the latest WRAPI 2.0 code, binaries and a sample application that invokes WRAPI.
To get WRAPI to work, you need to check if the NDISUIO service is started. This can be checked by typing the following command at the command prompt:
% net start ndisuioThe next thing to do is to disable the Wireless Zero Configuration service.
Disabling Wireless Zero COnfigurationWireless Zero Configuration is a Windows service that is normally started at boot time. It provides autoconfiguration for the 802.11 wireless adapters (NICs) by scanning for avaialble access points and associating with the strongest signal. This service automatically binds to NDISUIO and doesn't allow other apps/dlls like WRAPI to bind to it. If this service is not disabled, WRAPI applications report:
"Could not open NDIS Device, error 170".
In order to disable Wireless Zero Configuration, go to:
Control Panel ---> Performance and Maintenance ---> Administrative Tools ---> Services.
Click on Wireless Zero Configuration; change the "Startup Type" drop box to "Manual" and stop the service.
Yes and No.
Yes, if you want to add your own functionality to WRAPI; and No, if you just want to use existing WRAPI functionality.
To program with WRAPI, you first need to download the WindowsXP DDK, which is available from your MSDN subscription.
Once you install the DDK, make sure you have the source code for Network Samples (this includes the code for the NDISUIO driver). Add the DDK include directory in your "includes" path.
To build WRAPI.dll from Sources:
Create a Visual Stuido 6.0 project with the source files and build it. Check that you have (done) the following:
- Microsoft WindowsXP DDK
- MSVCRT.dll (Multithreaded Debug and Release versions of the standard C-runtime library)
- MFC42.dll (Multithreaded Debug and Release versions of the MFC runtime library)
- Include "nuiouser.h" from the NDISUIO source directory in the Project's include path
- Include WRAPI_EXPORTS in the Project's Preprocessor definitions
To use WRAPI.dll in a test application:
WRAPITest.cpp is the source file for the test application. Add it to your Visual Studio 6.0 project and link the application against WRAPI.lib. Check that you have (done) the following:
- WRAPI.dll and WRAPI.lib are in the same directory as your application sources or WRAPI.lib is in your Project's library path.
- Include "WRAPIExports.h" and stdafx.h in your source files.
In WRAPI.dll, the variables DeviceList and AP_List are allocated using malloc() and linked against MSVCRT.dll (Multithreaded C-runtime library) and not LIBC.lib. Therefore, the application using WRAPI should also link against the same library in order to avoid errors when freeing memory for these variables in the application's destructor.
WRAPI works on all wireless NICs (network interface cards) that have drivers for WindowsXP. In other words, WRAPI works with any driver that is NDIS 5.1 compliant. This is because the wireless OIDs are not supported in any earlier versions of NDIS (5.0 and earlier).
WRAPI has been tested on some of the most common wireless NICs including, Lucent ORiNOCO wireless cards, Cisco Aironet cards (340 and 4800 series), Compaq and Dell in-built wireless cards, and Linksys cards.