core-bluetooth

how to get public Bluetooth Device Address using core_bluetooth

只愿长相守 提交于 2019-12-01 07:40:50
问题 We have one bluetooth devices.Bluetooth devices have one public bluetooth device address(BDA).In android they get bluetooth like (30:03:5B:00:15:12) .I can get only device name and device UUID like this -(void) centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI { NSLog(@"Discovered peripheral %@ (%@) (%@)",peripheral.name,peripheral.identifier.UUIDString); //PHARMACELL CAREOUSEL

Make communication between 2 android phones over BLE

こ雲淡風輕ζ 提交于 2019-12-01 07:36:34
问题 I have two android smartphones (Xperia Z and Xperia Z1) and both have BLE capability. Can I connect to one of them as a peripheral over BLE? In my application I can see and conenct a BLE as peripheral (CC2541 device) and I can see all sevices and characteristics. But same application can not see one of my phones?? Is there a way to achice that?? 回答1: As of Android 4.4 there is no support for peripheral mod in the Android BLE apis. You would need this to be able to make two phones talk over

Core Bluetooth deprecations for iOS 7

别来无恙 提交于 2019-12-01 07:20:57
问题 In iOS 7, some Core Bluetooth things are now deprecated like CBUUIDGenericAccessProfileString and CBUUIDDeviceNameString. The apple docs state "(Deprecated. There are no replacements for these constants.)" I am wondering what we are supposed to do to replace these GAP things, as the apple docs and examples are of no help. The entire internet also seems to be silent about this. My code is pretty much just like the Heart Rate Monitor example which still has the deprecated code /* GAP (Generic

IOS:Convert string to hexadecimal array

时光怂恿深爱的人放手 提交于 2019-12-01 06:53:54
问题 i have string representing data .i need to convert those data to the hex array .By using the hex array data i can pass it to the CRC for writing to the peripheral My string data is like this NSString *stringsdata=@"helloworld1234567812345q"; i need to convert to hex format array like {0x0h,0x0e............0x0q}. so by using this array i can keep the data in the crc and write it to the peripheral data as Byte comm[24]; comm[0]=0x01; comm[1]=0x30; comm[2]=0x62; comm[3]=0x00;................

I want to trigger iOS7 to ask users permission to use Bluetooth and Twitter account

こ雲淡風輕ζ 提交于 2019-12-01 06:49:12
问题 This is somewhat backward to what most people ask. I want to purposely trigger the dialog asking for the users permission to: Connect to bluetooth devices, even when offline. Access there iOS-based Twitter account. I already have a similar dialog for location working fine. I'm doing this because I want to make the process of asking permission a bit more gentle, like Heyday, by showing a welcome screen explaining why the app needs this service then when the user taps OK, initiating the request

CLBeaconRegion, how to turn off warning: Turn On Bluetooth to Allow * to Connect to Accessories

∥☆過路亽.° 提交于 2019-12-01 06:14:27
We have a project that is using CoreLocation regions to monitor iBeacon region entering/exiting in the app background. CLBeaconRegion (CLRegion), CLBeacon, etc. CLLocationManager returns callbacks when a CLBeacon (iBeacon) region is entered. It is a light wrapper around a bluetoothManager underneath. // various CLLocation delegate callback examples - (void) locationManager:(CLLocationManager *)manager didRangeBeacons:(NSArray *)beacons inRegion:(CLBeaconRegion *)region; - (void) locationManager:(CLLocationManager *)manager didDetermineState:(CLRegionState)state forRegion:(CLRegion *)region;

How to control when to present the Bluetooth permission request prompt in iOS13?

允我心安 提交于 2019-12-01 05:36:10
问题 With the new policies related to privacy & Bluetooth in iOS13, my app launches an alert prompt on app install, or after app update (in iOS13) requesting access to Bluetooth. Is there anyway to control the presentation of this prompt? I'm making sure that the app doesn't access or initializes anything related to the CBCentralManager, on app start, but in a very specific place in the app, but still I get the prompt on app start. Is the presentation of this prompt related to the CBCentralManager

How to List discoverable Bluetooth devices and already paired devices in iOS, which method to use in swift?

╄→尐↘猪︶ㄣ 提交于 2019-12-01 05:25:14
I would like to include Bluetooth feature on my app using swift. I want to list all nearby/discoverable peripheral devices including those devices are already paired Which method i should use for listing the paired devices. Im using CoreBlutooth framework for implementing Bluetooth availability check. If Bluetooth works fine i would like to list out paired devices. And if possible please provide the method for connecting the device directly from the listed paired devices func startUpCentralManager() { println("Initializing central manager") centralManager = CBCentralManager(delegate: self,

CLBeaconRegion, how to turn off warning: Turn On Bluetooth to Allow * to Connect to Accessories

懵懂的女人 提交于 2019-12-01 04:09:41
问题 We have a project that is using CoreLocation regions to monitor iBeacon region entering/exiting in the app background. CLBeaconRegion (CLRegion), CLBeacon, etc. CLLocationManager returns callbacks when a CLBeacon (iBeacon) region is entered. It is a light wrapper around a bluetoothManager underneath. // various CLLocation delegate callback examples - (void) locationManager:(CLLocationManager *)manager didRangeBeacons:(NSArray *)beacons inRegion:(CLBeaconRegion *)region; - (void)

The advertisement key 'Manufacturer Data' is not allowed in CoreBluetooth

风格不统一 提交于 2019-12-01 03:34:42
I am working with the core bluetooth framework . I am trying to create the peripheral using this framework . My peripheral advertise the data using : manager=[[CBPeripheralManager alloc]initWithDelegate:self queue:nil]; [manager startAdvertising:dictionary]; here the dictionary that I am passing for the advertisement is : NSDictionary *dictionary = [[NSDictionary alloc] initWithObjectsAndKeys: @"name", CBAdvertisementDataLocalNameKey,@"some other data",CBAdvertisementDataManufacturerDataKey,nil]; when I am running the application I getting the warning : The advertisement key 'Manufacturer Data