Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jul 2009

    pys60 1.9.6 bt_discover problem

    Hi all,
    I would appreciate it if some of you could help with some advice. I am learning pys60 for a project. I have a couple of problems using bt_discover. First step, I am essentially trying to get two N97s to talk via bluetooth without user intervention.
    I have just started the project and so, first thing I am trying to do something very simple. I use bt_discover() to discover a few devices and then, I select one of them and print the bluetooth address of the device on the screen. But while doing this the bt_discover() is not completing at all. After I select any of the discovered devices, it waits for 5-10 secs and then prints the error: line 15 in <module> addr,services=socket.bt_discover() error:(0,'Error')

    The code I used is as follows:

    import appuifw
    import btsocket as socket
    import e32

    def exit_key_handler():

    appuifw.app.title = u"bt mob to ext"

    appuifw.app.exit_key_handler = exit_key_handler
    script_lock = e32.Ao_lock()

    sock = socket.socket(socket.AF_BT,socket.SOCK_STREAM)
    appuifw.note(u"socket created", 'info')
    addr,services = socket.bt_discover()

    appuifw.note(u"discovered"+addr, 'info')


    thanks in advance.
    Last edited by sreekant; 2009-07-27 at 21:03.

  2. #2
    Registered User
    Join Date
    Jun 2009

    Re: pys60 1.9.6 bt_discover problem

    Hi sreekant,

    I also had a problem with bluetooth as I needed to do scanning without user interaction. However,as I've found out, it is not possible with the current version. I chose to use lightblue for the purpose, and even though it is not yet ported for 1.9.x, the developer recompiled the c++ source code for 3rd ed FP2 for me.
    Therefore I'd suggest to try to use (compile as well ) lightblue, I'm just not sure how much N97 platform is different from 3rd ed FP2.


  3. #3
    Registered User
    Join Date
    Nov 2008

    Re: pys60 1.9.6 bt_discover problem

    I also have a similar problem with my 5800, AFAIK it is a known bug.
    Valério Valério


  4. #4
    Registered User
    Join Date
    Nov 2008

    Re: pys60 1.9.6 bt_discover problem

    my 5800XM problem same this case. someone help me how to fix this problem?

  5. #5
    Registered User
    Join Date
    Jul 2009

    Re: pys60 1.9.6 bt_discover problem

    Hi guys,
    I am having a very strange problem now. Since my last post, I tried different things. I tried instantiating my variables as global and it seemed to work for a while.
    I was able to get bt_discover() to work a couple of times. I was trying to discover my N97 from the S60 emulator and vice versa. Since that was working, I tried to connect the two. Being my first attempt, it obviously was unsuccesful and python on both devices just hung. I restarted the two devices. Once I did that, bt_discover() works just fine when I try to discover any other device on either my phone or my emulator. But when I get the list of available devices,
    (1) when i choose to discover the emulator from my phone, it gives me error: 'no such file or directory'
    (2) when i choose to discover the phone from my emulator, python crashes with error:
    application closed

    Can anyone please throw some light on what might be wrong here? Thanks in advance.

  6. #6
    Nokia Developer Champion
    Join Date
    Feb 2008
    Ahmedabad, Gujarat, India

    Re: pys60 1.9.6 bt_discover problem

    hello sreekant

    please do stick to one thread and don't start multiple threads for same sort of question. If some body gets a clue will definitely help you.


Similar Threads

  1. Python for S60 1.9.6 released
    By tvijayan in forum Symbian
    Replies: 27
    Last Post: 2009-07-19, 15:52
  2. How to setup pys60 1.9.6 run with 5th Emulator?
    By nakhoncman in forum Symbian
    Replies: 2
    Last Post: 2009-07-16, 17:42
  3. Where's the PyS60 1.9.6?
    By sbn in forum Symbian
    Replies: 3
    Last Post: 2009-06-26, 07:46
  4. PyS60 in Nokia N70 (Problem)
    By Biggy-D in forum Symbian
    Replies: 1
    Last Post: 2007-12-16, 23:02
  5. PJava runtime problem within Nokia 9210, Hrlp~!
    By Nokia_Archive in forum PersonalJava
    Replies: 1
    Last Post: 2002-05-28, 13:15

Posting Permissions

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