core-bluetooth

Bluetooth LE RSSI for proximity detection iOS

十年热恋 提交于 2019-12-17 15:23:25
问题 I'll start with the question. Is the BTLE RSSI a good way to indicate two devices proximity to each other or not? does it only work with small devices like fobs etc? The Issue: I am currently looking at making an app that will use BTLE and allow connections based on proximity. In this regard it is much like the demo app that apple show in the Advanced Core Bluetooth keynote (When two devices are almost touching they then connect). As I understand it the proximity is determined based on the

BLE Peripheral disconnects when navigating to different ViewController

走远了吗. 提交于 2019-12-17 12:09:06
问题 I am working on BLE iOS (Swift) application which has multiple ViewControllers. The main ViewController has a button which navigates to TableViewController which has detected BLE devices to connect with. But when I return back to main or another view the peripheral device disconnects. I tried to pass peripheral from TableViewController to main ViewController but still, it disconnects. MainViewController: var bleManager: BLEManager! var peripheral: CBPeripheral! override func viewDidLoad() {

Solving 'CBConcreteCentralManager is not powered on' in Core Bluetooth in MonoTouch

人盡茶涼 提交于 2019-12-14 02:24:06
问题 Currently trying to get a Bluteooth sample working. I'm using this sample as reference - http://developer.apple.com/library/mac/#samplecode/HeartRateMonitor/Listings/HeartRateMonitor_HeartRateMonitorAppDelegate_m.html#//apple_ref/doc/uid/DTS40011322-HeartRateMonitor_HeartRateMonitorAppDelegate_m-DontLinkElementID_4 Bluetooth is enabled on my device. I've tried using code like: _manager = new CBCentralManager (); _manager.DiscoveredPeripheral += HandleDiscoveredPeripheral; _manager

DidDiscoverPeripheral delegate method is not called

拟墨画扇 提交于 2019-12-14 01:41:52
问题 I am working with iphone5,and scanning for the device with the UUID.and i want to get list of available bluetooth device in my apps,but didDiscoverPeriphral delegate method is not call. here i give my code. - (id)init { NSLog(@"hello init"); if ((self = [super init])) { CM = [[CBCentralManager alloc]initWithDelegate:self queue:dispatch_get_main_queue()]; } return self; } - (void)viewDidLoad { CM = [[CBCentralManager alloc]initWithDelegate:self queue:dispatch_get_main_queue()]; isOn=NO; [super

didDiscoverPeripheral not called

孤街浪徒 提交于 2019-12-13 17:23:11
问题 I need to send ASCII-codes via bluetooth to the third-party device. Hope it's possible to do with spp. I could be wrong in terminology. I don't know enough this programming area. In centralManagerDidUpdateState I'm scanning for peripherals: CBUUID *cbuuidService = [CBUUID UUIDWithString:@"0x1101"]; NSArray *service = @[ cbuuidService ]; NSDictionary *options = @{ CBCentralManagerScanOptionAllowDuplicatesKey : @YES }; [central scanForPeripheralsWithServices:service options:options]; but

Android/ios/Mobile : How can we “SECURELY” do bluetooth pairing without prompting anything on user screen?

不羁的心 提交于 2019-12-13 09:24:46
问题 I know we can pair any bluetooth device without promoting on user screen but it is not secure. I guess as passkey will remain same for such connections for all the devices so anyone can sniff or do eavesdropping. How can we reduce the risk or make it more secure? I heard somebody is saying user public/private key to generate the link key but is that possible for such insecure connections?? Ref Secure Simple Pairing I hope I am able to put the question clearly ! 回答1: I've only been working

Windows 8.0 not discovering CBPeripheral

偶尔善良 提交于 2019-12-13 07:17:34
问题 I have a sample iPhone application taken from https://github.com/KhaosT/CBPeripheralManager-Demo/tree/master/PeripheralModeTest. I am advertising my peripheral service as follows. - (void)peripheralManager:(CBPeripheralManager *)peripheral didAddService:(CBService *)service error:(NSError *)error { NSLog(@"didAddService start"); NSLog(@"Added"); NSDictionary *advertisingData = @{CBAdvertisementDataLocalNameKey : @"BTService", CBAdvertisementDataServiceUUIDsKey : @[[CBUUID UUIDWithString:@

Interpret Characteristic Properties (iOS and BLE)

家住魔仙堡 提交于 2019-12-13 04:36:49
问题 I am reading characteristic properties from a BLE device from my iPhone. However, some of the properties I am seeing (like 0xA, 0x22) are not in the enumerated list that Apple provides. Are these properties a combination of 2 or more enumerated values? Or are these custom properties from the manufacturer? Need guidance on this. 回答1: As you can read in the documentation: Values representing the possible properties of a characteristic. Since characteristic properties can be combined, a

How can I create a secured connection to BLE peripheral through CBCentralManager?

孤街醉人 提交于 2019-12-13 00:12:30
问题 I am new to iOS and Core Bluetooth. What I would like to know is how to create a secured connection to the device. What I understand is: [manager connectPeripheral:peripheral options:nil] is the API provided to connect to the BLE device. From this, how do I establish a secured connection? 回答1: All BT4.0 connections are secured and managed by the device/sensor and iOS, you do not have control over this. BT4.0 devices you also have bounded and unbounded connections. Bounded connections are in a

CBCentralManager setNotifyValue: not working

大兔子大兔子 提交于 2019-12-12 22:34:32
问题 I am attempting to connect two iPhones using Core Bluetooth. One is running a peripheral, the other a central. It seems the two devices are connected. And every method is getting called in the typical control flow up until peripheralManager:central:didSubscribeToCharacteristic: does not get called on the peripheral side and peripheral: didUpdateValueForCharacteristic: error: does not get called on the central side. However, If I call readValueForCharacteristic: it works and grabs the first