list_devices.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:bjarkan 作者: GetWellNetwork 项目源码 文件源码
def scan_devices( duration = 10 ):
    """
    This causes the bluetooth system to scan for any broadcasting devices. Once found, the devices get added to a
    dbus backed database specific for bluetooth for retrieval later.

    Args:
        duration (int): the amount of time that the scan should run for in seconds.
    """
    adapter = DeviceManager().find_adapter()

    adapter.StartDiscovery()

    mainloop = GObject.MainLoop()
    GObject.timeout_add(duration * 1000, quit, mainloop)
    mainloop.run()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号