I'm trying to send files over a COM port, but failed every time.
First, I configure a serial on each machine like this:
MODE COMx:115200,N,8
where x is the COM port number.
After this I'm trying to do:
COPY file.zip COM1: /B
and the reverse on the receiving PC.
In most cases I've gotten a broken archive. But last tries gave me nothing at all - first PC says that the file was sent, but the second is just waiting for data. Is there somebody who knows how to solve this?
To transmit a data byte, the serial device driver program sends a data to the serial port I/O address. This data gets into a 1-byte "transmit shift register" in the serial port. From this shift register bits are taken from the data one-by-one byte and sent out bit-by-bit on the serial line.
#1) Right-click on the start menu. #2) Select Command Prompt (Admin). #3) Type 'netsh firewall show state; or Netstat -ab. #4) Hit Enter.
Open a console sessionUsing PuTTY or other terminal emulator, select "Serial" as the connection type and change the "Serial line" to match the COM port noted earlier. The serial console speed is typically 9600. Click "Open" to connect to the console.
This works for me to send a binary file to an Arduino :
mode COM21 BAUD=115200 PARITY=n DATA=8
copy yourfile.txt \\.\COM21
Notice the \\.\
which is mandatory for port numbers >= 10, and can be used too for port numbers 1-9.
You need to specify /B for binary file after the .zip file (or whatever else it is) as well as at the end of the command line. e.g. COPY ABinary.File /B COM1 /B
otherwise it will stop at the first non-text ASCII character.
Try using Hyperterminal at the receiving end and Transfer > Capture Text
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With