×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    101

    Help with bluetooth...

    Hi experts,
    I'm trying to test this code which basically tries to see if a particular mobile named Microbox is detected. Kindly check it out..
    Code:
    import bluetooth
    target_name = "Microbox"
    target_address = None
    nearby_devices = bluetooth.discover_devices()
    for bdaddr in nearby_devices:
        if target_name == bluetooth.lookup_name( bdaddr ):
            target_address = bdaddr
            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"
    I'm using Pybluez and
    Unfortunately I'm stuck with this error..
    Traceback (most recent call last):
    File "C:/Python26/using_bluez.py", line 4, in <module>
    nearby_devices = bluetooth.discover_devices()
    File "C:\Python26\Lib\site-packages\bluetooth\msbt.py", line 9, in discover_devices
    return bt.discover_devices (flush_cache, lookup_names)
    IOError: No Bluetooth adapter detected

    I appreciate any help

  2. #2
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,777

    Re: Help with bluetooth...

    Does your bluetooth of your phone function properly? What does the standard socket (you are using 1.4.x) return?

    Does the output differ after restarting the phone?
    Pankaj Nathani
    www.croozeus.com

  3. #3
    Registered User
    Join Date
    Dec 2008
    Posts
    101

    Re: Help with bluetooth...

    Hi Croozeus,
    Yes the bluetooth on my phone is working. And as I remembered this is the same code I tried when I used Ubuntu.

  4. #4
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,777

    Re: Help with bluetooth...

    Quote Originally Posted by picuser View Post
    Hi Croozeus,
    Yes the bluetooth on my phone is working. And as I remembered this is the same code I tried when I used Ubuntu.
    I hope you aren't mixing the Pybuez for PC and for S60! Where did you download it from?

    If you are using 1.4.x version of PyS60, what does the standard socket module return when you search for devices?
    Pankaj Nathani
    www.croozeus.com

  5. #5
    Registered User
    Join Date
    Dec 2008
    Posts
    101

    Re: Help with bluetooth...

    Hi Croozeus, Sorry for the very late reply, I've been out for a while. This is the version I download PyBluez-0.16 and installed to my Xp sp2. When I was using the code on ubuntu it was working and detecting the target cphone. I'm not sure if missed something, cant remember where I downloaded the Pybluez. My PyS60 on my phone is version 1.4.3.

  6. #6
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,777

    Smile Re: Help with bluetooth...

    Quote Originally Posted by picuser View Post
    HThis is the version I download PyBluez-0.16 and installed to my Xp sp2.
    That means it is not an PyS60 extension...
    Pankaj Nathani
    www.croozeus.com

Similar Threads

  1. detecting if bluetooth is enabled (Series 40)
    By dspoeri in forum Mobile Java General
    Replies: 2
    Last Post: 2009-05-01, 13:08
  2. Successfully Connected Using Bluetooth with Pc Suite
    By zrilo in forum Bluetooth Technology
    Replies: 0
    Last Post: 2006-04-09, 04:21
  3. PC Suite not detect 6600 with Bluetooth connection
    By spinacle in forum Bluetooth Technology
    Replies: 29
    Last Post: 2004-03-14, 23:24
  4. Nokia 6210 Bluetooth Connectivity Pack
    By peter-h-hansen in forum Bluetooth Technology
    Replies: 1
    Last Post: 2002-08-19, 12: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
  •