bluetooth.btcommon.BluetoothError: (2, 'No such file or directory')

前端 未结 2 429
执笔经年
执笔经年 2021-02-05 11:17

I\'m simply trying to run the RFCOMM server example at https://code.google.com/p/pybluez/source/browse/trunk/examples/simple/rfcomm-server.py

$ python2 rfcomm-se         


        
2条回答
  •  终归单人心
    2021-02-05 11:32

    I had the same problem on Raspbian, and solved by:

    • Running bluetooth in compatibility mode,

      by modifying /etc/systemd/system/dbus-org.bluez.service,

      changing

      ExecStart=/usr/lib/bluetooth/bluetoothd

      into

      ExecStart=/usr/lib/bluetooth/bluetoothd -C

    • Then adding the Serial Port Profile, executing: sudo sdptool add SP

    References:

    • https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=133263

    • https://github.com/karulis/pybluez/issues/161

    • https://raspberrypi.stackexchange.com/questions/41776/failed-to-connect-to-sdp-server-on-ffffff000000-no-such-file-or-directory

提交回复
热议问题