-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
78 changed files
with
4,491 additions
and
1,473 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
.build/* | ||
Packages/* | ||
Xcode/BlueZ.xcodeproj/project.xcworkspace/xcuserdata/* | ||
Carthage/* | ||
|
||
Headers/* | ||
|
||
Xcode/BluetoothLinux.xcodeproj/project.xcworkspace/xcuserdata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "BlueZ", | ||
name: "BluetoothLinux", | ||
dependencies: [ | ||
.Package(url: "https://github.com/PureSwift/CBlueZ.git", majorVersion: 1), | ||
.Package(url: "https://github.com/PureSwift/CSwiftBluetoothLinux", majorVersion: 1), | ||
.Package(url: "https://github.com/PureSwift/SwiftFoundation.git", majorVersion: 1), | ||
], | ||
targets: [ | ||
Target( | ||
name: "ScanTest", | ||
dependencies: [.Target(name: "BlueZ")]), | ||
dependencies: [.Target(name: "BluetoothLinux")]), | ||
Target( | ||
name: "iBeaconTest", | ||
dependencies: [.Target(name: "BlueZ")]), | ||
dependencies: [.Target(name: "BluetoothLinux")]), | ||
Target( | ||
name: "PeripheralTest", | ||
dependencies: [.Target(name: "BlueZ")]), | ||
name: "L2CAPServerTest", | ||
dependencies: [.Target(name: "BluetoothLinux")]), | ||
Target( | ||
name: "BlueZ") | ||
name: "BluetoothLinux") | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,18 @@ | ||
# SwiftBlueZ | ||
Swift wrapper for Linux Bluetooth C API (BlueZ) | ||
# BluetoothLinux | ||
Pure Swift Bluetooth Stack for Linux | ||
|
||
Does not require [BlueZ](https://www.bluez.org), communicates directly with the Linux kernel. | ||
|
||
![Screenshot](http://i.imgur.com/0EPoVEr.png) | ||
|
||
# Dependencies | ||
|
||
1. SwiftFoundation [dependencies](https://github.com/PureSwift/SwiftFoundation/blob/develop/README.md#compiling-on-ubuntu) | ||
2. `sudo apt-get install libbluetooth-dev` | ||
2. Install [Helper C Headers](https://github.com/PureSwift/CSwiftBluetoothLinux) | ||
|
||
# Unit Tests | ||
``` | ||
swift build | ||
sudo .build/debug/UnitTests | ||
``` | ||
|
||
I recommend [LightBlue Explorer](https://itunes.apple.com/us/app/lightblue-explorer-bluetooth/id557428110?mt=8) and [Locate Beacon](https://itunes.apple.com/us/app/locate-beacon/id738709014?mt=8) to verify the iBeacon is advertising. The iBeacon test case is already configured to use a UUID that is preinstalled in the *Locate Beacon* app. | ||
|
||
## Troubleshooting | ||
- Do not test in Parallels or VMware with the built in Bluetooth adapter found in Macs. You can, however, use VMWare or Parallels, with a Linux compatible BLE USB adapter plugged in. | ||
|
||
- If the unit tests fail, particularly for the iBeacon case, disconnect and reconnect the USB adapter. Sometimes disabling the advertising fails, and if you run the unit test a 2nd time, it fails to advertise because it already is. | ||
- Do not test in Parallels or VMware with the built in Bluetooth adapter found in Macs. You can, however, use VMWare or Parallels, with a Linux compatible BLE USB adapter plugged in. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.