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
1
vote
0 answers

IOS Bluetooth(BLE) CBPeripheralManager service broadcasting

How to embed two services in CBPeripheralManager and broadcast. service1 - Info(Read characteristic), Key (Write Characteristic) service2 - Data(modified based on Key received in service1) My app design is like first service will have basic info…
nik
  • 2,289
  • 6
  • 37
  • 60
1
vote
1 answer

How to write command on CBPeripheral device?

I have a BLE device which has two modules 1-Blue Tooth (BlueCreation BC127A) 2-MicroController attached which has some set of commands, Like LOGIN RESET VERSION etc. I want to write commands to that BLE which communicate with uC. Following my…
1
vote
1 answer

CBCentralManager not calling didDiscoverPeripheral method when iPhone is locked

I am working on an app that scans for a specific peripheral, ones peripheral is found it should send the small amount of data. App works in the foreground and also in background. I have also add this code in the plist UIBackgroundModes …
Paragon
  • 982
  • 2
  • 10
  • 37
1
vote
0 answers

How to reset CBPeripheralManager of CoreBluetooth in Swift?

I am writing an app in swift using CoreBluetooth, and I'm looking for a way to reset CBPeripheralManager to the same state it's in when the app first starts up.
1
vote
2 answers

why isn't the CBPeripheralManagerDelegate method calling?

why isn't the CBPeripheralManagerDelegate method callinga although i have initialized the class as var bluetoothManager = CBPeripheralManager(delegate: self, queue: nil, options: nil) and already added BlueTooth Framework in my Bundle. import…
user4790024
1
vote
1 answer

How to send RGB signal to BLE device using iPhone application?

We are working on iOS application and in which we need to pass the RGB signal to the BLE device and based on RGB code the device LED will glow. We are doing the connection using CBCentralManager for the CBPeripheral object of Bluetooth Framework in…
1
vote
1 answer

Error received from peripheral:didUpdateNotificationStateForCharacteristic

I have developed a Bluetooth Low Energy peripheral app that successfully connects with a second BLE central app. However, I am unable to get the central app to subscribe to notifications for one of the characteristics of the service offered by the…
1
vote
0 answers

Advertising multiple independent BLE Services using CBPeripheralManager

I have two methods, each which adds a service to the peripheral manager. When I get the didAddService callback I use the [manager startAdvertisingServices:] method with the services that have been added (so the array used as the value for the…
JuJoDi
  • 14,627
  • 23
  • 80
  • 126
0
votes
0 answers

Bluetooth disconnection issue with PicoX 1 device:Error Domain=CBErrorDomain Code=0 "Unknown error." UserInfo={NSLocalizedDescription=Unknown error

I'm encountering a recurring disconnection issue when trying to connect to a PicoX 1 device using CoreBluetooth in iOS Swift. The disconnection occurs automatically in every 5-6 second with the following error message: Error Domain=CBErrorDomain…
0
votes
0 answers

CoreBluetooth: Battery Service's Battery Level always iPhone's Level. Is it Possible to Change?

I am creating an app that is intended for QC/engineering tests to emulate an embedded system that has a battery. I am trying to make it so that my team and myself can change the battery level to an arbitrary value for testing with a UISlider or…
0
votes
1 answer

CoreBluetooth peripheral response to write request

I have the following code in the peripheral manager delegate func peripheralManager(_ peripheral: CBPeripheralManager, didReceiveWrite requests: [CBATTRequest]) { print ("received write request") for request in requests { if…
greenhorn
  • 1,097
  • 6
  • 10
0
votes
1 answer

Can any one help me to solve this error in iOS 13.5.1 devices for using CoreBluetooth for ble transmission

================================================================= Native Crash Reporting Got a abrt while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your…
0
votes
0 answers

Check existing services in local GATT Profile

I’m developing an iOS app as a ‘Peripheral’, where services are added to ‘PeripheralManager’. Is there a way to check what services exists at a later time? Use case: let’s say I’m about to start advertising and want to make sure my ‘CustomService’…
0
votes
1 answer

Is there a way to know if the advertising device is an android or ios?

My iPhone device is advertising as a peripheral and there is a separate central that reads advertising data based on uuid. I think i cannot advertise both service uuid and manufacture data at the same time on iOS. So is there any way that the…
0
votes
1 answer

How to get notify when advertisementData changed when app is in background?

I want to get notified when something happened at the BLE device. If BLE device passes some data/Command to the app, then in-app the advertisementData not changed. But the same thing we can do with android it's working perfectly. I want to implement…
Vikas
  • 1,548
  • 2
  • 12
  • 25