Swiftpack.co - Package - PureSwift/Bluetooth

Bluetooth

Swift Platform Release License

Build Status CodeBeat Docs

SPM compatible Carthage compatible

Pure Swift Bluetooth Definitions.

Usage

import Bluetooth

let uuid128bit = BluetoothUUID(rawValue: "60F14FE2-F972-11E5-B84F-23E070D5A8C7")
let uuid16bit = BluetoothUUID(rawValue: "FEA9")
let address = BluetoothAddress(rawValue: "00:1A:7D:DA:71:13")

Installation

Swift Package Manager

import PackageDescription

let package = Package(
    name: "hcitool",
    products: [
        .executable(name: "hcitool", targets: ["hcitool"])
    ],
    dependencies: [
        .package(url: "https://github.com/PureSwift/Bluetooth.git", .branch("master"))
    ],
    targets: [
        .target(
            name: "hcitool",
            dependencies: [
                "Bluetooth"
            ]
        )
    ]
)

Carthage

github "PureSwift/Bluetooth"

Documentation

Read the documentation here. Documentation can be generated with Jazzy. For more information, see the gh-pages branch.

See Also

  • BluetoothLinux - Pure Swift Linux Bluetooth Stack
  • BluetoothDarwin - Low Level Swift Bluetooth library for the Darwin kernel
  • AndroidBluetooth - Swift Bluetooth stack for Android
  • GATT - Bluetooth Generic Attribute Profile (GATT) for Swift
  • Netlink - Swift library for communicating with Linux Kernel Netlink subsystem (Linux Only)
  • DBus - Swift library for DBus (Linux Only)
  • Cacao - Pure Swift Cross-platform UIKit
  • Silica - Pure Swift CoreGraphics (Quartz2D) implementation
  • Predicate - Pure Swift Predicate implementation
  • TLVCoding - Swift TLV8 (Type-Length-Value) Encoding library

License

Bluetooth is released under the MIT license. See LICENSE for details.

Github

link
Stars: 39

Dependencies

Used By

Total: 0

Releases

v4.0.0 - 2019-04-29 18:04:21

  • #119 Fixed GATT Notifications
  • #121 Support Swift 5

v3.3.0 - 2018-11-28 20:25:44

  • #117 Improved GAPData data encoding
  • #111 Use synthesized Equatable and Hashable
  • aaf53f7 GATT.UUID should be internal

v3.2.1 - 2018-11-23 05:11:51

  • #117 Refactored data encoding
  • d9eb40e Added ATTProtocolDataUnit.validateOpcode()
  • 6990cfa Added Data.suffixCheckingBounds(from:)
  • 26b729c Updated MTU truncation for GATT Notifications and Indications

v3.2.0 - 2018-11-22 08:14:31

  • #117 Refactored data encoding
  • b94aa10 Removed BluetoothAddress.any
  • 1ca8508 Removed usage of Range
  • ed6a929 Added ATTAttributeDataList
  • 66e52a4 Updated GATTCharacteristicFormatType

v3.1.0 - 2018-11-19 03:46:00

  • #115 Updated for Swift 4.2
  • #113 Implemented CaseIterable

v3.0.0 - 2018-11-18 23:48:03

  • #111 Updated for Swift 4.1, deprecated Swift 3 support
  • 1af36d05ce3049b19510d67d84425b1e3ba66156 Updated POSIXError
  • d836f38 Fixed GATTServer.maximumTransmissionUnit
  • ae2d6fb Renamed Address to BluetoothAddress
  • 26c7f7a7 ATTConnection is now internal instead of public

v2.5.2 - 2018-09-16 21:26:36

  • 21976e7 Improved Address RawRepresentable performance

v2.5.1 - 2018-09-14 05:07:03

  • e255051 Fixed GATTServer strong reference cycle
  • 28f280d Fixed ATTConnection crash

v2.5.0 - 2018-09-12 04:34:40

  • c8d25fb Make L2CAPSocket non-blocking

v2.4.0 - 2018-09-11 03:07:31

  • #32 Implemented GATT Indications

v2.3.2 - 2018-09-08 22:33:47

  • #109 Added 128 bit UUID to 16 / 32 bit UUID conversion
  • fec0a38 Fixed Integer overflow crash in GATTClient

v2.3.1 - 2018-08-25 22:23:24

  • #104 Optimized data parsing

v2.3.0 - 2018-08-25 09:01:00

  • #108 Decrease iOS, watchOS, tvOS framework size
  • #104 Optimized data parsing
  • #99 Implemented HCI Inquiry and Link Control commands

v2.2.2 - 2018-08-17 05:24:23

  • 31c9a4c Added HCILEAdvertisingReport.Report.Event.isConnectable

v2.2.1 - 2018-08-16 21:53:20

  • eb90ee8 Fixed GAPDataDecoder

v2.2.0 - 2018-08-15 13:59:20

  • 145b073 Fixed GAPDataDecoder crash
  • eac2a70 Fixed LowEnergyAdvertisingData
  • 4268909 Updated HCILEAdvertisingReport to use LowEnergyAdvertisingData instead of Data

v2.1.9 - 2018-08-15 02:46:17

  • 49db956 Added POSIXError.description

v2.1.8 - 2018-08-12 06:31:15

  • 67f9390 Updated LE scanning
  • 79bf4b8 Fixed iBeacon advertising

v2.1.7 - 2018-07-23 20:43:30

  • 8384c06 Fixed BluetoothHostControllerInterface Swift 4 compiler crash

2.1.6 - 2018-07-19 04:18:13

  • 3fcb7d0 Added ATTConnection.writePending

v2.1.5 - 2018-07-14 05:53:13

  • #58 Added standard GATT Characteristics
  • 612799a Added UInt48

v2.1.4 - 2018-07-04 20:22:58

  • #58 Added standard GATT Characteristics

v2.1.3 - 2018-06-29 15:40:18

  • #58 Added standard GATT Characteristics
  • #89 Added UInt24 and UInt40

v2.1.2 - 2018-06-23 05:28:45

  • #58 Added standard GATT Characteristics

v2.1.1 - 2018-06-20 00:11:16

  • #58 Added standard GATT Characteristics
  • dfecefd Fixed duplicate file references for iOS, tvOS, watchOS

v2.1.0 - 2018-06-15 23:43:26

  • #46 Implemented defined GATT Descriptors
  • #58 Implemented defined GATT Characteristics
  • #72 Refactored layout of source files

v2.0.0 - 2018-06-13 04:30:32

  • #3 Added HCI commands and tests
  • #23 Updated iBeacon
  • #25 Implemented GATT Notifications for GATTClient
  • #33 Implemented GATT Descriptors for GATTClient
  • #35 Added GAP Data types
  • #41 Fixed BluetoothHostControllerInterface.lowEnergyRemoveDeviceFromResolvingList()
  • #45 Fixed POSIXError on Android
  • #49 Update 16 Bit UUIDs For Members
  • #50 Updated Company Identifiers
  • #58 Implemented defined GATT Characteristics
  • #59 Generate unit tests and extensions for UnitIdentifier
  • 60a5820 Added BluetoothHostControllerInterface.deviceRequest<C: HCICommand, EP: HCIEventParameter>()

v1.8.1 - 2018-05-11 18:33:28

  • #3 Added HCI commands and tests

1.8.0 - 2018-04-29 02:54:58

  • #35 Added GAP Data Types
  • 0433f73 Added LowEnergyAdvertisingData

v1.7.8 - 2018-04-24 14:59:19

  • #3 Implemented all LE HCI Commands and Events.
  • 5990c18 Added BitMaskOption.remove()