Final Presentation Wireless LAN driver for Win CE Eli Bendersky & Igor Oks Supervisor: Yevgeny Rivkin
Project Goals Experience with Win CE based development Understanding the internals of a WLAN card driver Serve as a starting point for future projects based on communications using the protocol Set up a functional WLAN environment Important: Extensive documentation
Overview Driver originally written by Symbol Technologies Handed over to Intel for further development Our laboratory received the sources from Intel to understand and improve the driver
Driver Development Models Monolithic – code consists of both platform dependent and platform independent code Layered – code is divided to platform independent code (usually common to all drivers) and platform dependent code
NDIS Network Driver Interface Specification Provides a fully-abstracted interface for network adapter device-driver development
Miniport Drivers Our driver is a Miniport driver A Miniport driver is wrapped with NDIS from both sides Higher level applications use NDIS calls to contact the driver The driver uses NDIS calls to connect to the underlying hardware
Driver Code
DriverEntry Primary initialization routine for the driver Initializes the wrapper and registers the miniport driver in the system
Demonstration: Sending mechanism
Interrupt Handling Hardware generates an interrupt whenever it reaches a state where software intervention is required The interrupt is handled by the Interrupt Service Routine (ISR)
IsrIsr This handler implements MiniportIsr Called when an interrupt arises Defers most I/O interrupt handling to IsrHandleInterrupt
IsrHandleInterrupt Handles most of the interrupts for the driver Upon receiving interrupts, appropriate functions are called
SendSend Implements the MiniportSend handler Handles some bureaucracy of interrupt masks and defers the actual sending to AdapCopyDown
AdapCopyDown Copies data from memory to the adapter Uses the AdapWriteUshort function to write data to the adapter from the memory buffer
AdapWriteUshort Writes one USHORT (unsigned short, usually 4 bytes) to the adapter Calls NDIS’s supplied NdisRawWritePortUshort routine
NdisRawWritePortUshort NDIS internal function Writes an USHORT value to an I/O port on the network card
Building the Driver Porting to MS Visual C++ Embedded workspace Modifying workspace settings Adapting parameters for Win CE compilation
Building the Driver (cont.) Finding suitable Project Settings Code Generation / Runtime settings Object / Library modules Conditional compilation settings
Building the Driver (cont.) Resolving compilation and linkage errors Modifying code for successful linkage Linking to the DDK Linking to NDIS
Results A lot of experience with Win CE driver development Internals of a WLAN driver understood and documented Extensive documentation written Working WLAN environment wasn’t set up
Reasons for failure to set up a working environment No support from Intel No hardware specification No external documentation for the driver Therefore: No practical way to debug and improve the code
Some Optimism The knowledge gained and documented during the project can be very helpful to future projects Hopefully the above mentioned resources will be available in the future This, together with our documentation can give future projects a very good starting point