Link to home
Start Free TrialLog in
Avatar of lalosla
lalosla

asked on

wireless connection

Hi all. Im trying to do a wireless connection from an iPAQ h4350 to a Cisco Acces Point through WIFI.

Programmatically I can Turn on the radio using the iPaqUtil.dll or using the NDIS_802_11_SSID, that works fine.

The steps I am following are:

1) Scan the access point nearby using the OID_802_11_BSSID_LIST_SCAN.
2) Set the OID_802_11_BSSID.
3) Set the OID_802_11_SSID.
Until there everything works fine, so I don´t know what to do next.

I've tried the connection manager, the zeroconfig header and dll, the OID_802_11_ASSOCIATION_INFORMATION, the OID_802_11_ AUTHENTICATION_MODE and some other several ways, but I can't connect to the acces point.

So please if anyone over there have any idea what to do, i'll appreciate it too much, because I have no much time to deliver it.

I'm developing this solution on Embedded Visual C++ 4.0 SP 4.
ASKER CERTIFIED SOLUTION
Avatar of opanza
opanza

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jhance
jhance

Just a correction to the above comment.

The proper sequence is:

1) OID_802_11_INFRASTRUCTURE set to ESS (Ndis802_11Infrastructure)
2) OID_802_11_AUTHENTICATION_MODE set to OPEN (Ndis802_11_AuthModeOpen)
3) OID_802_11_SSID set to the SSID of your AP.

There should be no need to set the BSSID unless you are in a network with more than one AP with the same SSID AND you want to connect to a particular one for some reason.  Otherwise, the SSID alone is enough.

If you want to scan, set the SSID to a random value.  This forces the radio on but prevents an association.  Once you're scanned and identified the AP you want to use, set the SSID to that value and it will associate.

You should check the scan results to make sure the AP you are attempting to use is OPEN or you will not get an association without setting the encryption mode and key.
1) The order in this case is not important. It connects the same if OID_802_11_AUTHENTICATION_MODE is set before OID_802_11_INFRASTRUCTURE.

2) If you want to do a scan, do the proper sequence:

- Right after setting OID_802_11_BSSID_LIST_SCAN, make a query using OID_802_11_BSSID_LIST.
- A NDIS_802_11_BSSID_LIST_EX structure will be filled in with a survey of BSSs.
- To go through this structure, do not use indexes. Use the follow:

               PNDIS_WLAN_BSSID_EX pNet = &pBSSId_List->Bssid[ 0 ];
               for( ULONG i = 0; i < pBSSId_List->NumberOfItems; i++ )
               {
                    if( pNet->IELength ) ShowInformationElements(...); // If you are interested in them
                    pNet = (PNDIS_WLAN_BSSID_EX)( ( (PBYTE)pNet ) + pNet->Length );
               }

(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceddk40/html/cmrefoid_802_11_bssid_list.asp)
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceddk40/html/cmrefoid_802_11_bssid_list_scan.asp)
Just pointing out that I've found two items on this:

a) Tracing of what Microsoft does with WZC shows that they never set the AUTH mode before setting INFRASTRUCTURE.

b) I've found that some cards produce an error on INF before AUTH.

Granted the specification doesn't indicate a specific order but in some cases it matters.  As we all know, what MS does is correct by definition.
Just an explanation to the above comment:

1) There is a specific order. The 802.11 Network Configuration sets a specific order for network configuration on the 802.11 device. In this case INFRASTRUCTURE is set before AUTHENTICATION.

(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/network/hh/network/213_802.11_9d00a7b1-3f9d-4937-ab26-8bc5f263eb4d.xml.asp)

2) There's a question in EE where the accepted answer set AUTHENTICATION before INFRASTRUCTURE.

(https://www.experts-exchange.com/questions/21349980/ADD-WEP-Problem.html)

3) On iPAQ h4350 it doesn't matter if you change this order, it connects straight away following the original answer. The same happens on Blueangel XDA IIs.