Click to See Complete Forum and Search --> : Setting up Ad-hoc connection on WinCE using Network Driver IOCTLs and OIDs


psupina
10-13-2006, 04:33 AM
Hello.

I am creating a library for Win CE 5.0 in eVC++ 4.0. This library will allow application developers to programmatically set up wireless connection.

I have decided to use DeviceIoControl function to communicate with network driver using Network Driver IOCTLs and OIDs ( for reference see Network Driver Reference (http://msdn.microsoft.com/library/en-us/wceddk5/html/wce50grfNetworkDriverReference.asp) ).

To set up wireless connection using infrastructure mode I do following operations:

Set OID_802_11_INFRASTRUCTURE_MODE to value Ndis802_11Infrastructure
Set OID_802_11_AUTHENTICATION_MODE to value Ndis802_11AuthModeOpen or Ndis802_11AuthModeShared
Set OID_802_11_WEP_STATUS to value Ndis802_11WEPDisabled or Ndis802_11WEPEnabled
If WEP is enabled, set OID_802_11_ADD_WEP to value of specified WEP key and index
Set OID_802_11_SSID to value of specified network name

This works for me.

Now, what is my problem:
I am trying to set up Ad-hoc (IBSS mode) connection, so I simply tried to change Ndis802_11Infrastructure to Ndis802_11IBSS in the first step. But it does not work (connection is not successfully built).

I also set up static addresses on both devices which I was trying to interconnect and I have switched off WZCTOOL in "Advanced Wireless Settings" dialog.

I think I am missing some operations to be done or I am using incorrect order of operations which I have stated above.

I will appreciate your help. Thanks.

M/Q
10-13-2006, 08:01 AM
Not sure, but just a thought rather than shutting WZC off where you did, you may want to disable the service.

psupina
10-13-2006, 08:42 AM
Not sure, but just a thought rather than shutting WZC off where you did, you may want to disable the service.

Thank you, M/Q, for your post.

I think I cannot disable the WZC service on my version of WinCE, because it is not listed in services list (when I type "services list" command - it lists which services are running and which are off; and there is no service with letters "WZC" in its name).

When I am connecting in infrastructure mode (using my library) while the checkbox "Use Windows to configure my wireless settings" is checked, then the connection process will fail. But if it is unchecked, the connection process will succeed.
But this is not true when I am connecting in Ad hoc mode. In that case the connection process has never been successful using my library with operations listed in my previous post.

So I think it is not necessary (maybe impossible on WinCE) to disable the WZC service and there must be other issue.