Questions tagged [cbperipheralmanager]

CBPeripheralManager objects are used to manage published services within the local peripheral device’s Generic Attribute Profile (GATT) database and to advertise these services to central devices (represented by CBCentral objects).

In iOS, CBPeripheralManager objects are used to manage published services within the local peripheral device’s Generic Attribute Profile (GATT) database and to advertise these services to central devices (represented by CBCentral objects).

https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/CBPeripheralManager_Class/index.html#//apple_ref/occ/cl/CBPeripheralManager

70 questions
0
votes
0 answers

Bluetooth device Integration in iphone

I want to fetch UUID of a bluetooth device (like iBeacon but not iBeacon) by scanning, but wasn't successful so far. I have tried CBPeripheral but it's returned uuid does not match with the real values. Please suggest me how to find UUID / MAC…
0
votes
0 answers

How to prioritize BLE operations/roles in an iOS app?

So this is a weird one, but we have written a monitoring iOS app that does two things: (1) acts as a BLE central that acquires data from a device, and (2) acts as a BLE peripheral that transmits data to another observing iOS app (which we have also…
Chris
  • 629
  • 1
  • 10
  • 28
0
votes
1 answer

Background Bluetooth(BLE) Transmit and Scan

Code works great when the application is open(foreground) but, It does not run in the background. I have all background modes enabled. I have also added Background location updates using .allowsBackgroundLocationUpdates implemented. Not sure where…
0
votes
0 answers

Core-bluetooth peripheral doesn't notify the central when data is updated

I'm trying to send big packets of data via BLE. To do this I've created a characteristic that should notify the central when it's data change. The problem is that apparently the peripheral stacks up the data in the characteristic, but obviously once…
0
votes
0 answers

BLE IOS - CBPeripheralManager .updatevalue

I am trying to send data (image) between 2 devices (both iPhones). This code is for the CBPeripheralManager that advertises: func peripheralManagerDidUpdateState(_ peripheral: CBPeripheralManager) { switch peripheral.state { case .unknown: …
ironRoei
  • 2,049
  • 24
  • 45
0
votes
0 answers

CBCentralManager not calling didDiscoverPeripheral method Even Peripherals are active

When App opens the first time it is successfully detecting Peripherals and when I rescan it will detecting perfectly again. when I trying to connect to it. didDisconnectPeripheral is getting called that I understand but after that when I scan…
user6644763
0
votes
0 answers

iPhone 8/X BLE Advertising Failed

We have an iOS peripheral mode app that has been in use since iOS 10. We are now starting to see issues when the app is used on iPhone 8 or X. The failure we see is that the app does not Advertise even though the…
0
votes
2 answers

OBJ-C Connect to Services in Bluetooth

***** EDIT: ALL I NOW WORKING, SEE ACCEPTED ANSWER BELOW AND UPDATED CODE IN THIS QUESTION... ***** Ok I am extremely new to micro-controller code, but just as new to Objective-c bluetooth code. What I Want I would like to connect to my Bluetooth…
0
votes
1 answer

centralManagerDidUpdateState not getting called

I am not new to iOS coding but very new to BLE in iOS. I have successfully written code in my Main View Controller to access and write to a BLE device. So all the peripheral and manager stuff is tested. My app will get a list of BLE devices,…
0
votes
0 answers

How to keep CoreBluetooth connection alive between views

I have implemented CoreBluetooth for an app based on Apples CoreBluetooth TemperatureSensor example (https://developer.apple.com/library/ios/samplecode/TemperatureSensor/Introduction/Intro.html). It works great searching for devices, populating the…
0
votes
0 answers

CBPeripheralManager is unsupported in one app and powered on in other

I've faced issue with CBPeripheralManager I have two apps first one is demo app where I've tested checking state of bluetooth and second is app that will have this working solutions. According to this solution I've succesfuly implemented checking…
Błażej
  • 3,617
  • 7
  • 35
  • 62
0
votes
0 answers

didWriteValueForCharacteristic getting null in Characteristic value

I am sending the date from to the peripheral by using the below code. NSString* alternative = [NSString stringWithFormat:@"hello"]; NSData *dataToSend = [alternative dataUsingEncoding:NSUTF8StringEncoding]; [self.discoveredPeripheral…
Vineesh TP
  • 7,755
  • 12
  • 66
  • 130
0
votes
1 answer

EverTime Call didDisconnectPeripheral

Good Morning, this is Pavan, I have doubts in corebluetooth. I am using the bluetooth LE device. i wrote the sample code in Using core bluetooth frameworking in objective c , I got the bluetooth name, UUID, RRSI value. I used central manager,…
0
votes
0 answers

Bluetooth Sharing permission change crash the app

I am developing an app with bluetooth-peripheral capability in Background modes. This makes the app ask for permission for Bluetooth Sharing: If the user initially does not allow the permission and then goes to change it, the app crashes…
entropid
  • 6,130
  • 5
  • 32
  • 45
0
votes
1 answer

Assertion failure in CBPeripheralManager respondToRequest:withResult

When my iOS (peripheral) starts advertising, I instantly re-run my app, at this point, my computer (central) was in middle of subscribing to a characteristic and writing to it. Once my peripheral app finishes launching, something goes wrong…