How to send a file through a serial port at a Windows command prompt

I try to send files via the COM port, but not every time. First, I configure the serial number on each machine as follows:

MODE COMx: 115200, N, 8

where x is the COM port number. After that I try to do taht:

COPY file.zip COM1: / B

and back on pc receiver. In most cases, I have a broken archive. But recent attempts do not give me anything - the first computer says that the file is sent, and the second just waits for data. Is there anyone who knows how to solve this?

+5
source share
2 answers

This works for me to send a binary to Arduino:

mode COM21 BAUD=115200 PARITY=n DATA=8 copy yourfile.txt \\.\COM21 

Pay attention to \\.\ , Which is mandatory for port numbers> = 10, and can also be used for port numbers 1-9.

+6
source

You need to specify / B for the binary after the .zip file (or something else), and also at the end of the command line. for example COPY ABinary.File / B COM1 / B, otherwise it will stop at the first non-text ASCII character.

Try using Hyperterminal on the receiving side and Transfer> Capture Text

0
source

Source: https://habr.com/ru/post/1246518/


All Articles