简体   繁体   English

在树莓派上的链接

[英]plink on raspberry pi

I am trying to develop a command line program in C++ on windows which uses putty to control a Raspberry Pi. 我正在尝试在Windows上用C ++开发一个命令行程序,该程序使用腻子控制Raspberry Pi。 I have used the Putty application and it works 100% fine. 我已经使用了Putty应用程序,并且可以100%正常工作。 However I have tried to use the plink executable so I can control the program with my C++ program, but I get a random string of characters when I try and connect to the Pi. 但是,我尝试使用plink可执行文件,以便可以用C ++程序控制该程序,但是当我尝试连接到Pi时,会得到随机的字符串。 the console output is as follows 控制台输出如下

C:\Users\user>plink pi@xxx.xxx.xxx.xxx
Using username "pi".
pi@xxx.xxx.xxx.xxx's password:
Linux raspberrypi 3.6.11+ #371 PREEMPT Thu Feb 7 16:31:35 GMT 2013 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue May 21 15:59:02 2013 from xxx.xxx.xxx.xxx
←]0;pi@raspberrypi: ~←[01;32mpi@raspberrypi←[00m ←[01;34m~ $←[00m
←]0;pi@raspberrypi: ~←[01;32mpi@raspberrypi←[00m ←[01;34m~ $←[00m
←]0;pi@raspberrypi: ~←[01;32mpi@raspberrypi←[00m ←[01;34m~ $←[00m

(the last line appears again when i press enter). (当我按Enter键时,最后一行再次出现)。

Any help please? 有什么帮助吗?

That's your shell prompt showing up. 那是您的shell提示出现。 The odd looking characters are control characters your shell uses to produce a color terminal. 外观奇怪的字符是您的外壳用于产生彩色端子的控制字符。

Plink doesn't respect the terminal's settings properly, otherwise those control characters would never get sent. Plink不会正确遵守终端的设置,否则这些控制字符将永远不会发送。 You should be able to save a putty session with the terminal type set to 'dumb' and load those settings with plink using the -load option. 您应该能够保存终端类型设置为“哑”的腻子会话,并使用-load选项通过plink加载这些设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM