Skip to content

Commit

Permalink
Merge branch 'Gatt'
Browse files Browse the repository at this point in the history
  • Loading branch information
colemancda committed Mar 3, 2016
2 parents b90d00b + a5aa8d4 commit 27527e3
Show file tree
Hide file tree
Showing 78 changed files with 4,491 additions and 1,473 deletions.
3 changes: 2 additions & 1 deletion .gitignore
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
14 changes: 7 additions & 7 deletions Package.swift
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")
]
)
16 changes: 6 additions & 10 deletions README.md
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.
69 changes: 0 additions & 69 deletions Sources/BlueZ/Adapter.swift

This file was deleted.

140 changes: 0 additions & 140 deletions Sources/BlueZ/Address.swift

This file was deleted.

42 changes: 0 additions & 42 deletions Sources/BlueZ/DeviceCommand.swift

This file was deleted.

Loading

0 comments on commit 27527e3

Please sign in to comment.