Hi,

Currently writing a NFC program (Windows 7-->VC++ MFC ).
The reader is connected via USB and when i run the exe, i manually select and connect the reader for the exe to work.
my requirement is

  1. In the code, identify the wireless network and if my particular reader name is found, do the normal operations.
  2. If unable to identify the particular SSID name, then throw error message.

I still havent written any code for this and though attempted few( got thru google ) but no fruitful result.

How to capture the SSID ?

Thanks

Recommended Answers

I think you'll find that what you want is the DOT11_SSID member of the WLAN_AVAILABLE_NETWORK struct.

Jump to Post

All 4 Replies

@NULL PTR, thanks for the post and small hiccup in getting the right network
workig in Multibyte char set . so made small changes in d coding from Uni to MBS

Shown Wireless Network in my pc
-------------------------------
Cloud_9  
GuestActive
MyRdr
Bison_ch

My prefered network is : MyRdr
I have to connect to it, to run my application

Code portion 
=============
for (j = 0; j < pBssList->dwNumberOfItems; j++) // returns 4 networks
{
  char temp[50];
  char DefChar = ' ';
  pBssEntry = (WLAN_AVAILABLE_NETWORK *) & pBssList->Network[j];
  pBssEntry->strProfileName // always return Cloud_9
  WideCharToMultiByte(CP_ACP,0,pBssEntry->strProfileName,-1, temp,260,&DefChar, NULL);
  std::string profile_name(temp);
  strncmp("MyRdr",profile_name.c_str(),9);
    if True, then i quite here
    else continue the loop
}
problem is : When it tries to read the second to last netwrk name, it shows only ""
y am i getting only Cloud_9 as constant network name.
I manually got connected to "MyRdr" and i expect it to read all available networks and then matching found, quit the loop.
Whr is d bug ?
Thanks

I think you'll find that what you want is the DOT11_SSID member of the WLAN_AVAILABLE_NETWORK struct.

commented: Thanks and this worked. U have helped me a lot and have also learnt lot by making errors.Thanks friend +0

hi. can anyone help me to write a code to display some sensor information on the ssid when the device is not connected to the network?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.