Giter VIP home page Giter VIP logo

ios's Introduction

Introduction

This BLE SDK for iOS provides a framework for Mac OSX and iOS developers to develop Bluetooth 4.0 Low Energy (aka BLE) Apps easily using a simeple TXRX Service for exchanging data. It is based on Apple's CoreBluetooth framework.

It currently supports iOS 7 and Mac OSX 10.9.2.
OSX 10.7.5, 10.8.x and iOS 6 also support BLE but not tested.
OSX 10.9.0 and 10.9.1 have bugs, so we will not support.

For iOS devices, only iPhone 4s/5/5s, iPod touch 5 and iPad 3/4/Air/Mini have BLE 4.0 support.
For Mac devices, if no BLE hardware built-in, you need to buy an USB Bluetooth 4.0 dongle (CSR or Broadcom).

Since BLE is a new technology, if you found your App does not run correctly, it might be the OS issue, try to restart your device to try again.

The examples are for our BLE development boards, currently, it supports:

  • BLE Shield
  • BLE Mini
  • Blend Micro
  • Blend
  • BLE Nano
  • RBL nRF51822

Please refer to their repositories at https://github.com/RedBearLab/

License

Copyright (c) 2012-2014 RedBearLab

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

ios's People

Contributors

beepscore avatar cheong2k avatar kouky avatar otlichnick avatar zhu081607 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  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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ios's Issues

I hope you modify BLE.m for iOS7.1 and iPhone 5s.

