How to implement virtual WiFi in Windows 7

Hello :slight_smile:
It is known that the native 802.11 Virtual WiFi operation mode is available in windows 7; the operating system installs a virtual device if a Hosted network capable wireless adapter is present on the machine. This virtual device normally shows up as ?wireless network connection 2? with a name of ?Microsoft virtual WiFi miniport adapter ?. According to the MSDN document: this virtual device is used exclusively for performing software AP if your PC has a single wireless network adapter? And I successfully turn my computer into a hot spot and share my existing network with others using this virtual device in windows 7(netsh command like: netsh wlan set hostednetwork mode=allow ssid=Test key=password etc.).

But, I want to know how can I make this virtual device be a virtual station adapter which could be used as a real network adapter to connect to another wireless network? MSDN document says: [Virtual station: http://msdn.microsoft.com/en-us/library/ee220436.aspx], an independent hardware vendor (IHV) uses VSTA (virtual station adapter) functionality through the IHV extensibility framework. They just list the five functions that support virtual station, such as Dot11ExtRequestVirtualStation, but they don?t specify how to implement and organize these functions to implement a virtual station. Do anyone know about this?

Thanks very much
Leyond

I find some Virtual WiFi OIDs[http://msdn.microsoft.com/en-us/library/ee220464.aspx], First, I think we should create a new 802.11 MAC using OID_DOT11_CREATE_MAC. I am new to the driver development, I am wondering may I implement call OID in a user mode application? Is there any sample? Thanks

The name of the topic you referenced gives the answer:

“Virtual Wi-Fi in Kernel Mode”

You need a driver and a lot of previous Windows experience to achieve your
goal. Frankly, I’ve been working with NDIS drivers for a long time and I
suspect that I couldn’t bring Virtual Wi-Fi to life with the available
documentation. (Microsoft tends to provide a lot of interesting information
about Native Wi-Fi - but I don’t think it’s complete.)

You probably need to go to the beginning of the section that contains the
topic you mentioned. It actually provides some very sound guidance that you
must follow.

http://msdn.microsoft.com/en-us/library/cc835913.aspx

Good luck!

Thomas F. Divine
htt://www.ndis.com


From:
Sent: Wednesday, December 02, 2009 9:36 PM
To: “Windows System Software Devs Interest List”
Subject: RE:[ntdev] How to implement virtual WiFi in Windows 7

> I find some Virtual WiFi
> OIDs[http://msdn.microsoft.com/en-us/library/ee220464.aspx], First, I
> think we should create a new 802.11 MAC using OID_DOT11_CREATE_MAC. I am
> new to the driver development, I am wondering may I implement call OID in
> a user mode application? Is there any sample? Thanks
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

Hi Thomas, thanks for your answers. And I know it is hard.
If I Just focus on how to create a new MAC entity using OID_DOT11_CREATE_MAC, do you think it is possible to send this OID request from the filter driver to call miniport driver to create new MAC? thanks.

“Thomas F. Divine” wrote in message
news:xxxxx@ntdev…
> The name of the topic you referenced gives the answer:
>
> “Virtual Wi-Fi in Kernel Mode”
>
> You need a driver and a lot of previous Windows experience to achieve your
> goal. Frankly, I’ve been working with NDIS drivers for a long time and I
> suspect that I couldn’t bring Virtual Wi-Fi to life with the available
> documentation.

AFAIK this is because “virtual” here is not pure software, it involves
the OEM driver, and even the device firmware. A very tough er, bit.

> (Microsoft tends to provide a lot of interesting information about Native
> Wi-Fi - but I don’t think it’s complete.)

Sure, the docum is never complete - because the construction is never
complete.

> Good luck!

Good luck to all of us…

Regards,
– pa

I really don’t know enough to give direction on this. I do know that the
Microsoft Native Wi-Fi filter controls most of the Native 802.11 operations.
And, my favorite saying in this context:

“An 802.11 miniport cannot obey two masters!”

(If you don’t know what this means yet, you will before to long…).

Thomas

From:
Sent: Wednesday, December 02, 2009 10:15 PM
To: “Windows System Software Devs Interest List”
Subject: RE:[ntdev] How to implement virtual WiFi in Windows 7

> Hi Thomas, thanks for your answers. And I know it is hard.
> If I Just focus on how to create a new MAC entity using
> OID_DOT11_CREATE_MAC, do you think it is possible to send this OID request
> from the filter driver to call miniport driver to create new MAC? thanks.
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

wrote in message news:xxxxx@ntdev…
> I find some Virtual WiFi
> OIDs[http://msdn.microsoft.com/en-us/library/ee220464.aspx], First, I
> think we should create a new 802.11 MAC using OID_DOT11_CREATE_MAC. I am
> new to the driver development, I am wondering may I implement call OID in
> a user mode application? Is there any sample? Thanks

Ok, just imagine someone sends this OID.
What next? How you’re going to receive it? Are you the miniport?
After creating a new MAC, how you’re going to make it function?

–pa

Thanks you both.
I think if the driver supports Virtual WiFi, or the miniport driver has been compiled with NTDDI_VERSION macro set to >= NTDDI_WIN7. When a method request of OID_DOT11_CREATE_MAC is made, the miniport driver must create a new 802.11 MAC entity and return a DOT11_MAC_INFO structure. After creating a new MAC,I haven’t any further plan so far. (: