Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User bluetooth2008's Avatar
    Join Date
    Apr 2008
    Posts
    3
    Dear all
    I test the first python program to discover devices by bluetooth.
    The code is

    from bluetooth import *
    target_name = "My Phone"
    target_address = None
    nearby_devices = discover_devices( )
    for address in nearby_devices :
    if target_name == lookup_name( address ) :
    target_address = address
    break
    if target_address is not None :
    print "found target bluetooth device with address" , target_address
    else :
    print "could not find target bluetooth device nearby"


    when I run the program I face this error:

    Traceback (most recent call last):
    File "<pyshell#7>", line 1, in <module>
    nearby_devices = discover_devices( )
    File "C:\Python25\Lib\site-packages\bluetooth\msbt.py", line 7, in discover_devices
    return bt.discover_devices (flush_cache, lookup_names)
    IOError: No Bluetooth adapter detected


    I need your help as soon as possible.
    thanks

  2. #2
    Registered User bluetooth2008's Avatar
    Join Date
    Apr 2008
    Posts
    3
    Hi alls

    I want to know if the problem in the bluetooth adapter ?
    I use ISSC usb bluetooth and it works properly..

    with thanks

  3. #3
    Nokia Developer Champion gaba88's Avatar
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,701
    hi bluetooth2008
    welcome to the python dibo. Hope you will get the best help here.
    Now when you start your application it asks to switch on your bluetooth.
    give a feedback
    please always write your code using the quotes provided
    thanks

  4. #4
    Regular Contributor kandyfloss's Avatar
    Join Date
    Dec 2007
    Location
    India
    Posts
    133
    Quote Originally Posted by bluetooth2008 View Post
    Dear all
    I test the first python program to discover devices by bluetooth.
    The code is

    from bluetooth import *
    target_name = "My Phone"
    target_address = None
    nearby_devices = discover_devices( )
    for address in nearby_devices :
    if target_name == lookup_name( address ) :
    target_address = address
    break
    if target_address is not None :
    print "found target bluetooth device with address" , target_address
    else :
    print "could not find target bluetooth device nearby"


    when I run the program I face this error:

    Traceback (most recent call last):
    File "<pyshell#7>", line 1, in <module>
    nearby_devices = discover_devices( )
    File "C:\Python25\Lib\site-packages\bluetooth\msbt.py", line 7, in discover_devices
    return bt.discover_devices (flush_cache, lookup_names)
    IOError: No Bluetooth adapter detected


    I need your help as soon as possible.
    thanks
    Hi bluetooth2008 ,

    I think that you are trying to on off the bluetooth of the PC Bluetooth adapter, is it?
    Please use the Code tabs to post your code, the indentations are lost in your post and noone can spot any error if any due to indentations
    Kandyfloss

    V 7.0642.0
    18-10-06
    RH-51
    Nokia 7610

  5. #5
    Registered User bluetooth2008's Avatar
    Join Date
    Apr 2008
    Posts
    3
    Hello again

    I didn't try to switch on off the bluetooth adapter. and the program didn't ask me to do so..

    Are there any other possible reasons?

  6. #6
    Nokia Developer Champion gaba88's Avatar
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,701
    Quote Originally Posted by bluetooth2008 View Post
    Hello again

    I didn't try to switch on off the bluetooth adapter. and the program didn't ask me to do so..

    Are there any other possible reasons?
    hi bluetooth2008
    plz check that the bluetooth adapter is switched on and bluetooth in your phone is also switched on.
    then try your code.
    happy pythoning

  7. #7
    Registered User Isslah7's Avatar
    Join Date
    Apr 2012
    Posts
    1
    Hi alls ,
    i have the same problem with the same bluetooth adapter , i'm using windows xp sp3 any help
    with thanks

Similar Threads

  1. Replies: 35
    Last Post: 2009-04-11, 14:36
  2. Nokia 7650 support Bluetooth audo?
    By ovjo12 in forum Bluetooth Technology
    Replies: 5
    Last Post: 2003-07-17, 18:50
  3. Belkin USB Bluetooth Adapter Works!
    By jonawebb in forum Bluetooth Technology
    Replies: 10
    Last Post: 2003-06-21, 20:10
  4. The differences between Bluetooth Adapter and card .
    By akokchai in forum Bluetooth Technology
    Replies: 2
    Last Post: 2003-05-13, 10:23
  5. Nokia 6310i, PC Suite and Mitsumi USB Bluetooth adapter
    By swahmed in forum Bluetooth Technology
    Replies: 10
    Last Post: 2003-03-24, 15:51

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved