×

Discussion Board

Results 1 to 10 of 10

Hybrid View

  1. #1
    Registered User
    Join Date
    Apr 2005
    Posts
    6

    Error connecting to btconsole

    Hi all,

    I am using the latest python for series60 release on a Nokia 3650 phone.

    I have tried to connect to the bt-console using HyperTerminal but it didn't work. I have a Bluetooth Serial port (COM6) enabled on the PC. When I start btconsole.py on the phone it correctly finds the PC, but when I select it, I get the following error:

    Discovering...
    Discovered: 00:30:4f:24:dd:1a, {u'Bluetooth Serial Port\x00': 6}
    Traceback (most recent call last):
    File "E:\System\Apps\Python\default.py", line 58 in <lambda>
    lambda: menu_action(query_and_exec)),
    File "E:\System\Apps\Python\default.py", line 47 in menu_action
    f()
    File "E:\System\Apps\Python\default.py", line 32, in query_and_exec
    execfile(os.path.join(this_dir, script_list[index]), globals())
    File "E:\System\Apps\Python\bt_console.py", line 9, in ?
    btconsole.main()
    File "E:\System\libs\btconsole.py", line 319, in main
    run()
    File "E:\System\libs\btconsole.py", line 302, in run
    sock=connect()
    File "E:\System\libs\btconsole.py", line 128, in connect
    print "Discovered: %s, %s"%(addr, services)
    SymbianError: [Errno 2] Error 2

    Any idea what can be wrong?

    Thanks and regards,
    Nick

  2. #2
    Registered User
    Join Date
    May 2005
    Posts
    34

    Re: Error connecting to btconsole

    Originally posted by njonesy
    Hi all,

    I am using the latest python for series60 release on a Nokia 3650 phone.

    I have tried to connect to the bt-console using HyperTerminal but it didn't work. I have a Bluetooth Serial port (COM6) enabled on the PC. When I start btconsole.py on the phone it correctly finds the PC, but when I select it, I get the following error:

    Discovering...
    ------> Cut

    Any idea what can be wrong?

    Thanks and regards,
    Nick
    I've got a similar error when Hyperterminal can't open the com (because PCSuite had occupied it). Are you sure the com is open in Terminal? (Each time I have to change property in PCSuite usig bt_console - this is why I don't love it)


    Pietro

  3. #3
    Registered User
    Join Date
    Apr 2005
    Posts
    6

    Re: Re: Error connecting to btconsole

    Originally posted by pimol
    I've got a similar error when Hyperterminal can't open the com (because PCSuite had occupied it). Are you sure the com is open in Terminal? (Each time I have to change property in PCSuite usig bt_console - this is why I don't love it)


    Pietro
    Well, I am not sure that COM6 is open in terminal. When I open the connection in HyperTerminal, nothing happens, I just get a cursor and that's all.

    As for the PCSuite, I am sorry, but I don't understand what you mean. Can you be a little bit more specific?

    Regards,
    Nick

  4. #4
    Super Contributor
    Join Date
    Dec 2004
    Posts
    643
    I can't be sure, but it seems probable that the problem is on the PC side. The Bluetooth console works pretty reliably if the PC side is in a sane state, but unfortunately Bluetooth drivers on the PC are notoriously brittle, buggy and hard to configure.

    Sorry, but I can't be of much help there. All I can think of is that you might want to check if the serial port has "secure connection" selected. At least for me that will prevent bt_console from working.

  5. #5
    Registered User
    Join Date
    May 2005
    Posts
    34

    Re: Re: Re: Error connecting to btconsole

    Originally posted by njonesy
    Well, I am not sure that COM6 is open in terminal. When I open the connection in HyperTerminal, nothing happens, I just get a cursor and that's all.

    As for the PCSuite, I am sorry, but I don't understand what you mean. Can you be a little bit more specific?

    Regards,
    Nick
    I mean: if PC suit is running, the com port is occupied by it (mRouter actually do it).
    So hyperterminal can' open the port.
    But it raises an error; 'can't open the com6 port' and doesn't go online. If hyperterminal go online (the state is reported in the right-low corner) your problem is not the same.
    Be sure com port is the rigth one: the same used by PCSuite (in my case com10 and com11 are binded to bluetooth, but hyperterminal (bt_console) and PCsuite work both on COM10, and I cant work with COM11...)
    Sorry for English, I hope I'm clear.

    Pietro

  6. #6
    Registered User
    Join Date
    Nov 2005
    Posts
    2

    Re: Error connecting to btconsole

    Hi,
    I have the same problem of njonesy, but I run on linux machine (gentoo) with bluez, ussp-push, rfcomm, hci, sdp.
    On phone (6600) i have PythonForSeries60.SIS (from PythonForSeries60_for_2ndEd_SIS.zip)
    I can transfer files from gentoo to 6600 (with a usb-bluetooth key) but I can't establish a connection with bt_console.py script.
    First, I configure a serial port in gentoo with the command:

    Code:
    sdptool add-channel=2 SP
    and then set up an rfcomm port to receive the communications:

    Code:
    rfcomm listen /dev/rfcomm0 2
    Now, launch Python on 6600 and run bt_console.py and crash

    My stack trace error (on phone) is very similar to njonesy:

    Code:
    File "C:\System\Apps\Python\default.py", line 48, in menu_action f()
    File "C:\System\Apps\Python\default.py", line 32, in query_and_exec execfile(os.path.join(this_dir, script_list[index]), globals())
    File "C:\System\Apps\Python\bt_console.py", line 9, in ? btconsole.main()
    File "C:\System\libs\btconsole.py", line 321, in main run()
    File "C:\System\libs\btconsole.py", line 304, in run sock=connect()
    File "C:\System\libs\btconsole.py", line 129, in connect
    addr,services=socket.bt_discover()
    error: (2, 'No such file or directory')
    P.S:
    http://crschmidt.nt/blog/archives/11/bluetooth-console/

    Help me, please

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

    Re: Error connecting to btconsole

    I think that command should be
    Code:
    sdptool add --channel=2 SP

  8. #8
    Registered User
    Join Date
    Nov 2005
    Posts
    2

    Re: Error connecting to btconsole

    Hi jplauril,
    it's works, now.
    Well, I got an error when try to connect with 6600 with cu command:

    Code:
    cu -l /dev/rfcomm0
    My error is:

    Code:
    cu: creat (/var/lock/uucp/TMP0000002f05): Permission denied
    cu: /dev/rfcomm0: Line in use
    but I haven't problem with permission in the folder (root, uucp)

    !!! root not is in the group uucp....
    Last edited by giorgina; 2005-11-17 at 09:10. Reason: solved

  9. #9
    Registered User
    Join Date
    Nov 2005
    Posts
    2

    Re: Error connecting to btconsole

    The problem is in stale UUCP locks. Just try to remove /var/lock/uucp/TMP0000002f05

  10. #10
    Registered User
    Join Date
    Dec 2005
    Posts
    1

    Re: Error connecting to btconsole

    Actually this lock file does not exist. Try to "chown" the /var/lock/uucp from root to uucp. (i use gentoo.)

    i write a simple tutorial as follow.

    Firstly, you should have both tools (or some replacement):
    bluez-utils (which provides sdpd, sdpdtool, rfcomm)
    taylor-uucp (which provides cu)

    #/etc/init.d/bluetooth restart // just mean starting "sdpd" (i use gentoo)
    #sdptool add --channel=3 SP // add service
    #sdptool browser local // view the current services if you want to confirm it
    #sudo rfcomm listen /dev/rfcomm1 3 // listen on channel 3, bind to /dev/rfcomm1

    Now run bt_console.py on your phone, search device and connect. You will see some information like "connected" in your linux box. Since "rfccomm listen" command blocks the terminal, we can use another terminal to run "cu".

    #sudo cu -l /dev/rfcomm1

    Write your test code:
    >>> import appuifw
    >>> appuifw.note(u'Symbian OS', 'info')
    Last edited by xuyijun; 2005-12-10 at 17:52.

Posting Permissions

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