×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    568

    Thumbs down Same old story with positioning in 1.4.1

    - Nokia N70
    - Holux GPSSlim236
    - Fresh installed 1.4.1

    This small test application

    Code:
    import positioning
    
    print positioning.module_info(positioning.default_module())
    positioning.select_module(positioning.default_module())
    positioning.set_requestors([{"type":"service",
    "format":"application",
    "data":"test_app"}])
    print positioning.position()
    Result: Have to plug out the accu in order to reanimate the phone. Appeared this since the very first version of positioning. I can choose the GPS device and that's all what I see from this "application".

    GOOD JOB, INDEED. THANKS FOR FIXING THIS

  2. #2
    Regular Contributor
    Join Date
    Jan 2007
    Posts
    80

    Re: Same old story with positioning in 1.4.1

    Did you try the non blocking way?

    # Example 2. Non-blocking call
    def cb(event):
    print "---"
    print event
    print "---"
    print "***starts the position feed***"


    print positioning.position(course=1,satellites=1,callback=cb, interval=500000,
    partial=0)

  3. #3
    Registered User
    Join Date
    Nov 2006
    Posts
    568

    Re: Same old story with positioning in 1.4.1

    Same result. I've never found a more secure way to blow up the phone.

    I'm through with it.

  4. #4
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    67

    Re: Same old story with positioning in 1.4.1

    Quote Originally Posted by neil.young View Post
    Same result..
    Down here it does work, however, i'm not really happy with the way positioning.py stores native objects in module-level namespace (i think it will crash anyway when used with threads). So i wrote a simple replacement to use the underlying _locationacq.pyd extension.

    You may want to try this code.

    Code:
    import imp
    _locationacq=imp.load_dynamic('_locationacq', 'c:\\sys\\bin\\_locationacq.pyd')
    
    class Positioner(object):
        _pos_service = _locationacq.position_server
        _req_type = _locationacq.req_type_service
        _req_format = _locationacq.req_format_app
        _pos_flags = _locationacq.info_course | _locationacq.info_satellites
        _pos_interval = 1000000
        _pos_partial = 1
        def __init__(self, data=u""):
            self._pos_service = self._pos_service()
            self._positioner = self._pos_service.positioner()
            self._positioner.set_requestors([{
                'type': self._req_type,
                'format': self._req_format,
                'data': data
            }])
            self._position = {
                'satellites': {},
                'course': {},
                'position': {}
            }
        def _handler(self, data):
            self._position = data
        position = property(lambda self, key='position': self._position[key])
        course = property(lambda self, key='course': self._position[key])
        satellites = property(lambda self, key='satellites': self._position[key])
        def start(self):
            self._positioner.position(
                self._pos_flags, self._handler, self._pos_interval, self._pos_partial
            )
        def stop(self):
            self._positioner.stop_position()
    
    del imp, _locationacq
    
    # test things out
    pos = Positioner()
    pos.start()
    
    # wait a few seconds
    import e32
    e32.ao_sleep(3)
    
    print pos.satellites
    print pos.position
    
    pos.stop()

  5. #5
    Registered User
    Join Date
    Aug 2007
    Posts
    3

    Re: Same old story with positioning in 1.4.1

    Hi nlsp,

    i'm not very familiar with python.
    Could you please add a short example on how to use your module ?

    Thanks a lot,
    Joe

  6. #6
    Super Contributor
    Join Date
    Dec 2004
    Posts
    643

    Re: Same old story with positioning in 1.4.1

    Quote Originally Posted by neil.young View Post
    - Nokia N70
    - Holux GPSSlim236
    - Fresh installed 1.4.1

    This small test application

    Code:
    import positioning
    
    print positioning.module_info(positioning.default_module())
    positioning.select_module(positioning.default_module())
    positioning.set_requestors([{"type":"service",
    "format":"application",
    "data":"test_app"}])
    print positioning.position()
    Result: Have to plug out the accu in order to reanimate the phone. Appeared this since the very first version of positioning. I can choose the GPS device and that's all what I see from this "application".

    GOOD JOB, INDEED. THANKS FOR FIXING THIS
    I'm sorry it doesn't work for you.

    However, an OS must not crash because of what an application does, and if it happens it's a firmware bug. What firmware version do you have? Have you updated it recently? Are other positioning applications running OK?

  7. #7
    Regular Contributor
    Join Date
    Sep 2005
    Location
    Finland, Helsinki
    Posts
    323

    Re: Same old story with positioning in 1.4.1

    Quote Originally Posted by jplauril View Post
    However, an OS must not crash because of what an application does, and if it happens it's a firmware bug. What firmware version do you have? Have you updated it recently? Are other positioning applications running OK?
    I've been having a lot of bluetooth-gps related problems with all 2ndEd phones (6600, 6630, N70*5) I've installed my PlokIn app. It doesn't matter whether Positioning module is used or bluetooth socket is read directly:
    - application exits after a random while with some symbian error (6600),
    - it hangs (6630, N70) and
    - all other running applications hang also (6630).
    Bluetooth remains occupied after crash and I have to switch it off and back on manually.

    In N70 I'm sometimes able to kill PlokIn app after hung, but in many cases only reboot helps.

    With E70 I don't have any problems.

  8. #8
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    67

    Cool Re: Same old story with positioning in 1.4.1

    Quote Originally Posted by JoeArmstrong View Post
    Hi nlsp,

    i'm not very familiar with python.
    Could you please add a short example on how to use your module ?

    Thanks a lot,
    Joe
    Hi Joe. I'm not going to interfere with the discussion in here by dumping large amounts of sourcecode into the forum. The module was meant as a debugging aid.

    However, i've created a small standalone application script from it. You can find it here.

    I wouldn't recommend myself as an expert in writing python code examples .

    Have fun with it.

  9. #9
    Registered User
    Join Date
    Aug 2007
    Posts
    3

    Re: Same old story with positioning in 1.4.1

    Thanks a lot !
    I will try it next weekend.

    Best regards,
    Joe

  10. #10
    Registered User
    Join Date
    Nov 2006
    Posts
    568

    Re: Same old story with positioning in 1.4.1

    Quote Originally Posted by jplauril View Post
    I'm sorry it doesn't work for you.

    However, an OS must not crash because of what an application does, and if it happens it's a firmware bug. What firmware version do you have? Have you updated it recently? Are other positioning applications running OK?
    Sorry, I've overseen your post (or I didn't get announced, this forum has become not very handy, I'm getting flooded with javascript errors... never mind)

    The fw version is V 5.0638.301 18-09-06 RM-84.
    AFAIK not the oldest one...

    Regards

Similar Threads

  1. Python for S60 1.4.1 released
    By jplauril in forum Symbian
    Replies: 30
    Last Post: 2009-02-07, 14:09
  2. S60 3rd FP1 - Positioning Methods
    By phanoulis in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2008-06-21, 22:53
  3. Positioning Plugin - Location Acquisition API
    By gosuwachu in forum Symbian Networking & Messaging (Closed)
    Replies: 9
    Last Post: 2008-02-20, 07:31
  4. Positioning - N70 - Holux: Help please!
    By neil.young in forum Symbian
    Replies: 0
    Last Post: 2007-07-31, 21:52
  5. Nokia Activ server 2.1 & JRE 1.4.1
    By jhonnyx in forum WAP Servers
    Replies: 3
    Last Post: 2003-03-30, 23:58

Posting Permissions

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