Hi Megha Joshi,
In the 1.0 SDK, WifiManager.getScanResults() returns a list of
ScanResult objects, each of which contains a capabilities String.
Please could you provide an example of what form this string might be?
I'm trying to get an understanding of how I might have to parse this
information in order to construct my own class to represent the
authentication, key management, and encryption schemes of wifi
networks.
Many thanks in advance
--
Brad.
On 24/09/2008, Megha Joshi <[EMAIL PROTECTED]> wrote:
>
> The emulator doesn't support Wi-Fi, so WifiManager won't tell you anything
> useful.
>
> 2008/9/15 Bradley Kite <[EMAIL PROTECTED]>
>
>
> >
> >
> >
> >
> > On 13/09/2008, Bradley Kite <[EMAIL PROTECTED]> wrote:
> > > On 11/09/2008, Bradley Kite <[EMAIL PROTECTED]> wrote:
> > > > Hi all,
> > > >
> > > > I would like to develop an application that makes use of the wifi
> API
> > > > (android.net.wifi.*).
> > > >
> > > > Is there any way that I can test my application within the emulator?
> > > >
> > > > At the moment I am getting this error:
> > > >
> > > > E/WifiService( 46): Failed to load Wi-Fi driver.
> > > >
> > > > Which I kind of expected, as the emulator doesn't actually contain
> any
> > > > wifi "hardware".
> > > >
> > > > Are there any hacks/tweaks I can make to QEMU that can make it
> present
> > > > an emulated piece of wifi hardware to the android device driver?
> > > >
> > > > Is any body else also trying to use the wifi API's and has solved
> this problem?
> > > >
> > > > Many thanks in advance
> > > >
> > > > --
> > > > Brad
> > >
> > >
> > > Hi all,
> > >
> > > I've come to the assumption that I wont be able to get wifi working
> > > within the emulator, so I'm trying to come up with some dummy data to
> > > "pretend" that its come from the wpa_supplicant.
> > >
> > > With this in mind, I'm trying to spoof some ScanResult structures, as
> > > returned by the WifiManager.getScanResult().
> > >
> > > However, it would seem like this API is still in a state of flux - for
> > > example ScanResult.capabilities is documented as returning a String,
> > > but with a TODO note saying that it should be parsed into a
> > > WifiConfiguration object. Does this mean that the API will change so
> > > that it returns the WifiConfiguration object, or is it expected of the
> > > user to parse the string?
> > >
> > > Would any body be able to clarify the situation with regards to how I
> > > should be able to detect the parameters of a wifi network?
> > >
> > > If somebody has access to a real device, could they please send me
> > > some example strings as returned by ScanResult.capabilities? In
> > > particular, what would a free/open-access wifi network capabilities
> > > string look like?
> > >
> > > I'd really appreciate the help/guidance that any one has to offer.
> > >
> > > Kind Regards
> > >
> > > --
> > > Brad.
> > >
> >
> > Guys, I'm really having trouble with the wifi API - even to the point
> > where I am unable to create any dummy data to work with.
> >
> > My code is as follows:
> >
> > WifiManager wm = (WifiManager)
> getSystemService(Context.WIFI_SERVICE);
> > Log.d(TAG, "Scanning for WIFI Networks");
> >
> > List<ScanResult> scan = wm.getScanResults();
> >
> > WifiConfiguration apConfigs[] = new WifiConfiguration[3];
> >
> > if (scan == null)
> > {
> > Log.d(TAG, "No Networks Found. Falling back to debug mode");
> > // Set up the dummy AP Configurations (WifiConfiguration classes)
> > Log.d(TAG, "About to set BSSID");
> > apConfigs[0].BSSID = "00:40:05:a5:88:0d";
> > Log.d(TAG, "BSSID is now set");
> > [...snip...]
> > return;
> > }
> >
> > The only output I get from this, however, is as shown below:
> >
> > D/HotSpotWatcher( 596): Scanning for WIFI Networks
> > D/HotSpotWatcher( 596): No Networks Found. Falling back to debug mode
> > D/HotSpotWatcher( 596): About to set BSSID
> > D/dalvikvm( 116): GC freed 3 objects / 72 bytes in 66ms
> > D/dalvikvm( 90): GC freed 1138 objects / 55512 bytes in 82ms
> >
> > It would seem like attempting to set the BSSID is making the function
> > return early, because it never actually prints out "BSSID is now set".
> >
> > Can any body help please?
> >
> >
> >
> >
> > Kind regards
> > --
> > Brad.
> >
> >
> >
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---