Board logo

标题: [文件操作] 批处理如何读取打印机中的串口数据? [打印本页]

作者: 司马光2008    时间: 2018-3-4 17:22     标题: 批处理如何读取打印机中的串口数据?

如何把串口数据读取到TXT文件中,我们需要读取打印机中的串口数据
作者: 司马光2008    时间: 2018-3-4 17:23

把外接的设备通过电脑的串口读取数据到本地硬盘中
作者: ivor    时间: 2018-3-4 21:35

plink.exe (a command-line interface to the PuTTY back ends)

https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
Options:
  -V        print version information and exit
  -pgpfp    print PGP key fingerprints and exit
  -v        show verbose messages
  -load sessname  Load settings from saved session
  -ssh -telnet -rlogin -raw -serial
            force use of a particular protocol

  -P port   connect to specified port
  -l user   connect with specified username
  -batch    disable all interactive prompts
  -proxycmd command
            use 'command' as local proxy
  -sercfg configuration-string (e.g. 19200,8,n,1,X)
            Specify the serial configuration (serial only)
The following options only apply to SSH connections:
  -pw passw login with specified password
  -D [listen-IP:]listen-port
            Dynamic SOCKS-based port forwarding
  -L [listen-IP:]listen-port:host:port
            Forward local port to remote address
  -R [listen-IP:]listen-port:host:port
            Forward remote port to local address
  -X -x     enable / disable X11 forwarding
  -A -a     enable / disable agent forwarding
  -t -T     enable / disable pty allocation
  -1 -2     force use of particular protocol version
  -4 -6     force use of IPv4 or IPv6
  -C        enable compression
  -i key    private key file for user authentication
  -noagent  disable use of Pageant
  -agent    enable use of Pageant
  -hostkey aa:bb:cc:...
            manually specify a host key (may be repeated)
  -m file   read remote command(s) from file
  -s        remote command is an SSH subsystem (SSH-2 only)
  -N        don't start a shell/command (SSH-2 only)
  -nc host:port
            open tunnel in place of session (SSH-2 only)
  -sshlog file
  -sshrawlog file
            log protocol details to a file
  -shareexists
            test whether a connection-sharing upstream exists

作者: 司马光2008    时间: 2018-3-4 23:44

你好,谢谢你的回复,我比较笨不明白什么用,请帮忙详细解析
作者: 司马光2008    时间: 2018-3-5 23:01

请高手帮忙解答
作者: 司马光2008    时间: 2018-3-6 22:22

请各位帮忙看看
作者: 司马光2008    时间: 2022-10-19 22:25

各位大佬,请教上面的问题,如何解决。串口读取到的数据记录到指定的D:\data.txt文件中,当有读取到新的串口数据时,自动覆盖D:\data.txt里面的内容,并把D:\data.txt旧的内容移动到D:\databackup.txt中做备份处理




欢迎光临 批处理之家 (http://bbs.bathome.net/) Powered by Discuz! 7.2