I am trying to obtain access point properties using RConnectionMonitor, specifically the security mode.
My approach is to initially perform a scan for IapAvailability using

RConnectionMonitor.GetPckgAttribute(EBearerIdWLAN, 0, KIapAvailability, iPkgNetworkIds, iStatus);

where iPkgNetworkIds is a TConnMonIapInfoBuf
and iStatus is an instance of TRequestStatus

On success of the above i perform another lookup to on each Iap obtained from the above call using

RConnectionMonitor.GetIntAttribute(iNextIap, 0, KSecurityMode, iSecurityMode, iStatus);

where iNextIap is a connecionId obtained by iterating through iPkgNetworkIds.

For some reason all i receive is KErrNotFound (-1) can anybody help me with this at all???