Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm trying to set my wireless adapter Channel and Physical layer.

I using wlanapi, currently i know how to set monitor mode on or off and i'm trying the same way to set the channel and physical layer.

This is the code to set monitor mode

C++
ULONG targetOperationMode = DOT11_OPERATION_MODE_NETWORK_MONITOR; 

SetInterface(wlan_intf_opcode_current_operation_mode, (PVOID*)&targetOperationMode, InterfaceGuid);

void AdapterApi::SetInterface(WLAN_INTF_OPCODE opcode, PVOID* pData, GUID* InterfaceGuid)
{
DWORD dwResult = 0;
HANDLE hClient = NULL;
DWORD dwCurVersion = 0;
DWORD outsize = 0;

// Open Handle for the set operation
dwResult = WlanOpenHandle(WLAN_CLIENT_VERSION_VISTA, NULL, &dwCurVersion, &hClient);
dwResult = WlanSetInterface(hClient, InterfaceGuid, opcode, sizeof(ULONG), pData, NULL);
WlanCloseHandle(hClient, NULL);
}


I couldn't found a proper way to set the channel and the physical layer. Thanks for the help!
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900