I hope you modify your BLE.m as the blow:
" [p writeValue:data forCharacteristic:characteristic type:CBCharacteristicWriteWithoutResponse]; " (A warning happens, and can't work right )
to
" [p writeValue:data forCharacteristic:characteristic type:CBCharacteristicWriteWithResponse]; "

So, I can use it for iOS7.1 and iPhone 5s, by the above modification.

Thank you.

Crashes on iOS 9

Hey the app crashes on iOS when pressing the "scan" under "BLE Controller" with a peripheral running BLEControllerSketch. Without the peripheral running, the app just reported nothing found with no crash.

BLE nano v2 ios libraries

The ios (xcode) libraries are the same even using BLE NANO v2?
I mean for ios devices with BLE 5.0 (iphone8 and iphoneX) do i have to change libraries?
On the other ios BLE4 devices (ipad pro, ipad air, ...) do i have to change something if i use a BLE NANO v2 with a arduino board?

9dof razor and BLE mini

Hi guys,

I'm trying to transmit data from the 9dof Razor IMU module (from Sparkfun) via the BLE mini (Red Bear labs) to the BLEChat_Central_OSX app and it doesn't work :/

The codes I use are:

I tried to transmit via BLE only one value with following code:

     Serial.print(int(smoothedAX));

     Serial.println();

But when running the BLEChat on Xcode I receive only "i" and "Y" values:

2014-07-16 18:27:01.389 BLEChat Central[395:303] scanForPeripheralsWithServices

2014-07-16 18:27:02.108 BLEChat Central[395:303] didDiscoverPeripheral

2014-07-16 18:27:02.426 BLEChat Central[395:303] Duplicate UUID found updating...

2014-07-16 18:27:03.389 BLEChat Central[395:303] Stopped Scanning

2014-07-16 18:27:03.389 BLEChat Central[395:303] Known peripherals : 1

2014-07-16 18:27:03.389 BLEChat Central[395:303] List of currently known peripherals :

2014-07-16 18:27:03.390 BLEChat Central[395:303] 0  |  308B4C0E-F756-434C-84D4-B474B1C12AD6

2014-07-16 18:27:03.390 BLEChat Central[395:303]
------------------------------------

2014-07-16 18:27:03.390 BLEChat Central[395:303] Peripheral Info :

2014-07-16 18:27:03.390 BLEChat Central[395:303] UUID : 308B4C0E-F756-434C-84D4-B474B1C12AD6

2014-07-16 18:27:03.390 BLEChat Central[395:303] Name : Biscuit

2014-07-16 18:27:03.391 BLEChat Central[395:303]
-------------------------------------

2014-07-16 18:27:03.391 BLEChat Central[395:303] Connecting to peripheral with UUID : 308B4C0E-F756-434C-84D4-B474B1C12AD6

2014-07-16 18:27:03.567 BLEChat Central[395:303] Connected to 308B4C0E-F756-434C-84D4-B474B1C12AD6 successful

2014-07-16 18:27:03.582 BLEChat Central[395:303] ->Connected

2014-07-16 18:27:03.747 BLEChat Central[395:303] Length: 2

2014-07-16 18:27:03.747 BLEChat Central[395:303] y

2014-07-16 18:27:03.749 BLEChat Central[395:303] Length: 2

2014-07-16 18:27:03.749 BLEChat Central[395:303] y

2014-07-16 18:27:03.750 BLEChat Central[395:303] Length: 2

2014-07-16 18:27:03.750 BLEChat Central[395:303] i

2014-07-16 18:27:03.814 BLEChat Central[395:303] Length: 2

2014-07-16 18:27:03.814 BLEChat Central[395:303] i

2014-07-16 18:27:03.816 BLEChat Central[395:303] Length: 2

2014-07-16 18:27:03.816 BLEChat Central[395:303] i

2014-07-16 18:27:03.817 BLEChat Central[395:303] Length: 2

2014-07-16 18:27:03.817 BLEChat Central[395:303] i

2014-07-16 18:27:03.818 BLEChat Central[395:303] Length: 2

2014-07-16 18:27:03.818 BLEChat Central[395:303] i

I also tried to transmit the data with an adaption of the arduino code:

     // uint16_t value = smoothedAX;

     uint16_t value = 123; // fake reading

     BLEMini_write(0x0B);

     BLEMini_write(value >> 8);

     BLEMini_write(value);

But then I receive an error message instantly:

2014-07-16 18:28:04.930 BLEChat Central[425:303] scanForPeripheralsWithServices

2014-07-16 18:28:04.964 BLEChat Central[425:303] didDiscoverPeripheral

2014-07-16 18:28:04.964 BLEChat Central[425:303] Duplicate UUID found updating...

2014-07-16 18:28:06.932 BLEChat Central[425:303] Stopped Scanning

2014-07-16 18:28:06.932 BLEChat Central[425:303] Known peripherals : 1

2014-07-16 18:28:06.932 BLEChat Central[425:303] List of currently known peripherals :

2014-07-16 18:28:06.932 BLEChat Central[425:303] 0  |  308B4C0E-F756-434C-84D4-B474B1C12AD6

2014-07-16 18:28:06.932 BLEChat Central[425:303] ------------------------------------

2014-07-16 18:28:06.933 BLEChat Central[425:303] Peripheral Info :

2014-07-16 18:28:06.933 BLEChat Central[425:303] UUID : 308B4C0E-F756-434C-84D4-B474B1C12AD6

2014-07-16 18:28:06.933 BLEChat Central[425:303] Name : Biscuit

2014-07-16 18:28:06.933 BLEChat Central[425:303] -------------------------------------

2014-07-16 18:28:06.933 BLEChat Central[425:303] Connecting to peripheral with UUID : 308B4C0E-F756-434C-84D4-B474B1C12AD6

2014-07-16 18:28:06.975 BLEChat Central[425:303] Connected to 308B4C0E-F756-434C-84D4-B474B1C12AD6 successful

2014-07-16 18:28:06.991 BLEChat Central[425:303] ->Connected

2014-07-16 18:28:07.131 BLEChat Central[425:303] Length: 2

2014-07-16 18:28:07.132 BLEChat Central[425:303] (null)

2014-07-16 18:28:07.133 BLEChat Central[425:303] An uncaught exception was raised

2014-07-16 18:28:07.134 BLEChat Central[425:303] -[__NSCFString appendString:]: nil argument

2014-07-16 18:28:07.134 BLEChat Central[425:303] (

0   CoreFoundation                      0x00007fff82e5725c __exceptionPreprocess + 172

1   libobjc.A.dylib                     0x00007fff88243e75 objc_exception_throw + 43

2   CoreFoundation                      0x00007fff82e5710c +[NSException raise:format:] + 204

3   CoreFoundation                      0x00007fff82e26def mutateError + 159

4   BLEChat Central                     0x00000001000054d1 -[RBLAppDelegate bleDidReceiveData:length:] + 257

5   BLEChat Central                     0x0000000100004cb2 -[BLE peripheral:didUpdateValueForCharacteristic:error:] + 770

6   CoreBluetooth                       0x00007fff884b4089 -[CBCentralManager xpcConnection:didReceiveMsg:args:] + 101

7   CoreBluetooth                       0x00007fff884bd88b __34-[CBXpcConnection handleMsg:args:]_block_invoke + 81

8   libdispatch.dylib                   0x00007fff884c81bb _dispatch_call_block_and_release + 12

9   libdispatch.dylib                   0x00007fff884c528d _dispatch_client_callout + 8

10  libdispatch.dylib                   0x00007fff884ccef0 _dispatch_main_queue_callback_4CF + 333

11  CoreFoundation                      0x00007fff82dbe4f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9

12  CoreFoundation                      0x00007fff82d79714 __CFRunLoopRun + 1636

13  CoreFoundation                      0x00007fff82d78e75 CFRunLoopRunSpecific + 309

14  HIToolbox                           0x00007fff877cea0d RunCurrentEventLoopInMode + 226

15  HIToolbox                           0x00007fff877ce7b7 ReceiveNextEventCommon + 479

16  HIToolbox                           0x00007fff877ce5bc _BlockUntilNextEventMatchingListInModeWithFilter + 65

17  AppKit                              0x00007fff833f624e _DPSNextEvent + 1434

18  AppKit                              0x00007fff833f589b -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122

19  AppKit                              0x00007fff833e999c -[NSApplication run] + 553

20  AppKit                              0x00007fff833d4783 NSApplicationMain + 940

21  BLEChat Central                     0x0000000100005122 main + 34

22  libdyld.dylib                       0x00007fff87eea5fd start + 1

)

2014-07-16 18:28:07.135 BLEChat Central[425:303] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString appendString:]: nil argument'

