Exemple #1
0
def pair_bluetooth_device(device):
    print("Pairing device " + str(device))
    print("Pairing OK == " + str(bluetoothctl.pair(device["mac_address"])))
    devices = bluetoothctl.get_paired_devices()
    print("Updating paired devices: ")
    print(devices)
    socketio.emit("paired bluetooth devices", devices, namespace="/test")
    devices = bluetoothctl.get_discoverable_devices()
    print(devices)
    socketio.emit("discoverable bluetooth devices", devices, namespace="/test")
Exemple #2
0
def pair_bluetooth_device(device):
    print("Pairing device " + str(device))
    print("Pairing OK == " + str(bluetoothctl.pair(device["mac_address"])))
    devices = bluetoothctl.get_paired_devices()
    print("Updating paired devices: ")
    print(devices)
    socketio.emit("paired bluetooth devices", devices, namespace="/test")
    devices = bluetoothctl.get_discoverable_devices()
    print(devices)
    socketio.emit("discoverable bluetooth devices", devices, namespace="/test")
Exemple #3
0
def send_available_bluetooth_devices():
    print("Sending available bluetooth devices")
    devices = bluetoothctl.get_discoverable_devices()
    print(devices)
    socketio.emit("discoverable bluetooth devices", devices, namespace="/test")
Exemple #4
0
def send_available_bluetooth_devices():
    print("Sending available bluetooth devices")
    devices = bluetoothctl.get_discoverable_devices()
    print(devices)
    socketio.emit("discoverable bluetooth devices", devices, namespace="/test")