Wlan Discovery

5 posts / 0 new
Last post
poocka
poocka's picture
Offline
Joined: 6 Apr 2010
Posts:
Wlan Discovery

The code below on Nokia N95 returns -1

#include <IX_WLAN.h>

....

int LL = maWlanStartDiscovery();
printf("Status: %d\n", LL);

....

I'm curious, for which Mobile Phone models IX_WLAN extension actually works today? Does it works for N95 or I'm just missing something in code ?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Fredrik Eldh
Fredrik's picture
Offline
Mobile Sorcerer
Joined: 16 Feb 2009
Posts:

IX_WLAN is currently disabled on all models. We have an implementation for models that run Symbian S60, 3rd edition. I'll see if I can enable it.

poocka
poocka's picture
Offline
Joined: 6 Apr 2010
Posts:

Hi,
The WLan Discovery seems to work fine, but I have trouble of getting wLan's names.
I will not post the initiation code, since there is just one command.
The code below is event listener, but instead of network name it brings some array ... 0, 50, 51, 52 ..... BTW - the Network SID is OK.

		case EVENT_TYPE_WLAN:{
			MAWlanAp CWLan;
				CWLan.name = "12345678901234567890123456789012";
				CWLan.nameBufSize = 32;
			while( maWlanGetNewAp( &CWLan ) > 0 ){
				printf("WLAN: [ %02X %02X %02X %02X %02X %02X ] < %d %d %d %d %d %d > %d\n",
				CWLan.address.a[0],CWLan.address.a[1],CWLan.address.a[2],CWLan.address.a[3],CWLan.address.a[4],CWLan.address.a[5],
				CWLan.name[0], CWLan.name[1], CWLan.name[2], CWLan.name[3], CWLan.name[4], CWLan.name[5],
				CWLan.signalStrength );
			}
			break;
		};

Aghr... just realized after posting - the array is the init string "1234 ... but the maWlanGetNewAp was cut it to Zero length string (put 0 at beginning of array)

poocka
poocka's picture
Offline
Joined: 6 Apr 2010
Posts:

Tired to wait for an update of Wlan Discovery code.
Checked source code of mosync-trunk\runtimes\cpp\platforms\symbian\src\wlanImpl.cpp

int Syscall::WlanGetNewAp(MAWlanAp* dst) {
	if(gWlanSynchronizer->IsActive())
		return 0;
	if(gWlanInfo->IsDone())
		return 0;

	TWlanBssid mac;
	gWlanInfo->Bssid(mac);
	memcpy(dst->address.a, mac.Ptr(), WLAN_ADDR_LEN);

	dst->signalStrength = - gWlanInfo->RXLevel();	//dBm

	dst->name[0] = 0;	//TODO: name (aka SSID)
	
	gWlanInfo->Next();

	return 1;
}

The line dst->name[0] = 0; //TODO: name (aka SSID) enplanes all, that I'd posted before.
Please check the issue.

Fredrik Eldh
Fredrik's picture
Offline
Mobile Sorcerer
Joined: 16 Feb 2009
Posts:

Sorry for the delay. Revision 1701 should fix this.