*** First throw call stack:

(

0   CoreFoundation                      0x00007fff82e5725c __exceptionPreprocess + 172

1   libobjc.A.dylib                     0x00007fff88243e75 objc_exception_throw + 43

2   CoreFoundation                      0x00007fff82e5710c +[NSException raise:format:] + 204

3   CoreFoundation                      0x00007fff82e26def mutateError + 159

4   BLEChat Central                     0x00000001000054d1 -[RBLAppDelegate bleDidReceiveData:length:] + 257

5   BLEChat Central                     0x0000000100004cb2 -[BLE peripheral:didUpdateValueForCharacteristic:error:] + 770

6   CoreBluetooth                       0x00007fff884b4089 -[CBCentralManager xpcConnection:didReceiveMsg:args:] + 101

7   CoreBluetooth                       0x00007fff884bd88b __34-[CBXpcConnection handleMsg:args:]_block_invoke + 81

8   libdispatch.dylib                   0x00007fff884c81bb _dispatch_call_block_and_release + 12

9   libdispatch.dylib                   0x00007fff884c528d _dispatch_client_callout + 8

10  libdispatch.dylib                   0x00007fff884ccef0 _dispatch_main_queue_callback_4CF + 333

11  CoreFoundation                      0x00007fff82dbe4f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9

12  CoreFoundation                      0x00007fff82d79714 __CFRunLoopRun + 1636

13  CoreFoundation                      0x00007fff82d78e75 CFRunLoopRunSpecific + 309

14  HIToolbox                           0x00007fff877cea0d RunCurrentEventLoopInMode + 226

15  HIToolbox                           0x00007fff877ce7b7 ReceiveNextEventCommon + 479

16  HIToolbox                           0x00007fff877ce5bc _BlockUntilNextEventMatchingListInModeWithFilter + 65

17  AppKit                              0x00007fff833f624e _DPSNextEvent + 1434

18  AppKit                              0x00007fff833f589b -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122

19  AppKit                              0x00007fff833e999c -[NSApplication run] + 553

20  AppKit                              0x00007fff833d4783 NSApplicationMain + 940

21  BLEChat Central                     0x0000000100005122 main + 34

22  libdyld.dylib                       0x00007fff87eea5fd start + 1

)

