Setting up Ad-hoc connection on WinCE device using Network Driver IOCTLs and OIDs
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 ).
To set up wireless connection using infrastructure mode I do following operations:
1. Set OID_802_11_INFRASTRUCTURE_MODE to value Ndis802_11Infrastructure
2. Set OID_802_11_AUTHENTICATION_MODE to value Ndis802_11AuthModeOpen or Ndis802_11AuthModeShared
3. Set OID_802_11_WEP_STATUS to value Ndis802_11WEPDisabled or Ndis802_11WEPEnabled
4. If WEP is enabled, set OID_802_11_ADD_WEP to value of specified WEP key and index
5. 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 set-up).
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 that WZC service cannot be disabled on my device, because it is not listed in "services list" command output.)
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.