 	
 	fileprivate func enterCommandMode() {
 		if !self.commandMode {
+			print("Entering command mode")
 			self.commandMode = true
 			self.sendData(data: Data(HummingbirdPeripheral.ADALE_COMMAND_MODE_TOGGLE.utf8))
-			Thread.sleep(forTimeInterval: 0.1)
+			Thread.sleep(forTimeInterval: 0.5)
 		}
 	}
 	

			if self.resettingName {
				self.resetNameFromMAC()
			}
			if self.initializing {
				self.finishInitialization()
			}
			
			return
		}
		
        if characteristic.value!.count % 5 != 0 {
            return
        }
        objc_sync_enter(self.peripheral)
        (characteristic.value! as NSData).getBytes(&self.last_message_recieved, length: 4)
        objc_sync_exit(self.peripheral)
    }
    
    /**

	var initializing = false
    fileprivate var setTimer: Timer = Timer()
	
	static let ADALE_COMMAND_MODE_TOGGLE = "+++\r\n"
	static let ADALE_GET_MAC = "AT+BLEGETADDR\n"
	static let ADALE_SET_NAME = "AT+GAPDEVNAME="
	static let ADALE_RESET = "ATZ\n"
	static let NAME_PREFIX = "HB"
	var macStr: String? = nil
	let macReplyLen = 17
