Note that there are some explanatory texts on larger screens.

plurals
  1. POConnect to LightBlue peripheral mode
    text
    copied!<p>I used LightBlue app on an IOS Devices (iPhone 4s, iOS 6.1.3) in peripheral mode and another IOS device (iPhone 4s, iOS 6.1.3) in a central mode.</p> <p>I'm using <a href="http://developer.apple.com/library/ios/#samplecode/BTLE_Transfer/Introduction/Intro.html" rel="nofollow">BTLE Transfer</a> example code from Apple, it's working properly on these two devices. However, It does not work on LightBlue. As I just want to develop a simple app that read data from Blood Pressure Device, I've just changed the following service and characteristic UUID in Transfer.h file</p> <h1>define TRANSFER_SERVICE_UUID @"1810"</h1> <h1>define TRANSFER_CHARACTERISTIC_UUID @"2A49" // just read value</h1> <p>My plan is going to clone a real device structure on LightBlue and then develop a central app to connect with LightBlue peripheral (I think it then will work with real devices because I donot have any real device at the moment). I set a device as a peripheral and the second one will install modified app (from apple sample) as a central or client.</p> <p>The following delegate method provided by Apple:</p> <pre><code>- (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI { // Reject any where the value is above reasonable range if (RSSI.integerValue &gt; -15) { return; } // Reject if the signal strength is too low to be close enough (Close is around -22dB) if (RSSI.integerValue &lt; -35) { return; } NSLog(@"Discovered %@ at %@", peripheral.name, RSSI); // Ok, it's in range - have we already seen it? if (self.discoveredPeripheral != peripheral) { // Save a local copy of the peripheral, so CoreBluetooth doesn't get rid of it self.discoveredPeripheral = peripheral; // And connect NSLog(@"Connecting to peripheral %@", peripheral); [self.centralManager connectPeripheral:peripheral options:nil]; self.connectingPeripheral=peripheral; // this line of code I have added as recommended from a member } } </code></pre> <p>And the problem is, this delegate method have been fired and log panel display "Discovered LightBlue at -32".It likely cannot connect to the Lightblue peripheral as I cannot see the output of the line of code NSLog(@"Connecting to peripheral %@", peripheral);</p> <p>All suggestion are welcome and highly appreciated. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload