Code Monkey home page Code Monkey logo

openble's Introduction

OpenBLE

=========================================================================== DESCRIPTION:

A simple iOS iPhone application that demonstrates how to use the CoreBluetooth Framework to connect to a Bluetooth LE 'spp' peripheral to read, write. Based on the Apple 1.0 Temperature Sensor example code https://developer.apple.com/library/IOS/samplecode/TemperatureSensor/Introduction/Intro.html

Currently supports the Seeed Studio Xadow BLE device http://www.seeedstudio.com/depot/xadow-ble-slave-p-1546.html and whoever else uses that part. Should support many other devices with few changes. You can edit the LeDataService files to work for your device, particularly the characteristic UUIDs . I accept pull requests of new LeDataService classes for other devices, or if you want to ship my your device I might be able to get to it.

Important: This project requires a Bluetooth LE Capable Device (iPhone 4s and later; iPad 3 and later; iPod Touch 5; iPad mini) and will not work on the simulator.

=========================================================================== BUILD REQUIREMENTS:

  • Xcode 5 or greater
  • iOS 7 SDK or greater

=========================================================================== RUNTIME REQUIREMENTS:

iOS 6 or later Bluetooth LE Capable Device Bluetooth LE Sensor/s

openble's People

Contributors

jacobrosenthal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

openble's Issues

CBPeripheral seperate queue?

We have the ability, and almost no one uses it, to put our CBPeripheral events into a dispatch queue, serial or concurrent, instead of the main queue.

Ive seen VERY few ble examples do it, but this guys 'competing' firmata does and it made me question my implementation
https://github.com/Xadow/XadowApps

Author's home directory in link step

Just tried downloading a fresh version. CocoaPods downloads dependancies ok, but during build I get the following warnings/errors:

Ld /Users/mansion/Library/Developer/Xcode/DerivedData/OpenBLE-cvjfcfjsjwwfytcnnqeftqmpajex/Build/Products/Debug-iphonesimulator/OpenBLE.app/OpenBLE normal x86_64
cd "/Users/mansion/Library/Mobile Documents/comappleCloudDocs/xcode projects/OpenBLE/examples/OpenBle"
export IPHONEOS_DEPLOYMENT_TARGET=6.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -L/Users/mansion/Library/Developer/Xcode/DerivedData/OpenBLE-cvjfcfjsjwwfytcnnqeftqmpajex/Build/Products/Debug-iphonesimulator -L/Users/jacobrosenthal/Documents/Code/OpenBLE/examples/OpenBle/Pods/build/Debug-iphoneos -F/Users/mansion/Library/Developer/Xcode/DerivedData/OpenBLE-cvjfcfjsjwwfytcnnqeftqmpajex/Build/Products/Debug-iphonesimulator -filelist /Users/mansion/Library/Developer/Xcode/DerivedData/OpenBLE-cvjfcfjsjwwfytcnnqeftqmpajex/Build/Intermediates/OpenBLE.build/Debug-iphonesimulator/OpenBLE.build/Objects-normal/x86_64/OpenBLE.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lPods-OpenBLE -lPods-TPKeyboardAvoiding -framework CoreBluetooth -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.0 -lPods -framework CoreBluetooth -framework CoreGraphics -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/mansion/Library/Developer/Xcode/DerivedData/OpenBLE-cvjfcfjsjwwfytcnnqeftqmpajex/Build/Intermediates/OpenBLE.build/Debug-iphonesimulator/OpenBLE.build/Objects-normal/x86_64/OpenBLE_dependency_info.dat -o /Users/mansion/Library/Developer/Xcode/DerivedData/OpenBLE-cvjfcfjsjwwfytcnnqeftqmpajex/Build/Products/Debug-iphonesimulator/OpenBLE.app/OpenBLE

ld: warning: directory not found for option '-L/Users/jacobrosenthal/Documents/Code/OpenBLE/examples/OpenBle/Pods/build/Debug-iphoneos'
ld: library not found for -lPods-OpenBLE
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Looking for good method of subclassing an LeService object

LeDataService is a poor class to subclass. I've tried protocol delegate methods out of it and I dont like it. I think LeDataService should be one type of service, and should maybe subclass from a more general service class. At the very least I want to store all the known SPP UUIDs and give services some interface to conform to.

In order to dodge this for the time being, as of 4636310 I'm going to have the discover class deal only in peripherals and not in services.

But I definitely still don't feel like this is the final solution. Input welcome

'saved' devices and background connecting

Look into the saved devices support that came from the original ios ble examples.

We should be able to like.. star a device and try to connect to it even if we dont see it.

Honestly though, we're currently not exploring background connecting in our example so maybe it doesnt fit yet?

writeWithResponse bug?

Hi there. Looking at line 243 (in 9b7cd25 -> https://github.com/OpenBLE/OpenBLE/blob/master/Classes/LeDataService.m#L243), I see the following:

if([writeWithResponseCBUUIDs containsObject:writeCharacteristic])

Shouldn't that be checking writeCharacteristic.UUID?

I tested this change locally and it seemed to fix my write issues with my BLE Shield (a RedBear v.2012.07). Making that change correctly identified the characteristic as a write without response call.

Also, as a side note, shouldn't writeWithResponseCBUUIDs and related variables be called writeWithoutResponseCBUUIDs? The fact that it's called writeWITH totally confused me while debugging my issue...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.