 // MARK: - Custom CBPeripheral subclass registeration
 extension Cusp {
 
-//	public func registerCustomPeripheral(ofClass: class, pattern: String) {
-//
-//	}
+	internal func sessionFor(peripheral: Peripheral?) -> CommunicatingSession? {
+		if peripheral == nil { return nil }
+
+		var tgtSession: CommunicatingSession?
+
+		dispatch_sync(self.sesOpQ) { () -> Void in
+			for session in self.sessions {
+				if session.peripheral == peripheral {
+					tgtSession = session
+					break
+				}
+			}
+		}
+
+		return tgtSession
+	}
+
+	/**
+	retrieve specific Peripheral object that core matches
+
+	- parameter core: CBPeripheral object
+
+	- returns: Peripheral object or nil if not found
+	*/
+	internal func peripheralFor(core: CBPeripheral) -> Peripheral? {
+		for p in discoveredPeripherals {
+			if p.core == core {
+				return p
+			}
+		}
+		return nil
+	}
 }
 
 


	/// disconnect requests set (断开连接请求的集合)
    internal var disconnectRequests                = Set<DisconnectRequest>()

	/// requests of service discovering (发现服务请求的集合)
    internal var serviceDiscoveringRequests        = Set<ServiceDiscoveringRequest>()

	/// requests of characteristic discovering (发现特征请求的集合)
    internal var characteristicDiscoveringRequests = Set<CharacteristicDiscoveringRequest>()

	/// requests of write characteristic value (写值请求的集合)
    internal var writeRequests                     = Set<WriteRequest>()

	/// requests of read characteristic value (读值请求的集合)
    internal var readRequests                      = Set<ReadRequest>()

	/// requests of subscribe characteristic value (订阅请求的集合)
    internal var subscribeRequests                 = Set<SubscribeRequest>()

	/// requests of unsubscribe characteristic value (退订请求的集合)
    internal var unsubscribeRequests               = Set<UnsubscribeRequest>()

	/// requests of RSSI reading (信号强度查询请求的集合)
    internal var RSSIRequests                      = Set<RSSIRequest>()

	// MARK: Peripheral Sets


/// session operation serial queue identifier
private let QIDSesOp = "com.keyang.cusp.sessionOperationQ"

/// Bluetooth Low Energy library in swift
public class Cusp: NSObject {

	/// Singleton
	public class var central: Cusp {
		struct Static {
			static let instance: Cusp = Cusp()
