Page 1 of 1

Need service uuids from advertising data

Posted: 20:03, 21 May 2015
by jenbeaven
AFAICT, on iOS the advertising data is never passed through.
From EVOBLE.m:

Code: Select all

/**
 * From interface CBCentralManagerDelegate.
 * Called when a device is discovered.
 */
- (void) centralManager: (CBCentralManager *)central
   didDiscoverPeripheral: (CBPeripheral *)peripheral
   advertisementData: (NSDictionary *)advertisementData
   RSSI: (NSNumber *)RSSI

{
   [self
      sendScanInfoForPeriperhal: peripheral
      RSSI: RSSI];
}

Later:

Code: Select all

- (void) sendScanInfoForPeriperhal: (CBPeripheral *)peripheral
   RSSI: (NSNumber *)RSSI
{
   // Create an info object.
   // The UUID is used as the address of the device (the 6-byte BLE address
   // does not seem to be directly available on iOS).
   NSDictionary* info = @{
      @"address" : [peripheral.identifier UUIDString],
      @"rssi" : RSSI,
      @"name" : (peripheral.name != nil) ? peripheral.name : [NSNull null],
      @"scanRecord" : @""
   };

   // Send back data to JS.
   if (self.scanCallbackId)
   {
      [self
         sendDictionary: info
         forCallback: self.scanCallbackId
         keepCallback: YES];
   }
}


So the services filter in easyble, which is exactly what I'm looking for, never gets any advert info besides the name and RSSI. Am I missing something? Is this only intended for Android?

Re: Need service uuids from advertising data

Posted: 10:37, 26 May 2015
by Fredrik
You have an old version of the BLE plugin. The current version supplies advertisementData. Please update your Evothings Client.

The services filter in easyble is meant for platforms (such as Android) that supply the raw scanRecord, and not (like iOS) the already-parsed advertisementData.