Posts

Post not yet marked as solved
1 Replies
107 Views
My Swift app accesses the USB serial port via a C++ API built as a universal dylib. When the dylib is added as a framework via "Frameworks, Libraries, and Embedded Content", it works fine. When instead the dylib is included as a binary target within an xcframework inside a Package, I get an error indicating a permissions issue. The package looks like this: // swift-tools-version:5.3 import PackageDescription let package = Package( name: "BrainFlow", platforms: [ .macOS(.v10_14) ], products: [ .library( name: "BrainFlow", targets: ["BrainFlow", "BoardController", "BrainBitLib", "DataHandler", "GanglionLib", "MLModule", "MuseLib"]) ], dependencies: [ // Dependencies declare other packages that this package depends on. ], targets: [ .target( name: "BrainFlow" ), .binaryTarget( name: "BoardController", path: "BoardController.xcframework" ), .binaryTarget( name: "BrainBitLib", path: "BrainBitLib.xcframework" ), .binaryTarget( name: "DataHandler", path: "DataHandler.xcframework" ), .binaryTarget( name: "GanglionLib", path: "GanglionLib.xcframework" ), .binaryTarget( name: "MLModule", path: "MLModule.xcframework" ), .binaryTarget( name: "MuseLib", path: "MuseLib.xcframework" ), .testTarget( name: "BrainFlowTests", dependencies: ["BrainFlow"] ) ] )
Posted Last updated
.
Post not yet marked as solved
0 Replies
241 Views
How do I adjust the latency timer for the AppleUSBFTDI driver? I am developing an app in Swift using Xcode on a MacBook Pro M1 running Big Sur, for clinical brain-computer interface (BCI) research. The app needs very low-latency streaming from an external USB device. The external device is a headset which connects via Bluetooth to an FT231X chip mounted on a USB-Serial dongle. The FT231X chip reads timestamped EEG data from the headset. The issue is that the AppleUSBFTDI driver is buffering the packets coming in from the headset, which causes jitter in the timestamps. Typically, with proprietary drivers from FTDI, the solution is to reconfigure them to reduce the latency timer to 1ms. The Info.plist is edited to add new key/value pairs. Is there a similar solution for Apple's built-in driver?
Posted Last updated
.