All Projects → netguru → Blueswift

netguru / Blueswift

Licence: mit
Swift framework for easy connection with Bluetooth peripherals.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Blueswift

Bleu
BLE (Bluetooth LE) for U🎁 Bleu is the best in the Bluetooth library.
Stars: ✭ 481 (+446.59%)
Mutual labels:  bluetooth-low-energy, bluetooth
Nrf52dk Sys
A Rust Crate to develop on the Nordic nRF52-DK
Stars: ✭ 83 (-5.68%)
Mutual labels:  bluetooth-low-energy, bluetooth
Eaze
iOS Cleanflight Configurator
Stars: ✭ 8 (-90.91%)
Mutual labels:  iphone, bluetooth
Bleak
Bluetooth Low Energy platform Agnostic Klient for Python
Stars: ✭ 415 (+371.59%)
Mutual labels:  bluetooth-low-energy, bluetooth
Hibeacons
An iBeacons example app for iOS 10, with Apple Watch (watchOS 3.0) support, written in Swift 3.
Stars: ✭ 1,153 (+1210.23%)
Mutual labels:  iphone, bluetooth
Gort
Command Line Interface (CLI) for RobotOps
Stars: ✭ 425 (+382.95%)
Mutual labels:  bluetooth-low-energy, bluetooth
Bluetoothserial
Cordova (PhoneGap) Plugin for Serial Communication over Bluetooth
Stars: ✭ 999 (+1035.23%)
Mutual labels:  bluetooth-low-energy, bluetooth
pyscrlink
Scratch-link for Linux written in python
Stars: ✭ 88 (+0%)
Mutual labels:  bluetooth, bluetooth-low-energy
Pulsator
Pulse animation for iOS
Stars: ✭ 1,238 (+1306.82%)
Mutual labels:  bluetooth-low-energy, bluetooth
Qdomyos Zwift
Zwift bridge for smart treadmills and bike/cyclette
Stars: ✭ 63 (-28.41%)
Mutual labels:  bluetooth-low-energy, bluetooth
Ios Pods Dfu Library
OTA DFU Library for Mac and iOS, compatible with nRF5x SoCs
Stars: ✭ 349 (+296.59%)
Mutual labels:  bluetooth-low-energy, bluetooth
Bluetooth
Pure Swift Bluetooth library
Stars: ✭ 74 (-15.91%)
Mutual labels:  bluetooth-low-energy, bluetooth
Blegattcoroutines
Functional Bluetooth GATT for Android (all the meanings)
Stars: ✭ 343 (+289.77%)
Mutual labels:  bluetooth-low-energy, bluetooth
Rxbluetoothkit
iOS & OSX Bluetooth library for RxSwift
Stars: ✭ 1,213 (+1278.41%)
Mutual labels:  bluetooth-low-energy, bluetooth
Blynk Library
Blynk library for embedded hardware. Works with Arduino, ESP8266, Raspberry Pi, Intel Edison/Galileo, LinkIt ONE, Particle Core/Photon, Energia, ARM mbed, etc.
Stars: ✭ 3,305 (+3655.68%)
Mutual labels:  bluetooth-low-energy, bluetooth
Uart Smartwatch
Android App, Firmware and Circuit for a DIY Smartwatch working with Bluetooth Low Energy
Stars: ✭ 30 (-65.91%)
Mutual labels:  bluetooth-low-energy, bluetooth
bluenet
Bluenet is the in-house firmware on Crownstone hardware. Functions: switching, dimming, energy monitoring, presence detection, indoor localization, switchcraft.
Stars: ✭ 79 (-10.23%)
Mutual labels:  bluetooth, bluetooth-low-energy
bluer
BlueR — Official BlueZ Bindings for Rust
Stars: ✭ 43 (-51.14%)
Mutual labels:  bluetooth, bluetooth-low-energy
Gjlightbluetooth
自己封装的基于CoreBluetooth的蓝牙开发库,内附CoreBluetooth使用demo。数据传递基本上使用Block,还使用了Runtime等技术。
Stars: ✭ 50 (-43.18%)
Mutual labels:  bluetooth-low-energy, bluetooth
Rxbluetoothkotlin
Bluetooth low energy reactive framework for Android written in Kotlin
Stars: ✭ 68 (-22.73%)
Mutual labels:  bluetooth-low-energy, bluetooth


Easy to use Bluetooth open source library brought to you by Netguru.
🤟 Probably the easiest way to interact with bluetooth peripherals 🤟

🤹🏻‍♂️ Features

  • [x] Handles connection with remote peripherals.
  • [x] Handles advertising an iPhone as Bluetooth LE peripheral.
  • [x] Closure based read/write/notify requests.
  • [x] Built in data conversion method with Command wrapper.

📲 Connection:

Below you can find an easy code sample to connect to the peripheral.
Really thats all that is needed 🍾🍾

let connection = BluetoothConnection.shared
let characteristic = try! Characteristic(uuid: "your_characteristic_uuid", shouldObserveNotification: true)
let service = try! Service(uuid: "your_service_uuid", characteristics: [characteristic])
let configuration = try! Configuration(services: [service], advertisement: "your_advertising_uuid")
let peripheral = Peripheral(configuration: configuration)
connection.connect(peripheral) { error in
	// do awesome stuff
}

📡 Advertisement:

Below you can find a code sample the setup the iPhone to advertise Bluetooth.
That's all it takes to advertise one service containing one characteristic.

let characteristic = try! Characteristic(uuid: "your_characteristic_uuid")
let service = try! Service(uuid: "your_service_uuid", characteristics: [characteristic])
let configuration = try! Configuration(services: [service], advertisement: "your_service_uuid")
let peripheral = Peripheral(configuration: configuration, advertisementData: [.localName("Test"), .servicesUUIDs("your_service_uuid")])
advertisement.advertise(peripheral: peripheral) { error in
	// oh no, something failed in that case          
}

📟 📲 Data transfer:

Of course data transfer is also possible, both for advertising and connection mode! Below there are some basic examples, for more please see More usage section 👇🏻

Connection mode:

let command = Command.utf8String("Hello world")
peripheral.write(command: command, characteristic: someCharacteristic, handler: { error in
	// written!
})
peripheral.read(characteristic, handler: { data, error in
	// read!
})

Advertisement mode:

let command = Command.int8(3)
advertisement.update(command, characteristic: characteristic) { error in
	// data updated!
}
advertisement.writeRequestCallback = { characteristic, data in
	// written!
}

⚙️ More usage:

For more advanced usage check out documentation page at: https://netguru.github.io/BlueSwift/.
Also feel free to check example project bundled with this repository! 👩🏼‍🏫 👨🏼‍🏫 It's a complete app that allows connection and sending text messages between two iPhones.

🛠 Dependency management:

BlueSwift can be drag'n dropped to the project directory,
but what's more important it's supported by most common dependency management!

Just drop the line below to your Podfile:

pod 'BlueSwift'

(but probably you'd like to pin it to the nearest major release, so pod 'BlueSwift' , '~> 1.0.0')

The same as with Cocoapods, insert the line below to your Cartfile:

github 'netguru/BlueSwift'

, or including version - github 'netguru/BlueSwift' ~> 1.0.0

📄 License

(As all cool open source software, it's...)
Licensed under MIT license.

Also it would be really nice if you could drop us a line about your usage!! 🚀🚀

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].