|
Hermit (Electrical)
18 Oct 02 22:08
Hello, I would like to know how to write a programme to send\receive files over the serial\COM port and which programming language would be most suitable?
As of now, I'm able write a program to send and receive characters through the port using a C++ compiler. However, even after gathering enough info from the help files and websites to get this far, I still couldn't find anything on sending files. = \
Anyhow, I would appreciate any info anyone can offer.
Thanks.
DH.
nbucska (Electrical)
19 Oct 02 16:13
I suggest use the ASCII "0" character to mark the end of file.
i=0; While (b=file[i++] < 0) {send(b); ); i=0; while (b=receive()>0 ) ( data(i++)=b; ); <nbucska@pcperipherals.com>
字串8
Hermit (Electrical)
20 Oct 02 1:54
Right now I'm having a problem reading large files. My program is only reading around 50k of the file. So my question is if theres a method of reading large files into the buffer, or am I just using the wrong commands?
Hermit (Electrical)
20 Oct 02 22:59
Ok, I 'think' I solved my first file problem; however, I still can't tell it where the EOF is located.
I'm sending the file in binary mode, therfore, what can I send in binary over the COM that the other computer can interpret as an EOF command?
Btw, I tried the ASCII '0' suggestion. I'm not sure if I was doing it correctly, but it kept cutting the file short. = \
(Click:)
|