| Reply | « Previous Thread | Next Thread » |
|
Hi all,
I tried the solution described in the documentation to set the default WiFi AP. I used the following code: apid = socket.select_access_point() apo = socket.access_point(apid) socket.set_default_access_point(apo) apo.start() self.phoneIp = apo.ip() This triggers a window "Default access point" with a list of the available APs. Then a confirmation window about the fact that I am creating a default AP in offline mode (I am not using a SIM at the moment) is displayed. But then when I called the socket constructor, a new window for the selection of the AP is again displayed, this time the standard one with the title "Search access point" (no confirmation is needed about the "offline status"). The code for retrieving the access point is in the constructor of the object. The object starts a thread where the socket is created. If I put the code in the thread, the phone simply freezes. What is the best way of setting the standard WiFi AP? Any help is really appreciated. Thanks, Mirco |
| mircomusolesi |
| View Public Profile |
| Find all posts by mircomusolesi |
|
Join Date: Nov 2007
Posts: 319
Location: Sertaozinho/Brazil
marcelobarrosalmeida
Offline
Forum Nokia Champion
|
|
I decided to use my own access point dialog, even loosing the "WiFi Search" feature. Then, I set the default access point and no questions are done anymore.
Code:
from socket import select_access_point, access_point, access_points, set_default_access_point
from appuifw import *
def sel_access_point():
""" Select the default access point. Return True if the selection was
done or False if not
"""
aps = access_points()
if not aps:
note(u"Could't find any access point.","error")
return False
ap_labels = map( lambda x: x['name'], aps )
item = popup_menu( ap_labels, u"Access points:" )
if item is None:
note(u"At least one access point is required.","error")
return False
apo = access_point( aps[item]['iapid'] )
set_default_access_point( apo )
return True
Marcelo Barros Nokia E71, N800, N95 and XM 5800 http://www.croozeus.com http://wordmobi.wordpress.com http://jedizone.wordpress.com |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| VoIP - OMA provisioning Setting, CODEC Problem | xweekend | VoIP | 10 | 2009-05-07 10:47 |
| Problem with Skin enabling - disabling and Setting List in S60 | sauvikds | Series 40 & S60 Platform Feedback | 6 | 2008-08-23 15:29 |
| Problem with Skin enabling - disabling and Setting List in S60 | sauvikds | General Discussion | 1 | 2008-08-21 13:44 |
| Problem with Setting of mobile in toolkit 3.0 | jybasle | General Browsing | 2 | 2005-10-10 16:48 |
| solution: S60 application icon problem | Nokia_Archive | Symbian Tools & SDKs | 0 | 2002-06-03 03:43 |