lib/ble/data/gap/servicedata.js
function process(data) {
  var uuid = data.substr(2,2) + data.substr(0,2);

  // NOTE: this is for legacy compatibility
  var advertiserData = {
    serviceData: {
      uuid: uuid,
      data: data.substr(4)
    }
  };

  gattservices.process(advertiserData);

  return advertiserData.serviceData;
}
function process(data) {
  var uuid = data.substr(2,2) + data.substr(0,2);

  // NOTE: this is for legacy compatibility
  var advertiserData = {
    serviceData: {
      uuid: uuid,
      data: data.substr(4)
    }
  };

  gattservices.process(advertiserData);

  return advertiserData.serviceData;
}
function process ( data ) { var uuid = data . substr ( 2 , 2 ) + data . substr ( 0 , 2 ) ; // NOTE: this is for legacy compatibility var advertiserData = { serviceData : { uuid : uuid , data : data . substr ( 4 ) } } ; gattservices . process ( advertiserData ) ; return advertiserData . serviceData ; }
Parse BLE advertiser service data.
@param {string} data The raw service data as a hexadecimal-string.
Parse BLE advertiser service data .