       let otherAction = UIAlertAction(title: "Disconnect", style: .Default) {
         action in
           NSLog("[Konashi] Disconnect \(Konashi.peripheralName())")
+          self.manualDisconnection = true
           // LED2を消灯
           Konashi.digitalWrite(KonashiDigitalIOPin.DigitalIO1, value: KonashiLevel.Low)
           // 接続解除

    
    if let default_konashi = _default["konashi"] as? String {
      NSLog("[Konashi] Auto connecting to \(default_konashi) (default) ...")
      
      if findKonashiWithName(default_konashi) == KonashiResult.Failure {
        
        NSLog("[Konashi] Konashi.findWithName failed...")
        // UserDefaultsから前回接続したKonashiを読み、接続を試みる
        if let previously_connected_konashi = UD.stringForKey(UD_KEY_KONASHI) {
          NSLog("[Konashi] Auto connecting to \(previously_connected_konashi) (previus connection) ...")
          if Konashi.findWithName(previously_connected_konashi) == KonashiResult.Success {
            NSLog("[Konashi] Konashi.findWithName success")
          }
          else {
            NSLog("[Konashi] Konashi.findWithName failed...")
          }
        }
      }
    }
  }
  

    }
    Konashi.shared().disconnectedHandler = {
      NSLog("[Konashi] Disonnected")
      
      // button
      self.konashiBtn.setTitle(self.konashiBtnDefaultLabel, forState: UIControlState.Normal)
      
      // 勝手に切断された場合にリトライする
      if self.manualDisconnection != true {
        // UserDefaultsから前回接続したKonashiを読み、接続を試みる
        if let previously_connected_konashi = self.UD.stringForKey(self.UD_KEY_KONASHI) {
          NSLog("[Konashi] Retry connecting to \(previously_connected_konashi) (previus connection) ...")
          self.findKonashiWithName(previously_connected_konashi)
        }
        self.manualDisconnection = false
      }
    }
    Konashi.shared().readyHandler = {
      NSLog("[Konashi] Ready...")
