core-bluetooth

CoreBluetooth - Can connectPeripheral be called multiple times

為{幸葍}努か 提交于 2020-01-04 02:05:46
问题 Can an application attempt to connect to multiple devices at once? When an app calls 'connectPeripheral', it will attempt to connect for an unspecified amount of time since there is no time-out. However, if 'connectPeripheral' is called a second time, does it cancel out the previous call, or will the app attempt to make two separate connections at once? 回答1: In my testing I've seen if you call it multiple times prior to being connected, it will take longer to actually connect (and often

How can I receive simple integer values over bluetooth in ios

回眸只為那壹抹淺笑 提交于 2020-01-03 05:48:45
问题 I am trying to learn how to get some sensors plugged into an Arduino board to talk to an iPhone over Bluetooth with a Red Bear Labs mini board but have hit a brick wall. The sensors get a reading and this is sent to the phone over BLE. So far I've connected to the device and I get back what appears to be data but I can't make sense of it. I've written a little sketch that looks like this, to simulate the sensor data. #include <SoftwareSerial.h> SoftwareSerial bluetooth(5, 6); void setup() {

How to advertise manufacturer specific data using bluetooth low energy protocol in Xamarin iOS?

六眼飞鱼酱① 提交于 2020-01-03 05:36:05
问题 I need to broadcast advertisement packets which contain certain manufacturer specific data using Bluetooth low energy protocol in Xamarin iOS. I am able to broadcast advertising packets, but when they are received they contain no manufacturer specific data. They do contain local name and data service UUID key which I'm setting. I should mention doing this in Xamarin Android is not a problem. Could you please tell me why manufacturer specific data is not being broadcast in Xamarin iOS? I am

How to display the supported services of Bluetooth in tableview from devicename(UITableViewCell)?

▼魔方 西西 提交于 2020-01-02 19:26:52
问题 I'm developing Bluetooth app.I have a name of available Bluetooth device in Table View..If press a device means i want to know all the supported services UUID name in another view controller with Table view.Give me an Idea. 1)Peripheralmanager (NSObject) 2)FirstViewController (In this I have a Device Name) 3)SecondViewController (In this I want Supported Services) Peripheralmanager.m - (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral

Removing PIN in Core Bluetooth Connection

守給你的承諾、 提交于 2020-01-01 20:00:54
问题 I'm working on an application that connects phones via core bluetooth (BLE). The connection and data transmission work beautifully, but there is one small imperfection. When connecting to a new device, a pin must be entered on one of the devices. The application is supposed to be very instantaneous, and the pin-input greatly interrupts this process. I'm not worried about security, and I've personally connected my phone to many bluetooth devices without entering pins, so I was just wondering

iOS BLE - How to keep app active in the background?

怎甘沉沦 提交于 2020-01-01 19:15:18
问题 I am trying to find a clever way to keep a BLE app active in the background on iOS 6, without breaking any of Apple's rules. I plan to use the phone as a peripheral device and another BLE circuit as the central. My app will automatically be opened when a user arrives to a building using geofencing. After that the iPhone will connect to the first BLE central device it sees (the device will be in its white list). The user will then be able to move throughout the building switching to different

i schedule a Timer to read RSSI using readRSSI function ,but the timer stops when my app go into background

旧城冷巷雨未停 提交于 2020-01-01 18:12:34
问题 I schedule a Timer to read RSSI using readRSSI function ,but the timer stops when my app go into background. Maybe there is a good method to get RSSI value from peripheral's notification when app comes into background . But I don't know how to do. Could anybody help me? Anyone has a better method? 回答1: I have got the same problem, and I have two idea. 1. First, you should have some service that got corebluetooth delegate periodly. F or my example, I have a battery service that I can got

CoreBluetooth Central --> Peripheral

倾然丶 夕夏残阳落幕 提交于 2020-01-01 16:49:53
问题 I'm quite new to bluetooth communication. My first project intends to transfer data from an iOS device to a BLEshield (small chip). To test my central code, I decided to setup an iPhone as peripheral (the role the chip will have, once I got it) and an iPad as Central. I can connect the devices and also send data from the peripheral to the central. It's quite easy though: - (void)startService { _readChar = [[CBMutableCharacteristic alloc] initWithType:[CBUUID ...] properties

Core Bluetooth doesn't find peripherals when scanning for specific CBUUID

半世苍凉 提交于 2020-01-01 09:38:05
问题 It seems this question was "answered" here, but without any code to show what they did differently I'm having to ask a new question. I have my own code with the same behaviour, where scanning for specific CBUUIDs using Core Bluetooth's CBCentralManager on OS X doesn't discover an iOS device acting as a peripheral with CBPeripheralManager (unless it and its services have previously been discovered). To see if it's something wrong in my code, I downloaded Apple's sample code. Running the sample

iOS8 and BTLE | CBCentralManager unable to find peripherals

南笙酒味 提交于 2020-01-01 09:05:08
问题 I have an iOS app that is connecting to a device (arduino) using a BTLE. Everything is working fine on my iPad iOS 7. After upgrading to iOS 8, the CBCentralManager is not finding any peripherals. - (void)startScanningForSupportedUUIDs { [self.centralManager scanForPeripheralsWithServices:nil options:nil]; } I don't know what can be the problem. 回答1: I have the solution, for some reason in iOS 8 there is some delay after instantiate your CBManager. You need to start to scan when the