"Bluetooth device not available" using FUSE

  • DN

    DN - 2008-05-01

    I am trying to make a Bluetooth MacFUSE module using lightblue and FusePython, having successfully used the lightblue and FusePython modules separately.

    I am using a slightly modified version of obex_ftp_client.py to return data rather than printing it to screen. The idea is to call methods directly from the FTPClient class from the FUSE class, calling ls() for example from readdir().

    The problem occurs when trying to make a connection from the FUSE methods, I am only able to make a connection from the __init__ method. I only workaround I have discovered is to put the Bluetooth methods in another script file and calling it using commands.getoutput, this is inelegant and slower and requires carefully parsing out the warnings at the top though.

    Here is a summary of the exception when trying to call connect() from within the FUSE methods:
      File "blue_fuse.py", line 56, in readdir

      File ".../blue-fuse/obex_ftp_client.py", line 40, in connect
        response = self.client.connect({'target': FTP_TARGET_UUID})

      File "/Library/Python/2.5/site-packages/lightblue/_obex.py", line 158, in connect
        "Bluetooth device not available")

    <class 'lightblue._obexcommon.OBEXError'>
    [Errno -21879] Bluetooth device not available

    My guess is that it is due to low level nature of MacFUSE that is causing the problem, as the Python app never appears in the Dock either. This can be reproduced by installing MacFUSE and compiling FusePython and attempting a connection from one of the methods. I can provide some example code.

    • blam

      blam - 2008-05-01

      Is your Bluetooth device turned on? That exception should only be raised if the local Bluetooth device is not powered on.

      • DN

        DN - 2008-05-01

        The device is definitely on. It is able to communicate in the __init__method but throws an exception in any other method of the class.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks