PureSwift / GATT

Bluetooth Generic Attribute Profile (GATT) for Swift (Supports Linux)
MIT License
64 stars 18 forks source link

[Linux] Command Disallowed #31

Open mickeyl opened 1 year ago

mickeyl commented 1 year ago

With this test program:

import GATT
import Bluetooth
import BluetoothLinux

typealias LinuxCentral = GATTCentral<BluetoothLinux.HostController, BluetoothLinux.L2CAPSocket>
guard let hostController = await HostController.default else { fatalError("No Bluetooth hardware available") }
let central = LinuxCentral(hostController: hostController, socket: BluetoothLinux.L2CAPSocket.self)

// start scanning
let stream = try await central.scan(filterDuplicates: true)
for try await scanData in stream {
    print(scanData)
    stream.stop()
}

I'm getting Swift/ErrorType.swift:200: Fatal error: Error raised at top level: Command Disallowed (even with sudo).

I'm on an Ubuntu 20.04.2 LTS derivate. Any idea what could be wrong?