     vmlog("VehicleManager connect started")
     centralManager.connectPeripheral(openXCPeripheral, options:nil)
     connectionState = .ConnectionInProgress
-    messageCount = 0
     
   }
   

    if openXCPeripheral == nil {
      
      // only find the right kinds of the BLE devices (C5 VI)
      if peripheral.name==OpenXCConstants.C5_VI_NAME {
        let advName = advertisementData["kCBAdvDataLocalName"] as! String
        // check to see if we already have this one
        // and save the discovered peripheral
        if foundOpenXCPeripherals[advName] == nil {
          vmlog("FOUND:")
          vmlog(peripheral.name)
          vmlog(peripheral.identifier.UUIDString)
          vmlog(advertisementData["kCBAdvDataLocalName"])
          
          foundOpenXCPeripherals[advName] = peripheral
          
          // if we're in auto connect mode, just connect right away
          if autoConnectPeripheral {
            connect()
          }
        }
        
        // notify client if the callback is enabled
        if let act = managerCallback {
          act.performAction(["status":VehicleManagerStatusMessage.C5DETECTED.rawValue] as NSDictionary)
        }
      }
      
    }

    vmlog("VehicleManager connect started")
    centralManager.connectPeripheral(openXCPeripheral, options:nil)
    connectionState = .ConnectionInProgress
    
  }
  
