Package cc.arduino.packages.ssh

Examples of cc.arduino.packages.ssh.SSH


      session.setUserInfo(new NoInteractionUserInfo(myPassword));
      session.connect(30000);

      scp = new SCP(session);
      SSH ssh = new SSH(session);
      myHighLevelConsoleStream.println("Sending sketch " + hexFile + " to " + myHost);
      scpFiles(scp, hexFile);
      myHighLevelConsoleStream.println("Sketch is now on yun: /tmp/sketch.hex");

      // String additionalParams = verbose ? prefs.get("upload.params.verbose") : prefs.get("upload.params.quiet");
      String additionalParams = "";// Common.getBuildEnvironmentVariable(myProject, myCConf, ArduinoConst. upload.params.quiet, "");

      // not sure why but I need to swap err and out not to get red text
      PrintStream stderr = new PrintStream(myOutconsole);
      PrintStream stdout = new PrintStream(myErrconsole);

      myHighLevelConsoleStream.println("merge-sketch-with-bootloader.lua /tmp/sketch.hex");
      ret = ssh.execSyncCommand("merge-sketch-with-bootloader.lua /tmp/sketch.hex", stdout, stderr);
      myHighLevelConsoleStream.println("kill-bridge");
      ssh.execSyncCommand("kill-bridge", stdout, stderr);
      myHighLevelConsoleStream.println("run-avrdude /tmp/sketch.hex '" + additionalParams + "'");
      ret = ret && ssh.execSyncCommand("run-avrdude /tmp/sketch.hex '" + additionalParams + "'", stdout, stderr);

  } catch (JSchException e) {
      String message = e.getMessage();
      String errormessage = "";
      if ("Auth cancel".equals(message) || "Auth fail".equals(message)) {
View Full Code Here

TOP

Related Classes of cc.arduino.packages.ssh.SSH

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.