libc++abi.dylib: terminating with uncaught exception of type NSException

I tried to look for a solution for three days but I haven't been able to solve the problem. It would be really nice if you could help me :)

Thanks a lot in advance and cheers!

Version difference App Store vs. Github

The app downloaded from App Store to iOS 10 is able to connect with BLE Shield. The version here after install to the same iOS 10 device was unable to connect with BLE Shield. Is there a version difference between the current App Store version and Github version?

Where have samples been moved to?

This commit removes the sample apps with the message "Moved samples to other repositories." 34e70c2

Where have these been moved to?

The README still references these as if they're contained within this repo.

iOS 8 and Swift support

Hi guys,

Do you have any plans to release an iOS 8 \ Swift support to your BLE mini ?

Thanks.

Build errors for example projects

Both the BLE Select and BLE Controller example projects have several of the following build errors:
Property 'UDID' not found on object of type 'CBPeripheral'.

The BLE Controller project has two such errors, and the BLE Select project has six such errors.

Swift SDK

Did Swift SKD ready to use ?
did "didUpdateValueForCharacteristic" method implementation in swift finished ?

did we need to chunk date when receive like objc ?

Objc link

Swift link

SimpleControls_iOS does NOT work on my iPhone.

I have an Arduino Leonardo and a RedBearLab BLE Shield. iOS 7.0.3 system. I have uploaded the latest library to the Arduino. The BLEArduino App from app store works perfectly. I installed the latest SimpleControls example to my iPhone and the hardware and iPhone were successful connected. However, any of the buttons in the app was NOT working. I didn't make any change on that example.
Anybody knows why?
I'm not a programmer so I really need some help now.
Thank you

SimpleControls works on Mac but not on iPhone

Using this repository (commit 3263961) and a BLE Mini v1.0 with iOS 7.0.5 does not work (digital out does not respond) whereas it does work on Mac OS.

I'm using your BLEMini repo (commit 2e42aff3d9) (btw I'd love to see releases) and tried Arduino UNO, Arduino pro mini and a YUN until I realized that everything works on the Arduino side and the iOS app is broken. The Mac OS app runs without problems...

Writing too fast to BLEMini module from Arduino results in lost data when reading from iOS

I've done a test where I send 215 bytes from Arduino to the BLEMini (wired). When i use the BLEMini library in iOS and I use the didReceiveData:length: method, some of the data is apparently lost. When I slightly delay (with delay(1)) the data being sent from Arduino, I get all the data and it matches exactly, byte for byte. It seems like there's some buffer on the BLEMini hardware device that maybe gets filled up too quickly in my scenario and overflows or gets overwritten if I write too it too fast from Arduino vs slowing down the Arduino writing to it and letting it get emptied at a more reasonable rate. Can you please confirm that this is expected or what the max data I can write to the module is or the max rate at which I should be writing to it?

Would it be a valid solution to write a byte not more often than 5ms?

Thanks!

Chat Example doesn't work for me

Hello,

I'm trying to use Chat_Scketch and Chat_IOS.

My iPhone connect to Arduino+BLE shield perfectly, but the method bleDidReceiveData never called.

I didn't make any changes on code.

The other examples works fine ( SimpleControls and BLE Arduino from appStore).

So it seems to me that Arduino+BLE shield couldn't send data to iPhone....

Could You help me ?

- controlSetup: method

Is there any reason controlSetup: in BLE.m requires an integer? It's not being used and I'm missing any kind of documentation.

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.