core-bluetooth

Does startAdvertisingPeer work when app enters background?

♀尐吖头ヾ 提交于 2019-11-27 02:59:44
问题 I'd like the app to advertise a service even when the app enters the background. With Core Bluetooth, this is possible by setting bluetooth-peripheral for UIBackgroundModes. Does anyone know if the same can be achieved with MCNearbyServiceAdvertiser? Thanks. 回答1: When I was at WWDC this year I went to a Developer Lab for Multipeer Connectivity and was told by an Apple engineer that no, service advertisers and browsers will not work in the background. That said, I've been successfully

Bluetooth connection between 2 iOS devices

拈花ヽ惹草 提交于 2019-11-27 01:24:31
问题 I am trying out Core Bluetooth framework introduced in iOS 5.0. According to many threads (one of many) on StackOverflow itself: Core Bluetooth framework can be used to communicate with ANY hardware, which has Bluetooth Low Energy (4.0) hardware support. We can forget about Made For iPhone/iPod (MFI) program, if you are using Core Bluetooth technology. I have an iPhone 5, iPhone 4S, Google Android Nexus 7 with me, and I am sure at least first 2 has hardware support for BLE. My Question is

Peripheral and central at the same time on iOS

落花浮王杯 提交于 2019-11-27 01:23:12
问题 I've looked everywhere and tried everything , but nothing seems to work :( On iOS, I'm making an app (for iOS 6 and above) in which iOS devices need to exchange data. Therefore, both devices need to be peripheral and central at the same time. I've done exactly as specified in the WWDC video, but the devices can't connect successfully with each other. When I make one device only central and the other only peripheral, the central connects seamlessly to the peripheral. However, when both devices

Core Bluetooth - constant RSSI updates of in-range devices

做~自己de王妃 提交于 2019-11-27 00:39:06
问题 I just started with the core bluetooth framework for iOS and I'm developing an app that needs to constantly scan for BLE devices so that I can retrieve their RSSI number every minute or so. Currently I have: manager = [[CBCentralManager alloc] initWithDelegate:self queue:nil]; NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:FALSE], CBCentralManagerScanOptionAllowDuplicatesKey, nil]; [manager scanForPeripheralsWithServices:nil options:options]; this

How to wake up iOS app with bluetooth signal (BLE)

喜欢而已 提交于 2019-11-26 22:49:56
问题 using the BLE with CoreBluetooth (no iBeacon), is there a way to wake app a not running app when the device receives a bluetooth signal? I'm simulating a beacon with the redbearlab's BLE Shield (http://redbearlab.com/bleshield/). Thanks, DAN * UPDATE 03/05/14 * It looks like Apple has introduced a major update with iOS 7.1: now iOS will open your app for you if it detects a UUID that matches your app. The app only needs to be installed, it doesn't have to be running (logic in AppDelegate

Corebluetooth, How to get a unique UUID?

[亡魂溺海] 提交于 2019-11-26 20:33:58
问题 my question is the UUID of CBPeripheral seems not to be unique. I have two iPad2, and a bluetooth4.0 device. The UUID of the bluetooth device differs from the two iPad. As shown in following images. Is there any way to find a unique UUID of bluetooth device on iOS device? I need to find a UUID or mac address that would not change between different devices. Thank you very much, please help me!! 回答1: The peripheral uses a random resolvable address that changes at least every 15 minutes, at

locationManager:didEnterRegion not called when a beacon is detected

邮差的信 提交于 2019-11-26 20:13:45
问题 While testing with beacons (iOS devices) I found the listener beacon giving some unexpected behavior. locationManager:didEnterRegion method is not getting called even if a beacon enters a region. But the locationManager:didRangeBeacons:inRegion: is getting called correctly, and detected beacons are shown there. Has anyone experienced anything like this. 回答1: Check if your methods are implemented in the following way. In viewDidLoad , start moniotoring at the end self.beaconRegion

Use BlueZ Stack As A Peripheral (Advertiser)

♀尐吖头ヾ 提交于 2019-11-26 19:21:49
Goal : Use BlueZ and an Bluetooth 4LE dongle to create a peripheral that advertises the bluetooth equivalent of "Hello World". Where I'm At : I've currently got the BlueZ stack setup and downloaded, I can use the hci tool to recognize and see the Bluetooth dongle. I've tinkered with hciconfig leadv but I'm just not quite getting it/understanding what's going on. What Help I Think I Need : I need to get it to the next step. If anyone can either point me towards a good resource, walk me through this, or anything, It would be much appreciated. If I need to do additional leg(search)work I can but

Does the iPhone simulator in Xcode support Bluetooth Low Energy?

丶灬走出姿态 提交于 2019-11-26 18:47:24
I'm trying some iOS test applications on the new Mac mini, that supports Bluetooth Low Energy. The CoreBluetooth framework is used in those. However, I'm not able to get Bluetooth working in the iPhone simulator, that is part of Xcode. When I allocate a new CBCentralManager , centralManagerDidUpdateState: receives CBCentralManagerStatePoweredOff which stands for Bluetooth is currently powered off. The first time I ran the text application, a box was then opened up that looked pretty bugged (only language variables were used, not the actual texts) and with two buttons. The first led me to the

CoreBluetooth: What is the lifetime of unique UUIDs

孤街醉人 提交于 2019-11-26 18:19:10
问题 Following off of this question, After connecting to a peripheral, I can retrieve its CFUUIDRef , which is unique, and can use it to reconnect via retrievePeripherals . However, I have found that I can not use it to reconnect after closing the application. Is the unique UUID generated after a connection only valid for the lifetime of the application or are we supposed to be able to save it for later use? I am trying to have my application remember one particular peripheral, but besides