You Are Here:

Community: Developer Discussion Boards

#1 Old Question How to save the default access point - 2007-11-24, 17:46

Join Date: Apr 2004
Posts: 107
Send a message via ICQ to carknue
carknue
Offline
Regular Contributor
Hi,

I select the default access point with this function:
Code:
def select_apn():
	global apo
	apid = socket.select_access_point()
	apo = socket.access_point(apid)
	socket.set_default_access_point(apo)
But how can I save the apo into a file and read it from there next time? Or even better how can I include the access_point selction into my config dialog?
Reply With Quote

#2 Old Re: How to save the default access point - 2007-11-25, 11:12

Join Date: May 2006
Posts: 622
Location: Oulu, Finland
lfd
Offline
Super Contributor
Hey carknue,

The only thing you have to do is to save the value of apid in the file. Then you check if apid exists in the file and bi-pass apid = socket.select_access_point()

Code:
def apid_isset():
    # open the file
    # read it
    # parse and get the apid value
    return apid
   

def select_apn():
	global apo
        apid = apid_isset()
	if not apid:
            apid = socket.select_access_point()
	apo = socket.access_point(apid)
	socket.set_default_access_point(apo)
After I'm not sure how reliable this solution is i.e: I'm not sure that each access point has a unique id or if it is just the position it appears in the list. For you to check.

LFD


Devices:
Nokia E61 3rd Edition - pys60 1.4.0

Tips and modules:
http://www.lfdm.net/thesis
Reply With Quote

#3 Old Re: How to save the default access point - 2007-11-26, 05:36

Join Date: May 2007
Posts: 2,738
Location: 21.46 N 72.11 E
croozeus's Avatar
croozeus
Offline
Forum Nokia Champion
Quote:
Originally Posted by lfd View Post
After I'm not sure how reliable this solution is i.e: I'm not sure that each access point has a unique id or if it is just the position it appears in the list. For you to check.

LFD
Hello,

I think that its the position that it appears on the list that is useful for selecting the access point as I havent as yet heard about access points having a unique id.


Best Regards
croozeus
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
How can i know whether an Access point is available or not? Aaypee General Symbian C++ 5 2007-08-02 14:22
Browser access point mateen_maldar General Symbian C++ 3 2007-06-29 13:58
Access Point Creation Problem on Panasonic X800 stv2005 General Symbian C++ 2 2005-08-08 16:50
default access point (GPRS) juliaf Symbian Networking & Messaging 0 2005-02-03 09:00
Gateway IP address in Nokia 6600 access point yashodhan General Discussion 0 2004-10-01 13:22

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia