Need service uuids from advertising data

Ask, and ye shall receive.
jenbeaven
Posts: 7
Joined: 21:37, 16 Nov 2014

Need service uuids from advertising data

Postby jenbeaven » 20:03, 21 May 2015

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?

Fredrik
Site Admin
Posts: 196
Joined: 15:00, 18 Nov 2013

Re: Need service uuids from advertising data

Postby Fredrik » 10:37, 26 May 2015

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.


Return to “Questions and answers”

Who is online

Users browsing this forum: No registered users and 45 guests