Skip to content

kevinbrewster/SwiftLinuxGATTServerExampleAdvanced

Repository files navigation

SwiftLinuxGATTServerExampleAdvanced

This is a simple example of how to create a Bluetooth 4.0 (BLE) peripheral (aka GATT server) on Linux (e.g. on a Raspberry Pi) using Swift and the SwiftLinuxBLE wrapper for the PureSwift BluetoothLinux library.

This example sets up a single BLE peripheral with a single service.

For a bare bones example without the SwiftLinuxBLE wrapper, take a look at SwiftLinuxGATTServerExample

Installation for Raspberry Pi

  1. Install Raspbian or Ubuntu on Raspberry Pi
  2. Install Swift 5 on Raspberry Pi using the prebuilt binary
  3. Checkout the SwiftLinuxGATTServerExampleAdvanced project
  4. Navigate to project directory and run: sudo /home/pi/usr/bin/swift run

Testing

The nRF Connect app is nice because you can subscribe to notifications

Dependencies

Helpful Links

BLE API Design

BLE Advertising

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages