You Are Here:

Community: Developer Discussion Boards

#1 Old How to switch between bluetooth GPS and internal GPS? - 2008-05-12, 10:57

Join Date: Feb 2008
Posts: 46
giapage
Offline
Registered User
Hello,
i've done an application to get GPS data from N95 either from internal or bluetooth GPS.
To select between them i need to go in Settings/Positioning and enable both GPS modules.
After that, the Bluetooth GPS become the default module.

Code:
tot_mod= positioning.modules()
print tot_mod

try:
	positioning.set_requestors([{"type":"service", "format":"application", "data":"test_app"}]) 
	positioning.position(course=1,satellites=1, callback=self.cb, interval=self.time_interval, partial=1) 

except:
	self.setErrorStatus(True)
self.setErrorStatus(False)

print "***NEW default modules***"
default=positioning.default_module()
print "Default ID= %s" %default


for gps_unit in tot_mod:
	if (gps_unit['id']==default):
		selected=gps_unit['name'] 
print "Default NAME= %s" %selected



for gps_unit in tot_mod:
	if (gps_unit['name']==u"Integrated GPS"):
		selected_id=gps_unit['id'] 

positioning.stop_position()	#Stops an ongoing position request.

positioning.select_module(selected_id)


try:
	positioning.set_requestors([{"type":"service", "format":"application", "data":"test_app"}]) 
	positioning.position(course=1,satellites=1, callback=self.cb, interval=self.time_interval, partial=1) #retutns also weak signal, Retrieve the GPS signal each  time_interval [ms]

except:
	self.setErrorStatus(True)
self.setErrorStatus(False)


default=positioning.default_module()

for gps_unit in tot_mod:
	if (gps_unit['id']==default):
		selected=gps_unit['name'] 
print "Default new NAME= %s" %selected
The result of this is that the default module is still the same (Bluetooth GPS) even if i selected the internal GPS.

Anyway it seems that the current GPS working is the internal GPS because even if i swith off the GPS antenna i still get the signal.
My problem is: why the bluetooth GPS is still blinking (getting the signal)? Doesn't work the stop request?
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
J2ME GPS - Connect phone to internal GPS or Bluetooth GPS solutions vgps Mobile Java General 3 2009-09-24 11:34
GPS bluetooth and internal:Positioning? giapage Python 5 2008-04-19 09:31
How to read GPS signal from N95 internal GPS? giapage Location Based Services and Navigation 1 2008-03-31 08:10
samsung's internal gps locked? frizi General Symbian C++ 0 2008-02-28 13:23
internal GPS interfacing satspace Location Based Services and Navigation 7 2008-02-01 16:09

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