docs: function markAndAddActiveDevices(bundle) {
          debugSS('in markAndAddActiveDevices');
          debugLFDS('in markAndAddActiveDevices');
          var defered = q.defer();
  
          // self.cachedScanBundle.scannedData
          debugMACT('Checking for any previously marked active devices in the last scan cache');
  
          function isDeviceStillActive(sn) {
              var isActive = false;
              self.cachedCurrentDevices.forEach(function(cachedDevice) {
                  var savedAttributes = cachedDevice.savedAttributes;
                  var serialNumber = savedAttributes.serialNumber;
                  if(sn === serialNumber) {
                      isActive = true;
                  }
              });
              return isActive;
          }
          // We need to un-mark any active devices that are no longer active.
  
          if(self.cachedScanBundle) {
              if(self.cachedScanBundle.scannedData) {
                  // debugMACT('We have previously found scanned data', self.cachedScanBundle.scannedData);
                  debugMACT('We have previously found scanned data');
                  debugPrintFlatScannedData(self.cachedScanBundle.scannedData, debugMACT);
                  var scannedData = self.cachedScanBundle.scannedData;
                  var dKeys = Object.keys(self.cachedScanBundle.scannedData);
                  dKeys.forEach(function(dKey) {
                      var dInfo = scannedData[dKey];
                      var isDeviceActive = dInfo.isActive;
                      var isActuallyActive = isDeviceStillActive(dInfo.serialNumber);
                      debugMACT('SN', dInfo.serialNumber, 'active?',isActuallyActive);
                      // Check to see if the device has the correct active state
                      if(dInfo.isActive != isActuallyActive) {
                          // The device is not actually active...
                          dInfo.isActive = false;
                          // loop through the connection types & fix the active connection.
                          var ctKeys = Object.keys(dInfo.connectionTypes);
                          ctKeys.forEach(function(ctKey) {
                              if(dInfo.connectionTypes[ctKey].isActive) {
                                  dInfo.connectionTypes[ctKey].isActive = false;
                                  dInfo.connectionTypes[ctKey].insertionMethod = 'scan';
                              }
                          });
                      }
                  });
              }
          }
  
          var promises = self.deviceManager.addCuratedDevices(
              self.cachedCurrentDevices
          );
          
          // Wait for all of the curated devices to get added.
          q.allSettled(promises)
          .then(function() {
              defered.resolve(bundle);
          }, function() {
              defered.resolve(bundle);
          });
  
          return defered.promise;
      }