redbearlab / ios Goto Github PK
View Code? Open in Web Editor NEWProvides a BLE framework for developing BLE App on iOS/OSX platform using RBL BLE Service.
Provides a BLE framework for developing BLE App on iOS/OSX platform using RBL BLE Service.
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?
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
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.
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.
Hi guys,
Do you have any plans to release an iOS 8 \ Swift support to your BLE mini ?
Thanks.
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 ?
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?
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!
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...
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.
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!
Hi there, how would I go about sending more than 20 bytes seamlessly?
Thankyou!
Is there any reason controlSetup: in BLE.m requires an integer? It's not being used and I'm missing any kind of documentation.
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.
Well, look at that... Apple seems to be getting rid of the UUID? Or is it just a compiler glitch? The UUID for CBPeripheral was introduced in iOS 5.
/../../.. ../BLE_Framework/BLE.m:466:20: 'UUID' is deprecated: first deprecated in iOS 7.0
What would be the solution?!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.