DemoPeripheral

Swift 3.0 Bluetooth LE Peripheral for ARM Linux device (e.g. BeagleBone, Raspberry Pi, Orange Pi)

38
7
Swift

DemoPeripheral

Turn your ARM Linux device (e.g. BeagleBone, Raspberry Pi, Orange Pi) into an iBeacon and Bluetooth Low Energy peripheral with Swift. Includes iOS app for interacting with the peripheral via Bluetooth.

Setup (iOS)

Install Carthage dependencies

carthage update

Setup (Linux)

  1. Install Swift 3.0 for ARM Linux, make sure to use 2016-09-26 build.
  2. Install BluetoothLinux dependencies.
  3. Clone and Build (will generate errors)
git clone https://github.com/colemancda/DemoPeripheral
cd DemoPeripheral
swift build
  1. Patch code, in Packages/CStatfs-1.0.0/module.modulemap replace x86_64-linux-gnu with arm-linux-gnueabihf
  2. Build and run
swift build
sudo .build/debug/Peripheral

Interaction

You should see the following in your console

Starting Peripheral Daemon...
Peripheral: Started GATT Server
Initialized Peripheral 0bd6311b-d0c9-425c-928b-89cc5bc0170c

You can also explore with LightBlue.